So I’m having this consistent error where my bot fails to move consistently. It seems as if my teleport skill dissapears (running a mf hammerdin) and when I take off and re-equip the enigma the problem goes away. Obviously I can’t be around 24/7 to take off and put on my enigma to fix the bug. Has anyone encountered a similar situation and have suggestions? Thanks guys.
there were a plenty of these issues on https://github.com/kolton/d2bot-with-kolbot/issues
- one answer was to avoid using the field id
be sure that your character have enough strengths points to wear the enigma armor, without any addition from other gear.
However, a while ago @jaenster wrote a part to reset enigma, like in d2nt:
/*
* jaenster
*
* I believe etal had a function for it, and i was right
* https://github.com/Project-Etal/D2Etal/blob/30406c9c27f6449be1c31a9fcbaefba07d6bdefb/D2Etal/scripts/libs/common/NTTown.ntl#L1629
* https://github.com/Project-Etal/D2Etal/blob/30406c9c27f6449be1c31a9fcbaefba07d6bdefb/D2Etal/scripts/libs/common/NTMove.ntl#L24
* which is called here. Etal fix'd this bug by checking if skill 54 (teleport) was still active, for every move it made.
* If I see the code of etal, it seems to "see" if it is bugged, you should see no teleport skill, but an equiped enigma.
*
* This would do the same, if enigma is equiped, but no teleport is found as skill, it should re-equip the enigma.
* To implement this check within kolton's counter part -> you would add this in your char config
*
*/
typeof Pather === 'object' && (function(original) {
Pather.useTeleport = function() {
let enigma = me.getItems().filter(item=>item.location===1 && item.bodylocation === 3).first();
// Check if we wear an armor, if it is an enigma, and we do not have teleport as a skill
if (enigma && enigma.getPrefix(20539 /*Enigma*/) && !me.getSkill(54, 1)) {
print('Enigma seems to be bugged');
enigma.toCursor(); // Put enigma on cursor
//ToDo; pause everything else?
delay(5000); // TO BE SURE
clickItem(0,3); // Put item back on armor slot
delay(5000); // TO BE SURE
//ToDo unpause everything else?
}
return original();
}
})(Pather.useTeleport)