Advertisement
kolton

Untitled

Nov 15th, 2011
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. function NTMain()
  2. {
  3. Include("libs/common/NTCommon.ntl");
  4. NTC_IncludeLibs();
  5. NTC_IncludeConfig("NTBot/char_configs");
  6.  
  7. NT_LoadConfig();
  8. NTSI_LoadNIPFiles("NTBot/item_configs");
  9.  
  10. NTA_Initialize();
  11.  
  12. if(!NTTM_CheckAct())
  13. {
  14. NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()");
  15. return;
  16. }
  17.  
  18. NTTMGR_TownManager();
  19.  
  20. if(!NTTM_TownMove("waypoint"))
  21. {
  22. NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
  23. return;
  24. }
  25.  
  26. if(!NTM_TakeWaypoint(35))
  27. {
  28. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
  29. return;
  30. }
  31.  
  32. NTP_DoPrecast(true);
  33.  
  34. for(var i = 0 ; i < 2 ; i++)
  35. {
  36. if(!NTM_MoveToStair(me.areaid, 36+i))
  37. {
  38. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
  39. return;
  40. }
  41.  
  42. if(!NTM_TakeStair(36+i))
  43. {
  44. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
  45. return;
  46. }
  47. }
  48.  
  49. NTP_DoPrecast(true);
  50. NTM_MoveTo(me.areaid, 22560, 9536);
  51. KillAndy();
  52. NTC_PingDelay(2000);
  53. NTSI_PickItems();
  54.  
  55. NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
  56. }
  57.  
  58. function KillAndy()
  59. {
  60. var _target = NTC_FindUnit(NTC_UNIT_MONSTER, 156, 5);
  61.  
  62. if(!_target)
  63. return false;
  64.  
  65. Print("ÿc4Name ÿc0" + _target.name + " ÿc4Fire resist ÿc0" + _target.GetStat(39) + " ÿc4Cold resist ÿc0" + _target.GetStat(41) + " ÿc4Lightning resist ÿc0" + _target.GetStat(43) + " ÿc4Poison resist ÿc0" + _target.GetStat(45));
  66.  
  67. for(var i = 0 ; i < 300 ; i++)
  68. {
  69. if(NTA_Attack(_target, (i % 30) == 0) < 2)
  70. break;
  71.  
  72. if(GetDistance(me, _target) <= 10)
  73. NTM_MoveTo(me.areaid, (me.x > 22548) ? 22535 : 22560, 9536);
  74.  
  75. if(_target.hp <= 0 || _target.mode == 0 || _target.mode == 12)
  76. return true;
  77. }
  78.  
  79. return (_target.hp <= 0 || _target.mode == 0 || _target.mode == 12);
  80. }
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement