[C++] Bonus Transfer Sistemi

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Arkadaşlar 29 tane satışım gerçekleşti büyük çoğunluğu bu forum üzerinden. Birçok kişiyle'de sorun yaşadım gerektiği yerde özür dilemesinide bildim. Fakat Gereğinden fazla gereksiz tartışmaya girdim. Geçmiş geçmişte kaldı gibi gözüksede aynı toplum içerisinde birbirimize düşman gözüyle baktık , herşeye eyw ama birkaç konuda haksızdım ve özür dilemesini bildim.

Dün dahil olmak üzere satılan filesler üzerinden oynanan birkaç oyun var ve bende haklı çıktığım ve forumu bırakma kararı aldım. 1 kaç paylaşım yapıp forumu bırakıyorum.

Kimse kusura bakmasın yaptıklarımdan dolayı.


Config.cpp açılır

Kod:
int    CostumeTransferBonusItemVnum = 71084;


Config.h açılır

Kod:
extern int CostumeTransferBonusItemVnum;


char.h açılır

Kod:
void CHARACTER::CostumeBonusTransfer(DWORD cell1, DWORD cell2){     if ((GetExchange() || IsOpenSafebox() || GetShopOwner()) || IsCubeOpen() || IsDead()){         ChatPacket(CHAT_TYPE_INFO, "Nie mozesz teraz wykonac tej operacji!");         return;     }     LPITEM costume1 = GetInventoryItem(cell1);     if (!costume1){         ChatPacket(CHAT_TYPE_INFO, "Nie odnaleziono pierwszego kostiumu.");         return;     }          if (costume1->GetType() != ITEM_COSTUME || costume1->GetType() == ITEM_COSTUME && costume1->GetSubType() != COSTUME_BODY){         ChatPacket(CHAT_TYPE_INFO, "Pierwszy przedmiot nie jest kostiumem!");         return;     }          if (costume1->IsEquipped()){         ChatPacket(CHAT_TYPE_INFO, "Kullanılamaz kostüm.");         return;     }          LPITEM costume2 = GetInventoryItem(cell2);     if (!costume2){         ChatPacket(CHAT_TYPE_INFO, "Slotta kostüm yok.");         return;     }          if (costume2->GetType() != ITEM_COSTUME || costume2->GetType() == ITEM_COSTUME && costume2->GetSubType() != COSTUME_BODY){         ChatPacket(CHAT_TYPE_INFO, "Malesef bunula yapamazsın");         return;     }          if (costume2->IsEquipped()){         ChatPacket(CHAT_TYPE_INFO, "Böyle bir kostüm kullanamazsın");         return;     }          if (CountSpecifyItem(CostumeTransferBonusItemVnum) < 1){         ChatPacket(CHAT_TYPE_INFO, "Bonus yok Neyi aktaracaksın.");         return;     }          if (costume2->GetAttributeCount() < 1){         ChatPacket(CHAT_TYPE_INFO, "İkinci Slota İyi bak!");         return;     }               RemoveSpecifyItem(CostumeTransferBonusItemVnum, 1);     costume1->ClearAttribute();     for (int i = 0; i < costume2->GetAttributeCount(); i++){         costume1->SetForceAttribute(i, costume2->GetAttributeType(i), costume2->GetAttributeValue(i));     }          costume2->RemoveFromCharacter();          ChatPacket(CHAT_TYPE_INFO, "Başarılı bir şekilde Transfer Edildi!"); }


char.h açılır

Kod:
void            CostumeBonusTransfer(DWORD cell1, DWORD cell2);


cmd.cpp açılır

Kod:
Kod:
ACMD(do_costume_transfer_bonus); [B]---[/B] { "kostum_degis_bonus",do_costume_transfer_bonus,0,POS_DEAD,GM_PLAYER},


Cmd_general.cpp açılır

Kod:
ACMD(do_costume_transfer_bonus){     char arg1[256], arg2[256];     DWORD cell1, cell2;     two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));     if (!*arg1 || !*arg2)         return;     str_to_number(cell1, arg1);     str_to_number(cell2, arg2);     if (cell1 < 0 || cell1 > INVENTORY_MAX_NUM || cell2 < 0 || cell2 > INVENTORY_MAX_NUM || cell1 == cell2)         return;     ch->CostumeBonusTransfer(cell1, cell2); }


Çalışma şekli;

/kostum_degis_bonus slot1 slot2

Slot1 deki bonuslar
slot2 deki bonuslara eklenir.

Kanıt ;

EqXz38.jpg

Metin2 oyununda gelişmiş sistemlerden biri olan [C++] Bonus Transfer Sistemi, oyuncuların karakter güçlerini optimize etmelerine yardımcı olur. Bu sistem, oyuncuların bonuslarını başka bir karaktere aktarmasını sağlar. Özellikle yüksek seviye karakterlerin bonus değerlerini yeni başlayanlara veya ikinci karakterlere aktarma imkanı sunar. Bu yazıda, Metin2 Lobby platformu üzerinden C++ tabanlı bonus transfer sisteminin nasıl geliştirildiğini, hangi dosyalarda değişiklik yapıldığını ve nasıl entegre edileceğini detaylıca inceleyeceğiz.

