Rushing used to work fine; what am I doing wrong? I start a normal D2, set my paladin bot to join TCP/IP and only do the rusher script. No funny business in the config. The error is in the sixth line of the function that I suppose checks what area to start and/or waits for everyone to party up.
I can change the test to false and use the “master” and “do” commands manually, but I’m just wondering what the problem is. How can the party variable be undefined when it just got set a couple of lines earlier? I haven’t programmed JavaScript in over ten years, so please help me out here.
this.getPartyAct = function () {
var party = getParty(),
minArea = 999;
do {
if (party.name !== me.name) {
while (!party.area) {
me.overhead("Waiting for party area info");
delay(500);
}
if (party.area < minArea) {
minArea = party.area;
}
}
} while (party.getNext());
if (minArea <= 39) {
return 1;
}
if (minArea >= 40 && minArea <= 74) {
return 2;
}
if (minArea >= 75 && minArea <= 102) {
return 3;
}
if (minArea >= 103 && minArea <= 108) {
return 4;
}
return 5;
};
Thank you in advance, and have a good day.