Jump to content
  • 0

Remove Pets In Towns


Question

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted (edited)

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
  • 0
Posted

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...

  • 0
Posted

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;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...