Advertisement
kolton

Untitled

Oct 31st, 2011
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. function NT_Andariel() {
  2. print("ÿc3Starting Andariel Script");
  3.  
  4. if (!NTTM_CheckAct()) {
  5. throw new Error("CheckAct failed.");
  6. }
  7.  
  8. NTTMGR_TownManager();
  9. print("ÿc8Going to Catacombs Level 2");
  10.  
  11. if (!NTTM_TownMove("waypoint")) {
  12. throw new Error("Failed to take WP.");
  13. }
  14.  
  15. if (!NTM_UsePortal("Waypoint", 35)) {
  16. print("ÿc8Seems we do not have the waypoint, Lets go get it! Traveling to Catacombs Level 2");
  17. NTM_TravelTO(35);
  18. print("ÿc8Interacting with Waypoint as we don't have it.");
  19. NTM_GotoWaypoint(35, true, 10000);
  20. }
  21.  
  22. print("ÿc5Precasting");
  23. NTP_DoPrecast();
  24. print("ÿc8Going to Catacombs Level 4");
  25. NTM_TravelTO(37);
  26.  
  27. if (NTConfig_CheckSafe) {
  28. if (!NTTMGR_CheckSafe(2)) {
  29. print("ÿc1Andariel Safe Check failed!");
  30. throw new Error();
  31. }
  32. }
  33.  
  34. NTM_MoveTo(22560, 9536);
  35.  
  36. print("ÿc1Killing Andariel");
  37.  
  38. if (me.classid === 1) {
  39. if (!KillAndy()) {
  40. throw new Error();
  41. }
  42. } else if (!NTA_KillBoss(156)) {
  43. throw new Error();
  44. }
  45.  
  46. if (NTConfig_ClearPosition) {
  47. NTA_ClearPosition();
  48. }
  49.  
  50. NTC_PingDelay(2000);
  51. NTSI_PickItems();
  52.  
  53. return true;
  54. }
  55.  
  56. function KillAndy()
  57. {
  58. var i,
  59. _target = NTC_GetUnit(NTC_UNIT_MONSTER, 156);
  60.  
  61. if (!_target) {
  62. return false;
  63. }
  64.  
  65. for (i = 0; i < 300; i += 1) {
  66. if (!me.getState(121)) {
  67. NTC_DoCast(NTConfig_AttackSkill[1], _NTA_SkillHand[1], _target);
  68. } else if (NTConfig_AttackSkill[2] > -1) {
  69. NTC_DoCast(NTConfig_AttackSkill[2], _NTA_SkillHand[2], _target);
  70. }
  71.  
  72. if (getDistance(me, _target) <= 10) {
  73. NTM_MoveTo((me.x > 22548) ? 22535 : 22560, 9536);
  74. }
  75.  
  76. if (_target.hp <= 0 || _target.mode === 0 || _target.mode === 12) {
  77. return true;
  78. }
  79. }
  80.  
  81. return (_target.hp <= 0 || _target.mode === 0 || _target.mode === 12);
  82. }
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement