Skip to content

Remove Pets In Towns

Featured Replies

Greeting cheaters ! I wonder if it is  possible to remove pets on enter in every towns or peace zones.

Go to L2TownZone.java , find onEnter method and add a check there.
Each time a character is entering a peace zone check if it has a pet, if yes then unsummon it.

Edited by `iAndre

Greeting cheaters ! I wonder if it is  possible to remove pets on enter in every towns or peace zones.

go to com.l2jhellas.gameserver.model.zone.type find L2TownZone.java find protected void onEnter(L2Character character)

 

 

find: //((L2PcInstance)character).sendMessage("You entered "+_townName);

((L2PcInstance) character).setLastTownName(_townName);
 
add:
+if(((L2PcInstance) character).getPet()!=null)
+{
+((L2PcInstance) character).getPet().unSummon((L2PcInstance) character);
+((L2PcInstance) character).sendMessage("Entered in town your pet has been removed!");
+}

Edited by AbSoLuTePoWeR

  • Author

Go to L2TownZone.java , find onEnter method and add a check there.

Each time a character is entering a peace zone check if it has a pet, if yes then unsummon it.

works fine but there is somthing i've missed, can you please tell me how to dissallow player to summon pets in town too? cause its silly to unsumon their pets on enter while they still can summon them while they are already in a town...

works fine but there is somthing i've missed, can you please tell me how to dissallow player to summon pets in town too? cause its silly to unsumon their pets on enter while they still can summon them while they are already in a town...

Block summon skills in peace zone, something like the one below should work ..

if ((Character.isInsideZone(ZoneId.PEACE)) && (skill.getSkillType == L2SkillType.SUMMON))
isDisabled == true;

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.