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;

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock