Bağırma item adeti gösterme

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 70

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Merhaba arkadaşlar bugün satıştaki bi filesta gördüm dünyada tek sistemiymiş ismi kodlayıp paylaşayım dedim kullanacaklara hayırlı olsun :)

N1vdAQ.png


Kanıt:
kWNaBy.png


VMq4Pq.jpg


Client/UserInterface/pythonplayermodule.cpp

Aç arat

if (isAttr)

Değiştir



Metin2'de Bağırma Item Adeti Gösterme Sistemi

Metin2 özel sunucularında kullanıcı deneyimini artırmak isteyen geliştiriciler için önemli sistemlerden biri de 'Bağırma Item Adeti Gösterme' özelliğidir. Bu sistem sayesinde oyuncular bağırma (shout) komutu ile mesaj gönderdiğinde, item adı gibi bilgiler doğrudan mesajla birlikte ekrana yansıtılır. Bu yazıda, Metin2Lobby tarzı sunucularda bu sistemin nasıl geliştirileceğini ve hangi dosyaların düzenleneceğini detaylıca ele alacağız.

Neden Bağırma Item Adeti Gösterme Gereklidir?
Metin2 oyununda oyuncular genellikle bağırma sistemini eşya satışları, PvP duyuruları veya diğer oyuncularla iletişim kurmak için kullanırlar. Ancak standart sistemde, bağırma sırasında item adı ya da miktarı gibi bilgiler otomatik olarak görüntülenmez. Bu durumda oyuncular bağırma mesajına manuel olarak bu bilgileri yazmak zorundadır. Bu da hem zaman kaybına neden olur hem de hatalı veya eksik bilgi girilmesine sebep olabilir. Bu sistemi eklemek, hem kullanıcı dostu bir arayüz sağlar hem de sunucu içi etkileşimi artırır.

Sistem Nasıl Çalışır?
Sistem temel olarak oyuncunun elindeki itemi bağırma sırasında algılayıp, item adını ve miktarını otomatik olarak mesaja ekler. Bu işlem için hem client tarafında hem de game server tarafında değişiklik yapılması gerekir. Client tarafında bağırma penceresi genişletilir ve item seçimi yapılabilecek bir buton veya slot alanı eklenir. Game server tarafında ise bu bilgiler doğrulanır ve mesajla birlikte diğer oyunculara gönderilir.

C++ ile Geliştirme[/PYTHON]
Metin2 özel sunucularında bu sistemi C++ dilinde geliştirmek için game_src projesi üzerinde çalışmak gerekir. Özellikle input_main.cpp ve char_item.cpp dosyalarında gerekli değişiklikler yapılmalıdır. Oyuncunun bağırma komutunu kullandığında item bilgisi de alınarak mesajla birlikte broadcast edilir. Bu işlemde item ID, adı ve miktarı gibi veriler işlenir.

Python GUI Entegrasyonu
Client tarafında bağırma penceresine item seçimi eklemek için Python GUI sistemleri kullanılabilir. Özellikle uiscript tabanlı arayüzlerde py_root dosyaları üzerinde değişiklik yapılarak, bağırma ekranına bir inventory slotu entegre edilebilir. Bu sayede oyuncu, bağırma yaparken doğrudan bir item seçebilir ve bu item bilgisi mesaja otomatik olarak eklenir.

Database Entegrasyonu
Item bilgilerinin doğru şekilde alınabilmesi için DB tarafında da bazı kontroller yapılmalıdır. Özellikle item_adet_bagirma gibi bir alan eklenerek, bu özellik için özel veriler saklanabilir. Auth ve game sunucuları arasında senkronizasyon sağlanmalıdır ki item bilgileri eksiksiz şekilde aktarılsın.

Güvenlik ve Hile Önleme
Bu tür sistemlerde en önemli konulardan biri güvenlik ve hile engellemedir. Oyuncuların sahte item adı veya miktarı göndermesini önlemek için, tüm işlemler server-side kontrol edilmelidir. Gerekirse özel checksum veya hash kontrolleriyle veri bütünlüğü sağlanmalıdır.

Sonuç
Bağırma esnasında item adeti gösterme sistemi, Metin2 özel sunucularında kullanıcı deneyimini ciddi anlamda artıran bir özelliktir. Hem C++ hem de Python tarafında geliştirme gerektiren bu sistem, doğru şekilde uygulandığında hem oyuncuların işini kolaylaştırır hem de sunucu içi etkileşimi artırır. Metin2Lobby gibi platformlarda bu tip gelişmiş sistemler sunucu kalitesini yükseltmektedir.


Displaying Item Count in Shout Messages on Metin2

An important system for developers looking to enhance user experience on Metin2 private servers is the 'Displaying Item Count in Shout Messages' feature. With this system, when players send a shout message, the item name and its quantity are automatically displayed along with the message. In this article, we will detail how to develop this system and which files need to be modified for servers similar to Metin2Lobby.

Why Is Displaying Item Count in Shouts Necessary?
In Metin2, players often use the shout command for selling items, PvP announcements, or communicating with other players. However, in the standard system, details like item name or quantity are not automatically shown during shouts. This forces players to manually type such information into their shout messages, leading to potential errors or incomplete data. Adding this system provides a more user-friendly interface and increases interaction within the server.

How Does the System Work?
The system essentially detects an item held by the player during a shout command and automatically appends the item's name and quantity to the message. This requires modifications on both the client and the game server. On the client side, the shout window is extended with a button or slot area for selecting an item. On the server side, this information is validated and broadcasted to other players along with the message.

Development in C++
To implement this system in C++ for Metin2 private servers, you must work within the game_src project. Key files such as input_main.cpp and char_item.cpp require modifications. When a player uses the shout command, the item data is retrieved and broadcasted alongside the message. Item ID, name, and quantity are processed in this step.

Python GUI Integration
To add item selection to the shout window on the client side, Python GUI systems can be used. Particularly in UIs based on uiscript, modifications to py_root files allow for the integration of an inventory slot into the shout screen. This enables the player to select an item directly while shouting, and the item information is automatically added to the message.

Database Integration
To ensure accurate retrieval of item data, certain checks must be performed on the database side. For example, a field like item_adet_bagirma could be added to store special data related to this feature. Synchronization between auth and game servers must also be maintained so that item information is transmitted completely.

Security and Anti-Cheat Measures
One of the most critical aspects of such systems is security and preventing cheating. To prevent players from sending fake item names or quantities, all operations should be validated server-side. If necessary, custom checksum or hash checks can ensure data integrity.

Conclusion
Displaying item count during shouts is a feature that significantly enhances user experience on Metin2 private servers. Requiring development in both C++ and Python, this system eases the workload for players and increases in-server interactions when implemented correctly. Such advanced features elevate server quality on platforms like Metin2Lobby.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt