Guest User

Untitled

a guest
Jan 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.00 KB | None | 0 0
  1. ////////////////////////////////////////////
  2. //Botscripts modificated by njomnjomnjom //
  3. ////////////////////////////////////////////
  4.  
  5. function NTMain()
  6. {
  7. Include("libs/common/NTCommon.ntl");
  8. NTC_IncludeLibs();
  9. NTC_IncludeConfig("NTBot/char_configs");
  10.  
  11. NT_LoadConfig();
  12. NTSI_LoadNIPFiles("NTBot/item_configs");
  13.  
  14. NTA_Initialize();
  15.  
  16. if(!NTTM_CheckAct())
  17. {
  18. NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()");
  19. return;
  20. }
  21.  
  22. NTTMGR_TownManager();
  23.  
  24. if(!NTTM_TownMove("waypoint"))
  25. {
  26. NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
  27. return;
  28. }
  29.  
  30. if(!NTM_TakeWaypoint(3))
  31. {
  32. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
  33. return;
  34. }
  35.  
  36. NTP_DoPrecast(true);
  37.  
  38. if(!NTM_MoveToStair(17, 19))
  39. {
  40. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
  41. return;
  42. }
  43.  
  44. if(!NTM_TakeStair(19))
  45. {
  46. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
  47. return;
  48. }
  49.  
  50.  
  51.  
  52. if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 397, -10, 0))
  53. {
  54. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
  55. return;
  56. }
  57.  
  58. Delay(50);
  59.  
  60. if(NTConfig_OpenChest)
  61. {
  62. var _chest;
  63.  
  64. _chest = NTC_GetSpecialChest();
  65.  
  66. if(_chest)
  67. {
  68. if(!NTM_MoveTo(me.areaid, _chest.x+1, _chest.y))
  69. {
  70. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
  71. return;
  72. }
  73.  
  74. for(i = 0; i <= 5; i++)
  75. {
  76. if(GetDistance(me.x,me.y,_chest.x,_chest.y) < 5 )
  77. {
  78. if(NTC_OpenChest(_chest))
  79. {
  80. NTSI_PickItems();
  81. break;
  82. }
  83. }
  84. else
  85. {
  86. Print("ÿc8Gegner mit Knockback???");
  87. NTM_MoveTo(me.areaid, _chest.x+1, _chest.y)
  88. }
  89. }
  90.  
  91. }
  92. else
  93. {
  94. Print("ÿc8Keine Chest gefunden.");
  95. Print("ÿc8Verzweiflungsschlag wird ausgeführt.");
  96.  
  97. var _randomchest;
  98.  
  99. _randomchest = NTC_FindUnit(NTC_UNIT_OBJECT, GetLocaleString(3260));
  100.  
  101. if(_randomchest)
  102. {
  103. if(!NTM_MoveTo(me.areaid, _randomchest.x+1, _randomchest.y))
  104. {
  105. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
  106. return;
  107. }
  108.  
  109. for(i = 0; i <= 5; i++)
  110. {
  111. if(GetDistance(me.x,me.y,_randomchest.x,_randomchest.y) < 5 )
  112. {
  113. if(NTC_OpenChest(_randomchest))
  114. {
  115. NTSI_PickItems();
  116. break;
  117. }
  118. }
  119. else
  120. {
  121. Print("ÿc8Gegner mit Knockback???");
  122. NTM_MoveTo(me.areaid, _randomchest.x+1, _randomchest.y)
  123. }
  124. }
  125.  
  126. }
  127. else
  128. {
  129. Print("ÿc8Scheisse");
  130. }
  131. }
  132. }
  133.  
  134. Delay(500);
  135.  
  136. _unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);
  137.  
  138. if(_unit)
  139. {
  140. for(n = 0 ; n < _unit.length ; n++)
  141. {
  142. if(_unit[n].id == 580)
  143. {
  144. NTM_MoveTo(me.areaid, _unit[n].roomx*5+_unit[n].x, _unit[n].roomy*5+_unit[n].y);
  145.  
  146. _chest = NTC_FindUnit(NTC_UNIT_OBJECT, "chest");
  147. if(_chest)
  148. {
  149. do
  150. {
  151. if(NTC_OpenChest(_chest))
  152. NTSI_PickItems();
  153. }while(_chest.GetNext());
  154. }
  155. }
  156.  
  157. }
  158. }
  159.  
  160. if(!NTM_MoveToStair(19, 17))
  161. {
  162. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
  163. return;
  164. }
  165.  
  166. if(!NTM_TakeStair(17))
  167. {
  168. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
  169. return;
  170. }
  171.  
  172. if(!NTM_MoveToStair(17, 18))
  173. {
  174. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
  175. return;
  176. }
  177.  
  178. if(!NTM_TakeStair(18))
  179. {
  180. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
  181. return;
  182. }
  183.  
  184.  
  185. if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 397, -10, 0))
  186. {
  187. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
  188. return;
  189. }
  190.  
  191. if(NTConfig_OpenChest)
  192. {
  193. var _chest;
  194.  
  195. _chest = NTC_GetSpecialChest();
  196.  
  197. if(_chest)
  198. {
  199. if(!NTM_MoveTo(me.areaid, _chest.x+1, _chest.y))
  200. {
  201. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
  202. return;
  203. }
  204.  
  205. for(i = 0; i <= 5; i++)
  206. {
  207. if(GetDistance(me.x,me.y,_chest.x,_chest.y) < 5 )
  208. {
  209. if(NTC_OpenChest(_chest))
  210. {
  211. NTSI_PickItems();
  212. break;
  213. }
  214. }
  215. else
  216. {
  217. Print("ÿc8Gegner mit Knockback???");
  218. NTM_MoveTo(me.areaid, _chest.x+1, _chest.y)
  219. }
  220. }
  221.  
  222. }
  223. else
  224. {
  225. Print("ÿc8Keine Chest gefunden.");
  226. Print("ÿc8Verzweiflungsschlag wird ausgeführt.");
  227.  
  228. var _randomchest;
  229.  
  230. _randomchest = NTC_FindUnit(NTC_UNIT_OBJECT, GetLocaleString(3260));
  231.  
  232. if(_randomchest)
  233. {
  234. if(!NTM_MoveTo(me.areaid, _randomchest.x+1, _randomchest.y))
  235. {
  236. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
  237. return;
  238. }
  239.  
  240. for(i = 0; i <= 5; i++)
  241. {
  242. if(GetDistance(me.x,me.y,_randomchest.x,_randomchest.y) < 5 )
  243. {
  244. if(NTC_OpenChest(_randomchest))
  245. {
  246. NTSI_PickItems();
  247. break;
  248. }
  249. }
  250. else
  251. {
  252. Print("ÿc8Gegner mit Knockback???");
  253. NTM_MoveTo(me.areaid, _randomchest.x+1, _randomchest.y)
  254. }
  255. }
  256.  
  257. }
  258. else
  259. {
  260. Print("ÿc8Scheisse");
  261. }
  262. }
  263. }
  264.  
  265. Delay(500);
  266.  
  267. _unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);
  268.  
  269. if(_unit)
  270. {
  271. for(n = 0 ; n < _unit.length ; n++)
  272. {
  273. if(_unit[n].id == 580)
  274. {
  275. NTM_MoveTo(me.areaid, _unit[n].roomx*5+_unit[n].x, _unit[n].roomy*5+_unit[n].y);
  276.  
  277. _chest = NTC_FindUnit(NTC_UNIT_OBJECT, "chest");
  278. if(_chest)
  279. {
  280. do
  281. {
  282. if(NTC_OpenChest(_chest))
  283. NTSI_PickItems();
  284. }while(_chest.GetNext());
  285. }
  286. }
  287.  
  288. }
  289. }
  290.  
  291.  
  292.  
  293. NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
  294. }
Add Comment
Please, Sign In to add comment