Hi!
I want to check if the player has summoned a pet or not.
Does anybody done something like this or knows how to do it?
I managed to give buffs to a summon using st.getPlayer().getPet() but if player doesnt got a pet summoned it will return a python error.
How can I get if player got or not a summoned pet?
Tnx!!!
Check if Player has Pet summoned (Gracia 2.1)
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 50
- Joined: Wed Mar 24, 2010 10:42 pm
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Check if Player has Pet summoned (Gracia 2.1)
you could just check e.g. the quest for a hatchling or wolf, how they check the pet summoned.. (421_LittleWingAdventures, 422_RepentYourSins, ...)
in java:
in jython:
in java:
Code: Select all
if (st.getPlayer().getPet() != null) { // do something if player has pet summoned}
Code: Select all
pet = st.getPlayer().getPet()if pet : // do something if player has pet summoned, you can use the variable pet as the pet to get pet data or do something with the pet
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
-
- Posts: 50
- Joined: Wed Mar 24, 2010 10:42 pm