Jump to content
  • 0

Party zone add check


MoNsT3ReN4RgY

Question

Hello MaxCheaters...i added party teleporter on my pack but i need the party zone check..i mean when the party get lower than 5 members inside party zone all the players should be teleported back to gatekeeper..i dont know if it counts but i have the multifunction zone added allready

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
34 minutes ago, MoNsT3ReN4RgY said:

Hello MaxCheaters...i added party teleporter on my pack but i need the party zone check..i mean when the party get lower than 5 members inside party zone all the players should be teleported back to gatekeeper..i dont know if it counts but i have the multifunction zone added allready

 

You do this at enter and exist/teleport/logout, but you don't check the class like this guy needs to.

 

Edited by Trance
Link to comment
Share on other sites

  • 0

In L2Party.java find the method:

public void removePartyMember

and under 

getMembers().remove(player);

Add an example of code:

if (player.isInsideZone(ZoneId.PVP))
{
	if (getMemberCount() < 5)
	{
		getMembers().forEach(s -> s.teleToLocation(TeleportWhereType.TOWN));
	}
}

 

Link to comment
Share on other sites

  • 0
On 5/18/2020 at 5:16 PM, EdithFinch said:

In L2Party.java find the method:


public void removePartyMember

and under 


getMembers().remove(player);

Add an example of code:


if (player.isInsideZone(ZoneId.PVP))
{
	if (getMemberCount() < 5)
	{
		getMembers().forEach(s -> s.teleToLocation(TeleportWhereType.TOWN));
	}
}

 

i'm getting these errors tried to chance getMembers() to GetPartyMembers() ..but i am getting errors on teleportwheretype.town and zoneid.pvp

Χωρίς τίτλο.png

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


×
×
  • Create New...