Developer Deliris 404 Posted May 22, 2016 Developer Share Posted May 22, 2016 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hello everyone, today I`m going to show to how to make a VIP system from SRC. You need Launcher SRC, Server SRC. So, let`s begin. Spoiler 1.Launcher: Go to UserInterface/InstanceBase.h and search Spoiler AFFECT_CHINA_FIREWORK, // 38 After that add: Spoiler AFFECT_VIP = 39, Search Spoiler BOOL IsGameMaster(); After that add: Spoiler BOOL IsVIP(); 1.2 Go to InstanceBase.cpp and search Spoiler BOOL CInstanceBase::IsGameMaster() { if (m_kAffectFlagContainer.IsSet(AFFECT_YMIR)) return true; return false; } After that add: Spoiler BOOL CInstanceBase::IsVIP() { if (m_kAffectFlagContainer.IsSet(AFFECT_VIP)) return true; return false; } In same file search: Spoiler if (IsGameMaster()) return TRUE; And after that add: Spoiler if (IsVIP()) return TRUE; //if you got bugs don`t add this line. Search: Spoiler if (rkInstDst.IsGameMaster()) return TRUE; After that add: Spoiler if (rkInstDst.IsVIP()) return TRUE; 1.3: In file InstanceBaseEffect.cpp search Spoiler if (pkInstMain->IsGameMaster()) { } After that add: Spoiler else if (pkInstMain->IsVIP()) { } Search: Spoiler if (IsGameMaster()) return; After that add: Spoiler if (IsVIP()) return; Search: Spoiler case AFFECT_YMIR: if (IsAffect(AFFECT_INVISIBILITY)) return; break; After that add: Spoiler case AFFECT_VIP: if (IsAffect(AFFECT_INVISIBILITY)) return; break; /* 1.4 In fine PythonCharacterModule.cpp search: Spoiler PyObject * chrIsGameMaster(PyObject* poSelf, PyObject* poArgs) { int iVirtualID; if (!PyTuple_GetInteger(poArgs, 0, &iVirtualID)) return Py_BuildException(); CInstanceBase * pInstance = CPythonCharacterManager::Instance().GetInstancePtr(iVirtualID); if (!pInstance) return Py_BuildValue("i", 0); return Py_BuildValue("i", pInstance->IsGameMaster()); } And after that add: Spoiler PyObject * chrIsVIP(PyObject* poSelf, PyObject* poArgs) { int iVirtualID; if (!PyTuple_GetInteger(poArgs, 0, &iVirtualID)) return Py_BuildException(); CInstanceBase * pInstance = CPythonCharacterManager::Instance().GetInstancePtr(iVirtualID); if (!pInstance) return Py_BuildValue("i", 0); return Py_BuildValue("i", pInstance->IsVIP()); } Search: Spoiler { "IsGameMaster", chrIsGameMaster, METH_VARARGS }, And after that add: Spoiler { "IsVIP", chrIsVIP, METH_VARARGS }, Launcher part done. 2.SERVER 2.1 In file common/length.h search: Spoiler GM_PLAYER, And after that add: Spoiler GM_VIP, 2.2 In file game/src/affect.h search: Spoiler AFF_CHINA_FIREWORK, And after add: Spoiler AFF_VIP = 39, 2.3 In file game/src/char.cpp search: Spoiler if (GetGMLevel() > GM_LOW_WIZARD) { m_afAffectFlag.Set(AFF_YMIR); m_bPKMode = PK_MODE_PROTECT; } And after add: Spoiler else if (GetGMLevel() == GM_VIP) { m_afAffectFlag.Set(AFF_VIP); //m_bPKMode = PK_MODE_PROTECT; //delete '//' if you want GM protection for VIP. } Search Spoiler if (GetLevel() < PK_PROTECT_LEVEL) m_bPKMode = PK_MODE_PROTECT; And after that add: Spoiler else if (GetGMLevel() == GM_VIP) { m_afAffectFlag.Set(AFF_VIP); //m_bPKMode = PK_MODE_PROTECT; //delete '//' if you want GM protection for VIP. } 2.4 In file game/src/config.cpp search Spoiler if (!strcasecmp(levelname, "LOW_WIZARD")) level = GM_LOW_WIZARD; And mofify like that: Spoiler if (!strcasecmp(levelname, "VIP")) level = GM_VIP; else if (!strcasecmp(levelname, "LOW_WIZARD")) level = GM_LOW_WIZARD; 2.5 In file db/src/ClientManager.cpp search: Spoiler else if (!stAuth.compare("WIZARD")) Info.m_Authority = GM_WIZARD; And after that add: Spoiler else if (!stAuth.compare("VIP")) Info.m_Authority = GM_VIP; 3.MYSQL 3.1 Go to your database->COMMON->RIGHT CLICK ON gmlist->DESIGN TABLE->SELECT mAuthority from Fields TAB->VALUES->ADD VIP AFTER PLAYER. 4.CLIENT 4.1. In file ROOT/PlayerSettingModule.py search Spoiler chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+37, "", "d:/ymir work/effect/etc/guild_war_flag/flag_yellow.mse") And after that add: Spoiler chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+38, "Bip01", "locale/en/effect/vip.mse") Edit locale/en with your locale : ex locale/ro || locale/de 4.2 In locale go to effect folder(WHERE YOU HAVE GM.MSE) and add THIS FILES: This is the hidden content, please Sign In or Sign Up Post any problems/bugs and we will solve them tohether Sorry for my bad english..:( 83 2 2 1 2 1 3 3 1 3 46 8 85 r Link to comment Share on other sites More sharing options...
AlCapone 67 Posted May 22, 2016 Share Posted May 22, 2016 Good my frend I will test this 1 Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 22, 2016 Author Developer Share Posted May 22, 2016 1 minute ago, AlCapone said: Good my frend I will test this I`m waiting for reply..xD r Link to comment Share on other sites More sharing options...
DasSchwarzeT 111 Posted May 22, 2016 Share Posted May 22, 2016 Well I guess doing it using the GM table is not the best solution. When you add a player to the group of VIP you have to write it into the common/gm_list and type /reload a into the chat. That's not the best solution but it shoukd work. I guess via a new quest function (pc.set_vip(true)) or something like this it would be much more comfortable for server admins. Link to comment Share on other sites More sharing options...
Aurora 46 Posted May 22, 2016 Share Posted May 22, 2016 Do you have src for VIP Channel? Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 22, 2016 Author Developer Share Posted May 22, 2016 6 minutes ago, Aurora said: Do you have src for VIP Channel? No but is easy to do this with a quest: Verify if player is on vip ch when login and if is and is not a vip kick him.. r Link to comment Share on other sites More sharing options...
DasSchwarzeT 111 Posted May 22, 2016 Share Posted May 22, 2016 Well if you do it like this tutorial, VIP players can't be attacked because of PK_PROTECTED. Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 22, 2016 Author Developer Share Posted May 22, 2016 3 minutes ago, DasSchwarzeT said: Well if you do it like this tutorial, VIP players can't be attacked because of PK_PROTECTED. Yes, i know... This is a VIP Feature...is easy to remove this feature r Link to comment Share on other sites More sharing options...
VegaS 1086 Posted May 22, 2016 Share Posted May 22, 2016 if (GetGMLevel() == GM_VIP) { m_afAffectFlag.Set(AFF_VIP); } else if (GetGMLevel() == GM_VIP) { m_afAffectFlag.Set(AFF_VIP); } if (IsVIP()) return; - delete For remove PK_PROTECTED . 1 Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 22, 2016 Author Developer Share Posted May 22, 2016 1 minute ago, VegaS said: if (GetGMLevel() == GM_VIP) { m_afAffectFlag.Set(AFF_VIP); } else if (GetGMLevel() == GM_VIP) { m_afAffectFlag.Set(AFF_VIP); } For remove PK_PROTECTED . I edited the post already.. Is ok anyway.. r Link to comment Share on other sites More sharing options...
VegaS 1086 Posted May 22, 2016 Share Posted May 22, 2016 2 minutes ago, Wahmon said: I edited the post already.. Is ok anyway.. Are you serious? xD void CInstanceBase::__AttachEmpireEffect(DWORD eEmpire) if (IsVIP()) return; Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 22, 2016 Author Developer Share Posted May 22, 2016 1 minute ago, VegaS said: Are you serious? xD void CInstanceBase::__AttachEmpireEffect(DWORD eEmpire) if (IsVIP()) return; What`s wrong with that ? r Link to comment Share on other sites More sharing options...
DasSchwarzeT 111 Posted May 22, 2016 Share Posted May 22, 2016 1 minute ago, VegaS said: Are you serious? xD void CInstanceBase::__AttachEmpireEffect(DWORD eEmpire) if (IsVIP()) return; Well if you are from another kingdom and VIP there would be two effects and this won't look good. I guess that's why he did this. Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 22, 2016 Author Developer Share Posted May 22, 2016 (edited) Are you sure ? I have IsVIP() and work`s fine..you can do how you want Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal r Link to comment Share on other sites More sharing options...
DexterSK 14 Posted May 22, 2016 Share Posted May 22, 2016 NICE GABRIEL!!!!!!!!!!! YOU ROCKS"!!!!!!!!!! 1 Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 22, 2016 Author Developer Share Posted May 22, 2016 I`m waiting for feedback :3 r Link to comment Share on other sites More sharing options...
ShadowsPR0 6 Posted May 22, 2016 Share Posted May 22, 2016 Im implementing it now will come back with Edit My DB doesnt compile X_X can this work without modifying DB ? Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 23, 2016 Author Developer Share Posted May 23, 2016 8 hours ago, ShadowsPR0 said: Im implementing it now will come back with Edit My DB doesnt compile X_X can this work without modifying DB ? Yes you can, but without a new GM level, you can use GOD authority.. Send me a pm with error and i will try to fix it. r Link to comment Share on other sites More sharing options...
terrorr 15 Posted May 23, 2016 Share Posted May 23, 2016 This one bro : chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+38, "Bip01", "d:\locale\ro\effect\vip.mse") Have to be like that: chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+38, "Bip01", "locale/en/effect/vip.mse") Regards. Link to comment Share on other sites More sharing options...
testtesttest13 0 Posted May 23, 2016 Share Posted May 23, 2016 16 hours ago, Wahmon said: Yes you can, but without a new GM level, you can use GOD authority.. Send me a pm with error and i will try to fix it. Wahmon , contact skype , please ? Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 23, 2016 Author Developer Share Posted May 23, 2016 (edited) 1 hour ago, terrorr said: This one bro : chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+38, "Bip01", "d:\locale\ro\effect\vip.mse") Have to be like that: chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+38, "Bip01", "locale/en/effect/vip.mse") Regards. Ohh, my bad, my client is crypted so.. i`m using with d:\ ThX fot feedback :3 -EDIT- - Skype Edited May 23, 2016 by Shisui Skype ID removed (Read Board Rules) r Link to comment Share on other sites More sharing options...
nicu1993 0 Posted May 24, 2016 Share Posted May 24, 2016 I can't atack a VIP person on FREE,I have this function dezactivated with // " //m_bPKMode = PK_MODE_PROTECT; //delete '//' if you want GM protection for VIP. " Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 24, 2016 Author Developer Share Posted May 24, 2016 Hmm, send me a pm with contact.. r Link to comment Share on other sites More sharing options...
Developer Deliris 404 Posted May 26, 2016 Author Developer Share Posted May 26, 2016 UP r Link to comment Share on other sites More sharing options...
drgos001 20 Posted May 26, 2016 Share Posted May 26, 2016 Good Link to comment Share on other sites More sharing options...
Recommended Posts