Öncelikle, bonus transfer sisteminin temel mantığına bakalım. Bu sistem, oyuncunun sahip olduğu bonus puanlarını (örneğin STR, DEX, HT, INT gibi) bir şarta bağlı olarak başka bir karaktere aktarabilmesini sağlar. Bu sayede oyuncular, yeni açtıkları karakterlerde zaman kazanabilir ve daha hızlı bir şekilde rekabete hazır hale gelebilirler.

Sistem C++ tabanlıdır ve genellikle game server tarafında çalışır. Oyuncu, belirli bir seviyeye ulaşmışsa ve bonus puanları mevcutsa, belirli komutlarla ya da GUI üzerinden işlem başlatılır. Sistem, auth server ile senkronize çalışarak güvenliği sağlar. Ayrıca, DB üzerinde karakterler arasında bonus transferi için özel tablolar oluşturulabilir. Bu tablolar, transfer geçmişini saklamak ve tekrar transferi engellemek için önemlidir.

Bonus Transfer Sistemi için gerekli olan C++ kaynak kodları, genellikle client src ve server src üzerinde çalıştırılır. Sistem, oyuncu karakter bilgilerini okur, bonus puanlarını hesaplar ve hedef karaktere aktarır. Bu süreçte güvenlik ön plandadır. Her transfer işlemi loglanmalı ve DB üzerinde kontrol edilmelidir. Martysama gibi geliştirici araçları, bu süreçte büyük kolaylık sağlar.

Sistemin kurulumu için Metin2 Lobby kullanıcıları için özel olarak hazırlanmış compile ve source edit süreçleri mevcuttur. Geliştiriciler, uiscript dosyalarında GUI arayüzünü tanımlar ve py root üzerinden gerekli kontrolleri yapar. Bu sistem, Python GUI ile de entegre edilebilir. Böylece hem C++ hem de Python tabanlı modüller aynı projede çalışabilir.

Metin2 development sürecinde bu tip sistemlerin entegrasyonu oldukça kritiktir. Game core ve DB core üzerinde yapılacak değişiklikler, sunucunun performansını doğrudan etkiler. Bu nedenle, core dosyalarında yapılacak her değişiklik dikkatlice test edilmelidir. Channel bazlı sistemlerde, bonus transfer sadece belirli kanallarda veya belirli zamanlarda aktif edilebilir. Bu, sunucu yöneticilerinin kontrolünü artırır ve haksız avantajı önler.

Sonuç olarak, Metin2 özel sunucularında kullanılabilecek [C++] Bonus Transfer Sistemi, oyuncu deneyimini artırmak için güçlü ve esnek bir özelliktir. Doğru entegrasyon ile bu sistem, hem yeni oyuncuların hem de tecrübeli oyuncuların avantaj sağlayabileceği bir yapıya dönüşebilir. Metin2 Lobby platformu, bu tür gelişmiş sistemlerin entegrasyonu için eksiksiz bir rehber sunar.


Metin2 features an advanced system known as the [C++] Bonus Transfer System, which allows players to optimize their character stats. This system enables transferring bonus points from one character to another. Especially useful for high-level characters to pass on their bonus values to newcomers or secondary characters. In this article, we will examine how the C++ based bonus transfer system was developed and integrated into the Metin2 Lobby platform, including which files were modified and how it can be implemented.

Firstly, let's look at the basic logic of the bonus transfer system. It allows players to transfer their bonus points (such as STR, DEX, HT, INT) to another character under certain conditions. This helps players save time with newly created characters and get them PvP-ready faster.

The system is based on C++ and usually runs on the game server. If a player reaches a certain level and has bonus points available, they can initiate the process via specific commands or through a GUI. The system works in sync with the auth server to ensure security. Additionally, special tables in the DB can be created to store transfer history and prevent duplicate transfers.

The necessary C++ source codes for the Bonus Transfer System typically operate on both client src and server src. The system reads player character information, calculates bonus points, and transfers them to the target character. Security is paramount during this process. Each transfer must be logged and checked against the DB. Developer tools like Martysama greatly simplify this process.

For installation, Metin2 Lobby users have specially prepared compile and source edit procedures. Developers define the GUI interface in uiscript files and perform checks via py root. The system can also integrate with Python GUI, allowing both C++ and Python-based modules to coexist within the same project.

Integrating such systems during Metin2 development is critical. Changes made to game core and DB core directly affect server performance. Therefore, every modification in core files should be thoroughly tested. In channel-based systems, bonus transfers can be activated only in specific channels or times, enhancing control for server admins and preventing unfair advantages.

In conclusion, the [C++] Bonus Transfer System for private Metin2 servers is a powerful and flexible feature that enhances player experience. With proper integration, this system can benefit both new and veteran players alike. The Metin2 Lobby platform provides a comprehensive guide for integrating such advanced systems.
 

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

Benzer konular

Geri
Üst Alt