Guest User

Untitled

a guest
Oct 21st, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.83 KB | None | 0 0
  1. var CurScriptIndex = 0;
  2. var LastScript = false;
  3.  
  4. var CloneDiabloString;
  5. var CloneDiabloNotify = false;
  6.  
  7. // Provalone Edit //
  8. Include("libs/common/NTExp.ntl");
  9. NTE_InitializeStats();
  10. //
  11.  
  12. function NTMain()
  13. {
  14. Delay(1000);
  15.  
  16. //Print("ÿc4[+] NTBot 4.2 [+]");
  17.  
  18. Include("libs/common/NTCommon.ntl");
  19. NTC_IncludeLibs();
  20. NTC_IncludeConfig("NTBot/char_configs");
  21.  
  22.  
  23. NT_LoadConfig();
  24. NTSI_LoadNIPFiles("NTBot/item_configs");
  25.  
  26. // ubi21 Enigma reset start
  27. ////////////////////////////
  28. NTU_LogExitStatus("F");
  29.  
  30. // ubi21 Enigma reset end
  31. ////////////////////////////
  32.  
  33. if(NTConfig_StartDelay > 0);
  34. NTC_Delay(NTConfig_StartDelay);
  35.  
  36. SetUIState(0x0A, true);
  37.  
  38. // ubi21 Enigma reset start
  39. ////////////////////////////
  40. if(!NTT_PutBackEnigma()) {
  41. NTC_Delay(240000); // Wait 4 mins to prevent r/d 240000
  42. ExitGame();
  43. }
  44. // ubi21 Enigma reset end
  45. ////////////////////////////
  46.  
  47. NTT_GetCorpses();
  48.  
  49. if(NTConfig_Script.length > 0)
  50. {
  51. NTCU_InitCubing();
  52.  
  53. //NTT_ClearInventory();
  54. NTT_ClearBelt();
  55.  
  56. // ubi21 Enigma reset start
  57. ////////////////////////////
  58. if(!NTT_LookForEnigma()) {
  59. if (GetUIState(0x01))
  60. SetUIState(0x01, false);
  61. NTC_Delay(240000); // Wait 4 mins to prevent r/d 240000
  62. ExitGame();
  63. }
  64. // ubi21 Enigma reset end
  65. ////////////////////////////
  66.  
  67. Load("NTBot/tools/NTToolsThread.ntj");
  68.  
  69.  
  70.  
  71. if(NTConfig_CheckCloneDiablo)
  72. {
  73. CloneDiabloString = GetLocaleString(11005);
  74. RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
  75. }
  76.  
  77. RegisterEvent(EVENT_KEYDOWN, NT_KeyEvents);
  78. RegisterEvent(EVENT_SCRIPTMSG, NT_ScriptMsgEvents);
  79.  
  80. Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
  81. SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
  82.  
  83. NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);//jinay item log
  84.  
  85. while(!LastScript || CloneDiabloNotify)
  86. {
  87. NTC_Delay(500);
  88. }
  89. }
  90.  
  91. // Provalone Edit
  92. NTE_ComputeStats(false);
  93. //
  94. ExitGame();
  95. }
  96.  
  97. function NT_GameMsgEvents(msg, type)
  98. {
  99.  
  100. // ubi21 Enigma reset start
  101. ////////////////////////////
  102. var _holdPauseCheck = "";
  103. // ubi21 Enigma reset end
  104. ////////////////////////////
  105.  
  106. if(type == 4 && msg.indexOf(CloneDiabloString) != -1)
  107. {
  108. CloneDiabloNotify = true;
  109.  
  110. NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿc4" + CloneDiabloString);
  111. SetStatusText(CloneDiabloString);
  112.  
  113. me.maxgametime = 0;
  114.  
  115. // ubi21 Enigma reset start
  116. ////////////////////////////
  117.  
  118. _holdPauseCheck = NTU_GetExitStatus();
  119. while(_holdPauseCheck == "T") {
  120. NTC_Delay(500);
  121. _holdPauseCheck = NTU_GetExitStatus();
  122. }
  123. // ubi21 Enigma reset end
  124. ////////////////////////////
  125.  
  126. NTC_StopScript(NTConfig_Script[CurScriptIndex]);
  127. NTC_Delay(500);
  128.  
  129. NTTM_CheckAct();
  130. }
  131. }
  132.  
  133. function NT_KeyEvents(keycode)
  134. {
  135. var _script;
  136.  
  137. switch(keycode)
  138. {
  139. case 36: //Pause/Break
  140. _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
  141. if(_script)
  142. {
  143. if(_script.running)
  144. {
  145. _script.Stop();
  146.  
  147. NTC_Delay(300);
  148. ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);
  149.  
  150. SetStatusText("ÿc1Paused " + NTConfig_Script[CurScriptIndex]);
  151. }
  152. else
  153. {
  154. Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
  155. SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
  156. }
  157. }
  158. break;
  159.  
  160. case 33:
  161. _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
  162.  
  163. if(_script.running)
  164. {
  165. _script.Stop();
  166.  
  167. NTC_Delay(300);
  168. ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);
  169.  
  170. SetStatusText("ÿc;Stopped " + NTConfig_Script[CurScriptIndex]);
  171. break;
  172. }
  173. else
  174. {
  175. for(i=0; i<NTConfig_Script.length-1; i++)
  176. {
  177. if(CurScriptIndex < NTConfig_Script.length-1)
  178. CurScriptIndex++
  179. else
  180. CurScriptIndex = 0;
  181. }
  182.  
  183. SetStatusText("ÿc!Back to " + NTConfig_Script[CurScriptIndex]);
  184. break;
  185. }
  186.  
  187. case 34: //Page Down
  188. _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
  189.  
  190. if(_script.running)
  191. {
  192. _script.Stop();
  193. SetStatusText("ÿc;Stopped " + NTConfig_Script[CurScriptIndex]);
  194. }
  195. else if(++CurScriptIndex < NTConfig_Script.length)
  196. SetStatusText("ÿc!Skipped to " + NTConfig_Script[CurScriptIndex]);
  197. else if(++CurScriptIndex >= NTConfig_Script.length)
  198. {
  199. CurScriptIndex = 0
  200. SetStatusText("ÿc2Skipped to " + NTConfig_Script[CurScriptIndex]);
  201. }
  202. break;
  203. case 97: //1 (Num Lock)
  204. {
  205. NTU_DropItems();
  206. }
  207. break;
  208. case 100: //4 (Num Lock)
  209. {
  210. NTU_Funny();
  211. }
  212. break;
  213. case 101: //5 (Num Lock)
  214. {
  215. NTU_TLInventory();
  216. }
  217. break;
  218. case 105: //9 (Num Lock)
  219. {
  220. NTU_CheckMyStats()
  221. }
  222. break;
  223. case 106: //* (Num Lock)
  224. {
  225. NTU_CheckCoord()
  226. }
  227. break;
  228. case 61: //+ (Num Lock)
  229. {
  230. NTU_TLNipCheck()
  231. }
  232. break;
  233.  
  234.  
  235. }
  236. }
  237.  
  238. function NT_ScriptMsgEvents(msg)
  239. {
  240. var _area;
  241.  
  242. switch(msg)
  243. {
  244. case "SCRIPT_END":
  245. if(++CurScriptIndex < NTConfig_Script.length)
  246. {
  247. NTTM_CheckAct();
  248. Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
  249. SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
  250. NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);
  251. }
  252. else{
  253. LastScript = true;
  254.  
  255.  
  256. }
  257.  
  258. break;
  259. default:
  260. Print("ÿc1" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed");
  261.  
  262. _area = GetArea();
  263.  
  264. if(_area)
  265. NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (" + _area.name + ")");
  266. else
  267. NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (unknown area)");
  268.  
  269. if(++CurScriptIndex < NTConfig_Script.length)
  270. {
  271. NTTM_CheckAct();
  272. Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
  273. SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
  274. NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);
  275. }
  276. else
  277. LastScript = true;
  278. break;
  279. }
  280. }
Add Comment
Please, Sign In to add comment