this is all maplecharacter
add this global variable:
Code:
private ScheduledFuture<?> fishTask;
add this in "changeMapInternal" method (around the place where the damage dealing is also done)
Code:
if (mapid == 0) { // replace 0 with ur fish map id
fishTask = TimerManager.getInstance().schedule(this::fishStuff, 5000); // time in milliseconds
}
add this method anywhere
Code:
private void fishStuff() {
if (getChair() == 1) { // I believe this checks if the player is sitting, altho I'm not sure
// add fishing code
}
fishTask = TimerManager.getInstance().schedule(this::fishStuff, 5000);
}
now go to the leaveMap method, add a simmilar check that 'hpDecreaseTask' has but for 'fishTask'
and then again the same story for the "empty(final boolean remove)" method
I hope you can use your own logic to add the fishing code that u want