L2JDP Revision Number: 9839
Hello! i make a code that can get characters inside a Town Zone, townId.
Code: Select all
public static int pewpew(int bitch) { L2ZoneType zone = TownManager.getTown(bitch); int i = 0; if (zone != null) { for (L2Character character : zone.getCharactersInside()) { if (character instanceof L2PcInstance) { i++; } } return i; } return -1; }
Giran Town(ID: 9):
Code: Select all
tb.append("<td valign=\"top\"><font color=\"FF6600\">Players Inside: " + pewpew(9) + ".</font>");
How i can make this code to get the ZoneId ?
I need adapt this code to get the ZONE ID to send in the HTML code.
EXAMPLE:
Code: Select all
tb.append("<td valign=\"top\"><font color=\"FF6600\">Players Inside: " + pewpew(12002) + ".</font>");
You can find this on: data/zones/custom_boss.xml
Code: Select all
<zone name="Baium Boss" id="12002" type="BossZone" shape="NPoly" minZ="10061" maxZ="11061"> <node X="111022" Y="16177" /> <node X="114510" Y="12623" /> <node X="118142" Y="15790" /> <node X="114773" Y="19589" /> </zone>
I need this because i have created one custom boss teleport gatekeeper, and i need add the info of players inside the bosses area.
HELP ME PLEASE!