0 Tryskell Posted November 9, 2020 Posted November 9, 2020 (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 November 9, 2020 by Tryskell 1 Quote
0 Friko Posted November 10, 2020 Author Posted November 10, 2020 (edited) a Edited March 2, 2023 by Friko Quote
0 Tryskell Posted November 10, 2020 Posted November 10, 2020 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. Quote
0 SweeTs Posted November 11, 2020 Posted November 11, 2020 (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 November 11, 2020 by SweeTs Quote
Question
Friko
a
Edited by Friko4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.