Advertisement
Guest User

Kappa 123

a guest
May 27th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. /**
  2. * @filename Andariel.js
  3. * @author kolton
  4. * @desc kill Andariel
  5. */
  6.  
  7. function Andariel() {
  8. this.killAndariel = function () {
  9. var i,
  10. target = getUnit(1, 156);
  11.  
  12. if (!target) {
  13. throw new Error("Andariel not found.");
  14. }
  15.  
  16. if (Config.MFLeader) {
  17. Pather.makePortal();
  18. say("kill " + 156);
  19. }
  20.  
  21. for (i = 0; i < 300; i += 1) {
  22. ClassAttack.doCast(target, Config.AttackSkill[1], Config.AttackSkill[2]);
  23.  
  24. if (target.dead) {
  25. return true;
  26. }
  27.  
  28. if (getDistance(me, target) <= 10) {
  29. Pather.moveTo(me.x > 22548 ? 22535 : 22560, 9520);
  30. }
  31. }
  32.  
  33. return target.dead;
  34. };
  35.  
  36. Town.doChores();
  37. Pather.useWaypoint(35);
  38. Precast.doPrecast(true);
  39.  
  40. if (!Pather.moveToExit([36, 37], true)) {
  41. throw new Error("Failed to move to Catacombs Level 4");
  42. }
  43.  
  44. Pather.moveTo(22549, 9520);
  45.  
  46. if (me.classid === 1 && me.gametype === 0) {
  47. this.killAndariel();
  48. } else {
  49. Attack.kill(156); // Andariel
  50. }
  51.  
  52. delay(2000); // Wait for minions to die.
  53. Pickit.pickItems();
  54.  
  55. return true;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement