[SOLVED] Prevent teleporting/soe/recall during event

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
HappyLDE
Posts: 123
Joined: Tue Sep 10, 2013 6:22 pm
Location: Belgium
Contact:

[SOLVED] Prevent teleporting/soe/recall during event

Post 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:
Last edited by HappyLDE on Sat Mar 22, 2014 10:32 am, edited 1 time in total.
Thank you for making L2JServer happen! :D
"If you believe you will fail or succeed, in both ways you are right." - Henry Ford
User avatar
HappyLDE
Posts: 123
Joined: Tue Sep 10, 2013 6:22 pm
Location: Belgium
Contact:

Re: Prevent teleporting/soe/recall during event

Post 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);
Thank you for making L2JServer happen! :D
"If you believe you will fail or succeed, in both ways you are right." - Henry Ford
User avatar
HappyLDE
Posts: 123
Joined: Tue Sep 10, 2013 6:22 pm
Location: Belgium
Contact:

Re: Prevent teleporting/soe/recall during event

Post by HappyLDE »

Solved:

Code: Select all

    @Override    public boolean onSkillUse(final SkillUseEvent event) {        if ( event.getSkill().hasEffectType(L2EffectType.TELEPORT) ) {            return false;        }         return true;    }
Thank you for making L2JServer happen! :D
"If you believe you will fail or succeed, in both ways you are right." - Henry Ford
Post Reply