Skip to content

Party zone add check

Featured Replies

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

Solved by Trance

  • Solution
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

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));
	}
}

 

  • 4 months later...
  • Author
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

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.