Metin2 Yeni Dungeon Fonksiyonu

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Grupla / Bireysel Giriş Koordinat olanağı vs. kullanabilirsiniz. Biraz düzenleyin kendinize göre.
Kod:
dungeon.h     void    JoinParty_Coords(LPPARTY pParty, long X, long Y);        void    Join_Coords(LPCHARACTER ch, long X, long Y);  dungeon.cpp struct FWarpToDungeonCoords {     FWarpToDungeonCoords(long lMapIndex, long X, long Y, LPDUNGEON d)     : m_lMapIndex(lMapIndex), m_x(X), m_y(Y), m_pkDungeon(d)     {     }     void operator () (LPCHARACTER ch)     {         ch->SaveExitLocation();         ch->WarpSet(m_x, m_y, m_lMapIndex);     }     long m_lMapIndex;     long m_x;     long m_y;     LPDUNGEON m_pkDungeon; }; void CDungeon::Join_Coords(LPCHARACTER ch, long X, long Y) {     if (SECTREE_MANAGER::instance().GetMap(m_lMapIndex) == NULL) {         sys_err("CDungeon: SECTREE_MAP not found for #%ld", m_lMapIndex);         return;     }     X*=100;     Y*=100;     FWarpToDungeonCoords(m_lMapIndex, X, Y, this) (ch); } void CDungeon::JoinParty_Coords(LPPARTY pParty, long X, long Y) {     pParty->SetDungeon(this);     m_map_pkParty.insert(std::make_pair(pParty,0));     if (SECTREE_MANAGER::instance().GetMap(m_lMapIndex) == NULL) {         sys_err("CDungeon: SECTREE_MAP not found for #%ld", m_lMapIndex);         return;     }     X*=100;     Y*=100;     FWarpToDungeonCoords f(m_lMapIndex, X, Y, this);     pParty->ForEachOnlineMember(f); } questlua_dungeon.cpp     int dungeon_join_coords(lua_State* L)     {         if (lua_gettop(L)<3 || !lua_isnumber(L,1) || !lua_isnumber(L, 2) || !lua_isnumber(L,3))         {             sys_err("not enough argument");             return 0;         }         long lMapIndex = (long)lua_tonumber(L, 1);         LPDUNGEON pDungeon = CDungeonManager::instance().Create(lMapIndex);         if (!pDungeon)             return 0;         LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();         if (ch->GetParty() && ch->GetParty()->GetLeaderPID() == ch->GetPlayerID())             pDungeon->JoinParty_Coords(ch->GetParty(), (long)lua_tonumber(L, 2), (long)lua_tonumber(L, 3));         else if (!ch->GetParty())             pDungeon->Join_Coords(ch, (long)lua_tonumber(L, 2), (long)lua_tonumber(L, 3));         return 0;     }     { "join_coords",     dungeon_join_coords }, //INTO RegisterDungeonFunctionTable()

Metin2'de Yeni Dungeon Fonksiyonu Ekleme Rehberi

Metin2 özel sunucularında gelişmiş sistemler kurmak, oyuncu deneyimini ciddi anlamda artırabilir. Bu yazıda, Metin2 özel sunucularında yeni bir dungeon (zindan) fonksiyonu nasıl eklenir detaylıca anlatacağız. Bu rehber özellikle Metin2 server src, C++ system, game core, db core gibi alanlarda çalışan geliştiriciler için değerli bilgiler içerecektir.

Yeni Dungeon Fonksiyonunun Amacı
Metin2 özel sunucularında oyuncuların daha fazla etkileşimde bulunması, yeni ödüller kazanması ve uzun süre oyunda kalabilmesi için yeni dungeon sistemleri oldukça önemlidir. Bu sistemler, özel boss düşmanlar, sınırlı giriş hakkıyla zaman yönetimi ve yüksek seviye ödüller içerir. Bu sayede hem oyuncu hem de sunucu sahibi için faydalı bir yapı ortaya çıkar.

C++ Tarafında Temel Yapılandırma
Öncelikle dungeon sistemi için C++ tabanlı game server üzerinde bazı değişiklikler yapılması gerekir. Server src dosyalarında 'dungeon_manager.cpp' veya benzeri bir dosya üzerinden yeni bir dungeon sınıfı tanımlamalısınız. Bu sınıf, dungeon’ın açılıp kapanma süresi, kaç kişiyle girileceği, hangi harita kullanılacağı gibi bilgileri içermelidir.

Örnek olarak:
- Dungeon ID belirlenmeli
- Oyuncu seviyesi kontrolü yapılmalı
- Zaman sınırlaması tanımlanmalı
- Ödül sistemi entegre edilmeli

