-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
* Summoner script now uses red portal to move to Duriel * Change attack function in Andariel and Duriel for classic compatibility * Use Warriv to move to act 1 if game starts in act 2 * always precast at duriel start * Remove warriv use in doChores + revisions * Loader refactoring * scriptName now returns null instead of undefined
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* @desc kill the Summoner | ||
*/ | ||
|
||
function Summoner() { | ||
function Summoner () { | ||
Town.doChores(); | ||
Pather.useWaypoint(74); | ||
Precast.doPrecast(true); | ||
|
@@ -27,5 +27,24 @@ function Summoner() { | |
|
||
Attack.clear(15, 0, 250); // The Summoner | ||
|
||
if (Loader.scriptName(1) === "Duriel") { | ||
let journal = getUnit(2, 357); | ||
|
||
if (!journal) { | ||
throw new Error("Journal not found"); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
|
||
Pather.moveToUnit(journal); | ||
journal.interact(); | ||
delay(500); | ||
me.cancel(); | ||
|
||
if (!Pather.usePortal(46)) { | ||
throw new Error("Failed to take arcane portal"); | ||
This comment has been minimized.
Sorry, something went wrong.
noah-
Collaborator
|
||
} | ||
|
||
Loader.skipTown.push("Duriel"); | ||
} | ||
|
||
return true; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -887,14 +887,22 @@ ModeLoop: | |
break; | ||
} | ||
|
||
var i, tick, wp, coord, retry; | ||
var i, tick, wp, coord, retry, npc; | ||
|
||
for (i = 0; i < 12; i += 1) { | ||
if (me.area === targetArea || me.dead) { | ||
break; | ||
} | ||
|
||
if (me.inTown) { | ||
npc = getUnit(1, NPC.Warriv); | ||
|
||
if (me.area === 40 && npc && getDistance(me, npc) < 50) { | ||
if (npc && npc.openMenu()) { | ||
Misc.useMenu(0x0D37); | ||
This comment has been minimized.
Sorry, something went wrong.
noah-
Collaborator
|
||
} | ||
} | ||
|
||
Town.move("waypoint"); | ||
} | ||
|
||
|
instead of throwing error should return true and do what it would normally do without using this optimization