Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
game/char_battle.cpp
Arama
Kod:
void CHARACTER::RewardGold(LPCHARACTER pkAttacker)
Kod:
bool isAutoLoot = (pkAttacker->GetPremiumRemainSeconds(PREMIUM_AUTOLOOT) > 0 || pkAttacker->IsEquipUniqueGroup(UNIQUE_GROUP_AUTOLOOT))
ile değiştir
Kod:
bool isAutoLoot = (pkAttacker->GetPremiumRemainSeconds(PREMIUM_AUTOLOOT) > 0 || pkAttacker->IsEquipUniqueGroup(UNIQUE_GROUP_AUTOLOOT) || pkAttacker->IsEquipUniqueItem(UNIQUE_ITEM_AUTOLOOT_GOLD))
unique_item.h
Kod:
UNIQUE_ITEM_AUTOLOOT_GOLD = 71010, // 제3의 손
Metin2 Özel Sunucularda Gold Karşılığı Third Hand Eşyası Aktif Etme Rehberi
Metin2 özel sunucularında oyun deneyimini artırmak için birçok geliştirici, oyunculara farklı yollarla ödüller sunar. Bunlardan birisi de gold (altın) karşılığı eşya alım satımıdır. Bu sistemlerden biri olan Third Hand (Üçüncü El) eşyası, oyuncuların iki elini kullanarak silah tutarken bile üçüncü bir eşyayı kullanabilmesini sağlar. Bu eşyanın sunucuda kullanılabilir hale getirilmesi için yapılabilecek bazı ayarlar vardır.
Third Hand Nedir?
Third Hand, Metin2'de karakterin ana ve ikincil silah dışında bir yardımcı eşya kullanmasına izin veren bir özelliktir. Genellikle töre, defans veya özel güç sağlayan aksesuarlar bu slotu doldurur. Ancak bu özelliğin aktif olması için hem client (istemci) tarafında hem de server (sunucu) tarafında belirli değişiklikler yapılması gerekir.
Sunucu Tarafında Third Hand Sistemi Nasıl Kurulur?
Öncelikle server files (sunucu dosyaları) üzerinde çalışmanız gerekir. Eğer bir C++ tabanlı Metin2 server src kullanıyorsanız, game core kısmında eşya tanımı ve slot kontrol mekanizmalarında değişiklik yapmalısınız. Özellikle char_item.cpp, item_manager.cpp gibi dosyalarda eşya slotlarını yöneten fonksiyonları incelemek gerekir.
Ayrıca, db_core üzerinden veritabanına eşya ID'si olarak Third Hand tipinde yeni bir item tanımlamalısınız. Bu item item_proto dosyasında doğru sınıflandırılmış olmalıdır. Örneğin, type = ARMOR ve subtype = ARMOR_EAR gibi değerlerle tanımlanabilir, ancak bu değerler projeye göre değişebilir.
Client Tarafında Third Hand Görsel Entegrasyonu
Sunucu tarafında eşya aktif hale geldikten sonra, client tarafında bu eşyanın doğru görüntülenmesi gerekir. Bu işlem genellikle uiscript ve root klasörlerindeki arayüz dosyalarında yapılır. Python GUI (PyGUI) tabanlı sistemlerde inventorywindow.py dosyası üzerinde değişikliklerle üçüncü el slotunun görünmesi sağlanabilir.
Ayrıca, Martysama gibi Metin2 geliştirme araçları yardımıyla bu tür modifikasyonlar daha kolay yapılabilir. Third Hand slotunun görünmesi için UI üzerinde bir slot eklenmeli ve bu slotun hangi item tipleriyle etkileşime gireceği belirlenmelidir.
Gold Karşılığı Satış Sistemi
Oyuncuların bu eşyayı satın alabilmesi için bir market veya npc sistemi kurulabilir. Bu sistemde, Third Hand item’ı belirli bir gold miktarı karşılığı satılabilir. Bu işlem için python tarafında bir system yazılması önerilir. Örneğin, bir NPC’ye tıklanınca menüde Third Hand item’ı gösterilip, tıklanınca karakterin gold miktarı kontrol edilir ve yeterli ise eşya verilir.
Bu tür sistemlerde py_root içindeki exchange veya shop sınıfları örnek alınabilir. Ayrıca, sunucu tarafında pack dosyalarına bu itemin doğru şekilde dahil edildiğinden emin olunmalıdır.
Sonuç
Metin2 özel sunucularında Third Hand eşyasının gold karşılığı aktif edilmesi, oyuncu deneyimini artırır ve sunucu popülerliğini destekler. Hem server hem de client tarafında yapılan küçük değişikliklerle bu özellik aktif hale getirilebilir. Bu işlem sırasında C++ ve Python bilgileriniz oldukça faydalı olacaktır.
How to Enable Third Hand Item for Gold on Metin2 Private Servers
To enhance the gaming experience on Metin2 private servers, many developers offer rewards to players through various methods. One of these methods is buying and selling items in exchange for gold. The Third Hand item system is one such feature that allows players to use an additional item while wielding weapons in both hands. Certain configurations are required to make this item available on your server.
What is Third Hand?
The Third Hand in Metin2 allows a character to use an accessory alongside their main and secondary weapons. These items usually provide lore, defense, or special power. However, enabling this feature requires modifications on both the client side and the server side.
How to Install Third Hand System on Server Side?
Firstly, you need to work on server files. If you're using a C++-based Metin2 server src, you'll need to modify functions related to item definitions and slot management within the game core. Specifically, files like char_item.cpp and item_manager.cpp must be adjusted to handle third-hand slots.
Additionally, you should define a new item with the correct type in the database via db_core. This item must be correctly classified in the item_proto file, for example, as type = ARMOR and subtype = ARMOR_EAR, though these values can vary based on your project.
Visual Integration of Third Hand on Client Side
After the item becomes active on the server, it must be visually represented on the client. This is typically done in UI-related files located in the uiscript and root folders. In Python GUI-based systems, modifying inventorywindow.py allows the third hand slot to appear.
Tools like Martysama can simplify such modifications. A slot must be added in the UI to represent the third hand, and its interaction with specific item types should be defined.
Gold-Based Sale System
To allow players to purchase this item, a market or NPC system can be implemented. For instance, the Third Hand item could be sold for a certain amount of gold. Such systems require writing a system in python where clicking on an NPC shows the Third Hand item in a menu. Upon clicking, the player's gold balance is checked, and if sufficient, the item is given to the player.
In such systems, classes like exchange or shop found in py_root can serve as examples. Additionally, ensure that the item is properly included in pack files on the server side.
Conclusion
Enabling the Third Hand item for gold on Metin2 private servers enhances player engagement and supports server popularity. With small modifications on both server and client sides, this feature can be enabled. Having knowledge of C++ and Python during this process will prove highly beneficial.
