DarkHorseDre

AT - open chest at end (config.openchests =false)

Aug 7th, 2020
2,559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. *   @filename   AncientTunnels.js
  3. *   @author     kolton
  4. *   @desc       clear Ancient Tunnels
  5. */
  6.  
  7. function AncientTunnels() {
  8.     Town.doChores();
  9.     Pather.useWaypoint(44);
  10.     Precast.doPrecast(true);
  11.  
  12.     if (Config.AncientTunnels.OpenChest && Pather.moveToPreset(me.area, 2, 580) && Misc.openChests(5)) {
  13.         Pickit.pickItems();
  14.     }
  15.  
  16.     if (Config.AncientTunnels.KillDarkElder && getPresetUnit(me.area, 1, 751) && Pather.moveToPreset(me.area, 1, 751)) {
  17.         Attack.clear(15, 0, getLocaleString(2886));
  18.     }
  19.  
  20.     if (!Pather.moveToExit(65, true)) {
  21.         throw new Error("Failed to move to Ancient Tunnels");
  22.     }
  23.  
  24.     Attack.clearLevel(Config.ClearType);
  25.  
  26.     if (Pather.moveToPreset(me.area, 2, 397) && Misc.openChests(5)) {//dhdadded get chest at end of AT
  27.         Pickit.pickItems();
  28.     }
  29.     return true;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment