BackPlayer 55 Posted August 3, 2016 Share Posted August 3, 2016 How can i block gms to give buffs? Link to comment Share on other sites More sharing options...
VegaS 1087 Posted August 3, 2016 Share Posted August 3, 2016 (edited) Hmm try with that xD [File: Src/Server/game/src/char_skill.cpp] //1.) Search in function bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster): if (false == CanUseSkill(dwVnum)) return false; //2,) Add before: #define ENABLE_BLOCK_BUFF_SKILL_STAFF // put this in common/service.h #ifdef ENABLE_BLOCK_BUFF_SKILL_STAFF int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (dwVnum == pTableSkill[i] && GetGMLevel() > GM_PLAYER) { //ChatPacket(CHAT_TYPE_INFO, "You are part of staff, you can not do use buff skill."); return false; } } #endif Edited August 3, 2016 by VegaS fix 3 Link to comment Share on other sites More sharing options...
Zeke 811 Posted August 3, 2016 Share Posted August 3, 2016 13 minutes ago, VegaS said: Hmm try with that xD [File: Src/Server/game/src/char_skill.cpp] //1.) Search in function CanUseSkill: if (0 == dwSkillVnum) return false; //2,) Add bellow: #ifdef ENABLE_BLOCK_BUFF_SKILL_STAFF int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (pTableSkill[i] == dwSkillVnum && GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "You are part of staff, you can not do use buff skill."); return false; } } #endif How is possible to be everywhere; every post i see with [C++] down there you 100% have comment something xD Link to comment Share on other sites More sharing options...
BackPlayer 55 Posted August 3, 2016 Author Share Posted August 3, 2016 he does still think that i am reseller? Link to comment Share on other sites More sharing options...
VegaS 1087 Posted August 3, 2016 Share Posted August 3, 2016 11 minutes ago, BackPlayer said: he is still think that i am reseller? Maybe 1 Link to comment Share on other sites More sharing options...
BackPlayer 55 Posted August 3, 2016 Author Share Posted August 3, 2016 4 minutes ago, VegaS said: Maybe xD pff Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted August 3, 2016 Active Member Share Posted August 3, 2016 (edited) 1 hour ago, VegaS said: Hmm try with that xD [File: Src/Server/game/src/char_skill.cpp] //1.) Search in function CanUseSkill: if (0 == dwSkillVnum) return false; //2,) Add bellow: #ifdef ENABLE_BLOCK_BUFF_SKILL_STAFF int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (pTableSkill[i] == dwSkillVnum && GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "You are part of staff, you can not do use buff skill."); return false; } } #endif It doesn't work for me. I still can buff players with GM. Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 I'll be always helpful! Link to comment Share on other sites More sharing options...
VegaS 1087 Posted August 3, 2016 Share Posted August 3, 2016 31 minutes ago, ReFresh said: It doesn't work for me. I still can buff players with GM. Check again my first post, and please next time stop with quote :-w is so ugly.. 2 Link to comment Share on other sites More sharing options...
BackPlayer 55 Posted August 3, 2016 Author Share Posted August 3, 2016 ty i tested it and works fine! Link to comment Share on other sites More sharing options...
VegaS 1087 Posted August 3, 2016 Share Posted August 3, 2016 Here is a much better, because method before you can not use all the skill nor for you. Put check in function: bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster) #ifdef ENABLE_REFLECT_BUFF_STAFF int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (dwVnum == pTableSkill[i] && GetGMLevel() > GM_PLAYER) { pkVictim = this; // The skills you will reflect on you when you try to give a player a buff, use as you give yourself buff. } } #endif 3 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 3, 2016 Active Member Share Posted August 3, 2016 1 hour ago, VegaS said: Here is a much better, because method before you can not use all the skill nor for you. Put check in function: bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster) #ifdef ENABLE_REFLECT_BUFF_STAFF int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (dwVnum == pTableSkill[i] && GetGMLevel() > GM_PLAYER) { pkVictim = this; // The skills you will reflect on you when you try to give a player a buff, use as you give yourself buff. } } #endif Awesome dude thanks Btw isn't it better to do Spoiler if (deVnum == pTableSkill && GetGMLevel() > GM_PLAYER) { if ((GetGMLevel() < GM_PLAYER) != pkVictim) { pkVictim = this; } } so GMs can buff each other but not normal players? (I know my function is shit I hope someone corrects it ) Also if someone could please be so kind to give a "return false;" function for inviting GMs to party/guild and the other way around (GMs create party/invite to guild players) I would be so much greatful Thanks in advance Link to comment Share on other sites More sharing options...
VegaS 1087 Posted August 3, 2016 Share Posted August 3, 2016 (edited) 35 minutes ago, Mind Rapist said: Hide contents if (deVnum == pTableSkill && GetGMLevel() > GM_PLAYER){ if ((GetGMLevel() < GM_PLAYER) != pkVictim) { pkVictim = this; }} Please stop, do not kill c++. xD omg no. Now check is only if you have grade gm and if victim is a player. int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (dwVnum == pTableSkill[i] && GetGMLevel() > GM_PLAYER && pkVictim->GetGMLevel() == GM_PLAYER) { [......................] } } Edited August 3, 2016 by VegaS xxx 2 Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted August 4, 2016 Active Member Share Posted August 4, 2016 It works fine, good job. I'll be always helpful! Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 4, 2016 Active Member Share Posted August 4, 2016 Thanks dude :-D btw I just remembered, what about party buffs? Many people have enabled their buffs' setFlag to be party. And Blue Possession is a party skill too... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now