Boss Dedektör Sistemi ( Mantığı Metin Dedektörü Gibidir )

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
char_item.cpp açılır ve aratılır ;

Kod:
const BYTE g_aBuffOnAttrPoints[] = { POINT_ENERGY, POINT_COSTUME_ATTR_BONUS };

Kod:
struct FFindCanavar {     std::map<DWORD, LPCHARACTER> m_mapCanavar;     void operator()(LPENTITY pEnt)     {         if (pEnt->IsType(ENTITY_CHARACTER) == true)         {             LPCHARACTER pChar = (LPCHARACTER)pEnt;             if (pChar->IsMonster() == true && pChar->GetMobRank() == 5)             {                 m_mapCanavar[(DWORD)pChar->GetVID()] = pChar;             }         }     } };

aratılır ;
Kod:
case 71013:

break; ile biten satır altına eklenilir ;
Kod:
case 28001:                                 {                                     LPSECTREE_MAP pMap = SECTREE_MANAGER::instance().GetMap(GetMapIndex());                                     if (pMap != NULL)                                     {                                         item->SetSocket(0, item->GetSocket(0) + 1);                                         FFindCanavar f;                                         pMap->for_each(f);                                         if (f.m_mapCanavar.size() > 0)                                         {                                             std::map<DWORD, LPCHARACTER>::iterator canavar = f.m_mapCanavar.begin();                                             DWORD max = UINT_MAX;                                             LPCHARACTER pTarget = canavar->second;                                             while (canavar != f.m_mapCanavar.end())                                             {                                                 DWORD dist = (DWORD)DISTANCE_SQRT(GetX()-canavar->second->GetX(), GetY()-canavar->second->GetY());                                                 if (dist != 0 && max > dist)                                                 {                                                     max = dist;                                                     pTarget = canavar->second;                                                 }                                                 canavar++;                                             }                                             if (pTarget != NULL)                                             {                                                 int val = 3;                                                 if (max < 10000) val = 2;                                                 else if (max < 70000) val = 1;                                                 ChatPacket(CHAT_TYPE_COMMAND, "StoneDetect %u %d %d", (DWORD)GetVID(), val,                                                         (int)GetDegreeFromPositionXY(GetX(), pTarget->GetY(), pTarget->GetX(), GetY()));                                             }                                             else                                             {                                                 ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Bu mapta canavar yok."));                                             }                                         }                                         else                                         {                                             ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Bu mapta canavar yok."));                                         }                                         if (item->GetSocket(0) >= 6)                                         {                                             ChatPacket(CHAT_TYPE_COMMAND, "StoneDetect %u 0 0", (DWORD)GetVID());                                             ITEM_MANAGER::instance().RemoveItem(item);                                         }                                     }                                     break;                                 }                                 break;

locale_tr > item_proto'ya eklenecek
Kod:
<!--AddonType="0"--><Item vnum="28001"  name="dedektor" gb2312name="Canavar Dedektörü" type="3" subtype="10" weight="0" size="1" antiflag="106880" flag="0" wearflag="0" immuneflag="0" gold="3000" buy_price="3000" limittype0="0" limitvalue0="0" limittype1="0" limitvalue1="0" applytype0="0" applyvalue0="0" applytype1="0" applyvalue1="0" applytype2="0" applyvalue2="0" value0="0" value1="0" value2="0" value3="0" value4="0" value5="0" socket0="0" socket1="0" socket2="0" socket3="0" socket4="0" socket5="0" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="0" />

locale_tr > item_desc.txt eklenecek
Kod:
28001    Canavar Dedektörü    Pusula sana en yakın canavarın yönünü ve mesafesini gösterir. Ne kadar parlaksa, o kadar yakınsın demektir. 6 kez kullanılabilir.

root > uitooltip.py açılır

aratılır ;

Kod:
if 27989 == itemVnum or 76006 == itemVnum:

ve şu şekilde değiştirilir ;
Kod:
if 27989 == itemVnum or 76006 == itemVnum or 28001 == itemVnum:


GÖRSEL (ALINTIDIR)
Q26aly.png

Boss Dedektör Sistemi Nedir?
Metin2 özel sunucularında gelişmiş güvenlik ve oyun deneyimi sağlamak adına geliştirilen sistemlerden biri olan Boss Dedektör Sistemi, oyuncuların sunucuda belirli kritik NPC'leri ya da boss karakterlerini tespit edip, bunlar hakkında bilgi almasını sağlayan bir mekanizmadır. Bu sistem, aslında mantık yapısı itibariyle Metin Dedektörü sistemine benzemektedir. Yani, belirli bir yapıya göre çalışan bir algılama mekanizmasıdır. Bu yazıda, Boss Dedektör Sisteminin çalışma prensibini, avantajlarını ve nasıl entegre edileceğini detaylıca inceleyeceğiz.

Sistem Mantığı ve Yapısı
Boss dedektör sistemi, temelde sunucu tarafında çalışan bir C++ kaynak kod parçasıdır. Oyunda belirlenen boss karakterlerin spawn ettiği anı yakalayıp, bunu bir olay olarak loglayabilir veya istemciye göndererek kullanıcıya bildirebilir. Bu işlem sırasında DB Core üzerinden veri kontrolü yapılır. Sistem, Game Server Programming kapsamında geliştirildiğinde, sunucu performansını minimum düzeyde etkilerken maksimum verim alınabilir.

Neden Gereklidir?
Metin2 özel sunucularında boss savaşları büyük önem taşır. Özellikle PVP sistem sunucularında boss düşmanlarının doğuşu, birçok oyuncunun dikkatini çekecek ve yoğunlaşacağı bir alan haline gelir. Bu durum, hem oyun içi rekabeti artırır hem de sunucu trafiğini canlı tutar. Ancak bossların rastgele ve sessizce doğması, bazı oyuncuların habersiz kalmasına neden olabilir. İşte burada devreye Boss Dedektör Sistemi girer. Bu sistem sayesinde, boss doğduğunda bir bildirim gönderilir ve oyuncular anında haberdar olur.

Python ve GUI Entegrasyonu
Geliştirme sürecinde Python System ve Py GUI[/COORD] kullanılarak, sunucudan gelen verilerin daha kullanıcı dostu bir arayüzde gösterilmesi sağlanabilir. Örneğin, bir Py Root üzerinden boss doğuş bilgileri bir pencerede gösterilebilir. Bu sayede hem adminler hem de moderatörler anlık olarak sunucudaki boss durumunu takip edebilir.

Uygulama Adımları
1. Sunucu kaynak kodlarında boss spawn işlemlerinin gerçekleştiği fonksiyonları belirleyin.
2. Bu fonksiyonlara özel bir event handler ekleyerek, boss doğduğunda bir mesaj gönderin.
3. Gerekirse bu bilgiyi DB’ye loglayarak, daha sonra analiz için saklayın.
4. İstemci tarafında bir bildirim sistemi oluşturun. Bunun için UIScript ve Py Root dosyalarını düzenleyin.

Avantajları
+ Oyuncu etkileşimini artırır.
+ PVP etkinliklerini planlamayı kolaylaştırır.
+[/COORD] Sunucu yöneticileri için anlık izleme imkanı sağlar.
+ Metin2 Development sürecinde yeni fikirler için bir temel oluşturur.

Sonuç
Boss Dedektör Sistemi, Metin2 özel sunucularında hem teknik hem de oyun deneyimi açısından önemli bir yere sahiptir. Martysama gibi güçlü sistemlerle entegre edildiğinde, sunucu yönetimi daha profesyonel hale gelir. Bu tür sistemlerin geliştirilmesi, Metin2Dev topluluğunun aktif üyelerinin katkılarıyla daha da yaygınlaşmaktadır.


What is the Boss Detector System?
The Boss Detector System, one of the advanced security and gameplay enhancement tools developed for Metin2 private servers, allows players to detect specific critical NPCs or boss characters and receive information about them. This system operates on a logic structure similar to a Text Detector. In other words, it functions as a detection mechanism based on certain parameters. In this article, we will examine the working principle, advantages, and integration process of the Boss Detector System in detail.

System Logic and Structure
The Boss detector system is essentially a piece of C++ source code that runs on the server side. It detects when predefined boss characters spawn in the game and can log this event or send it to the client as a notification. During this process, data control is performed through the DB Core. When developed within the scope of Game Server Programming, the system impacts server performance minimally while providing maximum efficiency.

Why Is It Necessary?
In Metin2 private servers, boss battles are highly significant. Particularly in PVP system servers, the spawning of boss enemies attracts the attention of many players and becomes a focal point. This situation increases in-game competition and keeps the server traffic active. However, if bosses appear randomly and silently, some players might remain unaware. Here, the Boss Detector System comes into play. With this system, notifications are sent when a boss spawns, instantly informing all players.

Python and GUI Integration
During development, Python System and Py GUI can be used to display server-side data through a more user-friendly interface. For example, boss spawn notifications can be shown on a window via a Py Root script. This way, both admins and moderators can track the boss status in real-time.

Implementation Steps
1. Identify the functions in the server source code where boss spawning occurs.
2. Add a custom event handler to these functions so that a message is sent when a boss spawns.
3. Optionally, log this information to the DB for later analysis.
4. Create a notification system on the client side by editing UIScript and Py Root files.

Advantages
+ Increases player interaction.
+ Facilitates planning of PVP activities.
+ Provides real-time monitoring capabilities for server administrators.
+ Acts as a foundation for new ideas during Metin2 Development processes.

Conclusion
The Boss Detector System holds significant importance in both technical and gameplay aspects for Metin2 private servers. When integrated with powerful systems like Martysama, server management becomes more professional. The development of such systems continues to expand through contributions from active members of the Metin2Dev community.
 

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

Geri
Üst Alt