[PvM] Efsun Nesnesi

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Öncelikle bu konuda bulunan pvm hasar bonusunu ekliyoruz.

Ardından
Char_item.cpp ara:

Kod:
else if (item->GetVnum() == 76014)                                     {                                         int aiChangeProb[ITEM_ATTRIBUTE_MAX_LEVEL] =                                         {                                             0, 10, 50, 39, 1                                         };                                         item2->ChangeAttribute(aiChangeProb);                                     }
Altına ekle :
Kod:
else if (item->GetVnum() == 76028)                                     {                                         bool hasAttribute99 = false;                                         int32_t value1 = (number(1, 10));                                         for (int i = 0; i < item2->GetAttributeCount(); i++)                                         {                                             if (item2->GetAttributeType(i) == 99)                                             {                                                 item2->SetForceAttribute(i, 99, value1);                                                 hasAttribute99 = true;                                                 break;                                             }                                         }                                         if (item2->GetAttributeCount() < 5 )                                         {                                             ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ESYANIZDA_ENAZ_5EFSUN_OLMALI"));                                             return false;                                         }                                         else if (!hasAttribute99)                                         {                                             item2->SetForceAttribute(item2->GetAttributeCount(), 99, value1);                                         }                                         // item2->SetForceAttribute(1, 71, value2);                                     }                                                                          else if (item->GetVnum() == 76029)                                     {                                         bool hasAttribute99 = false;                                         int32_t value1;                                         int randomNumber = number(1, 100); // Rastgele bir sayı üret                                                                              if (randomNumber <= 10)                                         {                                             value1 = (number(30, 50)); // %20 şans ile 30-50 arası değer alır                                         }                                         else                                         {                                             value1 = (number(10, 30)); // %80 şans ile 10-20 arası değer alır                                         }                                                                              for (int i = 0; i < item2->GetAttributeCount(); i++)                                         {                                             if (item2->GetAttributeType(i) == 99)                                             {                                                 item2->SetForceAttribute(i, 99, value1);                                                 hasAttribute99 = true;                                                 break;                                             }                                         }                                                                              if (item2->GetAttributeCount() < 5)                                         {                                             ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ESYANIZDA_ENAZ_5EFSUN_OLMALI"));                                             return false;                                         }                                         else if (!hasAttribute99)                                         {                                             item2->SetForceAttribute(item2->GetAttributeCount(), 99, value1);                                         }                                     }

2 tip pvm efsun nesnesi yaptık.
76027 olan pvm 1 ila 10 arası tüm eşyalarınıza pvm hasar bonusu ekler.
76028 olan pvm 10 ila 50 arası tüm eşyalarınıza pvm hasar bonusu ekler.
76028 olan nesnesimizde %20 şans ile 30-50 arası bonus gelir. %80 ile de 10-30 arası pvm efsun bonusu gelir bunu kendinize göre değiştirebilirsiniz yorum satırı bıraktım value'lerde.
5 efsun olmadan pvm bonusu atamazsınız bu şekilde engel var.
İconları ve item_desc'i kendinze göre değiştirebilirsiniz.


item_names :
Kod:
76028    PvM Efsun Nesnesi 76029    PvM Efsun Nesnesi(S)
item_proto :
Kod:
76028    m2item    ITEM_USE    USE_CHANGE_ATTRIBUTE    1    NONE    ITEM_STACKABLE | LOG    NONE    NONE    1000000    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0 76029    m2item    ITEM_USE    USE_CHANGE_ATTRIBUTE    1    NONE    ITEM_STACKABLE | LOG    NONE    NONE    1000000    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0
locale_string :
Kod:
"ESYANIZDA_ENAZ_5EFSUN_OLMALI"; "[PvM] Eşyanızda En Az 5 Efsun eklenmiş olmalı!";

147671_bab8ffd09393dab5fc1bc7e70677fd34.png

147673_d70051facbcaa564c652c9d5b93e8d8e.png

147675_76626fe46c8d4dab21165da02ee9097d.png

Metin2'de PvM Sistemine Özel Efsun Nesnesi Nedir?

Metin2 özel sunucularında PvM (Player vs Monster) sistemleri, oyuncuların canavarlarla mücadelesini daha dengeli ve keyifli hale getirmek amacıyla geliştirilir. Bu sistemlerin merkezinde ise Efsun Nesnesi gibi önemli yapılar yer alır. Efsun nesnesi, oyuncuların belirli bonuslarla donatılmasını sağlayan ve PvM maceralarında büyük avantaj sağlayabilen bir özelliktir. Bu yazıda, Metin2 özel sunucularda PvM Efsun Nesnesi'nin nasıl çalıştığını, nasıl geliştirildiğini ve hangi teknik yapılarla entegre olduğunu inceleyeceğiz.

Efsun Sistemi Nasıl Çalışır?

Metin2 özel sunucularda efsun sistemi genellikle C++ tabanlı sunucu kaynak kodları üzerinden geliştirilir. Bu sistem, oyuncunun giydiği eşyalar üzerinde belirli bonuslar tanımlanmasına olanak tanır. PvM oyun tarzında bu bonuslar, canavarlara karşı hasar artışı, savunma artışı veya ekstra özellikler gibi şekillenebilir. Örneğin, bir Canavar Avcısı efsunu, oyuncuya PvM savaşlarında +%30 daha fazla hasar verebilmesini sağlayabilir.

