Merhaba arkadaşlar uzatma dan her zaman ki ben diyeyim
İstediğiniz zırha bu düzenlemeyle efekt verebileceksiniz
1. UserInterface klasöründe bulunan InstanceBase.cpp dosyasını açın. Ve aşağıdaki kodu bulun:
Kod:
case CItemData::ITEM_TYPE_ARMOR: __ClearArmorRefineEffect(); // °©¿Ê Æ¯È ÀÌÆåÆ® if (pItem->GetSubType() == CItemData::ARMOR_BODY) { DWORD vnum = pItem->GetIndex(); if (12010 <= vnum && vnum <= 12049) { __AttachEffect(EFFECT_REFINED+EFFECT_BODYARMOR_SPECIAL); __AttachEffect(EFFECT_REFINED+EFFECT_BODYARMOR_SPECIAL2); } } if (refine < 7) //ÇöÀç Á¦·Ãµµ 7 ÀÌ»ó¸¸ ÀÌÆåÆ®°¡ ÀÖ½À´Ï´Ù. return 0; if (pItem->GetSubType() == CItemData::ARMOR_BODY) { m_armorRefineEffect = EFFECT_REFINED+EFFECT_BODYARMOR_REFINED7+refine-7; __AttachEffect(m_armorRefineEffect); } break; } return 0; }
Bununla değiştirin:
Kod:
case CItemData::ITEM_TYPE_ARMOR: __ClearArmorRefineEffect(); // °©¿Ê Æ¯È ÀÌÆåÆ® if (pItem->GetSubType() == CItemData::ARMOR_BODY) { DWORD vnum = pItem->GetIndex(); // color armors [blue shining] - DEFAULT if (vnum >= 12010 && vnum <= 12019 || //Blaustahlpanzer vnum >= 12020 && vnum <= 12029 || //Blauer Drachenanzug vnum >= 12030 && vnum <= 12039 || //Auraplattenpanzer vnum >= 12040 && vnum <= 12049) //Kleidung des Drachen { __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL); //effect 19 bubble __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL2); //effect 20 blue shining } //Beginning NEW ARMOR - [New Effect] - NEW ARMOR if (vnum == Item-ID? || vnum == Item-ID? || vnum == Item-ID? || vnum == Item-ID? || vnum == Item-ID? || vnum == Item-ID? || vnum == Item-ID? || vnum == Item-ID?) { __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_NEW_SPECIAL1); //effect 19 NEW EFFECT __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_NEW_SPECIAL2); //effect 21 NEW EFFECT __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_REFINED9); //effect 18 sparkle 9 effect } //End NEW ARMOR - [New Effect] - NEW ARMOR } if (refine < 7) //ÇöÀç Á¦·Ãµµ 7 ÀÌ»ó¸¸ ÀÌÆåÆ®°¡ ÀÖ½À´Ï´Ù. return 0; if (pItem->GetSubType() == CItemData::ARMOR_BODY) { m_armorRefineEffect = EFFECT_REFINED+EFFECT_BODYARMOR_REFINED7+refine-7; __AttachEffect(m_armorRefineEffect); } break; } return 0; }
2. UserInterface klasöründe bulunan InstanceBase.h dosyasını açın ve aşağıdaki kodu arayın:
Kod:
EFFECT_BODYARMOR_SPECIAL, EFFECT_BODYARMOR_SPECIAL2,
Ve zırh etkisine yeni satırları ekleyin. Örnek:
Kod:
EFFECT_BODYARMOR_SPECIAL = 19 EFFECT_BODYARMOR_SPECIAL2 = 20 EFFECT_BODYARMOR_NEW_SPECIAL1 = 21 EFFECT_BODYARMOR_NEW_SPECIAL2 = 22
3. playersettingmodule.py dosyasını açın, ve aşağıdakileri ekleyin.
Kod:
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+19, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-4-2-1.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+20, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-4-2-2.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+21, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-effect-new1.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+22, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-effect-new2.mse")
Ve son hadi hayırlı olsun
Sourceden Belirlenen Zırha Efekt Verme Rehberi
Metin2 özel sunucularında oyun deneyimini zenginleştirmek için geliştiriciler farklı sistemler entegre eder. Bunlardan birisi de zırhlara özel efekt atamadır. Bu efektler; karakterin hasar alma, savunma veya görsel etki gibi yönlerini etkileyebilir. Bu yazıda, source üzerinden belirlenen bir zırha nasıl efekt verileceğini adım adım anlatacağız.
Zırh Efekti Nedir?
Zırh efekti, oyuncunun giydiği zırhın belli koşullarda özel bir görsel veya mekanik etki yaratmasını sağlar. Örneğin, bir zırh belirli bir seviyeye ulaştığında kırmızı bir parıltı verebilir ya da hasar alındığında özel bir ses çalabilir. Bu efektler genellikle client-side ve server-side olarak ikiye ayrılır.
Source Dosyası Üzerinde Değişiklik Yapma
Zırh efekti atamak için öncelikle game server source dosyalarında gerekli değişiklikleri yapmalısınız. Bu işlem genellikle C++ dilinde yazılmış olan game core üzerinde yapılır. Öncelikle hangi zırh item ID sine efekt atamak istediğinizi belirlemelisiniz. Bu ID numarası item_proto.txt dosyasında tanımlıdır.
Efekt Tanımı ve Script Oluşturma
Zırh efektini tanımlamak için uiscript veya py root üzerinden bir Python GUI (PyGUI) arayüzü oluşturabilirsiniz. Bu arayüz, efektin ne zaman aktif olacağını belirleyen kuralları içerir. Örneğin, zırh hasar aldığında efektin devreye girmesi gibi. Bu tür sistemler genellikle Python ile geliştirilir ve martysama gibi gelişmiş yapılarla birleştirilir.
DB ve Game Server Etkileşimi
Efektli zırh sistemi, hem db core hem de game server ile uyumlu çalışmalıdır. DB tarafında zırh ile ilgili verilerin doğru şekilde saklanması gerekir. Oyuncu zırhı giydiğinde, bu veri game server tarafından okunur ve efekt çalıştırılır. Bu süreçte auth ve pack yapıları da kontrol edilmelidir.
Compile ve Test Etme
Tüm değişiklikleri yaptıktan sonra source kodunuzu derlemeniz (compile) gerekir. Derleme işlemi sırasında hata oluşmaması için kod yazım kurallarına dikkat etmelisiniz. Derleme tamamlandıktan sonra local sunucuda test yaparak zırh efektinin doğru çalışıp çalışmadığını kontrol edin.
Client-Side Efekt Atama
Efektin sadece sunucuda değil, istemcide de görünmesi isteniyorsa client src üzerinde de değişiklik yapılması gerekir. Bu tür efektler genellikle .gr2 dosyalarında tanımlanır ve efekt motoru ile bağlanır. Bu işlem C++ bilgisi gerektirir ve dikkatli yapılmalıdır.
Sonuç
Zırhlara efekt atamak, Metin2 özel sunucularında kullanıcı deneyimini artıran önemli bir özelliktir. Bu işlem için hem C++ hem de Python bilgisi gerekebilir. Doğru yapılandırılmış bir sistem, hem güvenli hem de görsel açıdan zengin bir oyun ortamı sağlar. Daha fazla bilgi ve destek için Metin2Lobby üzerinden toplulukla iletişime geçebilirsiniz.
How to Assign an Effect to an Armor from Source
To enrich the gaming experience on Metin2 private servers, developers integrate various systems. One such system is assigning special effects to armors. These effects can influence character defense, damage taken, or visual appearance. In this article, we will explain step-by-step how to assign an effect to a specific armor via the source.
What Is an Armor Effect?
An armor effect allows a specific visual or mechanical action triggered when a player wears that armor. For example, an armor may glow red upon reaching a certain level, or play a sound effect when taking damage. Such effects are generally divided into client-side and server-side.
Modifying the Source Files
To assign an effect to an armor, you first need to make the necessary modifications in your game server source files. This process typically occurs within the game core, which is written in C++. First, determine the item ID of the armor you want to assign an effect to. This ID is defined in the item_proto.txt file.
Effect Definition and Script Creation
To define the armor effect, you can create a Python GUI interface via uiscript or py root. This interface includes rules for when the effect should activate. For example, the effect might trigger when the armor takes damage. Such systems are often developed with Python and integrated with advanced structures like martysama.
DB and Game Server Interaction
The armor effect system must be compatible with both the db core and the game server. Data related to the armor must be stored correctly in the database. When a player equips the armor, the game server reads this data and triggers the effect. During this process, auth and pack structures should also be checked.
Compiling and Testing
After making all changes, you need to compile your source code (compile). Pay attention to coding standards during compilation to avoid errors. Once compiled, test the armor effect on a local server to ensure it functions properly.
Assigning Client-Side Effects
If the effect needs to appear not only on the server but also on the client side, modifications must also be made in the client src. These types of effects are usually defined in .gr2 files and linked with the effect engine. This requires knowledge of C++ and careful execution.
Conclusion
Assigning effects to armors is a key feature that enhances user experience on Metin2 private servers. This process may require knowledge of both C++ and Python. A well-configured system provides a secure and visually rich gaming environment. For more information and support, you can contact the community via Metin2Lobby.
