Jump to content
metin2dev
Dash

[C++] Party flag

Recommended Posts

On 04.11.2015, 07:36:43, tierrilopes said:

Party flag working perfectly, thank you again.

To the people that want to use it to make the buff for the whole group, but also have they like they normally do (buff people of same kingdom without being at their party):

 

 

SKIP this part of the tutorial

 

Hidden Content

 

At this part, do what is bellow instead

 

Hidden Content

 

Do this instead:

 

Hidden Content

tried you'r way, but now the skill is buffing like the normal one ... but using party_flag

Share this post


Link to post
Share on other sites
4 hours ago, Tasho said:

tried you'r way, but now the skill is buffing like the normal one ... but using party_flag

With buffs like normal way if your not ina  party.

When you're in a party it will buff yourself and the party members.

If that doesnt work i suggest doing Dash whole tutorial, and then see my post and remove only those parts. (with Party set on db.skill_proto)

  • Like 1

Share this post


Link to post
Share on other sites

Good job Dash! Nice work!

But the problem is, if i want buff my mate without group, don't work.. I just buff myself..

I have try just replace what tierrilopes said but still don't work..

King regards!

Share this post


Link to post
Share on other sites

Hi Guys!


I know this post is very old but I usually see this system in some server and I always find a mistake about it.
Let me explain.
If you implement this system with the fix that tierrilopes show to us still you won't be able to buff someone if you are in a party and he is not. So you should exit your current party, and give buff to him.
If you want to fix this bug too, you should go to char_skill.cpp and search for this line:

GetParty()->ForEachOnMapMember(f, GetMapIndex());

After this line past this condition:
 

//Fix where you should exit your party to buff someone who is not in your party//
		if (!pkVictim->GetParty())
			ComputeSkill(dwVnum, pkVictim);

Finally it should like this:

 

else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
	{
		FPartyPIDCollector f;
		GetParty()->ForEachOnMapMember(f, GetMapIndex());
		//Fix where you should exit your party to buff someone who is not in your party//
		if (!pkVictim->GetParty())
			ComputeSkill(dwVnum, pkVictim);
		for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
		{
			LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
			ComputeSkill(dwVnum, ch);
		}
	}

Compile, and you are done!

Result:
For now, you can buff any player and doesn't matter you are in a party or not, but if you are in a party you will buff your teammates with the guy who is not in your team.


It"s not a large modification, but I think it's useful.


Sorry for my bad english!
Best regards!

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
On 9/24/2018 at 4:37 PM, hackeresmetin@gmail.com said:

Hi Guys!


I know this post is very old but I usually see this system in some server and I always find a mistake about it.
Let me explain.
If you implement this system with the fix that tierrilopes show to us still you won't be able to buff someone if you are in a party and he is not. So you should exit your current party, and give buff to him.
If you want to fix this bug too, you should go to char_skill.cpp and search for this line:


GetParty()->ForEachOnMapMember(f, GetMapIndex());

After this line past this condition:
 


//Fix where you should exit your party to buff someone who is not in your party//
		if (!pkVictim->GetParty())
			ComputeSkill(dwVnum, pkVictim);

Finally it should like this:

 


else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
	{
		FPartyPIDCollector f;
		GetParty()->ForEachOnMapMember(f, GetMapIndex());
		//Fix where you should exit your party to buff someone who is not in your party//
		if (!pkVictim->GetParty())
			ComputeSkill(dwVnum, pkVictim);
		for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
		{
			LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
			ComputeSkill(dwVnum, ch);
		}
	}

Compile, and you are done!

Result:
For now, you can buff any player and doesn't matter you are in a party or not, but if you are in a party you will buff your teammates with the guy who is not in your team.


It"s not a large modification, but I think it's useful.


Sorry for my bad english!
Best regards!

it works perfectly, ty 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×