Advertisement
Guest User

Evrams Modified Star TP Diablo

a guest
Apr 17th, 2010
3,546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.49 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(107))
  27. {
  28. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
  29. return;
  30. }
  31.  
  32. NTP_DoPrecast(true);
  33.  
  34. if(!NTM_MoveTo(108, 7792, 5292))
  35. {
  36. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
  37. return;
  38. }
  39.  
  40. if(NTConfig_PublicMode)
  41. {
  42. NTC_PingDelay(1000);
  43.  
  44. NTA_ClearPosition(20, true, 2);
  45.  
  46. NTM_MakeTP();
  47. Say("TP is safe!");
  48.  
  49. NTA_ClearPosition(25, true, 2);
  50.  
  51. NTP_DoPrecast(true);
  52. }
  53.  
  54. if(!NT_OpenSealsInt())
  55. {
  56. NTC_SendMsgToScript("NTBotGame.ntj", "NT_OpenSealsInt()");
  57. return;
  58. }
  59.  
  60. if(NTConfig_PublicMode)
  61. Say("Killing Diablo");
  62.  
  63. NTP_DoPrecast(true);
  64.  
  65. if(!NTM_MoveTo(me.areaid, 7792, 5292))
  66. {
  67. NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
  68. return;
  69. }
  70.  
  71. NTC_FindUnit(NTC_UNIT_MONSTER, 243, 100);
  72.  
  73. if(!NTA_KillMonster(243))
  74. {
  75. NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
  76. return;
  77. }
  78.  
  79. NTSI_PickItems();
  80.  
  81. if(NTConfig_PublicMode)
  82. Say("Next game");
  83.  
  84. NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
  85. }
  86.  
  87. // Internal function
  88. function NT_OpenSealsInt()
  89. {
  90. var i, _unit;
  91. var _result;
  92.  
  93. _unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);
  94.  
  95. if(!_unit)
  96. return false;
  97.  
  98. _result = false;
  99.  
  100. for(i = 0 ; i < _unit.length ; i++)
  101. {
  102. if(_unit[i].id == 396)
  103. {
  104. if(_unit[i].roomy*5 + _unit[i].y == 5275)
  105. _result = NT_OpenVizierSealInt(1);
  106. else
  107. _result = NT_OpenVizierSealInt(2);
  108.  
  109. break;
  110. }
  111. }
  112.  
  113. if(!_result)
  114. return false;
  115.  
  116. NTP_DoPrecast(false);
  117.  
  118. _result = false;
  119.  
  120. for(i = 0 ; i < _unit.length ; i++)
  121. {
  122. if(_unit[i].id == 394)
  123. {
  124. if(_unit[i].roomx*5 + _unit[i].x == 7773)
  125. _result = NT_OpenDeSeisSealInt(1);
  126. else
  127. _result = NT_OpenDeSeisSealInt(2);
  128.  
  129. break;
  130. }
  131. }
  132.  
  133. if(!_result)
  134. return false;
  135.  
  136. NTP_DoPrecast(false);
  137.  
  138. _result = false;
  139.  
  140. for(i = 0 ; i < _unit.length ; i++)
  141. {
  142. if(_unit[i].id == 392)
  143. {
  144. if(_unit[i].roomx*5 + _unit[i].x == 7893)
  145. _result = NT_OpenVenomSealInt(1);
  146. else
  147. _result = NT_OpenVenomSealInt(2);
  148.  
  149. break;
  150. }
  151. }
  152.  
  153. return _result;
  154. }
  155.  
  156. function NT_OpenVizierSealInt(type)
  157. {
  158. var i, n;
  159. var _attackpos = [7740, 5300, 7740, 5280, 7720, 5280, 7720, 5300];
  160. var _monstername = GetLocaleString(2851);
  161.  
  162. for(i = 0 ; i < _attackpos.length ; i += 2)
  163. {
  164. NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
  165.  
  166. NTA_ClearPosition(25, true, 2);
  167. }
  168.  
  169. for(i = 0 ; i < 3 ; i++)
  170. {
  171. if(type == 1)
  172. {
  173. NT_OpenSealInt(395, 7654, 5310);
  174. NT_OpenSealInt(396, 7659, 5277);
  175.  
  176. NTM_MoveTo(me.areaid, 7665, 5277);
  177. }
  178. else
  179. {
  180. NT_OpenSealInt(395, 7650, 5276);
  181. NT_OpenSealInt(396, 7651, 5310);
  182. }
  183.  
  184. for(n = 0 ; n < 10 ; n++)
  185. {
  186. NTC_Delay(200);
  187.  
  188. if(NTA_KillMonster(_monstername))
  189. {
  190. NTA_ClearPosition();
  191. NTSI_PickItems();
  192.  
  193. return NTM_MoveTo(me.areaid, 7750, 5280);
  194. }
  195. }
  196. }
  197.  
  198. return false;
  199. }
  200.  
  201. function NT_OpenDeSeisSealInt(type)
  202. {
  203. var i, n;
  204. var _attackpos = [7780, 5255, 7800, 5255, 7800, 5235, 7780, 5235];
  205. var _monstername = GetLocaleString(2852);
  206.  
  207. for(i = 0 ; i < _attackpos.length ; i += 2)
  208. {
  209. NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
  210.  
  211. NTA_ClearPosition(25, true, 2);
  212. }
  213.  
  214. for(i = 0 ; i < 3 ; i++)
  215. {
  216. if(type == 1)
  217. {
  218. NT_OpenSealInt(394, 7769, 5158);
  219.  
  220. NTM_MoveTo(me.areaid, 7771, 5196);
  221. }
  222. else
  223. {
  224. NT_OpenSealInt(394, 7810, 5156);
  225.  
  226. NTM_MoveTo(me.areaid, 7770, 5169);
  227. }
  228.  
  229. for(n = 0 ; n < 10 ; n++)
  230. {
  231. NTC_Delay(200);
  232.  
  233. if(NTA_KillMonster(_monstername))
  234. {
  235. NTA_ClearPosition(30);
  236. NTSI_PickItems();
  237.  
  238. return NTM_MoveTo(me.areaid, 7800, 5255);
  239. }
  240. }
  241. }
  242.  
  243. return false;
  244. }
  245.  
  246. function NT_OpenVenomSealInt(type)
  247. {
  248. var i, n;
  249. var _attackpos = [7835, 5280, 7835, 5300, 7855, 5300, 7855, 5280];
  250. var _monstername = GetLocaleString(2853);
  251.  
  252. for(i = 0 ; i < _attackpos.length ; i += 2)
  253. {
  254. NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
  255.  
  256. NTA_ClearPosition(25, true, 2);
  257. }
  258.  
  259. for(i = 0 ; i < 3 ; i++)
  260. {
  261. if(type == 1)
  262. {
  263. NT_OpenSealInt(393, 7915, 5280);
  264. NT_OpenSealInt(392, 7895, 5318);
  265.  
  266. NTM_MoveTo(me.areaid, 7892, 5298);
  267. }
  268. else
  269. {
  270. NT_OpenSealInt(393, 7905, 5277);
  271. NT_OpenSealInt(392, 7916, 5310);
  272.  
  273. NTM_MoveTo(me.areaid, 7937, 5305);
  274. }
  275.  
  276. for(n = 0 ; n < 10 ; n++)
  277. {
  278. NTC_Delay(200);
  279.  
  280. if(NTA_KillMonster(_monstername))
  281. {
  282. NTSI_PickItems();
  283.  
  284. if(NTC_PutSkill(124, NTC_HAND_RIGHT))
  285. NTC_PingDelay(1000);
  286.  
  287. return true;
  288. }
  289. }
  290. }
  291.  
  292. return false;
  293. }
  294.  
  295. function NT_OpenSealInt(classid, x, y)
  296. {
  297. var _seal;
  298.  
  299. NTM_MoveTo(me.areaid, x, y);
  300.  
  301. NTA_ClearPosition(25, true, 2);
  302.  
  303. _seal = NTC_FindUnit(NTC_UNIT_OBJECT, classid, 5);
  304.  
  305. if(!_seal)
  306. return false;
  307.  
  308. if(_seal.mode > 0)
  309. return true;
  310.  
  311. for(var i = 0 ; i < 4 ; i++)
  312. {
  313. if((i % 2) == 0)
  314. {
  315. if(GetDistance(me, _seal) > 2)
  316. NTM_MoveTo(_seal.areaid, _seal.x+1, _seal.y);
  317.  
  318. NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _seal);
  319. }
  320.  
  321. NTC_Delay(500);
  322.  
  323. if(_seal.mode > 0)
  324. return true;
  325. }
  326.  
  327. return false;
  328. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement