Open Ricola3D opened 6 years ago
Issue discussed and progress made in https://github.com/kolton/d2bot-with-kolbot/issues/280 - now linked.
I just ran into this same exact issue with the same setup. I debugged it and concluded that the player.area is being read too early in the function. A better fix is to move area = player.area; after the for loop for taking the portal. Code should look like this:
print("ÿc4MFHelperÿc0: Clear Level");
for (i = 0; i < 5; ++i) {
if (Pather.usePortal(player.area, player.name)) {
break;
}
delay(1000);
}
area = player.area;
Also replace i += 1 to ++i because who increments the loop variable like that?
I plan on submitting a pull request to fix this issue.
@semajtrip good work - ensure you test on all scripts. timing within and between scripts tp calls causes issues. e.g. rakinishu before trist causes a problem as the leader opens tp, tells followers to kill (take tp), kills raki (followers tp back but often miss the tp before it closes) then jumps to trist, opens tp and calls to clear area.. this nearly always failed before the above edits.
also one of the act 1 scripts did the same. I think mausoleum also failed often.
Environment:
Settings:
Scenario:
I added some logs to find the issue here in code:
MFHelper.js
The issue is because of the value of
area
andplayer.area
as explained in comments.A dumb work around solution is to add a
delay(1000);
before copyingplayer.area
value in thearea
variable 👎