Jump to content
  • 0

[HELP] Radius Check


Question

Posted

Hi anyone can help me im trying to create a condition that will check if player is near the party leader.

 

I have a cicle checking all party members but i can't figure how to create a condition that will check if player is near lets say in an area of 400, i knew how to do it but forgot.

 

Thx in advance

2 answers to this question

Recommended Posts

  • 0
Posted

Something like this...

 


private boolean checkInRangeLeader(L2PcInstance player, Integer _range)
{
	L2Party party = player.getParty();
	if (party == null)
	{
		return false;
	}
	if (!player.isInsideRadius(party.getLeader(), _range, true, true))
	{
		return false;
	}
return true;
}

 

Then you'd use it like this

if (checkInRangeLeader(whoever,1000) )
{
   do whatever.
}

 

Just an example... Very simple to do though.

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock