The main idea if you know some basic java is to make an Instance NPC (copy one L2XXInstance)
and inside write codes like
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.startsWith("partytp"))
{
TP(event, npc, player, event);
}
return "";
}
@SuppressWarnings("deprecation")
public int getPartiesInside(int zoneId)//Calculating parties inside party area.
{
int i = 0;
for (L2ZoneType zone : ZoneManager.getInstance().getAllZones())
if (zone.getId() == zoneId)
{
for (L2Character character : zone.getCharactersInside().values())
if (character instanceof L2PcInstance && (!((L2PcInstance) character).getClient().isDetached()) &&
((L2PcInstance) character).getParty() != null &&
((L2PcInstance) character).getParty().isLeader((L2PcInstance) character))
i++;
}
return i;
}
and when they click teleport an IF to check if parties number is bigger than X if you know the basics of java