Here is a small playground for owners of servers . xD
I made a small improvements statics for players via command.
I made a small improvements statics for players via command.
Kod:
//@svn/Server/common/service.h#define ENABLE_ONLINE_COMMAND //@svn/Server/game/src/cmd.cpp //1.) Search: { "messenger_auth", do_messenger_auth, 0, POS_DEAD, GM_PLAYER }, //2.) Add bellow: #ifdef ENABLE_ONLINE_COMMAND { "online", do_online, 0, POS_DEAD, GM_PLAYER }, #endif //1.) Search: ACMD(do_messenger_auth); //2.) Add bellow: #ifdef ENABLE_ONLINE_COMMAND ACMD(do_online); #endif //@svn/Server/game/src/cmd_general.cpp //1.) Add where you want: ACMD(do_online) { /********************************************************************* * date : 2016.10.25 * file : cmd_general.cpp * author : VegaS * description : Statistics server + configuration for fake */ time_t currentTime; struct tm *localTime; time(&currentTime); localTime = localtime(&currentTime); #define ENABLE_OFFLINE_SHOP #ifdef ENABLE_OFFLINE_SHOP std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery("SELECT COUNT(*) FROM player.offline_shop_npc WHERE owner_id and channel = %d", g_bChannel)); MYSQL_ROW row = mysql_fetch_row(pmsg->Get()->pSQLResult); int mShopsOffline = 0; str_to_number(mShopsOffline, row[0]); #endif int mResultHour = localTime->tm_hour, mResultMin = localTime->tm_min, mResultSec = localTime->tm_sec; int mTotalOnline; int * mEmpire; int mLocal; DESC_MANAGER::instance().GetUserCount(mTotalOnline, &mEmpire, mLocal); /* 0 = 00:00 1 = 01:00 2 = 02:00 3 = 03:00 4 = 04:00 5 = 05:00 6 = 06:00 7 = 07:00 8 = 08:00 9 = 09:00 10 = 10:00 11 = 11:00 12 = 12:00 13 = 13:00 14 = 14:00 15 = 15:00 16 = 16:00 17 = 17:00 18 = 18:00 19 = 19:00 20 = 14:00 21 = 21:00 22 = 22:00 23 = 23:00 */ static int arrayDesc[23 + 1][2] = { /* First row -> Current hour | Second row -> Value added for players fake Example: From 15:00 until 15:59:59 will be added on statics + 75 players online fake. Because -> { 15, 75 } */ { 0, 190 }, { 1, 175 }, { 2, 160 }, { 3, 140 }, { 4, 130 }, { 5, 100 }, { 6, 80 }, { 7, 75 }, { 8, 60 }, { 9, 55 }, { 10, 40 }, { 11, 30 }, { 12, 50 }, { 13, 60 }, { 14, 70 }, { 15, 75 }, { 16, 80 }, { 17, 90 }, { 18, 105 }, { 19, 120 }, { 20, 135 }, { 21, 155 }, { 22, 175 }, { 23, 180 } }; for (int i=0; i<=24-1; i++) { if (mResultHour == arrayDesc[i][0]) { for (int j=1; j<=3; j++) mEmpire[i] += arrayDesc[i][1] / 3; mTotalOnline += arrayDesc[i][1]; break; } } if (ch->IsGM()) { ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current time on server: %d:%d:%d", mResultHour, mResultMin, mResultSec); } ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current channel: [%d]", g_bChannel); ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current players online on this channel (all empire): [%d]", mTotalOnline); ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current players online on empire: Shinshoo - [%d] | Chunjo - [%d] | Jinno - [%d]", mEmpire[1], mEmpire[2], mEmpire[3]); #ifdef ENABLE_OFFLINE_SHOP ch->ChatPacket(CHAT_TYPE_INFO, "[i] Current shops offline on this channel: [%d]", mShopsOffline); #endif }
Download:
- <li data-xf-list-type="ul">
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız! Giriş yap veya üye ol.
Metin2 Özel Sunucular İçin C++ Tabanlı Oyuncu İstatistik Sistemi + Sahte Veri Ekleme Özelliği
Giriş
Metin2 özel sunucu geliştirme sürecinde, oyuncuların istatistiklerini takip edebilmek büyük önem taşır. Özellikle PVP sistemlerin yoğun olduğu sunucularda, oyuncu performansları, seviye ilerlemeleri, eşya kazanımları gibi verilerin doğru bir şekilde işlenmesi gerekir. Bu bağlamda, C++ tabanlı bir istatistik sunucusu, hem performans hem de güvenlik açısından avantaj sağlar. Bu yazıda, Metin2 özel sunucular için geliştirilmiş bir C++ istatistik sunucusundan bahsedecek ve sahte veri ekleme (fake edition) özelliğini inceleyeceğiz.
Neden C++ Kullanılır?
Metin2 sunucularında, performans kritik öneme sahiptir. Oyun içi işlemler hızla gerçekleştiği için, sunucu tarafında çalışan sistemlerin hızlı ve optimize olması gerekir. C++, düşük seviyeli programlama imkanı sunduğu için, kaynakların daha verimli kullanılmasını sağlar. Ayrıca, C++ ile yazılmış sistemler, derleme sürecinden sonra yüksek hızla çalışabilir. Bu nedenle, Metin2 özel sunucularında game core veya auth[/COORD] süreçlerinde C++[/COORD] tercih edilir.
İstatistik Sunucusu Nedir?
Oyuncuların seviye, para, eşya, öldürme sayısı gibi verilerini tutan sistemdir. Bu sistem, genellikle DB core[/COORD] ile entegre çalışarak veritabanına yazma ve okuma işlemleri yapar. İstatistik sunucusu, hem gerçek zamanlı verileri takip eder hem de geçmişe dönük analizler yapılabilmesini sağlar. Bu sayede sunucu yöneticileri, oyun içi dengeleri daha iyi yönetebilir.
Sahte Veri Ekleme (Fake Edition) Nedir?
Bazı özel sunucularda, oyuncuların daha fazla motive edilmesi için sahte verilerin gösterilmesi tercih edilebilir. Örneğin, лидерликтaki listelerde sahte oyuncular yer alabilir ya da bazı özel ödüllerin görünmesi sağlanabilir. Bu, oyun deneyimi açısından psikolojik bir etki yaratır. Ancak bu özellik dikkatli kullanılmalıdır; aksi takdirde kullanıcılar tarafından olumsuz karşılanabilir.
Sistem Özellikleri
- Gerçek zamanlı istatistik güncellemesi
- DB entegrasyonu
- Sahte veri desteği
- Auth[/COORD] ve Game Server[/COORD] ile uyumlu yapı
- Low-level[/COORD] optimizasyonlar
Kurulum ve Entegrasyon
Kurulum aşamasında, C++[/COORD] derleyici ortamının hazırlanması gerekir. Proje dosyaları, genellikle Visual Studio[/COORD] veya GCC[/COORD] ile derlenebilir. Source edit[/COORD] işlemleri sırasında dikkatli olunmalıdır çünkü küçük hatalar sistem çökmesine yol açabilir. Kurulum tamamlandıktan sonra, sunucu tarafında gerekli hook[/COORD] noktalarına bağlanarak verilerin istatistik sunucusuna gönderilmesi sağlanır.
Sonuç
Metin2 özel sunucularında, C++[/COORD] ile geliştirilen istatistik sunucuları, hem performans[/COORD] hem de esneklik[/COORD] açısından büyük faydalar sağlar. Sahte veri ekleme özelliği ile birlikte, kullanıcı deneyimi daha da zenginleştirilebilir. Ancak bu tür sistemlerin dikkatli tasarlanması ve test edilmesi gerekir. Metin2Lobby, bu konuda size rehberlik edecek kaynaklar sunmaktadır.
C++ Based Player Statistics Server for Metin2 Private Servers + Fake Data Feature
Introduction
In the process of developing Metin2 private servers, tracking player statistics holds great importance. Especially in servers where PVP systems are dominant, correct processing of data such as player performance, level progression, item gains is crucial. In this context, a C++ based statistics server offers advantages in both performance and security. In this article, we will discuss a C++ statistics server developed for Metin2 private servers and examine its fake data feature.
Why Use C++?
Performance is critical in Metin2 private servers. Since in-game actions happen rapidly, server-side systems must be fast and optimized. C++ allows low-level programming which enables more efficient use of resources. Additionally, C++ based systems can operate at high speed after the compilation process. Therefore, C++ is preferred in game core or auth processes in Metin2 private servers.
What Is a Statistics Server?
It is a system that stores data such as player levels, money, items, and kill counts. This system works integrated with the DB core to write and read from the database. The statistics server tracks real-time data as well as enables historical analysis. Thus, server administrators can better manage in-game balances.
What Is Fake Data Addition (Fake Edition)?
On some private servers, fake data may be displayed to motivate players further. For instance, fake players might appear on leaderboards or certain special rewards could be made visible. This creates a psychological effect on game experience. However, this feature must be used carefully; otherwise, it could be negatively received by users.
System Features
- Real-time statistics updates
- DB integration
- Fake data support
- Compatibility with Auth and Game Server
- Low-level optimizations
Installation and Integration
During installation, a C++ compiler environment must be prepared. Project files can usually be compiled using Visual Studio or GCC. During source edit[/COORD] operations, caution is necessary since small errors can lead to system crashes. After installation is completed, necessary hook[/COORD] points on the server side are connected to ensure data is sent to the statistics server.
Conclusion
In Metin2 private servers, C++[/COORD] based statistics servers provide significant benefits in both performance[/COORD] and flexibility[/COORD]. Together with the fake data addition feature, user experience can be further enriched. However, such systems must be designed and tested carefully. Metin2Lobby provides resources to guide you in this area.
