Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.72 KB | None | 0 0
  1. const NTCU_GEM = 0;
  2.  
  3. const NTCU_MAGIC = 1;
  4. const NTCU_MAGIC_CHARM = 2;
  5.  
  6. const NTCU_CRAFT_HITPOWER_HELM = 10;
  7. const NTCU_CRAFT_HITPOWER_BOOTS = 11;
  8. const NTCU_CRAFT_HITPOWER_GLOVES = 12;
  9. const NTCU_CRAFT_HITPOWER_BELT = 13;
  10. const NTCU_CRAFT_HITPOWER_SHIELD = 14;
  11. const NTCU_CRAFT_HITPOWER_BODY = 15;
  12. const NTCU_CRAFT_HITPOWER_AMULET = 16;
  13. const NTCU_CRAFT_HITPOWER_RING = 17;
  14. const NTCU_CRAFT_HITPOWER_WEAPON = 18;
  15.  
  16. const NTCU_CRAFT_BLOOD_HELM = 19;
  17. const NTCU_CRAFT_BLOOD_BOOTS = 20;
  18. const NTCU_CRAFT_BLOOD_GLOVES = 21;
  19. const NTCU_CRAFT_BLOOD_BELT = 22;
  20. const NTCU_CRAFT_BLOOD_SHIELD = 23;
  21. const NTCU_CRAFT_BLOOD_BODY = 24;
  22. const NTCU_CRAFT_BLOOD_AMULET = 25;
  23. const NTCU_CRAFT_BLOOD_RING = 26;
  24. const NTCU_CRAFT_BLOOD_WEAPON = 27;
  25.  
  26. const NTCU_CRAFT_CASTER_HELM = 28;
  27. const NTCU_CRAFT_CASTER_BOOTS = 29;
  28. const NTCU_CRAFT_CASTER_GLOVES = 30;
  29. const NTCU_CRAFT_CASTER_BELT = 31;
  30. const NTCU_CRAFT_CASTER_SHIELD = 32;
  31. const NTCU_CRAFT_CASTER_BODY = 33;
  32. const NTCU_CRAFT_CASTER_AMULET = 34;
  33. const NTCU_CRAFT_CASTER_RING = 35;
  34. const NTCU_CRAFT_CASTER_WEAPON = 36;
  35.  
  36. const NTCU_CRAFT_SAFETY_HELM = 37;
  37. const NTCU_CRAFT_SAFETY_BOOTS = 38;
  38. const NTCU_CRAFT_SAFETY_GLOVES = 39;
  39. const NTCU_CRAFT_SAFETY_BELT = 40;
  40. const NTCU_CRAFT_SAFETY_SHIELD = 41;
  41. const NTCU_CRAFT_SAFETY_BODY = 42;
  42. const NTCU_CRAFT_SAFETY_AMULET = 43;
  43. const NTCU_CRAFT_SAFETY_RING = 44;
  44. const NTCU_CRAFT_SAFETY_WEAPON = 45;
  45.  
  46. const NTCU_SOCKET_BODYARMOR = 50;
  47. const NTCU_SOCKET_WEAPON = 51;
  48. const NTCU_SOCKET_HELM = 52;
  49. const NTCU_SOCKET_SHIELD = 53;
  50.  
  51. const NTCU_UPGRADE_N_UNIQUE_WEAPON = 60;
  52. const NTCU_UPGRADE_N_UNIQUE_ARMOR = 61;
  53. const NTCU_UPGRADE_E_UNIQUE_WEAPON = 62;
  54. const NTCU_UPGRADE_E_UNIQUE_ARMOR = 63;
  55.  
  56. const NTCU_UPGRADE_N_RARE_WEAPON = 64;
  57. const NTCU_UPGRADE_N_RARE_ARMOR = 65;
  58. const NTCU_UPGRADE_E_RARE_WEAPON = 66;
  59. const NTCU_UPGRADE_E_RARE_ARMOR = 67;
  60.  
  61. const NTCU_ESSENSE = 70;
  62.  
  63. const NTCU_RUNE_EL = 610;
  64. const NTCU_RUNE_ELD = 611;
  65. const NTCU_RUNE_TIR = 612;
  66. const NTCU_RUNE_NEF = 613;
  67. const NTCU_RUNE_ETH = 614;
  68. const NTCU_RUNE_ITH = 615;
  69. const NTCU_RUNE_TAL = 616;
  70. const NTCU_RUNE_RAL = 617;
  71. const NTCU_RUNE_ORT = 618;
  72. const NTCU_RUNE_THUL = 619;
  73. const NTCU_RUNE_AMN = 620;
  74. const NTCU_RUNE_SOL = 621;
  75. const NTCU_RUNE_SHAEL = 622;
  76. const NTCU_RUNE_DOL = 623;
  77. const NTCU_RUNE_HEL = 624;
  78. const NTCU_RUNE_IO = 625;
  79. const NTCU_RUNE_LUM = 626;
  80. const NTCU_RUNE_KO = 627;
  81. const NTCU_RUNE_FAL = 628;
  82. const NTCU_RUNE_LEM = 629;
  83. const NTCU_RUNE_PUL = 630;
  84. const NTCU_RUNE_UM = 631;
  85. const NTCU_RUNE_MAL = 632;
  86. const NTCU_RUNE_IST = 633;
  87. const NTCU_RUNE_GUL = 634;
  88. const NTCU_RUNE_VEX = 635;
  89. const NTCU_RUNE_OHM = 636;
  90. const NTCU_RUNE_LO = 637;
  91. const NTCU_RUNE_SUR = 638;
  92. const NTCU_RUNE_BER = 639;
  93. const NTCU_RUNE_JAH = 640;
  94. const NTCU_RUNE_CHAM = 641;
  95.  
  96. var _NTCU_CraftRecipe = new Array();
  97. _NTCU_CraftRecipe.push([84, 615, 571]);
  98. _NTCU_CraftRecipe.push([85, 617, 571]);
  99. _NTCU_CraftRecipe.push([79, 618, 571]);
  100. _NTCU_CraftRecipe.push([85, 616, 571]);
  101. _NTCU_CraftRecipe.push([82, 614, 571]);
  102. _NTCU_CraftRecipe.push([85, 613, 571]);
  103. _NTCU_CraftRecipe.push([90, 619, 571]);
  104. _NTCU_CraftRecipe.push([86, 620, 571]);
  105. _NTCU_CraftRecipe.push([85, 612, 571]);
  106.  
  107. _NTCU_CraftRecipe.push([84, 617, 581]);
  108. _NTCU_CraftRecipe.push([85, 614, 581]);
  109. _NTCU_CraftRecipe.push([79, 613, 581]);
  110. _NTCU_CraftRecipe.push([85, 616, 581]);
  111. _NTCU_CraftRecipe.push([82, 615, 581]);
  112. _NTCU_CraftRecipe.push([85, 619, 581]);
  113. _NTCU_CraftRecipe.push([90, 620, 581]);
  114. _NTCU_CraftRecipe.push([86, 621, 581]);
  115. _NTCU_CraftRecipe.push([85, 618, 581]);
  116.  
  117. _NTCU_CraftRecipe.push([84, 613, 561]);
  118. _NTCU_CraftRecipe.push([85, 619, 561]);
  119. _NTCU_CraftRecipe.push([79, 618, 561]);
  120. _NTCU_CraftRecipe.push([85, 615, 561]);
  121. _NTCU_CraftRecipe.push([82, 614, 561]);
  122. _NTCU_CraftRecipe.push([85, 616, 561]);
  123. _NTCU_CraftRecipe.push([92, 617, 561]);
  124. _NTCU_CraftRecipe.push([86, 620, 561]);
  125. _NTCU_CraftRecipe.push([85, 612, 561]);
  126.  
  127. _NTCU_CraftRecipe.push([84, 615, 576]);
  128. _NTCU_CraftRecipe.push([85, 618, 576]);
  129. _NTCU_CraftRecipe.push([79, 617, 576]);
  130. _NTCU_CraftRecipe.push([85, 616, 576]);
  131. _NTCU_CraftRecipe.push([82, 613, 576]);
  132. _NTCU_CraftRecipe.push([85, 614, 576]);
  133. _NTCU_CraftRecipe.push([90, 619, 576]);
  134. _NTCU_CraftRecipe.push([86, 620, 576]);
  135. _NTCU_CraftRecipe.push([85, 621, 576]);
  136.  
  137. var _NTCU_SocketRecipe = new Array();
  138. _NTCU_SocketRecipe.push([616, 619, 566]);
  139. _NTCU_SocketRecipe.push([617, 620, 561]);
  140. _NTCU_SocketRecipe.push([617, 619, 571]);
  141. _NTCU_SocketRecipe.push([616, 620, 581]);
  142.  
  143. var _NTCU_UpgradeRecipe = new Array();
  144. _NTCU_UpgradeRecipe.push([7, 617, 621, 576]);
  145. _NTCU_UpgradeRecipe.push([7, 616, 622, 586]);
  146. _NTCU_UpgradeRecipe.push([7, 626, 630, 576]);
  147. _NTCU_UpgradeRecipe.push([7, 627, 629, 586]);
  148.  
  149. _NTCU_UpgradeRecipe.push([6, 618, 620, 571]);
  150. _NTCU_UpgradeRecipe.push([6, 617, 619, 561]);
  151. _NTCU_UpgradeRecipe.push([6, 628, 631, 571]);
  152. _NTCU_UpgradeRecipe.push([6, 627, 630, 561]);
  153.  
  154. var _NTCU_Inventory = new Array(4);
  155. _NTCU_Inventory[0] = new Array(10);
  156. _NTCU_Inventory[1] = new Array(10);
  157. _NTCU_Inventory[2] = new Array(10);
  158. _NTCU_Inventory[3] = new Array(10);
  159.  
  160. var _NTCU_LogString;
  161. var _NTCU_KeptString = "Empty";
  162. var _KeptItem = "Empty";
  163.  
  164. function NTCU_CheckItem(item, result)
  165. {
  166. var i, n, _index;
  167. var _classid, _gid, _calclevel;
  168. var _result = false;
  169. var _isEthereal = ((item.itemflag & 0x400000) == 0x400000);
  170.  
  171. if(!NTConfig_Cubing)
  172. return false;
  173.  
  174. _classid = item.classid;
  175. _gid = item.gid;
  176. _calclevel = parseInt(me.GetStat(12)/2) + parseInt(item.itemlevel/2);
  177.  
  178. for(i = 0 ; i < NTConfig_CubingItem.length ; i++)
  179. {
  180. if(NTConfig_CubingItem[i][0] == NTCU_GEM)
  181. {
  182. if(_classid == NTConfig_CubingItem[i][1])
  183. {
  184. for(n = 0 ; n < 3 ; n++)
  185. {
  186. if(NTConfig_CubingItem[i][2+n] == null)
  187. {
  188. NTConfig_CubingItem[i][2+n] = _gid;
  189. break;
  190. }
  191. else if(NTConfig_CubingItem[i][2+n] == _gid)
  192. break;
  193. }
  194.  
  195. _result = true;
  196. }
  197. }
  198. else if(NTConfig_CubingItem[i][0] == NTCU_MAGIC || NTConfig_CubingItem[i][0] == NTCU_MAGIC_CHARM)
  199. {
  200. if(_classid == NTConfig_CubingItem[i][1])
  201. {
  202. if(result == 0 && item.quality == 4)
  203. {
  204. if(NTConfig_CubingItem[i][0] == NTCU_MAGIC_CHARM)
  205. {
  206. if(item.itemlevel >= 95)
  207. {
  208. if(NTConfig_CubingItem[i][2] == null)
  209. {
  210. NTConfig_CubingItem[i][2] = _gid;
  211. _result = true;
  212. }
  213. else if(NTConfig_CubingItem[i][2] == _gid)
  214. _result = true;
  215. }
  216. }
  217. //Begin Jav code
  218. else if( NTConfig_CubingItem[i][1] == 285 ) // maiden javelin
  219. {
  220. if(item.itemlevel >= 71 && item.itemlevel <= 75)
  221. {
  222. if(NTConfig_CubingItem[i][2] == null)
  223. {
  224. NTConfig_CubingItem[i][2] = _gid;
  225. _result = true;
  226. }
  227. else if(NTConfig_CubingItem[i][2] == _gid)
  228. _result = true;
  229. }
  230. }
  231. else if( NTConfig_CubingItem[i][1] == 295 ) // ceremonial javelin
  232. {
  233. if(item.itemlevel >= 77 && item.itemlevel <= 81)
  234. {
  235. if(NTConfig_CubingItem[i][2] == null)
  236. {
  237. NTConfig_CubingItem[i][2] = _gid;
  238. _result = true;
  239. }
  240. else if(NTConfig_CubingItem[i][2] == _gid)
  241. _result = true;
  242. }
  243. }
  244. else if( NTConfig_CubingItem[i][1] == 305 ) // maiden javelin
  245. {
  246. if(item.itemlevel >= 80 && item.itemlevel <= 84)
  247. {
  248. if(NTConfig_CubingItem[i][2] == null)
  249. {
  250. NTConfig_CubingItem[i][2] = _gid;
  251. _result = true;
  252. }
  253. else if(NTConfig_CubingItem[i][2] == _gid)
  254. _result = true;
  255. }
  256. }
  257. // End Jav Code
  258. else
  259. {
  260. if(item.itemlevel >= 85)
  261. {
  262. if(NTConfig_CubingItem[i][2] == null)
  263. {
  264. NTConfig_CubingItem[i][2] = _gid;
  265. _result = true;
  266. }
  267. else if(NTConfig_CubingItem[i][2] == _gid)
  268. _result = true;
  269. }
  270. }
  271. }
  272. }
  273. else if(_classid == 566 || _classid == 586 || _classid == 601)
  274. {
  275. if(NTConfig_CubingItem[i][2] != null)
  276. {
  277. for(n = 0 ; n < 3 ; n++)
  278. {
  279. if(NTConfig_CubingItem[i][3+n] == null)
  280. {
  281. NTConfig_CubingItem[i][3+n] = _gid;
  282. break;
  283. }
  284. else if(NTConfig_CubingItem[i][3+n] == _gid)
  285. break;
  286. }
  287.  
  288. _result = true;
  289. }
  290. }
  291. else if(_classid == 565)
  292. {
  293. if(NTConfig_CubingItem[i][2] != null)
  294. {
  295. for(n = 0 ; n < 3 ; n++)
  296. {
  297. if(NTConfig_CubingItem[i][6+n] == null)
  298. {
  299. NTConfig_CubingItem[i][6+n] = _gid;
  300. break;
  301. }
  302. else if(NTConfig_CubingItem[i][6+n] == _gid)
  303. break;
  304. }
  305.  
  306. _result = true;
  307. }
  308. }
  309. else if(_classid == 585)
  310. {
  311. if(NTConfig_CubingItem[i][2] != null)
  312. {
  313. for(n = 0 ; n < 3 ; n++)
  314. {
  315. if(NTConfig_CubingItem[i][9+n] == null)
  316. {
  317. NTConfig_CubingItem[i][9+n] = _gid;
  318. break;
  319. }
  320. else if(NTConfig_CubingItem[i][9+n] == _gid)
  321. break;
  322. }
  323.  
  324. _result = true;
  325. }
  326. }
  327. else if(_classid == 600)
  328. {
  329. if(NTConfig_CubingItem[i][2] != null)
  330. {
  331. for(n = 0 ; n < 3 ; n++)
  332. {
  333. if(NTConfig_CubingItem[i][12+n] == null)
  334. {
  335. NTConfig_CubingItem[i][12+n] = _gid;
  336. break;
  337. }
  338. else if(NTConfig_CubingItem[i][12+n] == _gid)
  339. break;
  340. }
  341.  
  342. _result = true;
  343. }
  344. }
  345. }
  346. else if(NTConfig_CubingItem[i][0] >= NTCU_CRAFT_HITPOWER_HELM && NTConfig_CubingItem[i][0] <= NTCU_CRAFT_SAFETY_WEAPON)
  347. {
  348. _index = NTConfig_CubingItem[i][0] - NTCU_CRAFT_HITPOWER_HELM;
  349.  
  350. if(_classid == NTConfig_CubingItem[i][1])
  351. {
  352. if(result == 0 && item.quality == 4 && _calclevel >= _NTCU_CraftRecipe[_index][0])
  353. {
  354. if(NTConfig_CubingItem[i][2] == null)
  355. {
  356. NTConfig_CubingItem[i][2] = _gid;
  357. _result = true;
  358. }
  359. else if(NTConfig_CubingItem[i][2] == _gid)
  360. _result = true;
  361. }
  362. }
  363. else if(_classid == 643)
  364. {
  365. if(result == 0 && NTConfig_CubingItem[i][2] != null)
  366. {
  367. if(NTConfig_CubingItem[i][3] == null)
  368. {
  369. NTConfig_CubingItem[i][3] = _gid;
  370. _result = true;
  371. }
  372. else if(NTConfig_CubingItem[i][3] == _gid)
  373. _result = true;
  374. }
  375. }
  376. else if(_classid == _NTCU_CraftRecipe[_index][1])
  377. {
  378. if(NTConfig_CubingItem[i][2] != null)
  379. {
  380. if(NTConfig_CubingItem[i][4] == null)
  381. {
  382. NTConfig_CubingItem[i][4] = _gid;
  383. _result = true;
  384. }
  385. else if(NTConfig_CubingItem[i][4] == _gid)
  386. _result = true;
  387. }
  388. }
  389. else if(_classid == _NTCU_CraftRecipe[_index][2])
  390. {
  391. if(NTConfig_CubingItem[i][2] != null)
  392. {
  393. if(NTConfig_CubingItem[i][5] == null)
  394. {
  395. NTConfig_CubingItem[i][5] = _gid;
  396. _result = true;
  397. }
  398. else if(NTConfig_CubingItem[i][5] == _gid)
  399. _result = true;
  400. }
  401. }
  402. else if(_classid == _NTCU_CraftRecipe[_index][2]-1)
  403. {
  404. if(NTConfig_CubingItem[i][2] != null && NTConfig_CubingItem[i][5] == null)
  405. {
  406. for(n = 0 ; n < 3 ; n++)
  407. {
  408. if(NTConfig_CubingItem[i][6+n] == null)
  409. {
  410. NTConfig_CubingItem[i][6+n] = _gid;
  411. _result = true;
  412.  
  413. break;
  414. }
  415. else if(NTConfig_CubingItem[i][6+n] == _gid)
  416. {
  417. _result = true;
  418.  
  419. break;
  420. }
  421. }
  422. }
  423. }
  424. }
  425. else if(NTConfig_CubingItem[i][0] >= NTCU_SOCKET_BODYARMOR && NTConfig_CubingItem[i][0] <= NTCU_SOCKET_SHIELD)
  426. {
  427. _index = NTConfig_CubingItem[i][0] - NTCU_SOCKET_BODYARMOR;
  428.  
  429. if(_classid == NTConfig_CubingItem[i][1])
  430. {
  431. if(result == 1 && item.quality <= 2 && item.GetStat(194) == 0)
  432. {
  433. if(NTConfig_CubingItem[i][2] == null)
  434. {
  435. NTConfig_CubingItem[i][2] = _gid;
  436. _result = true;
  437. }
  438. else if(NTConfig_CubingItem[i][2] == _gid)
  439. _result = true;
  440. }
  441. }
  442. else if(_classid == _NTCU_SocketRecipe[_index][0])
  443. {
  444. if(NTConfig_CubingItem[i][2] != null)
  445. {
  446. if(NTConfig_CubingItem[i][3] == null)
  447. {
  448. NTConfig_CubingItem[i][3] = _gid;
  449. _result = true;
  450. }
  451. else if(NTConfig_CubingItem[i][3] == _gid)
  452. _result = true;
  453. }
  454. }
  455. else if(_classid == _NTCU_SocketRecipe[_index][1])
  456. {
  457. if(NTConfig_CubingItem[i][2] != null)
  458. {
  459. if(NTConfig_CubingItem[i][4] == null)
  460. {
  461. NTConfig_CubingItem[i][4] = _gid;
  462. _result = true;
  463. }
  464. else if(NTConfig_CubingItem[i][4] == _gid)
  465. _result = true;
  466. }
  467. }
  468. else if(_classid == _NTCU_SocketRecipe[_index][2])
  469. {
  470. if(NTConfig_CubingItem[i][2] != null)
  471. {
  472. if(NTConfig_CubingItem[i][5] == null)
  473. {
  474. NTConfig_CubingItem[i][5] = _gid;
  475. _result = true;
  476. }
  477. else if(NTConfig_CubingItem[i][5] == _gid)
  478. _result = true;
  479. }
  480. }
  481. else if(_classid == _NTCU_SocketRecipe[_index][2]-1)
  482. {
  483. if(NTConfig_CubingItem[i][2] != null && NTConfig_CubingItem[i][5] == null)
  484. {
  485. for(n = 0 ; n < 3 ; n++)
  486. {
  487. if(NTConfig_CubingItem[i][6+n] == null)
  488. {
  489. NTConfig_CubingItem[i][6+n] = _gid;
  490. _result = true;
  491.  
  492. break;
  493. }
  494. else if(NTConfig_CubingItem[i][6+n] == _gid)
  495. {
  496. _result = true;
  497.  
  498. break;
  499. }
  500. }
  501. }
  502. }
  503. }
  504. else if(NTConfig_CubingItem[i][0] >= NTCU_UPGRADE_N_UNIQUE_WEAPON && NTConfig_CubingItem[i][0] <= NTCU_UPGRADE_E_RARE_ARMOR)
  505. {
  506. _index = NTConfig_CubingItem[i][0] - NTCU_UPGRADE_N_UNIQUE_WEAPON;
  507.  
  508. if(_classid == NTConfig_CubingItem[i][1])
  509. {
  510. if(result == 1 && item.quality == _NTCU_UpgradeRecipe[_index][0])
  511. {
  512. if(NTConfig_CubingItem[i][2] == null)
  513. {
  514. NTConfig_CubingItem[i][2] = _gid;
  515. _result = true;
  516. }
  517. else if(NTConfig_CubingItem[i][2] == _gid)
  518. _result = true;
  519. }
  520. }
  521. else if(_classid == _NTCU_UpgradeRecipe[_index][1])
  522. {
  523. if(NTConfig_CubingItem[i][2] != null)
  524. {
  525. if(NTConfig_CubingItem[i][3] == null)
  526. {
  527. NTConfig_CubingItem[i][3] = _gid;
  528. _result = true;
  529. }
  530. else if(NTConfig_CubingItem[i][3] == _gid)
  531. _result = true;
  532. }
  533. }
  534. else if(_classid == _NTCU_UpgradeRecipe[_index][2])
  535. {
  536. if(NTConfig_CubingItem[i][2] != null)
  537. {
  538. if(NTConfig_CubingItem[i][4] == null)
  539. {
  540. NTConfig_CubingItem[i][4] = _gid;
  541. _result = true;
  542. }
  543. else if(NTConfig_CubingItem[i][4] == _gid)
  544. _result = true;
  545. }
  546. }
  547. else if(_classid == _NTCU_UpgradeRecipe[_index][3])
  548. {
  549. if(NTConfig_CubingItem[i][2] != null)
  550. {
  551. if(NTConfig_CubingItem[i][5] == null)
  552. {
  553. NTConfig_CubingItem[i][5] = _gid;
  554. _result = true;
  555. }
  556. else if(NTConfig_CubingItem[i][5] == _gid)
  557. _result = true;
  558. }
  559. }
  560. else if(_classid == _NTCU_UpgradeRecipe[_index][3]-1)
  561. {
  562. if(NTConfig_CubingItem[i][2] != null && NTConfig_CubingItem[i][5] == null)
  563. {
  564. for(n = 0 ; n < 3 ; n++)
  565. {
  566. if(NTConfig_CubingItem[i][6+n] == null)
  567. {
  568. NTConfig_CubingItem[i][6+n] = _gid;
  569. _result = true;
  570.  
  571. break;
  572. }
  573. else if(NTConfig_CubingItem[i][6+n] == _gid)
  574. {
  575. _result = true;
  576.  
  577. break;
  578. }
  579. }
  580. }
  581. }
  582. }
  583. else if(NTConfig_CubingItem[i][0] == NTCU_ESSENSE)
  584. {
  585. if(_classid >= 654 && _classid <= 657)
  586. {
  587. if(NTConfig_CubingItem[i][2+_classid-654] == null)
  588. {
  589. NTConfig_CubingItem[i][2+_classid-654] = _gid;
  590. _result = true;
  591. }
  592. else if(NTConfig_CubingItem[i][2+_classid-654] == _gid)
  593. _result = true;
  594. }
  595. }
  596. else if(NTConfig_CubingItem[i][0] >= NTCU_RUNE_EL && NTConfig_CubingItem[i][0] <= NTCU_RUNE_ORT)
  597. {
  598. if(_classid == NTConfig_CubingItem[i][0])
  599. {
  600. for(n = 0 ; n < 3 ; n++)
  601. {
  602. if(NTConfig_CubingItem[i][2+n] == null)
  603. {
  604. NTConfig_CubingItem[i][2+n] = _gid;
  605. break;
  606. }
  607. else if(NTConfig_CubingItem[i][2+n] == _gid)
  608. break;
  609. }
  610.  
  611. _result = true;
  612. }
  613. }
  614. else if(NTConfig_CubingItem[i][0] >= NTCU_RUNE_THUL && NTConfig_CubingItem[i][0] <= NTCU_RUNE_LEM)
  615. {
  616. if(_classid == NTConfig_CubingItem[i][0])
  617. {
  618. for(n = 0 ; n < 3 ; n++)
  619. {
  620. if(NTConfig_CubingItem[i][2+n] == null)
  621. {
  622. NTConfig_CubingItem[i][2+n] = _gid;
  623. _result = true;
  624.  
  625. break;
  626. }
  627. else if(NTConfig_CubingItem[i][2+n] == _gid)
  628. {
  629. _result = true;
  630.  
  631. break;
  632. }
  633. }
  634. }
  635. else if(_classid == NTConfig_CubingItem[i][1])
  636. {
  637. if(NTConfig_CubingItem[i][3] != null)
  638. {
  639. if(NTConfig_CubingItem[i][5] == null)
  640. {
  641. NTConfig_CubingItem[i][5] = _gid;
  642. _result = true;
  643. }
  644. else if(NTConfig_CubingItem[i][5] == _gid)
  645. _result = true;
  646. }
  647. }
  648. }
  649. else if(NTConfig_CubingItem[i][0] >= NTCU_RUNE_PUL && NTConfig_CubingItem[i][0] <= NTCU_RUNE_CHAM)
  650. {
  651. if(_classid == NTConfig_CubingItem[i][0])
  652. {
  653. for(n = 0 ; n < 2 ; n++)
  654. {
  655. if(NTConfig_CubingItem[i][2+n] == null)
  656. {
  657. NTConfig_CubingItem[i][2+n] = _gid;
  658. break;
  659. }
  660. else if(NTConfig_CubingItem[i][2+n] == _gid)
  661. break;
  662. }
  663.  
  664. _result = true;
  665. }
  666. else if(_classid == NTConfig_CubingItem[i][1])
  667. {
  668. if(NTConfig_CubingItem[i][3] != null)
  669. {
  670. if(NTConfig_CubingItem[i][4] == null)
  671. {
  672. NTConfig_CubingItem[i][4] = _gid;
  673. _result = true;
  674. }
  675. else if(NTConfig_CubingItem[i][4] == _gid)
  676. _result = true;
  677. }
  678. }
  679. }
  680. }
  681.  
  682. return _result;
  683. }
  684.  
  685. function NTCU_InitCubing()
  686. {
  687. var i, n;
  688. var _count;
  689. var _items;
  690.  
  691. if(!NTConfig_Cubing)
  692. return false;
  693.  
  694. for(i = 0 ; i < NTConfig_CubingItem.length ; i++)
  695. {
  696. if(NTConfig_CubingItem[i][0] < NTCU_MAGIC)
  697. _count = 5;
  698. else if(NTConfig_CubingItem[i][0] < NTCU_CRAFT_HITPOWER_HELM)
  699. _count = 15;
  700. else if(NTConfig_CubingItem[i][0] < NTCU_ESSENSE)
  701. _count = 9;
  702. else if(NTConfig_CubingItem[i][0] == NTCU_ESSENSE)
  703. _count = 6;
  704. else if(NTConfig_CubingItem[i][0] < NTCU_RUNE_THUL)
  705. _count = 5;
  706. else if(NTConfig_CubingItem[i][0] < NTCU_RUNE_PUL)
  707. _count = 6;
  708. else
  709. _count = 5;
  710.  
  711. for(n = 2 ; n < _count ; n++)
  712. NTConfig_CubingItem[i][n] = null;
  713. }
  714.  
  715. _items = me.GetItems();
  716.  
  717. if(!_items)
  718. return false;
  719.  
  720. for(i = 0 ; i < _items.length ; i++)
  721. {
  722. if(_items[i].mode == 0)
  723. {
  724. if(_items[i].itemloc != 0 || NTConfig_Columns[_items[i].y][_items[i].x])
  725. NTSI_CheckItem(_items[i]);
  726. }
  727. }
  728.  
  729. for(i = 0 ; i < _items.length ; i++)
  730. {
  731. if(_items[i].mode == 0)
  732. {
  733. if(_items[i].itemloc != 0 || NTConfig_Columns[_items[i].y][_items[i].x])
  734. NTSI_CheckItem(_items[i]);
  735. }
  736. }
  737.  
  738. return true;
  739. }
  740.  
  741. function NTCU_CheckCubing()
  742. {
  743. var i, n;
  744.  
  745. if(!NTConfig_Cubing)
  746. return false;
  747.  
  748. for(i = 0 ; i < NTConfig_CubingItem.length ; i++)
  749. {
  750. if(NTConfig_CubingItem[i][0] == NTCU_MAGIC || NTConfig_CubingItem[i][0] == NTCU_MAGIC_CHARM)
  751. {
  752. for(n = 2 ; n < 6 ; n++)
  753. {
  754. if(NTConfig_CubingItem[i][n] == null)
  755. break;
  756. }
  757.  
  758. if(n >= 6)
  759. break;
  760.  
  761. for(n = 6 ; n < 9 ; n++)
  762. {
  763. if(NTConfig_CubingItem[i][n] == null)
  764. break;
  765. }
  766.  
  767. if(n >= 9)
  768. break;
  769.  
  770. for(n = 9 ; n < 12 ; n++)
  771. {
  772. if(NTConfig_CubingItem[i][n] == null)
  773. break;
  774. }
  775.  
  776. if(n >= 12)
  777. break;
  778.  
  779. for(n = 12 ; n < 15 ; n++)
  780. {
  781. if(NTConfig_CubingItem[i][n] == null)
  782. break;
  783. }
  784.  
  785. if(n >= 15)
  786. break;
  787. }
  788. else if(NTConfig_CubingItem[i][0] >= NTCU_CRAFT_HITPOWER_HELM && NTConfig_CubingItem[i][0] <= NTCU_UPGRADE_E_RARE_ARMOR)
  789. {
  790. for(n = 2 ; n < 6 ; n++)
  791. {
  792. if(NTConfig_CubingItem[i][n] == null)
  793. break;
  794. }
  795.  
  796. if(n >= 6)
  797. break;
  798.  
  799. for(n = 6 ; n < 9 ; n++)
  800. {
  801. if(NTConfig_CubingItem[i][n] == null)
  802. break;
  803. }
  804.  
  805. if(n >= 9)
  806. break;
  807. }
  808. else
  809. {
  810. for(n = 2 ; n < NTConfig_CubingItem[i].length ; n++)
  811. {
  812. if(NTConfig_CubingItem[i][n] == null)
  813. break;
  814. }
  815.  
  816. if(n >= NTConfig_CubingItem[i].length)
  817. break;
  818. }
  819. }
  820.  
  821. return (i < NTConfig_CubingItem.length);
  822. }
  823.  
  824. function NTCU_DoCubing()
  825. {
  826. var i, n;
  827. var _items;
  828.  
  829. _items = me.GetItems(NTC_UNIT_CUBE);
  830.  
  831. if(!_items || _items.length < 1)
  832. return false;
  833.  
  834. if(NTCU_CheckCubeInventoryInt() > 0)
  835. {
  836. if(!NTCU_OpenCubeInt(_items[0]))
  837. return false;
  838.  
  839. if(NTCU_ClearCubeInt() < 1)
  840. return false;
  841.  
  842. NTCU_CloseCubeInt();
  843. }
  844.  
  845. do
  846. {
  847. for(i = 0 ; i < NTConfig_CubingItem.length ; i++)
  848. {
  849. if(NTConfig_CubingItem[i][0] == NTCU_MAGIC || NTConfig_CubingItem[i][0] == NTCU_MAGIC_CHARM)
  850. {
  851. for(n = 2 ; n < 6 ; n++)
  852. {
  853. if(NTConfig_CubingItem[i][n] == null)
  854. break;
  855. }
  856.  
  857. if(n >= 6)
  858. {
  859. if(!NTCU_MoveItemsToCubeInt(_items[0], i, 2, 5))
  860. return false;
  861.  
  862. break;
  863. }
  864.  
  865. for(n = 6 ; n < 9 ; n++)
  866. {
  867. if(NTConfig_CubingItem[i][n] == null)
  868. break;
  869. }
  870.  
  871. if(n >= 9)
  872. {
  873. if(!NTCU_MoveItemsToCubeInt(_items[0], i, 6, 8))
  874. return false;
  875.  
  876. break;
  877. }
  878.  
  879. for(n = 9 ; n < 12 ; n++)
  880. {
  881. if(NTConfig_CubingItem[i][n] == null)
  882. break;
  883. }
  884.  
  885. if(n >= 12)
  886. {
  887. if(!NTCU_MoveItemsToCubeInt(_items[0], i, 9, 11))
  888. return false;
  889.  
  890. break;
  891. }
  892.  
  893. for(n = 12 ; n < 15 ; n++)
  894. {
  895. if(NTConfig_CubingItem[i][n] == null)
  896. break;
  897. }
  898.  
  899. if(n >= 15)
  900. {
  901. if(!NTCU_MoveItemsToCubeInt(_items[0], i, 12, 14))
  902. return false;
  903.  
  904. break;
  905. }
  906. }
  907. else if(NTConfig_CubingItem[i][0] >= NTCU_CRAFT_HITPOWER_HELM && NTConfig_CubingItem[i][0] <= NTCU_UPGRADE_E_RARE_ARMOR)
  908. {
  909. for(n = 2 ; n < 6 ; n++)
  910. {
  911. if(NTConfig_CubingItem[i][n] == null)
  912. break;
  913. }
  914.  
  915. if(n >= 6)
  916. {
  917. if(!NTCU_MoveItemsToCubeInt(_items[0], i, 2, 5))
  918. return false;
  919.  
  920. break;
  921. }
  922.  
  923. for(n = 6 ; n < 9 ; n++)
  924. {
  925. if(NTConfig_CubingItem[i][n] == null)
  926. break;
  927. }
  928.  
  929. if(n >= 9)
  930. {
  931. if(!NTCU_MoveItemsToCubeInt(_items[0], i, 6, 8))
  932. return false;
  933.  
  934. break;
  935. }
  936. }
  937. else
  938. {
  939. for(n = 2 ; n < NTConfig_CubingItem[i].length ; n++)
  940. {
  941. if(NTConfig_CubingItem[i][n] == null)
  942. break;
  943. }
  944.  
  945. if(n >= NTConfig_CubingItem[i].length)
  946. {
  947. if(!NTCU_MoveItemsToCubeInt(_items[0], i, 2, NTConfig_CubingItem[i].length-1))
  948. return false;
  949.  
  950. break;
  951. }
  952. }
  953. }
  954.  
  955. if(i < NTConfig_CubingItem.length)
  956. {
  957. if(!NTCU_OpenCubeInt(_items[0]))
  958. return false;
  959.  
  960. if(!Transmute())
  961. return false;
  962.  
  963. NTC_PingDelay(800);
  964. if(NTConfig_CubeProcessToManager > 0){
  965. if(NTConfig_CubeProcessToManager == 1)
  966. NTC_SendLogToOOG(NTC_LOG_ITEM, _NTCU_LogString);
  967. else if (NTConfig_CubeProcessToManager == 2) {
  968. NTC_SendLogToOOG(NTC_LOG_COMMON, _NTCU_LogString);
  969. var crafted_itm = NTCU_GetCubeContents();
  970. if(crafted_itm.length == 1)
  971. {
  972. if(crafted_itm[0].quality == 8 || crafted_itm[0].itemflag&0x400000 || crafted_itm[0].quality == 7 && crafted_itm[0].class == 2)
  973. {
  974. var _isEthereal = ((crafted_itm[0].itemflag & 0x400000) == 0x400000);
  975. if(NTSI_CheckItem(crafted_itm[0]) != 0)
  976. {
  977. if(NTConfig_LogCraftedItems && NTConfig_UseXMLItemlog) {
  978. if(NTConfig_IndependantLog) {
  979. NTI_WriteILog(crafted_itm[0], me, _isEthereal, 12, false, '', true);
  980. } else {
  981. NTI_WriteLog(crafted_itm[0], me, _isEthereal, 12, false, '', true);
  982. }
  983. }
  984. NTC_SendLogToOOG(NTC_LOG_ITEM, COLOR_2 + "Kept: " + NTC_ItemQualityToMGRColor[crafted_itm[0].quality] + crafted_itm[0].name.split("\n")[0]+ ";" + crafted_itm[0].itemdesc + "\n" + COLOR_2 + "iLvl: " + crafted_itm[0].itemlevel + COLOR_2 + "\n Crafted");
  985. }
  986. else
  987. {
  988. if(NTConfig_LogCraftedItems && NTConfig_UseXMLItemlog) {
  989. if(NTConfig_IndependantLog) {
  990. NTI_WriteILog(crafted_itm[0], me, _isEthereal, 13, false, '', true);
  991. } else {
  992. NTI_WriteLog(crafted_itm[0], me, _isEthereal, 13, false, '', true);
  993. }
  994. }
  995. NTC_SendLogToOOG(NTC_LOG_ITEM, COLOR_1 + "Sold: " + NTC_ItemQualityToMGRColor[crafted_itm[0].quality] + crafted_itm[0].name.split("\n")[0]+ ";" + crafted_itm[0].itemdesc + "\n" + COLOR_2 + "iLvl: " + crafted_itm[0].itemlevel + COLOR_2 + "\n Crafted");
  996. }
  997. }
  998. }
  999. }
  1000. }
  1001. if(NTConfig_LogCraftingString)
  1002. NTU_LogPrint("logs/CraftLog/"+me.charname+"-CraftingString.txt", _NTCU_LogString);
  1003. var crafted_itm = NTCU_GetCubeContents();
  1004. if (crafted_itm.length == 1)
  1005. {
  1006. if (crafted_itm[0].quality == 8)
  1007. {
  1008. var _isEthereal = ((crafted_itm[0].itemflag & 0x400000) == 0x400000);
  1009. if ( NTSI_CheckItem(crafted_itm[0]) != 0 ) {
  1010. if(NTConfig_LogCraftedItems && NTConfig_UseXMLItemlog) {
  1011. if(NTConfig_IndependantLog) {
  1012. NTI_WriteILog(crafted_itm[0], me, _isEthereal, 12, false, '', true);
  1013. } else {
  1014. NTI_WriteLog(crafted_itm[0], me, _isEthereal, 12, false, '', true);
  1015. }
  1016. }
  1017. //NTC_SendLogToOOG(NTC_LOG_ITEM, COLOR_1 + "Kept Cubed Item " + NTC_ItemQualityToMGRColor[crafted_itm[0].quality] + crafted_itm[0].name.split("\n")[0] + ";" + crafted_itm[0].itemdesc + "\n" + COLOR_2 + "iLvl: " + crafted_itm[0].itemlevel);
  1018. }
  1019. else
  1020. {
  1021. if(NTConfig_LogCraftedItems && NTConfig_UseXMLItemlog) {
  1022. if(NTConfig_IndependantLog) {
  1023. NTI_WriteILog(crafted_itm[0], me, _isEthereal, 14, false, '', true);
  1024. } else {
  1025. NTI_WriteLog(crafted_itm[0], me, _isEthereal, 14, false, '', true);
  1026. }
  1027. }
  1028. //NTC_SendLogToOOG(NTC_LOG_ITEM, "Trashed Cubed Item " + NTC_ItemQualityToMGRColor[crafted_itm[0].quality] + crafted_itm[0].name.split("\n")[0] + ";" + crafted_itm[0].itemdesc + "\n" + COLOR_2 + "iLvl: " + crafted_itm[0].itemlevel);
  1029. }
  1030. }
  1031.  
  1032. }
  1033.  
  1034. if(NTCU_ClearCubeInt() == 1) {
  1035. if(NTConfig_CubeProcessToManager > 0){
  1036. if(NTConfig_CubeProcessToManager == 1) {
  1037. NTC_SendLogToOOG(NTC_LOG_ITEM, _NTCU_KeptString);
  1038. }
  1039. else if (NTConfig_CubeProcessToManager == 2) {
  1040. NTC_SendLogToOOG(NTC_LOG_ITEM, _NTCU_KeptString);
  1041. }
  1042. }
  1043. var _isEthereal = ((_KeptItem.itemflag & 0x400000) == 0x400000);
  1044. if(NTConfig_LogCraftedItems && NTConfig_UseXMLItemlog) {
  1045. if(NTConfig_IndependantLog) {
  1046. NTI_WriteILog(_KeptItem, me, _isEthereal, 12, false, '', true);
  1047. } else {
  1048. NTI_WriteLog(_KeptItem, me, _isEthereal, 12, false, '', true);
  1049. }
  1050. }
  1051. NTCU_CloseCubeInt();
  1052. } else {
  1053. NTCU_CloseCubeInt();
  1054. return false;
  1055. }
  1056. }
  1057. } while(NTCU_InitCubing() && NTCU_CheckCubing());
  1058.  
  1059. return true;
  1060. }
  1061.  
  1062. // Internal function
  1063. function NTCU_CheckCubeInventoryInt()
  1064. {
  1065. var i, x, y;
  1066. var _itemcounts = 0;
  1067. var _items;
  1068.  
  1069. for(y = 0 ; y < 4 ; y++)
  1070. {
  1071. for(x = 0 ; x < 10 ; x++)
  1072. _NTCU_Inventory[y][x] = 0;
  1073. }
  1074.  
  1075. _items = me.GetItems();
  1076.  
  1077. if(!_items)
  1078. return 0;
  1079.  
  1080. for(i = 0 ; i < _items.length ; i++)
  1081. {
  1082. if(_items[i].mode == 0)
  1083. {
  1084. if(_items[i].itemloc == 0)
  1085. {
  1086. for(y = 0 ; y < _items[i].ysize ; y++)
  1087. {
  1088. for(x = 0 ; x < _items[i].xsize ; x++)
  1089. _NTCU_Inventory[_items[i].y+y][_items[i].x+x] = 1;
  1090. }
  1091. }
  1092. else if(_items[i].itemloc == 3)
  1093. _itemcounts++;
  1094. }
  1095. }
  1096.  
  1097. return _itemcounts;
  1098. }
  1099.  
  1100. function NTCU_MoveItemsToCubeInt(cube, index, start, end)
  1101. {
  1102. var i, n;
  1103. var _items;
  1104.  
  1105. _items = me.GetItems();
  1106.  
  1107. if(!_items)
  1108. return false;
  1109.  
  1110. _NTCU_LogString = COLOR_8 + "Transmuted ";
  1111.  
  1112. for(i = start ; i <= end ; i++)
  1113. {
  1114. for(n = 0 ; n < _items.length ; n++)
  1115. {
  1116. if(_items[n].gid == NTConfig_CubingItem[index][i])
  1117. {
  1118. if(!NTCU_MoveItemToCubeInt(cube, _items[n]))
  1119. return false;
  1120.  
  1121. if(i > start)
  1122. _NTCU_LogString += "+";
  1123.  
  1124. _NTCU_LogString += _items[n].name.split("\n")[0];
  1125.  
  1126. break;
  1127. }
  1128. }
  1129.  
  1130. if(n >= _items.length)
  1131. return false;
  1132. }
  1133.  
  1134. return true;
  1135. }
  1136.  
  1137. function NTCU_MoveItemToCubeInt(cube, item)
  1138. {
  1139. var x, y;
  1140. var _itemx, _itemy;
  1141.  
  1142. if(item.itemloc == 3)
  1143. return true;
  1144.  
  1145. _itemx = item.x;
  1146. _itemy = item.y;
  1147.  
  1148. if(!NTC_ItemToCursor(item))
  1149. return false;
  1150.  
  1151. if(item.itemloc == 0)
  1152. {
  1153. for(y = 0 ; y < item.ysize ; y++)
  1154. {
  1155. for(x = 0 ; x < item.xsize ; x++)
  1156. _NTCU_Inventory[_itemy+y][_itemx+x] = 0;
  1157. }
  1158. }
  1159.  
  1160. for(x = 0 ; x < 80 ; x++)
  1161. {
  1162. if((x % 40) == 0)
  1163. {
  1164. if(item.ysize < 3)
  1165. me.ClickItem(0, cube.x, cube.y, cube.itemloc);
  1166. else if(item.ysize == 3)
  1167. me.ClickItem(0, cube.x, cube.y-1, cube.itemloc);
  1168. else
  1169. {
  1170. if(cube.y == 0)
  1171. me.ClickItem(0, cube.x, -1, cube.itemloc);
  1172. else
  1173. me.ClickItem(0, cube.x, cube.y-2, cube.itemloc);
  1174. }
  1175. }
  1176.  
  1177. NTC_Delay(100);
  1178.  
  1179. if(!me.itemoncursor)
  1180. break;
  1181. }
  1182.  
  1183. if(x >= 80)
  1184. return false;
  1185.  
  1186. NTC_PingDelay(200);
  1187.  
  1188. return true;
  1189. }
  1190.  
  1191. function NTCU_MoveItemToInventoryInt(item)
  1192. {
  1193. var x, y, m, n;
  1194. var _havespace;
  1195.  
  1196. for(y = 0 ; y < 4 ; y++)
  1197. {
  1198. for(x = 0 ; x < 10 ; x++)
  1199. {
  1200. _havespace = true;
  1201.  
  1202. for(m = 0 ; m < item.ysize ; m++)
  1203. {
  1204. for(n = 0 ; n < item.xsize ; n++)
  1205. {
  1206. if(_NTCU_Inventory[y+m][x+n] == 1)
  1207. {
  1208. _havespace = false;
  1209. m = 4;
  1210. break;
  1211. }
  1212. }
  1213. }
  1214.  
  1215. if(_havespace)
  1216. {
  1217. if(!NTC_ItemToCursor(item))
  1218. return false;
  1219.  
  1220. for(m = 0 ; m < 80 ; m++)
  1221. {
  1222. if((m % 40) == 0)
  1223. me.ClickItem(0, x, y, 0);
  1224.  
  1225. NTC_Delay(100);
  1226.  
  1227. if(!me.itemoncursor)
  1228. break;
  1229. }
  1230.  
  1231. if(m >= 80)
  1232. return false;
  1233.  
  1234. for(m = 0 ; m < item.ysize ; m++)
  1235. {
  1236. for(n = 0 ; n < item.xsize ; n++)
  1237. _NTCU_Inventory[y+m][x+n] = 1;
  1238. }
  1239. _KeptItem = item;
  1240. _NTCU_KeptString = COLOR_2 + "Kept Transmuted: " + COLOR_8 + item.name.split("\n")[0]+ ";" + item.itemdesc + "\n" + COLOR_2 + "iLvl: " + item.itemlevel;
  1241.  
  1242. NTC_PingDelay(200);
  1243.  
  1244. return true;
  1245. }
  1246. }
  1247. }
  1248.  
  1249. return false;
  1250. }
  1251.  
  1252. function NTCU_OpenCubeInt(_cube)
  1253. {
  1254. if(_cube.itemloc == 4 && !GetUIState(0x19))
  1255. {
  1256. var _stash = NTC_FindUnit(NTC_UNIT_OBJECT, NTC_UNIT_STASH, 1);
  1257.  
  1258. if(!_stash)
  1259. return false;
  1260.  
  1261. if(!NTT_DoInteract(_stash))
  1262. return false;
  1263. }
  1264.  
  1265. if(!GetUIState(0x1A))
  1266. return NTT_DoInteract(_cube);
  1267.  
  1268. return true;
  1269. }
  1270.  
  1271. function NTCU_CloseCubeInt()
  1272. {
  1273. var i;
  1274.  
  1275. if(!GetUIState(0x1A))
  1276. return true;
  1277.  
  1278. for(i = 0 ; i < 20 ; i++)
  1279. {
  1280. if((i % 10) == 0)
  1281. me.Cancel(0);
  1282.  
  1283. NTC_Delay(200);
  1284.  
  1285. if(!GetUIState(0x1A))
  1286. {
  1287. NTC_PingDelay(200);
  1288. return true;
  1289. }
  1290. }
  1291.  
  1292. return false;
  1293. }
  1294.  
  1295. function NTCU_ClearCubeInt()
  1296. {
  1297. var i;
  1298. var _itemcounts = 0;
  1299. var _items = me.GetItems();
  1300.  
  1301. if(!_items)
  1302. return 0;
  1303.  
  1304. for(i = 0 ; i < _items.length ; i++)
  1305. {
  1306. if(_items[i].mode == 0 && _items[i].itemloc == 3)
  1307. {
  1308. if(!NTCU_MoveItemToInventoryInt(_items[i]))
  1309. return _itemcounts;
  1310.  
  1311. _itemcounts++;
  1312. }
  1313. }
  1314.  
  1315. return _itemcounts;
  1316. }
  1317.  
  1318. function NTCU_GetCubeContents()
  1319. {
  1320. var _items = me.GetItems();
  1321. var _cube_items = new Array();
  1322.  
  1323. for(i = 0 ; i < _items.length ; i++)
  1324. {
  1325. if(_items[i].mode == 0 && _items[i].itemloc == 3)
  1326. {
  1327. _cube_items.push(_items[i]);
  1328. }
  1329. }
  1330.  
  1331. return _cube_items;
  1332. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement