Jump to content

Recommended Posts

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 by VegaS
fix
  • Love 3
Link to comment
Share on other sites

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 

Untitled.png

Link to comment
Share on other sites

  • Active Member
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.

1470238151.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1

I'll be always helpful! 👊 

Link to comment
Share on other sites

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

 

  • Love 3
Link to comment
Share on other sites

  • Active Member
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 :P)

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

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 by VegaS
xxx
  • Love 2
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.