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

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..