Advertisement
kolton

Untitled

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