Python GUI ve Py Root Entegrasyonu
Metin2 özel sunucularında client tarafında kullanıcı arayüzüne özel dungeon eklentisi eklemek için py ui kullanılır. Py root klasörlerinde yeni bir pencere tasarımı yapılmalı ve bu pencere, oyuncuya dungeon ile ilgili bilgi verirken aynı zamanda giriş yapma seçeneği sunmalıdır. Bu işlem sırasında uiscript dosyaları düzenlenmelidir.

Database (DB) Tarafında Ayarlar
Dungeon sisteminde oyuncu giriş kayıtları, ödül geçmişi, zamanlama gibi veriler DB üzerinde tutulur. Auth ve game server arasında bağlantı kurulmuşsa, bu veriler senkronize şekilde saklanmalıdır. Dungeon tablosu oluşturulmalı ve oyuncu ID’si, dungeon ID’si, giriş sayısı, son giriş zamanı gibi alanlar tanımlanmalıdır.

Martysama ve Diğer Geliştirici Kaynakları
Metin2 özel sunucu geliştiricileri arasında popüler olan Martysama forumları, bu tarz sistemlerin uygulanması için birçok kaynak sağlar. Sistem editörleri, C++ kaynak kod örnekleri ve Python script çözümleri bu platformlarda paylaşılır. Bu tür kaynaklardan yararlanmak, dungeon sisteminin hızlıca entegre edilmesini sağlar.

Sunucu Performansını Artırmak
Yeni dungeon sistemi, server src üzerinde doğru tanımlanmadığında performans sorunlarına neden olabilir. Özellikle çok oyunculu sunucularda zamanlayıcılar, eşzamansız işlemler ve bellek yönetimi büyük önem taşır. Core yapıların optimize edilmesi, sunucu compile aşamasında dikkat edilmesi gereken önemli bir detaydır.

Sonuç
Metin2 özel sunucularında yeni dungeon fonksiyonu eklemek, C++, Python, database ve client tarafında yapılacak küçük ama dikkatli düzenlemelerle mümkündür. Oyun içi deneyimi artıran bu tür sistemler, sunucu sahiplerinin rekabet avantajı sağlamasını sağlar. Doğru kaynaklarla, doğru yapılandırmalar yapıldığında dungeon sistemi hem eğlenceli hem de karlı bir sistem haline gelir.


Guide to Adding a New Dungeon Function in Metin2

In Metin2 private servers, implementing advanced systems can significantly enhance the player experience. In this article, we will explain in detail how to add a new dungeon function in Metin2 private servers. This guide will contain valuable information for developers working on Metin2 server src, C++ system, game core, db core, and related areas.

Purpose of the New Dungeon Function
New dungeon systems are very important in Metin2 private servers to increase player interaction, reward acquisition, and retention. These systems often feature special boss enemies, limited entry chances with time constraints, and high-level rewards. As a result, both players and server owners benefit from such structures.

Basic Configuration on the C++ Side
Firstly, certain changes need to be made on the C++ based game server for the dungeon system. In the server src files, you should define a new dungeon class via a file like 'dungeon_manager.cpp'. This class must include information such as dungeon open/close times, maximum number of players allowed, and which map will be used.

As an example:
- Dungeon ID must be set
- Player level check must be implemented
- Time limits must be defined
- Reward system must be integrated

Python GUI and Py Root Integration
To add a custom dungeon interface on the client side in Metin2 private servers, py ui is used. A new window design should be created within the py root folders, providing the player with information about the dungeon and an option to enter. During this process, uiscript files must be updated accordingly.

Settings on the Database (DB) Side
In dungeon systems, player entry logs, reward history, and timing data are stored in the database. If there is a connection between auth and game server, these records must be synchronized. A dungeon table must be created with fields like player ID, dungeon ID, entry count, and last entry time.

Resources like Martysama and Other Developer Communities
Among Metin2 private server developers, forums like Martysama provide many resources for implementing such systems. System editors, C++ source code examples, and Python script solutions are shared on these platforms. Utilizing such resources enables faster integration of the dungeon system.

Improving Server Performance
If the new dungeon system is not properly configured on the server src, it may cause performance issues. Especially in multiplayer servers, timers, asynchronous operations, and memory management are critical. Optimizing core structures is an important step during the server compilation phase.

Conclusion
Adding a new dungeon function in Metin2 private servers is possible through small but careful adjustments in C++, Python, database, and client sides. Such systems that enhance the in-game experience allow server owners to gain competitive advantages. With proper resources and correct configurations, the dungeon system becomes both entertaining and profitable.
 

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

Benzer konular

Geri
Üst Alt