Jump to content

Question

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

You have to store your running task to a ScheduledFuture<?> _task (stored in L2PcInstance / Player) and then

 

        if (_task != null)
        {
            _task.cancel(false);
            _task = null;
        }

 

over it if you need to abort it. That code section can be put in a public method to be triggered anywhere, anytime. You got over 50+ occurrences on any regular L2J pack of that way of coding.

Edited by Tryskell
  • Like 1
  • 0
Posted

The task still runs silently in background.

 

While the task is only few dozens of seconds and is barely exploitable, it's not a good practice. Using that type of logic will pown you, one day or another.

  • 0
Posted (edited)

Simplest solution. Before you do revive, make a zone check.. Sounds obvious, right.

 

Whatever you like. Could be assigned to some method, variable as suggested. But it's not like it's a must, nor the whole code is super duper. Keep it simple stupid.

Edited by SweeTs

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