Advertisement
DraculaxAOE

NTArcaneSanctuary.ntj

Nov 20th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 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. NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()");
  14. return;
  15. }
  16. NTTMGR_TownManager();
  17. if(!NTTM_TownMove("waypoint")){
  18. NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
  19. return;
  20. }
  21. if(!NTM_TakeWaypoint(74)){
  22. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
  23. return;
  24. }
  25. NTP_DoPrecast(true);
  26. if(NTConfig_OpenSummonerChests) {
  27. var _object = GetPresetUnits(me.areaid);
  28. for(var i = 0; i < _object.length; i++) {
  29. if(_object[i].id == 357) {
  30. if(_object[i].x == 11 && _object[i].y == 11){
  31. // Print("Summoner is at the "+COLOR_2+"Top Right");
  32. NTM_MoveTo(me.areaid, 25863, 5449); //Bottom Right End No Summoner
  33. NTM_MakeTP();
  34. Delay(200);
  35. ChestifyTeam();
  36. NTM_MoveTo(me.areaid, 25445, 5869); //Bottom Left End No Summoner
  37. ChestifyTeam();
  38. NTM_MoveTo(me.areaid, 25023, 5449); //Top Left End No Summoner
  39. ChestifyTeam();
  40. NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2); //Top Right Summoner
  41. NTA_KillMonster(250);
  42. // Delay(200); //Not sure if this would prevent crash
  43. ChestifyTeam();
  44. // if(NTConfig_ClearPosition)
  45. // NTA_ClearPosition();
  46. // NTSI_PickItems();
  47. }
  48. else if (_object[i].x == 26 && _object[i].y == 11){
  49. // Print("Summoner is at the "+COLOR_2+"Bottom Right");
  50. NTM_MoveTo(me.areaid, 25445, 5869); //Bottom Left End No Summoner
  51. NTM_MakeTP();
  52. Delay(200);
  53. ChestifyTeam();
  54. NTM_MoveTo(me.areaid, 25023, 5449); //Top Left End No Summoner
  55. ChestifyTeam();
  56. NTM_MoveTo(me.areaid, 25450, 5030); //Top Right End No Summoner
  57. ChestifyTeam();
  58. NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2); //Bottom Right Summoner
  59. NTA_KillMonster(250);
  60. // Delay(200); //Not sure if this would prevent crash
  61. ChestifyTeam();
  62. // if(NTConfig_ClearPosition)
  63. // NTA_ClearPosition();
  64. // NTSI_PickItems();
  65. }
  66. else if (_object[i].x == 11 && _object[i].y == 21){
  67. // Print("Summoner is at the "+COLOR_2+"Bottom Left");
  68. NTM_MoveTo(me.areaid, 25023, 5449); //Top Left End No Summoner
  69. NTM_MakeTP();
  70. Delay(200);
  71. ChestifyTeam();
  72. NTM_MoveTo(me.areaid, 25450, 5030); //Top Right End No Summoner
  73. ChestifyTeam();
  74. NTM_MoveTo(me.areaid, 25863, 5449); //Bottom Right End No Summoner
  75. ChestifyTeam();
  76. NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2); //Bottom Left Summoner
  77. NTA_KillMonster(250);
  78. // Delay(200); //Not sure if this would prevent crash
  79. ChestifyTeam();
  80. // if(NTConfig_ClearPosition)
  81. // NTA_ClearPosition();
  82. // NTSI_PickItems();
  83. }
  84. else {
  85. // Print("Summoner is at the "+COLOR_2+"Top Left");
  86. NTM_MoveTo(me.areaid, 25450, 5030); //Top Right End No Summoner
  87. NTM_MakeTP();
  88. Delay(200);
  89. ChestifyTeam();
  90. NTM_MoveTo(me.areaid, 25863, 5449); //Bottom Right End No Summoner
  91. ChestifyTeam();
  92. NTM_MoveTo(me.areaid, 25445, 5869); //Bottom Left End No Summoner
  93. ChestifyTeam();
  94. NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2); //Top Left Summoner
  95. NTA_KillMonster(250);
  96. // Delay(200); //Not sure if this would prevent crash
  97. ChestifyTeam();
  98. // if(NTConfig_ClearPosition)
  99. // NTA_ClearPosition();
  100. // NTSI_PickItems();
  101. }
  102. }
  103. }
  104. }
  105. if(!NTConfig_OpenSummonerChests) {
  106. if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2)){
  107. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
  108. return;
  109. }
  110. }
  111. if(!NTConfig_OpenSummonerChests) {
  112. NTM_MakeTP();
  113. Delay(200);
  114. if(!NTA_KillMonster(250)) {
  115. NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
  116. return;
  117. }
  118. }
  119. if(!NTConfig_OpenSummonerChests) {
  120. if(NTConfig_ClearPosition)
  121. NTA_ClearPosition();
  122. NTSI_PickItems();
  123. }
  124. if(NTConfig_ClearArcaneSanc > 0) {
  125. if(NTConfig_ClearArcaneSanc == 1){
  126. NTConfig_SkipRegularMonsters = false;
  127. NTP_DoPrecast();
  128. if(!NTA_ClearLevel()){
  129. NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
  130. }
  131. }
  132. if(NTConfig_ClearArcaneSanc == 2){
  133. NTConfig_SkipRegularMonsters = true;
  134. NTP_DoPrecast();
  135. if(!NTA_ClearLevel()){
  136. NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
  137. }
  138. }
  139. }
  140. if(NTConfig_OpenChestsInArea && NTU_DontOpenAreas()){
  141. OpenChestsInArea();
  142. }
  143. NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
  144. }
  145.  
  146. function Chestify(){
  147. NTA_ClearPosition(20, true);
  148. NTC_OpenChestsInAreaNear(me.x, me.y, 30);
  149. NTSI_PickItems();
  150. NTC_InTown();
  151. NTM_MoveTo(me.areaid, 5108, 5059);
  152. NTTMGR_TownManager(true);
  153. NTM_MoveTo(me.areaid, 5069, 5066);
  154. if(!NTM_TakeWaypoint(74)){ Print("Waypoint Error!"); }
  155. if(!me.GetState(32) || !me.GetState(51)) { NTP_DoPrecast(); }
  156. }
  157.  
  158. function ChestifyTeam(){
  159. // NTA_ClearPosition(20, true);
  160. NTA_ClearPosition(10, true); //20 may make the bot miss the Superchests if a lotta mobs around. This will also call NTC_OpenChestsInAreaNear() with the range = the arg here
  161. // NTC_OpenChestsInAreaNear(me.x, me.y, 30);
  162. NTC_OpenChestsInAreaNear(me.x, me.y, 40); //Increased to 40, dont think NTConfig_SnagRange would be a problem...
  163. NTSI_PickItems();
  164. // NTC_InTown();
  165. // NTM_MoveTo(me.areaid, 5108, 5059);
  166. // NTTMGR_TownManager(true);
  167. // NTM_MoveTo(me.areaid, 5069, 5066);
  168. // if(!NTM_TakeWaypoint(74)){ Print("Waypoint Error!"); }
  169. if(!me.GetState(32) || !me.GetState(51)) { NTP_DoPrecast(); }
  170. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement