Skip to content

Commit

Permalink
Change Pather.pathTo back to Pather.moveTo
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeKGilmore committed Apr 14, 2019
1 parent 9ca4361 commit dbbd06c
Show file tree
Hide file tree
Showing 37 changed files with 260 additions and 254 deletions.
4 changes: 2 additions & 2 deletions d2bs/kolbot/libs/bots/Andariel.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Andariel() {
}

if (getDistance(me, target) <= 10) {
Pather.pathTo(me.x > 22548 ? 22535 : 22560, 9520);
Pather.moveTo(me.x > 22548 ? 22535 : 22560, 9520);
}
}

Expand All @@ -41,7 +41,7 @@ function Andariel() {
throw new Error("Failed to move to Catacombs Level 4");
}

Pather.pathTo(22549, 9520);
Pather.moveTo(22549, 9520);

if (me.classid === 1 && me.gametype === 0) {
this.killAndariel();
Expand Down
6 changes: 3 additions & 3 deletions d2bs/kolbot/libs/bots/AutoBaal.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function AutoBaal() {
if (throneCheck && me.area === 109) { // wait for throne signal - leader's safe message
print("ÿc4AutoBaal: ÿc0Trying to take TP to throne.");
Pather.usePortal(131, null); // take TP to throne
Pather.pathTo(Config.AutoBaal.LeechSpot[0], Config.AutoBaal.LeechSpot[1]); // move to a safe spot
Pather.moveTo(Config.AutoBaal.LeechSpot[0], Config.AutoBaal.LeechSpot[1]); // move to a safe spot
Precast.doPrecast(true);
Town.getCorpse(); // check for corpse - happens if you die and reenter
}
Expand All @@ -222,7 +222,7 @@ function AutoBaal() {
}

if (baalCheck && me.area === 131) { // wait for baal signal - leader's baal message
Pather.pathTo(15092, 5010); // move closer to chamber portal
Pather.moveTo(15092, 5010); // move closer to chamber portal
Precast.doPrecast(false);

while (getUnit(1, 543)) { // wait for baal to go through the portal
Expand All @@ -235,7 +235,7 @@ function AutoBaal() {
print("ÿc4AutoBaal: ÿc0Entering chamber.");

if (Pather.usePortal(null, null, portal)) { // enter chamber
Pather.pathTo(15166, 5903); // go to a safe position
Pather.moveTo(15166, 5903); // go to a safe position
}

Town.getCorpse(); // check for corpse - happens if you die and reenter
Expand Down
18 changes: 9 additions & 9 deletions d2bs/kolbot/libs/bots/Baal.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function Baal() {
}

for (i = 0; i < pos.length; i += 2) {
Pather.pathTo(pos[i], pos[i + 1]);
Pather.moveTo(pos[i], pos[i + 1]);
Attack.clear(25);
}
};
Expand All @@ -129,7 +129,7 @@ function Baal() {
if (hydra) {
do {
if (hydra.mode !== 12 && hydra.getStat(172) !== 2) {
Pather.pathTo(15072, 5002);
Pather.moveTo(15072, 5002);
while (hydra.mode !== 12) {
delay(500);
if (!copyUnit(hydra).x) {
Expand Down Expand Up @@ -208,7 +208,7 @@ function Baal() {
throw new Error("Failed to move to Throne of Destruction.");
}

Pather.pathTo(15095, 5029);
Pather.moveTo(15095, 5029);

if (Config.Baal.DollQuit && getUnit(1, 691)) {
say("Dolls found! NG.");
Expand All @@ -224,7 +224,7 @@ function Baal() {

if (Config.PublicMode) {
this.announce();
Pather.pathTo(15118, 5002);
Pather.moveTo(15118, 5002);
Pather.makePortal();
say(Config.Baal.HotTPMessage);
Attack.clear(15);
Expand All @@ -233,20 +233,20 @@ function Baal() {
this.clearThrone();

if (Config.PublicMode) {
Pather.pathTo(15118, 5045);
Pather.moveTo(15118, 5045);
Pather.makePortal();
say(Config.Baal.SafeTPMessage);
Precast.doPrecast(true);
}

tick = getTickCount();

Pather.pathTo(15094, me.classid === 3 ? 5029 : 5038);
Pather.moveTo(15094, me.classid === 3 ? 5029 : 5038);

MainLoop:
while (true) {
if (getDistance(me, 15094, me.classid === 3 ? 5029 : 5038) > 3) {
Pather.pathTo(15094, me.classid === 3 ? 5029 : 5038);
Pather.moveTo(15094, me.classid === 3 ? 5029 : 5038);
}

if (!getUnit(1, 543)) {
Expand Down Expand Up @@ -309,7 +309,7 @@ MainLoop:
say(Config.Baal.BaalMessage);
}

Pather.pathTo(15090, 5008);
Pather.moveTo(15090, 5008);
delay(5000);
Precast.doPrecast(true);

Expand All @@ -325,7 +325,7 @@ MainLoop:
throw new Error("Couldn't find portal.");
}

Pather.pathTo(15134, 5923);
Pather.moveTo(15134, 5923);
Attack.kill(544); // Baal
Pickit.pickItems();
}
Expand Down
42 changes: 21 additions & 21 deletions d2bs/kolbot/libs/bots/BaalAssistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function BaalAssistant() {
return false;
}
if (getDistance(me, 15094, 5029) > 3) {
Pather.pathTo(15094, 5029);
Pather.moveTo(15094, 5029);
}
if (Config.AttackSkill[4] > 0) {
Skill.setSkill(Config.AttackSkill[4], 0);
Expand Down Expand Up @@ -225,7 +225,7 @@ function BaalAssistant() {
}
}
for (i = 0; i < pos.length; i += 2) {
Pather.pathTo(pos[i], pos[i + 1]);
Pather.moveTo(pos[i], pos[i + 1]);
Attack.clear(25);
}
};
Expand All @@ -235,7 +235,7 @@ function BaalAssistant() {
if (hydra) {
do {
if (hydra.mode !== 12 && hydra.getStat(172) !== 2) {
Pather.pathTo(15072, 5002);
Pather.moveTo(15072, 5002);
while (hydra.mode !== 12) {
delay(500);
if (!copyUnit(hydra).x) {
Expand Down Expand Up @@ -398,26 +398,26 @@ function BaalAssistant() {
}

if (entrance) {
Pather.pathTo(entrance.x > me.x ? entrance.x - 5 : entrance.x + 5, entrance.y > me.y ? entrance.y - 5 : entrance.y + 5);
Pather.moveTo(entrance.x > me.x ? entrance.x - 5 : entrance.x + 5, entrance.y > me.y ? entrance.y - 5 : entrance.y + 5);
}

if (!Pather.moveToExit(131, true) || !Pather.pathTo(15118, 5002)) {
if (!Pather.moveToExit(131, true) || !Pather.moveTo(15118, 5002)) {
throw new Error("Failed to move to Throne of Destruction.");
}

Pather.pathTo(15095, 5029);
Pather.moveTo(15095, 5029);

if ((SoulQuit && getUnit(1, 641)) || (DollQuit && getUnit(1, 691))) {
print("Burning Souls or Undead Soul Killers found, ending script.");
return true;
}

Pather.pathTo(15118, 5002);
Pather.moveTo(15118, 5002);
if (Helper) {
Attack.clear(15);
Pather.pathTo(15118, 5002);
Pather.moveTo(15118, 5002);
} else {
Pather.pathTo(15117, 5045);
Pather.moveTo(15117, 5045);
}

secondAttempt = true;
Expand All @@ -431,9 +431,9 @@ function BaalAssistant() {
}
if (Helper) {
Attack.clear(15);
Pather.pathTo(15118, 5002);
Pather.moveTo(15118, 5002);
} else {
Pather.pathTo(15117, 5045);
Pather.moveTo(15117, 5045);
}
}
}
Expand Down Expand Up @@ -477,9 +477,9 @@ function BaalAssistant() {

if (Helper) {
Attack.clear(15);
Pather.pathTo(15118, 5002);
Pather.moveTo(15118, 5002);
} else {
Pather.pathTo(15117, 5045);
Pather.moveTo(15117, 5045);
}

secondAttempt = true;
Expand All @@ -493,9 +493,9 @@ function BaalAssistant() {
}
if (Helper) {
Attack.clear(15);
Pather.pathTo(15118, 5002);
Pather.moveTo(15118, 5002);
} else {
Pather.pathTo(15117, 5045);
Pather.moveTo(15117, 5045);
}
}
}
Expand All @@ -515,7 +515,7 @@ function BaalAssistant() {
Attack.clear(15);
this.clearThrone();

Pather.pathTo(15094, me.classid === 3 ? 5029 : 5038);
Pather.moveTo(15094, me.classid === 3 ? 5029 : 5038);
Precast.doPrecast(true);
}

Expand All @@ -524,7 +524,7 @@ function BaalAssistant() {
MainLoop: while (true) {
if (Helper) {
if (getDistance(me, 15094, me.classid === 3 ? 5029 : 5038) > 3) {
Pather.pathTo(15094, me.classid === 3 ? 5029 : 5038);
Pather.moveTo(15094, me.classid === 3 ? 5029 : 5038);
}
}

Expand Down Expand Up @@ -607,11 +607,11 @@ function BaalAssistant() {

if ((throneStatus || baalCheck) && KillBaal && me.area === 131) {
if (Helper) {
Pather.pathTo(15090, 5008);
Pather.moveTo(15090, 5008);
delay(2000);
Precast.doPrecast(true);
} else {
Pather.pathTo(15090, 5010);
Pather.moveTo(15090, 5010);
Precast.doPrecast(true);
}

Expand All @@ -638,7 +638,7 @@ function BaalAssistant() {

if (Helper) {
delay(1000);
Pather.pathTo(15134, 5923);
Pather.moveTo(15134, 5923);
baal = getUnit(1, 544);
Attack.kill(544);
Pickit.pickItems();
Expand All @@ -649,7 +649,7 @@ function BaalAssistant() {
return true;
}
} else {
Pather.pathTo(15177, 5952);
Pather.moveTo(15177, 5952);
baal = getUnit(1, 544);
while (baal) {
delay(1000);
Expand Down
18 changes: 9 additions & 9 deletions d2bs/kolbot/libs/bots/BaalHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function BaalHelper() { // experi-mental
}

for (i = 0; i < pos.length; i += 2) {
Pather.pathTo(pos[i], pos[i + 1]);
Pather.moveTo(pos[i], pos[i + 1]);
Attack.clear(30);
}
};
Expand All @@ -128,7 +128,7 @@ function BaalHelper() { // experi-mental
if (hydra) {
do {
if (hydra.mode !== 12 && hydra.getStat(172) !== 2) {
Pather.pathTo(15118, 5002);
Pather.moveTo(15118, 5002);

while (hydra.mode !== 12) {
delay(500);
Expand Down Expand Up @@ -213,7 +213,7 @@ WSKLoop:
}

if (entrance) {
Pather.pathTo(entrance.x > me.x ? entrance.x - 5 : entrance.x + 5, entrance.y > me.y ? entrance.y - 5 : entrance.y + 5);
Pather.moveTo(entrance.x > me.x ? entrance.x - 5 : entrance.x + 5, entrance.y > me.y ? entrance.y - 5 : entrance.y + 5);
}

if (!Pather.moveToExit([130, 131], false)) {
Expand All @@ -224,7 +224,7 @@ WSKLoop:
throw new Error("Failed to move to Throne of Destruction.");
}

if (!Pather.pathTo(15113, 5040)) {
if (!Pather.moveTo(15113, 5040)) {
D2Bot.printToConsole("path fail");
}
} else {
Expand Down Expand Up @@ -256,12 +256,12 @@ WSKLoop:

tick = getTickCount();

Pather.pathTo(15093, me.classid === 3 ? 5029 : 5039);
Pather.moveTo(15093, me.classid === 3 ? 5029 : 5039);

MainLoop:
while (true) {
if (getDistance(me, 15093, me.classid === 3 ? 5029 : 5039) > 3) {
Pather.pathTo(15093, me.classid === 3 ? 5029 : 5039);
Pather.moveTo(15093, me.classid === 3 ? 5029 : 5039);
}

if (!getUnit(1, 543)) {
Expand Down Expand Up @@ -321,15 +321,15 @@ MainLoop:
}

if (Config.BaalHelper.KillBaal) {
Pather.pathTo(15092, 5011);
Pather.moveTo(15092, 5011);
Precast.doPrecast(false);

while (getUnit(1, 543)) {
delay(500);
}

delay(1000);
Pather.pathTo(15092, 5011);
Pather.moveTo(15092, 5011);

portal = getUnit(2, 563);

Expand All @@ -339,7 +339,7 @@ MainLoop:
throw new Error("Couldn't find portal.");
}

Pather.pathTo(15134, 5923);
Pather.moveTo(15134, 5923);
Attack.kill(544); // Baal
Pickit.pickItems();
} else {
Expand Down
2 changes: 1 addition & 1 deletion d2bs/kolbot/libs/bots/BattleOrders.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function BattleOrders() {
quit();
}

Pather.pathTo(me.x + 6, me.y + 6);
Pather.moveTo(me.x + 6, me.y + 6);

var i,
tick = getTickCount(),
Expand Down
2 changes: 1 addition & 1 deletion d2bs/kolbot/libs/bots/BoneAsh.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function BoneAsh() {
Pather.useWaypoint(32);
Precast.doPrecast(true);

if (!Pather.pathTo(20047, 4898)) {
if (!Pather.moveTo(20047, 4898)) {
throw new Error("Failed to move to Bone Ash");
}

Expand Down
Loading

0 comments on commit dbbd06c

Please sign in to comment.