Advertisement
kolton

Untitled

Nov 15th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 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. var _tombs;
  8. var _unit;
  9.  
  10. NT_LoadConfig();
  11. NTSI_LoadNIPFiles("NTBot/item_configs");
  12.  
  13. NTA_Initialize();
  14.  
  15. if(!NTTM_CheckAct())
  16. {
  17. NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()");
  18. return;
  19. }
  20.  
  21. NTTMGR_TownManager();
  22.  
  23. if(!NTTM_TownMove("waypoint"))
  24. {
  25. NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
  26. return;
  27. }
  28.  
  29. if(!NTM_TakeWaypoint(46))
  30. {
  31. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
  32. return;
  33. }
  34.  
  35. NTP_DoPrecast(true);
  36.  
  37. _tombs = GetRoom();
  38.  
  39. if(!_tombs)
  40. {
  41. NTC_SendMsgToScript("NTBotGame.ntj", "GetRoom()");
  42. return;
  43. }
  44.  
  45. if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_TILE, _tombs.correcttomb-28))
  46. {
  47. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
  48. return;
  49. }
  50.  
  51. _unit = NTC_FindUnit(NTC_UNIT_TILE, _tombs.correcttomb - 28, 5);
  52.  
  53. if(!_unit)
  54. {
  55. NTC_SendMsgToScript("NTBotGame.ntj", "NTC_FindUnit()");
  56. return;
  57. }
  58.  
  59. if(!NTM_TakeStair(_unit.subareaid))
  60. {
  61. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
  62. return;
  63. }
  64.  
  65. if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 152, -2, 2))
  66. {
  67. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
  68. return;
  69. }
  70.  
  71. /*if(NTConfig_ClearPosition)
  72. NTA_ClearPosition(20, true);*/
  73.  
  74. if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
  75. {
  76. NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
  77. return;
  78. }
  79.  
  80. NTC_FindUnit(NTC_UNIT_OBJECT, 100, 10);
  81.  
  82. if(!NTM_TakeUnit(NTC_UNIT_OBJECT, 100))
  83. {
  84. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeUnit()");
  85. return;
  86. }
  87.  
  88. KillDuriel();
  89.  
  90. NTSI_PickItems();
  91.  
  92. NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
  93. }
  94.  
  95. function KillDuriel()
  96. {
  97. var _target = NTC_FindUnit(NTC_UNIT_MONSTER, 211, 5);
  98.  
  99. if(!_target)
  100. return false;
  101.  
  102. 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));
  103.  
  104. for(var i = 0 ; i < 300 ; i++)
  105. {
  106. NTC_CastSkill(NTConfig_AttackSkill[1], _NTA_SkillHand[1], _target);
  107.  
  108. while(me.GetSkillStatus(NTConfig_AttackSkill[1]) == 8)
  109. {
  110. if(GetDistance(me, _target) <= 10)
  111. NTM_MoveTo(me.areaid, 22638, (me.y < _target.y) ? 15722 : 15693);
  112.  
  113. if(NTConfig_AttackSkill[2] > -1 && me.GetSkillStatus(NTConfig_AttackSkill[2]) != 8)
  114. NTC_CastSkill(NTConfig_AttackSkill[2], _NTA_SkillHand[2], _target);
  115. else
  116. Delay(NTC_DELAY_FRAME);
  117. }
  118.  
  119. if(GetDistance(me, _target) <= 10)
  120. NTM_MoveTo(me.areaid, 22638, (me.y < _target.y) ? 15722 : 15693);
  121.  
  122. if(_target.hp <= 0 || _target.mode == 0 || _target.mode == 12)
  123. return true;
  124. }
  125.  
  126. return (_target.hp <= 0 || _target.mode == 0 || _target.mode == 12);
  127. }
  128.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement