Kod:
GameLib/ActorInstance.cpp Açılır, // Arat BOOL CActorInstance::IsDead() { return m_isRealDead; } // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER BOOL CActorInstance::IsLocked() { return m_isLocked; } #endif // Arat: void CActorInstance::Stun() { m_isStun = TRUE; } // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER void CActorInstance::LockPlayer(BYTE state) { m_isLocked = state; } #endif // Arat m_isResistFallen = FALSE; // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER m_isLocked = FALSE; #endif
Kod:
GameLib/ActorInstanceBattle.cpp // bunun içinde bool CActorInstance::CanAct() // bul if (IsSleep()) return false; // altına ekle #ifdef ENABLE_GM_LOCK_PLAYER if (IsLocked()) return false; #endif
Kod:
GameLib/ActorInstance.h // Arat BOOL IsDead(); // altına ekle #ifdef ENABLE_GM_LOCK_PLAYER BOOL IsLocked(); void LockPlayer(BYTE state); #endif // Arat BOOL m_isRealDead; // altına ekle #ifdef ENABLE_GM_LOCK_PLAYER BOOL m_isLocked; #endif
Kod:
UserInterface/Locale_inc.h // ekle #define ENABLE_GM_LOCK_PLAYER // Lock Player Move by GM
Kod:
UserInterface/InstanceBase.cpp // Arat BOOL CInstanceBase::IsSleep() { return m_GraphicThingInstance.IsSleep(); } // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER BOOL CInstanceBase::IsLocked() { return m_GraphicThingInstance.IsLocked(); } #endif
Kod:
UserInterface/InstanceBaseBattle.cpp // bunun içinde bool CInstanceBase::NEW_UseSkill(UINT uSkill, UINT uMot, UINT uMotLoopCount, bool isMovingSkill) // bul if (IsStun()) return false; // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER if (IsLocked()) return false; #endif // Bunun içinde void CInstanceBase::NEW_Attack(float fDirRot) // bul if (IsUsingSkill()) return; // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER if (IsLocked()) return; #endif // Dosyanın sonuna ekle #ifdef ENABLE_GM_LOCK_PLAYER void CInstanceBase::SetLockPlayer(BYTE state) { m_GraphicThingInstance.LockPlayer(state); SetLoopMotion(CRaceMotionData::NAME_WAIT); } #endif
Kod:
UserInterface/InstanceBase.h // Arat void Die(); // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER void SetLockPlayer(BYTE status); #endif // Arat BOOL IsSleep(); // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER BOOL IsLocked(); #endif
Kod:
UserInterface/Packet.h // Arat HEADER_GC_MAIN_CHARACTER4_BGM_VOL = 138, // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER HEADER_GC_LOCK_PLAYER = 139, #endif // Dosya sonundaki bu kodun #pragma pack(pop) // üstüne ekle #ifdef ENABLE_GM_LOCK_PLAYER typedef struct SPacketGCLockPlayer { BYTE bHeader; BYTE status; DWORD vid; } TPacketGCLockPlayer; #endif
Kod:
UserInterface/PythonNetworkStream.cpp // Arat Set(HEADER_GC_ACCE, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCAcce), DYNAMIC_SIZE_PACKET)); // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER Set(HEADER_GC_LOCK_PLAYER, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCLockPlayer), STATIC_SIZE_PACKET)); #endif
Kod:
UserInterface/PythonNetworkStream.h // Arat bool RecvFishing(); // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER bool RecvLockPlayer(); #endif
Kod:
UserInterface/PythonPlayerInputMouse.cpp // Bunun içinde void CPythonPlayer::NEW_SetMouseSmartState(int eMBS, bool isAuto) // bul if (pkInstMain->IsSleep()) { return; } // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER if (pkInstMain->IsLocked()) return; #endif
Kod:
UserInterface/PythonNetworkStreamPhaseGame.cpp // Arat default: ret = RecvDefaultPacket(header); break; } } if (!ret) RecvErrorPacket(header); // Üstüne ekle #ifdef ENABLE_GM_LOCK_PLAYER case HEADER_GC_LOCK_PLAYER: ret = RecvLockPlayer(); break; #endif // Dosyanın sonuna ekle #ifdef ENABLE_GM_LOCK_PLAYER bool CPythonNetworkStream::RecvLockPlayer() { TPacketGCLockPlayer packet; if (!Recv(sizeof(packet), &packet)) return false; CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance(); CInstanceBase* pkInstSel = rkChrMgr.GetInstancePtr(packet.vid); if (pkInstSel) { pkInstSel->SetLockPlayer(packet.status); } return true; } #endif
Kod:
common/service.h // ekle #define ENABLE_GM_LOCK_PLAYER // Lock Player Move by GM
Kod:
game/cmd.cpp // Arat struct command_info cmd_info[] = // Üstüne ekle #ifdef ENABLE_GM_LOCK_PLAYER ACMD(do_lock_player); #endif // Arat { "\n", NULL, 0, POS_DEAD, GM_IMPLEMENTOR } // Üstüne ekle #ifdef ENABLE_GM_LOCK_PLAYER { "lock_player", do_lock_player, 0, POS_DEAD, GM_IMPLEMENTOR }, #endif
Kod:
game/char.h // dosya sonuna ekle BEFORE: }; ESex GET_SEX(LPCHARACTER ch); this: #ifdef ENABLE_GM_LOCK_PLAYER public: bool isLocked() const; void LockPlayer(BYTE status); protected: BOOL m_isLocked; #endif
Kod:
game/cmd_general.cpp // Bunun içinde ACMD(do_user_horse_ride): // bul if (ch->IsDead() || ch->IsStun()) // bununla değiştir if (ch->IsDead() || ch->IsStun() #ifdef ENABLE_GM_LOCK_PLAYER || ch->isLocked() #endif ) // Bunun içinde ACMD(do_ride): // bul if (ch->IsDead() || ch->IsStun()) // bunun ile değiştir if (ch->IsDead() || ch->IsStun() #ifdef ENABLE_GM_LOCK_PLAYER || ch->isLocked() #endif )
Kod:
game/cmd_gm.cpp // Dosya sonuna ekle #ifdef ENABLE_GM_LOCK_PLAYER ACMD(do_lock_player) { char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); const char* name = arg1; if (!*arg1) { ch->ChatPacket(CHAT_TYPE_INFO, "Invalid argument."); return; } LPCHARACTER sas = CHARACTER_MANAGER::instance().FindPC(name); if (!sas) { ch->ChatPacket(CHAT_TYPE_INFO, "Der Spieler ist nicht Online"); return; } if (!sas->IsPC()) return; DWORD vid = sas->GetVID(); LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid); const char* spieler = sas->GetName(); if (!tch) { ch->ChatPacket(CHAT_TYPE_INFO, "<Sytem> Der Spieler existiert nicht!"); return; } if (!tch->IsPC()) return; BYTE status; if (tch->isLocked()) status = 0; else status = 1; if (status == 1) tch->ChatPacket(CHAT_TYPE_INFO, "You have been locked by a GM"); else tch->ChatPacket(CHAT_TYPE_INFO, "You have benn unlocked by a GM"); tch->ChatPacket(CHAT_TYPE_INFO, "You was stucked by a GM."); tch->LockPlayer(status); TPacketGCLockPlayer packet; packet.bHeader = HEADER_GC_LOCK_PLAYER; packet.status = status; packet.vid = vid; tch->GetDesc()->Packet(&packet, sizeof(packet)); if (status == 1) ch->ChatPacket(CHAT_TYPE_INFO, "Locked %s(%d)", spieler, vid); else ch->ChatPacket(CHAT_TYPE_INFO, "Unlocked %s(%d)", spieler, vid); } #endif
Kod:
game/packet.h // Arat HEADER_GC_MAIN_CHARACTER4_BGM_VOL = 138, // altına ekle #ifdef ENABLE_GM_LOCK_PLAYER HEADER_GC_LOCK_PLAYER = 139, #endif // Dosya sonundaki bu kodun #pragma pack() // üstüne ekle #ifdef ENABLE_GM_LOCK_PLAYER typedef struct SPacketGCLockPlayer { BYTE bHeader; BYTE status; DWORD vid; } TPacketGCLockPlayer; #endif
Kod:
game/char.cpp // Arat void CHARACTER::Initialize() { CEntity::Initialize(ENTITY_CHARACTER); // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER m_isLocked = FALSE; #endif // Bunun içinde bool CHARACTER::CanMove() const // bul if (GetMyShop()) return false; // Altına ekle #ifdef ENABLE_GM_LOCK_PLAYER if (isLocked()) return false; #endif // Dosya sonuna ekle #ifdef ENABLE_GM_LOCK_PLAYER bool CHARACTER::isLocked() const { return m_isLocked; } void CHARACTER::LockPlayer(BYTE status) { m_isLocked = status; } #endif
GM Hesaptan Oyuncuyu Kilitleme Sistemi
Metin2 özel sunucularında güvenlik ve oyun içi disiplin açısından önemli bir konu olan GM hesapları aracılığıyla oyuncuların kilitlenmesi, hem sunucu sahipleri hem de aktif oynayan oyuncular için hayati önem taşımaktadır. Bu işlem genellikle yetkisiz davranışlar, hile kullanımı ya da oyun kurallarına aykırı hareketler durumunda uygulanır. Bu yazıda, Metin2 özel sunucularında GM hesabından oyuncuyu nasıl kilitleyeceğinizi detaylı olarak ele alacağız.
Neden Oyuncu Kilidi Gereklidir?
Metin2 gibi PvP odaklı oyunlarda, oyun içi dengeyi korumak büyük öneme sahiptir. Bir oyuncunun hileli ya da kural dışı davranışları, tüm topluluk üzerinde olumsuz etkilere neden olabilir. Bu gibi durumlarda, GM (Game Master) yetkilisi tarafından kullanıcıya ceza verilerek oyun içi denge korunur. Bu işlem, oyuncu veritabanında ya da sunucu seviyesinde kilitlenebilir.
GM Hesabıyla Oyuncu Kilitleme Yöntemleri
Genellikle C++ tabanlı sunucu sistemlerinde, oyuncu kilitleme işlemi DB (veritabanı) üzerinden gerçekleştirilir. Sunucu tarafında yetkili bir kullanıcı olarak giriş yapmışsanız, aşağıdaki adımları izleyebilirsiniz:
- Oyuncunun karakter adını veya ID numarasını alın.
- auth veritabanında bulunan account table içerisinde ilgili hesabı bulun.
- status alanını 'BLOCKED' olarak güncelleyin.
- Günlük kayıt (log) tutarak bu işlemi belgeleyin.
Python Tabanlı Yönetim Sistemleri
Bazı Metin2 geliştiricileri, Python dilini kullanarak GUI (grafiksel kullanıcı arayüzü) tabanlı yönetim panelleri oluşturmuşlardır. Bu tür sistemler sayesinde GM yetkilileri, oyuncu kilitleme işlemini daha kolay ve hızlı bir şekilde yapabilirler. Örneğin Py Root veya Martysama gibi sistemlerde özel komutlar sayesinde !block character_name gibi bir komutla doğrudan oyuncuyu engellemek mümkündür.
Olası Riskler ve Dikkat Edilmesi Gerekenler
Oyuncu kilitleme işlemi sırasında dikkat edilmesi gereken bazı önemli hususlar vardır. Yanlışlıkla bir oyuncuyu kilitlemek, hem topluluk hem de sunucu güvenliği açısından ciddi sorunlara yol açabilir. Bu nedenle her işlem öncesi kimlik doğrulama ve onay mekanizmaları kullanmanız önerilir. Ayrıca, yapılan işlemler log olarak saklanmalı ve gerektiğinde geri alınabilmelidir.
Sunucu Güvenliği ve Oyun Dengelemesi
GM hesapları ile yapılan oyuncu kilitleri, sadece惩戒 değil aynı zamanda güvenlik açısından da değerlendirilmelidir. Sunucuda PvP sistemlerinin doğru çalışması için, hileci oyuncuların zamanında tespiti ve engellenmesi gerekir. Bu bağlamda, kilit sistemi aynı zamanda oyun denge mekanizmalarının da bir parçasıdır.
Sonuç
Metin2 özel sunucularında GM hesapları üzerinden oyuncu kilitleme işlemi, güvenlik, denge ve topluluk yönetimi açısından kritik bir işlemdir. C++, Python ya da Py GUI tabanlı sistemlerde bu işlem farklı şekillerde yapılabilir. Ancak her durumda dikkatli ve kontrollü bir yaklaşım benimsenmelidir.
Locking a Player from GM Account
In Metin2 private servers, locking players via GM accounts is a critical topic for both security and in-game discipline. This action is typically applied when players engage in unauthorized behavior, cheating, or violations of game rules. In this article, we will provide a detailed explanation on how to lock a player from a GM account in Metin2 private servers.
Why Player Locking is Necessary?
In PvP-focused games like Metin2, maintaining in-game balance is crucial. Actions such as using cheats or breaking rules can negatively impact the entire community. In such cases, GMs (Game Masters) may issue penalties by locking the user's account, which can occur either at the database level or on the server-side.
Methods for Locking Players via GM Accounts
Typically, in C++ based server systems, player blocking is handled through the database (DB). If you are logged in as an authorized user on the server side, you can follow these steps:
- Obtain the player’s character name or ID number.
- Locate the relevant account in the account table within the auth database.
- Update the status field to 'BLOCKED'.
- Record this action in the log for documentation purposes.
Python-Based Management Systems
Some Metin2 developers have created GUI (graphical user interface) based management panels using the Python language. These systems allow GMs to lock players more easily and quickly. For instance, with systems like Py Root or Martysama, commands such as !block character_name can directly block a player.
Risks and Important Considerations
There are important considerations to keep in mind during the player-locking process. Accidentally locking an innocent player can lead to serious issues regarding both community trust and server security. Therefore, identity verification and confirmation mechanisms are recommended before each action. Moreover, all actions should be logged and reversible if needed.
Server Security and Game Balance
Player locks made through GM accounts should be evaluated not only as punishment but also as part of security measures. To ensure PvP systems function correctly, cheaters must be identified and blocked promptly. Thus, the locking system is also part of the game balance mechanism.
Conclusion
Locking players from GM accounts in Metin2 private servers is a critical task in terms of security, balance, and community management. Such operations can be performed in various ways depending on whether the system is based on C++, Python, or Py GUI. However, in all scenarios, a careful and controlled approach must be maintained.
