Neler yeni

Foruma hoş geldin, Ziyaretçi

Metin2Lobby.com Metin2 Private Server Tanıtım Advertising Ve Geliştirme Forumudur.Metin2 pvp serverler,1-99,1-105,1-120,55-120 global serverları paylaş yada ara.
Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

[C++/Py] ItemShop Nesne Market

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Konular
48,285
Mesajlar
48,595
Tepkime puanı
75
M2 Yaşı
3 yıl 11 ay 10 gün
Trophy Puan
48
Konum
Web sitesi
M2 Yang
488,819
Ticaret : 1 / 0 / 0
Ticaret Oranı : 100%
Yabancı bir forumdan gördüm ve faydası olur diye burada paylaşmak istedim. ALINTIDIR.



1766934145980-png.162854

1766934160287-png.162855

1766934171992-png.162856

1766934197947-png.162857

1766934219955-png.162858

Metin2 Özel Sunucularında Gelişmiş ItemShop Sistemi Oluşturma Rehberi

Giriş

Metin2 özel sunucu geliştirme dünyasında kullanıcı deneyimini artırmak ve oyun içi ekonomiyi desteklemek adına ItemShop (Nesne Market) sistemi hayati bir öneme sahiptir. Bu sistem sayesinde oyuncular, oyun içi para veya gerçek para karşılığı çeşitli itemler satın alabilirler. Bu rehberde, hem C++ hem de Python tabanlı geliştirme araçları kullanılarak nasıl profesyonel bir ItemShop sistemi yapılandırılabileceğini detaylı olarak inceleyeceğiz.

ItemShop Nedir?

ItemShop, oyuncuların belirli itemleri satın alabileceği, satıcıdan satın alma işlemi gerçekleştirebildiği bir menüdür. Bu menü genellikle Python tarafında bir UI (User Interface) olarak tasarlanır. Oyun içi menüye entegre edilir ve sunucu tarafında (C++) bu menüden gelen istekler kontrol edilir. Satın alma işlemi güvenli bir şekilde gerçekleştirilir, item oyuncuya verilir ve gerekli para kesimi yapılır.

C++ Tarafında Geliştirme

Sunucu tarafında ItemShop sistemi için öncelikle game core üzerinde değişiklikler yapılması gerekir. Bu süreçte packet tanımlamaları yapılmalı ve satın alma isteği sunucuya iletilmelidir. Örneğin, oyuncu bir item satın almak istediğinde, Python menüsü bir packet gönderir. Bu paket game server tarafından karşılanır, item ID'si doğrulanır, fiyat kontrolü yapılır ve gerekli işlemler başlatılır.

Ayrıca, item listesi genellikle db core üzerinden veritabanına kaydedilir. Her item için fiyat, adet, sınırlama gibi bilgiler veritabanında tutulur. Oyuncunun bakiyesi kontrol edilir ve işlem ona göre devam ettirilir. Eğer yeterli bakiye yoksa, işlem iptal edilir ve oyuncuya bir hata mesajı gönderilir.

Python Tarafında Menü Tasarımı

Py GUI kullanılarak ItemShop menüsü oluşturulabilir. UIScript yardımıyla arayüz tasarımı yapılır. Menüde item listesi, fiyatlar, resimler ve satın alma butonları yer almalıdır. Py Root dosyası üzerinden menüye tıklama işlemleri yönlendirilir ve C++ tarafına doğru paket gönderilir.

Menüde item listeleme işlemi genellikle bir JSON benzeri yapıyla yapılır. Bu yapıda item ID, adı, fiyatı, ikonu gibi bilgiler bulunur. Bu liste sunucudan alınarak menüde gösterilir. Oyuncu bir item seçip satın almak istediğinde, Python scripti gerekli verileri paketleyip sunucuya gönderir.

Sistem Güvenliği

ItemShop sisteminde güvenlik çok önemlidir. Hatalı veya kötü niyetli paketler sunucuda büyük sorunlara yol açabilir. Bu nedenle packet doğrulama işlemleri mutlaka yapılmalıdır. Paketin kimden geldiğinin kontrolü, item ID'sinin geçerli olup olmadığı, fiyatın doğru girilip girilmediği gibi kontroller yapılmalıdır.

Ayrıca, her item için satın alma limiti konulabilir. Bu sayede bot kullanımı engellenir ve sunucu ekonomisi korunur. Limitler db core üzerinden kontrol edilir ve gerekirse işlem reddedilir.

Özet

ItemShop sistemi, Metin2 özel sunucularında kullanıcı memnuniyetini artıran ve oyun içi ekonomiyi aktif tutan önemli bir özelliktir. Hem C++ hem de Python tarafında dikkatli ve güvenli kodlama ile geliştirilmelidir. Martysama gibi deneyimli geliştiricilerin örneklerinden yola çıkarak bu sistemi kendi sunucunuza entegre edebilirsiniz. Game Core, DB Core, Pack ve Client SRC gibi kaynaklar bu geliştirme sürecinde yardımcı olacaktır.


Creating an Advanced ItemShop System for Metin2 Private Servers

Introduction

In the world of Metin2 private server development, the ItemShop system plays a crucial role in enhancing user experience and supporting in-game economy. This system allows players to purchase various items in exchange for in-game currency or real money. In this guide, we will thoroughly examine how to build a professional ItemShop system using both C++ and Python development tools.

What is ItemShop?

ItemShop is a menu where players can buy certain items by purchasing them from a vendor. This menu is usually designed as a UI (User Interface) using Python. It is integrated into the in-game menu, and requests from this menu are checked on the server side (C++). The purchase process is carried out securely, the item is given to the player, and the necessary monetary deduction is made.

Development on C++ Side

To implement the ItemShop system on the server side, modifications on the game core must be done first. During this process, packet definitions should be created, and purchase requests must be transmitted to the server. For example, when a player wants to buy an item, the Python menu sends a packet. This packet is received by the game server, the item ID is validated, price checks are performed, and required actions are initiated.

Additionally, the item list is typically stored in the database via the db core. Information such as price, quantity, and limits are kept in the database for each item. The player's balance is checked, and the transaction proceeds accordingly. If there isn't enough balance, the transaction is canceled and an error message is sent to the player.

Menu Design with Python

The ItemShop menu can be created using Py GUI. Interface design is done with UIScript. The menu should include item lists, prices, images, and purchase buttons. Click events are directed through the Py Root file, and the correct packets are sent to the C++ side.

Listing items in the menu is generally done in a JSON-like structure. In this structure, details like item ID, name, price, and icon are included. This list is retrieved from the server and displayed in the menu. When a player selects an item and wishes to purchase it, the Python script packages the necessary data and sends it to the server.

System Security

Security is highly important in the ItemShop system. Malicious or incorrect packets can cause significant issues on the server. Therefore, packet validation processes must be implemented. Checks must be performed to verify who sent the packet, whether the item ID is valid, and whether the price was entered correctly.

Moreover, purchase limits can be set for each item. This prevents bot usage and preserves the server economy. These limits are checked via the db core, and if needed, the transaction is rejected.

Summary

The ItemShop system is an essential feature that increases user satisfaction and maintains the in-game economy in Metin2 private servers. It should be developed carefully and securely on both C++ and Python sides. By following examples from experienced developers like Martysama, you can integrate this system into your own server. Resources like Game Core, DB Core, Pack, and Client SRC will assist during the development process.
 

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kaydol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Üye ol
Giriş Yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş Yap

Tema düzenleyici

Tema özelletirmeleri