Page 1 of 1

[SOLVED] Prevent teleporting/soe/recall during event

Posted: Thu Mar 20, 2014 7:52 am
by HappyLDE
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 6377:
L2JDP Revision 10159:

HI i coded an event engine in datapack by extending L2Script:

Code: Select all

public final class EventManager extends L2Script implements IBypassHandler, IVoicedCommandHandler { ... }
But during event one can escape by using SOE or whatever, how to prevent that?

We do have the listener onSkillUse but i wouldn't want to check if 10 most used teleport skills are used on each skill used during an event. Any solutions? :mrgreen:

Re: Prevent teleporting/soe/recall during event

Posted: Sat Mar 22, 2014 9:31 am
by HappyLDE
Maybe i wasn't clear :( isn't there a function like :

Code: Select all

// On enter eventplayer.setCanTeleport(false);
I need to be able to teleport the players to event and then block his teleport abilities..

There is already this function that works perfectly for not having the "To Village" button to respawn. The char is respawned only when the event says so:

Code: Select all

// On enter eventplayer.setCanRevive(false);

Re: Prevent teleporting/soe/recall during event

Posted: Sat Mar 22, 2014 10:31 am
by HappyLDE
Solved:

Code: Select all

    @Override    public boolean onSkillUse(final SkillUseEvent event) {        if ( event.getSkill().hasEffectType(L2EffectType.TELEPORT) ) {            return false;        }         return true;    }