Python GUI ve Uiscript ile Entegrasyon

Efsun sisteminin kullanıcı arayüzü genellikle Python GUI ile hazırlanır. Py Root ve uiscript yapıları, oyuncuların efsun menüsünü açarak hangi bonusları aktif etmek istediklerini seçmelerine olanak tanır. Bu arayüz, hem görsel olarak şık hem de işlevsel olacak şekilde tasarlanmalıdır. Py GUI sayesinde, oyuncular efsunları kolayca yönetebilir ve PvM mücadelelerine göre optimize edebilirler.

Efsun Sistemi İçin Gerekli Kodlama ve DB Yapıları

Sunucu tarafında efsun sistemi, genellikle game core üzerinde çalışır. DB Core yapısı, efsunların veritabanında saklanmasını ve oyuncu profillerine bağlanmasını sağlar. Oyuncunun efsunlarını kaydetmek, güncellemek ve silmek için özel SQL sorguları yazılır. Bu yapılar, auth server ile de senkronize edilmelidir ki oyuncu giriş çıkışlarında doğru veriler yüklensin.

MartySama ve Diğer Geliştirici Kaynakları

Metin2 geliştirme dünyasında MartySama gibi isimler, efsun sistemleri için örnek kaynaklar sunar. Bu tür kaynaklar, source edit süreçlerinde oldukça faydalıdır. Metin2 server src dosyalarında yapılan değişiklikler, efsun sisteminin daha güçlü ve esnek hale gelmesini sağlar. Geliştiriciler, bu kaynakları kullanarak kendi özel sistemlerini hızlıca oluşturabilirler.

Efsun Nesnesi İçin Pack ve Sunucu Yapılandırması

Oyuncuların efsun nesnelerini kullanabilmeleri için doğru paketlerin (pack) sunucuya entegre edilmesi gerekir. Bu paketler, client src üzerinde de uyumlu çalışacak şekilde ayarlanmalıdır. Paketlerde bulunan efsun eşyaları, oyuncu tarafından kullanılınca, sunucu üzerinde aktif bonusları tetikler. Bu işlem, C++ tabanlı kodlarla kontrol edilir ve doğru çalışması için derleme (compile) işlemleri dikkatlice yapılmalıdır.

Sonuç

PvM oyun deneyimi için efsun nesnesi, Metin2 özel sunucularında önemli bir rol oynar. C++ ile geliştirilen sistemler, Python GUI ile kullanıcı dostu hale getirilir. Game server programming konusunda bilgi sahibi geliştiriciler, bu yapıları kullanarak kendi özel PvM sistemlerini kurabilirler. Metin2lobby.com olarak, bu tür gelişmiş sistemleri geliştirmeye ve topluluğa aktarmaya devam ediyoruz.


What is a PvM Enchant Object in Metin2?

In Metin2 private servers, PvM (Player vs Monster) systems are developed to make the player versus monster battles more balanced and enjoyable. At the center of these systems lie important structures such as the Enchant Object. The enchant object allows players to be equipped with specific bonuses and provides significant advantages during PvM adventures. In this article, we will examine how the PvM Enchant Object works in Metin2 private servers, how it is developed, and its integration with technical structures.

How Does the Enchant System Work?

The enchant system in Metin2 private servers is generally developed through C++ based server source codes. This system allows defining certain bonuses on the items worn by the player. In PvM gameplay, these bonuses may take forms such as increased damage against monsters, improved defense, or additional features. For instance, a Monster Hunter enchant could allow the player to deal +%30 more damage in PvM battles.

Integration with Python GUI and Uiscript

The user interface of the enchant system is usually created with Python GUI. Py Root and uiscript structures allow players to open the enchant menu and choose which bonuses they want to activate. This interface must be both visually appealing and functional. With Py GUI, players can easily manage their enchants and optimize them according to PvM battles.

Required Coding and DB Structures for the Enchant System

On the server side, the enchant system typically operates on the game core. The DB Core structure ensures that enchants are stored in the database and linked to player profiles. Specific SQL queries are written to save, update, or delete player's enchants. These structures must also be synchronized with the auth server so that correct data is loaded during player logins and logouts.

MartySama and Other Developer Resources

In the world of Metin2 development, names like MartySama provide example resources for enchant systems. Such resources are highly beneficial during source edit processes. Changes made in Metin2 server src files allow the enchant system to become stronger and more flexible. Developers can quickly create their own custom systems by utilizing these resources.

Pack and Server Configuration for Enchant Objects

For players to be able to use enchant objects, correct packages (pack) must be integrated into the server. These packages should also be configured to work compatibly with the client src. When the enchant items included in the packages are used by the player, active bonuses are triggered on the server. This process is controlled with C++ based code, and compilation (compile) operations must be carefully performed for correct operation.

Conclusion

For PvM gameplay experience, the enchant object plays a crucial role in Metin2 private servers. Systems developed with C++ are made user-friendly with Python GUI. Developers knowledgeable in game server programming can establish their own custom PvM systems using these structures. As Metin2lobby.com, we continue to develop and share such advanced systems with the community.​
 

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

Geri
Üst Alt