Advertisement
Guest User

advanced fishing2 25-01

a guest
Jan 25th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.10 KB | None | 0 0
  1. $${
  2. toggle(adv_fishing2);
  3. if(adv_fishing2);
  4. log("");
  5. LOG("&f&1[&7Advanced &fFishing &ev2.0&1]: &aAtivada!");
  6. log("");
  7.  
  8. // ------------------//
  9. #delay_pesca = 1; // Nao recomendada a altera?ao.
  10. // ------------------//
  11. #durab_rep_vara = 10;
  12. &fishing_home = "adv_pesca";
  13. &buyline_home = "/home zmatheus22 linha";
  14. &pickline_home = "/home adv_linha";
  15. &trap_home = "adv_trap";
  16. unset(ok);
  17. //&slots_ignorados devera ser unsetada depois que os itens forem guardados no inventario.
  18. unset(&slots_ignorados);
  19. //temporario.
  20.  
  21. &armors = "310|311|312|313";
  22. &tools = "277|278";
  23. #sword = 276;
  24. #axe = 279;
  25.  
  26. //lixo ----------------------------------------------------------------------------------------
  27.  
  28. unset(#trash[]);
  29. put(#trash[],298); put(#trash[],299);
  30. put(#trash[],300); put(#trash[],301);
  31. put(#trash[],306); put(#trash[],307);
  32. put(#trash[],308); put(#trash[],309);
  33. put(#trash[],314); put(#trash[],394);
  34. put(#trash[],315); put(#trash[],316);
  35. put(#trash[],317); put(#trash[],268);
  36. put(#trash[],272); put(#trash[],267);
  37. put(#trash[],283); put(#trash[],270);
  38. put(#trash[],274); put(#trash[],257);
  39. put(#trash[],285); put(#trash[],271);
  40. put(#trash[],275); put(#trash[],258);
  41. put(#trash[],256); put(#trash[],284);
  42. put(#trash[],286); put(#trash[],290);
  43. put(#trash[],291); put(#trash[],292);
  44. put(#trash[],293); put(#trash[],294);
  45.  
  46. //lixo ----------------------------------------------------------------------------------------
  47.  
  48. //outros itens/variaveis: discos/homes/itens que seram salvos --------------------------------
  49.  
  50. unset(#disk_list[]);
  51. For(#discos,2256,2267);
  52. put(#disk_list[],%#discos%);
  53. Next;
  54.  
  55. //temporario jogar os discos fora
  56. For(#discos,2256,2267);
  57. put(#trash[],%#discos%);
  58. Next;
  59. //
  60.  
  61. unset(#save_items[]);
  62.  
  63.  
  64. //outros itens/variaveis: discos/homes -------------------------------------------------------
  65.  
  66. //prompts vao aqui.
  67.  
  68. //TEMPORARIO --------------------------------------
  69. //TEMPORARIO --------------------------------------
  70. //TEMPORARIO --------------------------------------
  71. //TEMPORARIO --------------------------------------
  72. //TEMPORARIO --------------------------------------
  73. //TEMPORARIO --------------------------------------
  74. //TEMPORARIO --------------------------------------
  75. //TEMPORARIO --------------------------------------
  76. //TEMPORARIO --------------------------------------
  77. //TEMPORARIO --------------------------------------
  78. //TEMPORARIO --------------------------------------
  79. //TEMPORARIO --------------------------------------
  80. //TEMPORARIO --------------------------------------
  81. //TEMPORARIO --------------------------------------
  82. //TEMPORARIO --------------------------------------
  83. //TEMPORARIO --------------------------------------
  84. //TEMPORARIO --------------------------------------
  85. //TEMPORARIO --------------------------------------
  86.  
  87. unset(guardar_espada);
  88. unset(vender_discos);
  89. set(armazenar_itens);
  90. unset(assar_peixes);
  91. unset(guardar_blazedima);
  92. unset(guardar_lagrimaapple);
  93. unset(armazenar_peixe);
  94. set(guardar_picareta);
  95. unset(guardar_pa);
  96. unset(guardar_machadoeff);
  97. unset(guardar_machados5);
  98. set(guardar_armadura);
  99. set(guardar_cp3umb3);
  100. unset(guardar_umb1);
  101. unset(guardar_umb2);
  102. set(guardar_umb3);
  103. unset(guardar_p4liso);
  104. unset(guardar_umb3liso);
  105. unset(guardar_silkt);
  106. unset(guardar_fortune3);
  107. unset(guardar_eff4);
  108. unset(guardar_eff5);
  109. unset(guardar_eficiencia4umb3);
  110. unset(guardar_eficiencia5umb3);
  111. unset(guardar_eff4umb3silk1);
  112. unset(guardar_eff4umb3fort3);
  113. unset(guardar_eff5umb3silk1);
  114. unset(guardar_eff5umb3fort3);
  115. unset(guardar_sw_afiada4);
  116. unset(guardar_sw_afiada5);
  117. unset(guardar_afiada5fire);
  118. set(guardar_s5umb3);
  119. unset(guardar_looting3);
  120. unset(guardar_sj3loot3);
  121. unset(guardar_sj3loot3umb3);
  122. unset(guardar_m_s5);
  123. set(guardar_m_s5umb3);
  124. set(guardar_m_s5j5a5);
  125. unset(guardar_thorns_1);
  126. unset(guardar_thorns_2);
  127. unset(guardar_thorns_3);
  128.  
  129. //TEMPORARIO --------------------------------------
  130. //TEMPORARIO --------------------------------------
  131. //TEMPORARIO --------------------------------------
  132. //TEMPORARIO --------------------------------------
  133. //TEMPORARIO --------------------------------------
  134. //TEMPORARIO --------------------------------------
  135. //TEMPORARIO --------------------------------------
  136. //TEMPORARIO --------------------------------------
  137. //TEMPORARIO --------------------------------------
  138. //TEMPORARIO --------------------------------------
  139. //TEMPORARIO --------------------------------------
  140. //TEMPORARIO --------------------------------------
  141. //TEMPORARIO --------------------------------------
  142. //TEMPORARIO --------------------------------------
  143. //TEMPORARIO --------------------------------------
  144. //TEMPORARIO --------------------------------------
  145. //TEMPORARIO --------------------------------------
  146. //TEMPORARIO --------------------------------------
  147.  
  148. //put/replace ---------------------------------------------------------------------------------
  149.  
  150. unset(&enchantment_sword_sharpness[]);
  151. unset(&enchantment_sword_smite[]);
  152. unset(&enchantment_sword_arthropods[]);
  153. unset(&enchantment_sword_knockback[]);
  154. unset(&enchantment_sword_fireaspect[]);
  155. unset(&enchantment_sword_looting[]);
  156. unset(&enchantment_sword_unbreaking[]);
  157.  
  158.  
  159. unset(&enchantment_tools_efficiency[]);
  160. unset(&enchantment_tools_fortune[]);
  161. unset(&enchantment_tools_silktouch[]);
  162. unset(&enchantment_tools_unbreaking[]);
  163.  
  164. unset(&enchantment_armor_protection[]);
  165. unset(&enchantment_armor_umbreaking[]);
  166. unset(&enchantment_armor_thorns[]);
  167.  
  168. unset(&enchantment_axe_sharpness[]);
  169. unset(&enchantment_axe_smite[]);
  170. unset(&enchantment_axe_arthropods[]);
  171. unset(&enchantment_axe_fortune[]);
  172. unset(&enchantment_axe_umbreaking[]);
  173.  
  174. unset(&save_items[]);
  175.  
  176. if(!armazenar_peixe);
  177. put(#trash[],349);
  178. else;
  179. put(#save_items[],349);
  180. endif;
  181.  
  182. if(!guardar_picareta);
  183. put(#trash[],278);
  184. else;
  185. put(#save_items[],278);
  186. endif;
  187.  
  188. if(!guardar_pa);
  189. put(#trash[],277);
  190. else;
  191. put(#save_items[],277);
  192. endif;
  193.  
  194. if(!guardar_espada);
  195. put(#trash[],276);
  196. else;
  197. put(#save_items[],276);
  198. endif;
  199.  
  200. if((!guardar_machadoeff)&&(!guardar_machados5));
  201. put(#trash[],279);
  202. else;
  203. put(#save_items[],279);
  204. endif;
  205.  
  206. if(!guardar_armadura);
  207. put(#trash[],310);
  208. put(#trash[],311);
  209. put(#trash[],312);
  210. put(#trash[],313);
  211. else;
  212. put(#save_items[],310);
  213. put(#save_items[],311);
  214. put(#save_items[],312);
  215. put(#save_items[],313);
  216. endif;
  217. if(!vender_discos);
  218. put(#trash[],2256);
  219. put(#trash[],2257);
  220. put(#trash[],2258);
  221. put(#trash[],2259);
  222. put(#trash[],2260);
  223. put(#trash[],2261);
  224. put(#trash[],2262);
  225. put(#trash[],2263);
  226. put(#trash[],2264);
  227. put(#trash[],2265);
  228. put(#trash[],2266);
  229. put(#trash[],2267);
  230. else;
  231. put(#save_items[],2256);
  232. put(#save_items[],2257);
  233. put(#save_items[],2258);
  234. put(#save_items[],2259);
  235. put(#save_items[],2260);
  236. put(#save_items[],2261);
  237. put(#save_items[],2262);
  238. put(#save_items[],2263);
  239. put(#save_items[],2264);
  240. put(#save_items[],2265);
  241. put(#save_items[],2266);
  242. put(#save_items[],2267);
  243. endif;
  244. if(!guardar_blazedima);
  245. put(#trash[],264);
  246. put(#trash[],369);
  247. else;
  248. put(#save_items[],264);
  249. put(#save_items[],369);
  250. endif;
  251. if(!guardar_lagrimaapple);
  252. put(#trash[],322);
  253. put(#trash[],370);
  254. else;
  255. put(#save_items[],322);
  256. put(#save_items[],370);
  257. endif;
  258.  
  259. //puts das armaduras -------------------------------------------------------------
  260.  
  261. if((guardar_cp3umb3)||(guardar_capabotap3umb3));
  262. put(&enchantment_armor_protection[],"Prote.{2}o III");
  263. put(&enchantment_armor_protection[],"Protection III");
  264. //indepentendemente se o usuario escolher guardar p3umb3 full
  265. //ou guardar somente capa e bota p3umb3, ambos tem p3, entao add p3 a array.
  266. endif;
  267. if(guardar_p4liso);
  268. put(&enchantment_armor_protection[],"Prote.{2}o IV");
  269. put(&enchantment_armor_protection[],"Protection IV");
  270. //nao e necessario adicionar umb aqui, por que a macro ira ignorar
  271. //o verificador de inquebravel la na frente se guardar_p4liso tiver ativado.
  272. endif;
  273.  
  274. if(guardar_umb1);
  275. put(&enchantment_armor_umbreaking[],"Inquebr.vel I");
  276. put(&enchantment_armor_umbreaking[],"Unbreaking I");
  277. endif;
  278.  
  279. if(guardar_umb2);
  280. put(&enchantment_armor_umbreaking[],"Inquebr.vel II");
  281. put(&enchantment_armor_umbreaking[],"Unbreaking II");
  282. endif;
  283.  
  284. if((guardar_umb3)||(guardar_umb3liso));
  285. put(&enchantment_armor_umbreaking[],"Inquebr.vel III");
  286. put(&enchantment_armor_umbreaking[],"Unbreaking III");
  287. endif;
  288.  
  289. if(guardar_thorns_1);
  290. put(&enchantment_armor_thorns[],"Espinhos I|Thorns I");
  291. endif;
  292. if(guardar_thorns_2);
  293. put(&enchantment_armor_thorns[],"Espinhos II|Thorns II");
  294. endif;
  295. if(guardar_thorns_3);
  296. put(&enchantment_armor_thorns[],"Espinhos III|Thorns III");
  297. endif;
  298.  
  299. //puts das armaduras -------------------------------------------------------------
  300.  
  301. //puts das ferramentas -----------------------------------------------------------
  302.  
  303. if((guardar_silkt)||(guardar_eff4umb3silk1)||(guardar_eff5umb3silk1));
  304. put(&enchantment_tools_silktouch[],"Toque Suave I");
  305. put(&enchantment_tools_silktouch[],"Silk Touch I");
  306. endif;
  307.  
  308. if((guardar_fortune3)||(guardar_eff4umb3fort3)||(guardar_eff5umb3fort3));
  309. put(&enchantment_tools_fortune[],"Fortuna III");
  310. put(&enchantment_tools_fortune[],"Fortune III");
  311. endif;
  312.  
  313. if((guardar_eff4)||(guardar_eficiencia4umb3)||(guardar_eff4umb3silk1)||(guardar_eff4umb3fort3));
  314. put(&enchantment_tools_efficiency[],"Efici.ncia IV");
  315. put(&enchantment_tools_efficiency[],"Efficiency IV");
  316. endif;
  317.  
  318. if((guardar_eff5)||(guardar_eficiencia5umb3)||(guardar_eff5umb3silk1)||(guardar_eff5umb3fort3));
  319. put(&enchantment_tools_efficiency[],"Efici.ncia V");
  320. put(&enchantment_tools_efficiency[],"Efficiency V");
  321. endif;
  322.  
  323. if((guardar_eff4umb3fort3)||(guardar_eff5umb3fort3)||(guardar_eficiencia4umb3)||(guardar_eficiencia5umb3)||(guardar_eff5umb3silk1)||(guardar_eff4umb3silk1));
  324. put(&enchantment_tools_unbreaking[],"Umbreaking III");
  325. put(&enchantment_tools_unbreaking[],"Inquebr.vel III");
  326. endif;
  327.  
  328. //puts das ferramentas -----------------------------------------------------------
  329.  
  330. //puts das espadas ---------------------------------------------------------------
  331.  
  332. if((guardar_sw_afiada4)||(guardar_afiada4fire)||(guardar_s4umb3));
  333. put(&enchantment_sword_sharpness[],"Afiada IV");
  334. put(&enchantment_sword_sharpness[],"Sharpness IV");
  335. endif;
  336.  
  337. if((guardar_sw_afiada5)||(guardar_afiada5fire)||(guardar_s5umb3));
  338. put(&enchantment_sword_sharpness[],"Afiada V");
  339. put(&enchantment_sword_sharpness[],"Sharpness V");
  340. endif;
  341.  
  342. if(guardar_looting3);
  343. put(&enchantment_sword_looting[],"Pilhagem III");
  344. put(&enchantment_sword_looting[],"Looting III");
  345. endif;
  346.  
  347. if((guardar_s5umb3)||(guardar_s4umb3));
  348. put(&enchantment_sword_unbreaking[],"Inquebr.vel III");
  349. put(&enchantment_sword_unbreaking[],"Umbreaking III");
  350. endif;
  351.  
  352.  
  353. if((guardar_sj3loot3)||(guardar_sj3loot3umb3));
  354. put(&enchantment_sword_sharpness[],"Afiada III"); put(&enchantment_sword_sharpness[],"Sharpness III");
  355. put(&enchantment_sword_smite[],"Julgamento III"); put(&enchantment_sword_smite[],"Smite III");
  356. put(&enchantment_sword_sharpness[],"Sharpness IV"); put(&enchantment_sword_sharpness[],"Afiada IV");
  357. put(&enchantment_sword_smite[],"Julgamento IV"); put(&enchantment_sword_smite[],"Smite IV");
  358. put(&enchantment_sword_sharpness[],"Sharpness V"); put(&enchantment_sword_sharpness[],"Afiada V");
  359. put(&enchantment_sword_smite[],"Julgamento V"); put(&enchantment_sword_smite[],"Smite V");
  360. put(&enchantment_sword_unbreaking[],"Inquebr.vel III"); put(&enchantment_sword_unbreaking[],"Umbreaking III");
  361. endif;
  362.  
  363. //puts das espadas ---------------------------------------------------------------
  364.  
  365. //puts dos machados --------------------------------------------------------------
  366.  
  367. if((guardar_m_s5)||(guardar_m_s5j5a5)||(guardar_m_s5umb3));
  368. put(&enchantment_axe[],"Afiada V");
  369. put(&enchantment_axe[],"Sharpness V");
  370. endif;
  371. if(guardar_m_s5umb3);
  372. put(&enchantment_axe[],"Inquebr.vel III");
  373. put(&enchantment_axe[],"Unbreaking III");
  374. endif;
  375. if(guardar_m_s5j5a5);
  376. put(&enchantment_axe[],"Julgamento V");
  377. put(&enchantment_axe[],"Smite V");
  378. put(&enchantment_axe[],"Bane of Arthropods V");
  379. put(&enchantment_axe[],"Bane of Arthropods V");
  380. endif;
  381.  
  382. //puts dos machados --------------------------------------------------------------
  383.  
  384. arraysize(&enchantment_sword[],#sizeof_sword);
  385. arraysize(&enchantment_tools[],#sizeof_tools);
  386. arraysize(&enchantment_armor[],#sizeof_armor);
  387. arraysize(&enchantment_axe[],#sizeof_axe);
  388.  
  389. Unsafe(0);
  390. &all_trash = "";
  391. foreach(#trash[],#current_trash);
  392. If(ok);
  393. set(&all_trash,%&all_trash% %#current_trash%);
  394. else;
  395. set(&all_trash,%&all_trash%%#current_trash%);
  396. Set(ok);
  397. endif;
  398. next;
  399. Endunsafe;
  400.  
  401. //put/replaces ---------------------------------------------------------------------------------
  402.  
  403.  
  404. set(go_trap);log(SETANDO GOTRAP);
  405.  
  406. do();
  407.  
  408. //va para o local -----------------------------------------------------------------------------
  409.  
  410. if(go_trap);
  411. unset(go_trap);
  412. log("Voltando para a trap");
  413. #xcoord = %XPOS%; #zcoord = %ZPOS%;
  414. echo("/home %&fishing_home%");wait(1500ms);
  415.  
  416. do(10);
  417. log("&6Aguardando teletransporte");
  418. wait(1);
  419. until((%XPOS% != %#xcoord%)||(%ZPOS% != %#zcoord%));
  420.  
  421. wait(450ms);
  422. #trap_yaw = %YAW% + 180; #trap_pitch = %PITCH%; //pegar coordenada de visao da trap
  423.  
  424. if(#trap_yaw > 360);
  425. dec(#trap_yaw,360);
  426. endif;
  427.  
  428. wait(450ms);
  429. endif;
  430.  
  431. //va para o local -----------------------------------------------------------------------------
  432.  
  433.  
  434.  
  435. //action -------------------------------------------------------------------------------------
  436. set(action);
  437. if(action);
  438. do();
  439.  
  440. //pesca ---------------------------------------------------
  441.  
  442. do();
  443. pick(346);
  444. look(%#trap_yaw%,%#trap_pitch%);
  445. key(use);
  446. wait(%#delay_pesca%ms);
  447.  
  448. //verificador de lixo--------------------------------
  449.  
  450. Unsafe(0);
  451. IF(%GUI% != "GUIINVENTORY");
  452. gui(inventory);
  453. ENDIF;
  454. for(#inv_checker,9,42);
  455. getslotitem(%#inv_checker%,#id,#stack);
  456. ifmatches("%&all_trash%","%#id%");
  457. if((#id != 0)&&(#id != 349));
  458. slotclick(%#inv_checker%,l,false);wait(20ms);
  459. slotclick(-999,l,false);wait(20ms);
  460. elseif((!armazenar_peixe)&&(#id == 349)&&(#stack >= 16)&&(#inv_checker != 36));
  461. slotclick(%#inv_checker%,l,false);wait(20ms);
  462. slotclick(-999,l,false);wait(20ms);
  463. endif;
  464. endif;
  465. ifmatches("%&slots_ignorados%","%#inv_checker%");
  466. else;
  467. ifmatches("%#id%","^%&armors%$|^%&tools%$|^%#axe%$|^%#sword%$");
  468. LOG("item especial: &e%#id%, &bverificando encantamentos");
  469. set(fim);
  470. break;
  471. endif;
  472. endif;
  473. next;
  474. if(fim);
  475. unset(fim);
  476. break;
  477. endif;
  478. Endunsafe;
  479.  
  480. //verificador de lixo--------------------------------
  481.  
  482. if((%GUI% == "GUICHAT");
  483. LOG("&a[&7&lAdvanced &e&lFishing &5v2.0&a]&7: &fCHAT aberto, aguardando fechamento.");
  484. do;wait(1);while(%GUI% == "GUICHAT");
  485. endif;
  486.  
  487. //verificador de vida--------------------------------------
  488.  
  489. if((%HEALTH% <= 8)&&(vip_player));
  490. log("Vida baixa, te levando a um local seguro e finalizando.");
  491. echo("/spawn");
  492. toggle(adv_fishing2);
  493. stop;
  494. endif;
  495.  
  496. //verificador de vida--------------------------------------
  497.  
  498. //verificador da durab. da vara----------------------------
  499.  
  500. pick(346);
  501. if(%DURABILITY% <= %#durab_rep_vara%);
  502. if(vip_player);
  503. do();
  504. echo("/reparar");
  505. wait(800ms);
  506. while(%DURABILITY% < %#durab_rep_vara%);
  507. elseif(!vip_player);
  508. do();
  509. looks(+0,90,1); wait(100ms);
  510.  
  511. if(%HITID% != 42);
  512. do(5);
  513. log("Bloco de ferro nao encontrado.");
  514. playsound(note.harp);
  515. wait(1);
  516. loop;
  517. toggle(adv_fishing2);
  518. stop;
  519. endif;
  520.  
  521. key(use);
  522. wait(800ms);
  523. while(%DURABILITY% <= %#durab_rep_vara%);
  524. endif;
  525. endif;
  526.  
  527. //verificador da durab. da vara----------------------------
  528.  
  529. //verificador de fome -------------------------------------
  530.  
  531. IF(%HUNGER% < 10);
  532. log("voce esta com fome, resolvendo");
  533. set(eat);
  534. break;
  535. ENDIF;
  536.  
  537. //verificador de fome -------------------------------------
  538.  
  539. //verificador de comida ------------------------------
  540.  
  541. /////log("verificador de comida");
  542. getslotitem(36,#food_checker);
  543. if(#food_checker != 349);
  544. getslot(349,#slot_fish);
  545. if(#slot_fish != -1);
  546. slotclick(%#slot_fish%,l,false);wait(20ms);
  547. slotclick(36,l,false);wait(20ms);
  548. endif;
  549. endif;
  550.  
  551. //verificador de comida ------------------------------
  552.  
  553. //verificador de linha------------------------------
  554.  
  555. /////log("verificador de linha");
  556. getslotitem(43,#string_checker,#stack_string);
  557. if((#string_checker != 287)||(#stack_string <= 5));
  558. log("&c sem linhas");
  559. set(without_lines);
  560. break;
  561. endif;
  562.  
  563. //verificador de linha------------------------------
  564.  
  565. loop;
  566.  
  567.  
  568. //pesca ---------------------------------------------------
  569.  
  570. //outros verificadores ------------------------------------
  571.  
  572.  
  573.  
  574.  
  575. //verificadores de inventario ----------------------------------------------------------------
  576.  
  577. Unsafe(0);
  578. gui(inventory);
  579.  
  580. //verificador de itens encantados --------------------
  581.  
  582. for(#inv_itens,9,42);
  583. getslotitem(%#inv_itens%,#current_item);
  584. setlabel(teste1,"inv itens: &c%#inv_itens% &bslots ignorados: &c%&slots_ignorados%");
  585. ifmatches("%&slots_ignorados%","%#inv_itens%");
  586. //se o item encontrado nao estiver no slot que deve ser ignorado (parte em baixo 'subir_item')
  587. else;
  588. // armaduras 310-311-312-313-----------------------
  589. /////log("verificador de armaduras 310 311 312 313");
  590. ifmatches(%#current_item%,%&armors%);
  591. SLOT(1);
  592. log("Armadura pescada detectada... verificando encantamentos.");
  593. slotclick(%#inv_itens%,l,false);wait(20ms);
  594. slotclick(36,l,false);wait(20ms);
  595.  
  596. unset(&ench); unset(ok);
  597. foreach(enchantments); //coloca o encanto na variavel '&ench.' caso nao tenha, pula o foreach.
  598. If(ok);
  599. set(&ench,%&ench%-%ENCHANTMENT%);
  600. else;
  601. set(&ench,%&ench%%ENCHANTMENT%);
  602. Set(ok);
  603. endif;
  604. next;
  605.  
  606. if(&ench == NULL);
  607. log("");
  608. log("Encantamento do item e: &cNenhum.");
  609. log("");
  610. else;
  611. log("");
  612. log("Encantamento do item e: &a%&ench%");
  613. log("");
  614. endif;
  615.  
  616. unset(protection_ok);
  617. unset(unbreaking_ok);
  618. unset(thorns_ok);
  619.  
  620. //verificador do encantamento: 'protecao' ---------------------
  621.  
  622. foreach(&enchantment_armor_protection[],&current_ench);
  623. //comparar encantos da array com o do item
  624. ifmatches(%&ench%,%&current_ench%);
  625. set(protection_ok);
  626. log("&aPROTECTION OK");
  627. endif;
  628. next;
  629. //se o encanto do item verificado bater com qualquer encanto do foreach
  630. //ele seta protection_ok
  631.  
  632. //verificador do encantamento: 'protecao' ---------------------
  633.  
  634. //verificador do encantamento: 'Inquebravel' ---------------------
  635. foreach(&enchantment_armor_umbreaking[],&current_ench); //comparar encantos da array com o do item
  636. ifmatches(%&ench%,%&current_ench%);
  637. set(unbreaking_ok);
  638. LOG("&fUNBREAKING OK");
  639. endif;
  640. next;
  641.  
  642. //exemplo: mum item p4umb2 se o usuario quiser um p4umb3 e umb2,
  643. //dentro desse array tera "Inquebravel II" e "III",
  644. //se bater com um desses unbreaking_ok.
  645.  
  646. //verificador do encantamento: 'Inquebravel' ---------------------
  647.  
  648. //caso o usuario selecionou guardar por ex p4umb3/2/1 e p3umb3 full:
  649. //salvaria tambem os p3umb1/2 entao isso vai corrigir este problema.
  650.  
  651. if((guardar_cp3umb3)||(guardar_capabotap3umb3)||(guardar_p4liso))
  652. ifmatches(%&ench%,"^Prote.{2}o III$|^Protection III$");
  653. ifmatches(%&ench%,"^Inquebr.vel III$|^Unbreaking III$");
  654. else;
  655. unset(unbreaking_ok);
  656. endif;
  657. endif;
  658. endif;
  659.  
  660. //verificador do encantamento: 'thorns' ---------------------
  661.  
  662. foreach(&enchantment_armor_thorns[],&current_ench); //comparar encantos da array com o do item
  663. ifmatches(%&ench%,%&current_ench%);
  664. set(thorns_ok);
  665. LOG("&cThorns OK");
  666. endif;
  667. next;
  668.  
  669. //verificador do encantamento: 'thorns' ---------------------
  670.  
  671.  
  672. unset(approved);
  673.  
  674. if(guardar_p4liso);
  675. //opcao do usuario: se o usuario escolheu guardar_p4liso:
  676. if(protection_ok);
  677. set(approved);
  678. endif;
  679. endif;
  680.  
  681. if((guardar_umb1)||(guardar_umb2)||(guardar_umb3));
  682. //opcao do usuario: se o usuario escolheu guardar_p4umb1/2/3:
  683. //se o usuario selecionou guardar p4umb3 somente por ex, e o item for umb1,
  684. //no foreach ele nao vai dar protection_ok entao nao passa aqui.
  685. if((protection_ok)&&(unbreaking_ok));
  686. set(approved);
  687. endif;
  688. endif;
  689.  
  690. if(guardar_umb3liso);
  691. if(unbreaking_ok);
  692. set(approved);
  693. endif;
  694. endif;
  695.  
  696. if(guardar_cp3umb3);
  697. if((protection_ok)&&(unbreaking_ok));
  698. set(approved);
  699. endif;
  700. endif;
  701.  
  702. if((guardar_capabotap3umb3)&&(#current_item == 310)||(#current_item == 313));
  703. if((protection_ok)&&(unbreaking_ok));
  704. set(approved);
  705. endif;
  706. endif;
  707.  
  708. //thorns -----------------------------------------------
  709. //thorns -----------------------------------------------
  710. //thorns -----------------------------------------------
  711.  
  712. if((guardar_thorns)&&(thorns_ok));
  713. //not intervate
  714. elseif((!guardar_thorns)&&(thorns_ok));
  715. unset(approved);
  716. //caso tenha thorns no item e o usuario nao queira guardar itens com thorns
  717. //o item e reprovado
  718. endif;
  719.  
  720. //thorns -----------------------------------------------
  721. //thorns -----------------------------------------------
  722. //thorns -----------------------------------------------
  723.  
  724. if(approved);
  725. log("&f&1[&fAdvanced &7Fishing &ev2.0&1]: &bEncantamento &aAprovado.");
  726. set(subir_item);
  727. break;
  728. else;
  729. log("&f&1[&fAdvanced &7Fishing &ev2.0&1]: &bEncantamento &cReprovado.");
  730. slotclick(36,l,false);wait(10ms);
  731. slotclick(-999,l,false);wait(10ms);
  732. endif;
  733.  
  734. endif;
  735.  
  736. // armaduras --------------------------------------
  737.  
  738. // ferramentas 277-278-------------------------
  739. /////log("ferramentas 277-278");
  740. ifmatches(%#current_item%,%&tools%);
  741. SLOT(1);
  742. log("Ferramenta pescada detectada... verificando encantamentos.");
  743. slotclick(%#inv_itens%,l,false);wait(20ms);
  744. slotclick(36,l,false);wait(20ms);
  745.  
  746. unset(&ench); unset(ok);
  747. foreach(enchantments); //coloca o encanto na variavel '&ench.' caso nao tenha, pula o foreach.
  748. If(ok);
  749. set(&ench,%&ench%-%ENCHANTMENT%);
  750. else;
  751. set(&ench,%&ench%%ENCHANTMENT%);
  752. Set(ok);
  753. endif;
  754. next;
  755.  
  756. if(&ench == NULL);
  757. log("");
  758. log("Encantamento do item e: &cNenhum.");
  759. log("");
  760. else;
  761. log("");
  762. log("Encantamento do item e: &a%&ench%");
  763. log("");
  764. endif;
  765.  
  766. unset(efficiency_ok);
  767. unset(unbreaking_ok);
  768. unset(fortune_ok);
  769. unset(silktouch_ok);
  770. unset(fortune_or_silk);
  771.  
  772. //verificador do encantamento: 'eficiencia' -------------------
  773.  
  774. foreach(&enchantment_tools_efficiency[],&current_ench); //comparar encantos da array com o do item
  775. ifmatches(%&ench%,%&current_ench%);
  776. set(efficiency_ok);
  777. log("&aEfficiency OK");
  778. endif;
  779. next;
  780.  
  781. //verificador do encantamento: 'eficiencia' ---------------------
  782.  
  783.  
  784. //verificador do encantamento: 'Inquebravel' ---------------------
  785.  
  786. foreach(&enchantment_tools_unbreaking[],&current_ench); //comparar encantos da array com o do item
  787. ifmatches(%&ench%,%&current_ench%);
  788. set(unbreaking_ok);
  789. LOG("&fUNBREAKING OK");
  790. endif;
  791. next;
  792.  
  793. //verificador do encantamento: 'Inquebravel' ---------------------
  794.  
  795.  
  796. //verificador do encantamento: 'fortune' ---------------------
  797.  
  798. foreach(&enchantment_tools_fortune[],&current_ench); //comparar encantos da array com o do item
  799. ifmatches(%&ench%,%&current_ench%);
  800. set(fortune_ok);
  801. LOG("&cFortune OK");
  802. endif;
  803. next;
  804.  
  805. //verificador do encantamento: 'fortune' ---------------------
  806.  
  807. //verificador do encantamento: 'toque suave' -----------------
  808.  
  809. foreach(&enchantment_tools_silktouch[],&current_ench); //comparar encantos da array com o do item
  810. ifmatches(%&ench%,%&current_ench%);
  811. set(silktouch_ok);
  812. LOG("&cSilk Touch OK");
  813. endif;
  814. next;
  815.  
  816. //verificador do encantamento: 'toque suave' -----------------
  817.  
  818. unset(approved);
  819.  
  820. if((guardar_eff4)||(guardar_eff5));
  821. if(efficiency_ok);
  822. set(approved);
  823. endif;
  824. endif;
  825.  
  826. if(guardar_fortune3);
  827. if(fortune_ok);
  828. set(approved);
  829. endif;
  830. endif;
  831.  
  832. if(guardar_silkt);
  833. if(silktouch_ok);
  834. set(approved);
  835. endif;
  836. endif;
  837.  
  838. if((guardar_eff4umb3fort3)||(guardar_eff5umb3fort3));
  839. if((fortune_ok)&&(efficiency_ok)&&(unbreaking_ok));
  840. set(approved);
  841. endif;
  842. endif;
  843.  
  844. if((guardar_eff4umb3silk1)||(guardar_eff5umb3silk1));
  845. if((silktouch_ok)&&(efficiency_ok)&&(unbreaking_ok));
  846. set(approved);
  847. endif;
  848. endif;
  849.  
  850. if(approved);
  851. log("&f&1[&fAdvanced &7Fishing &ev2.0&1]: &bEncantamento &aAprovado.");
  852. set(subir_item);
  853. break;
  854. else;
  855. log("&f&1[&fAdvanced &7Fishing &ev2.0&1]: &bEncantamento &cReprovado.");
  856. slotclick(36,l,false);wait(10ms);
  857. slotclick(-999,l,false);wait(10ms);
  858. endif;
  859.  
  860. endif;
  861.  
  862. // ferramentas 277-278-------------------------
  863.  
  864.  
  865. // espada 276--------------------------------------
  866. /////log("espada 276");
  867. //LOG("CURRENT_ITEM: &c%#current_item%");
  868. ifmatches(%#current_item%,"%#sword%");
  869. SLOT(1);
  870. log("Espada pescada detectada... verificando encantamentos.");
  871. slotclick(%#inv_itens%,l,false);wait(20ms);
  872. slotclick(36,l,false);wait(20ms);
  873.  
  874. unset(&ench); unset(ok);
  875. foreach(enchantments); //coloca o encanto na variavel '&ench.' caso nao tenha, pula o foreach.
  876. If(ok);
  877. set(&ench,%&ench%-%ENCHANTMENT%);
  878. else;
  879. set(&ench,%&ench%%ENCHANTMENT%);
  880. Set(ok);
  881. endif;
  882. next;
  883.  
  884. if(&ench == NULL);
  885. log("");
  886. log("Encantamento do item e: &cNenhum.");
  887. log("");
  888. else;
  889. log("");
  890. log("Encantamento do item e: &a%&ench%");
  891. log("");
  892. endif;
  893.  
  894. unset(sharpness_ok);
  895. unset(arthropods_ok);
  896. unset(smite_ok);
  897. unset(looting_ok);
  898. unset(fireaspect_ok);
  899. unset(knockback_ok);
  900. unset(unbreaking_ok);
  901.  
  902. //verificador do encantamento: 'sharpness' -------------------
  903.  
  904. foreach(&enchantment_sword_sharpness[],&current_ench); //comparar encantos da array com o do item
  905. ifmatches(%&ench%,%&current_ench%);
  906. set(sharpness_ok);
  907. log("&aSharpness OK");
  908. endif;
  909. next;
  910.  
  911. //verificador do encantamento: 'sharpness' ---------------------
  912.  
  913.  
  914. //verificador do encantamento: 'Arthropods' ---------------------
  915. //
  916. // foreach(&enchantment_sword_arthropods[],&current_ench); //comparar encantos da array com o do item
  917. // ifmatches(%&ench%,%&current_ench%);
  918. // set(arthropods_ok);
  919. // LOG("&farthropods OK");
  920. // endif;
  921. // next;
  922. //
  923. //verificador do encantamento: 'Arthropods' ---------------------
  924.  
  925.  
  926. //verificador do encantamento: 'smite' ---------------------
  927.  
  928. foreach(&enchantment_sword_smite[],&current_ench); //comparar encantos da array com o do item
  929. ifmatches(%&ench%,%&current_ench%);
  930. set(smite_ok);
  931. LOG("&cSmite OK");
  932. endif;
  933. next;
  934.  
  935. //verificador do encantamento: 'smite' ---------------------
  936.  
  937. //verificador do encantamento: 'looting' -----------------
  938.  
  939. foreach(&enchantment_sword_looting[],&current_ench); //comparar encantos da array com o do item
  940. ifmatches(%&ench%,%&current_ench%);
  941. set(looting_ok);
  942. LOG("&c Looting OK");
  943. endif;
  944. next;
  945.  
  946. //verificador do encantamento: 'looting' -----------------
  947.  
  948. //verificador do encantamento: 'fireaspect' -----------------
  949.  
  950. foreach(&enchantment_sword_fireaspect[],&current_ench); //comparar encantos da array com o do item
  951. ifmatches(%&ench%,%&current_ench%);
  952. set(fireaspect_ok);
  953. LOG("&cFire Aspect OK");
  954. endif;
  955. next;
  956.  
  957. //verificador do encantamento: 'fireaspect' -----------------
  958.  
  959. //verificador do encantamento: 'knockback' -----------------
  960. //
  961. //foreach(&enchantment_sword_knockback[],&current_ench); //comparar encantos da array com o do item
  962. // ifmatches(%&ench%,%&current_ench%);
  963. // set(knockback_ok);
  964. // LOG("&cKnockback OK");
  965. // endif;
  966. //next;
  967. //
  968. //verificador do encantamento: 'knockback' -----------------
  969.  
  970. //verificador do encantamento: 'unbreaking' -----------------
  971.  
  972. foreach(&enchantment_sword_unbreaking[],&current_ench); //comparar encantos da array com o do item
  973. ifmatches(%&ench%,%&current_ench%);
  974. set(unbreaking_ok);
  975. LOG("&cUmbreaking OK");
  976. endif;
  977. next;
  978.  
  979. //verificador do encantamento: 'unbreaking' -----------------
  980.  
  981. if((guardar_s4umb3)||(guardar_s5umb3)); //usuario selecionou isso.
  982. if((unbreaking_ok)&&(sharpness_ok)); //se isso for atendido, e o que o usuario pediu.
  983. set(approved);
  984. endif;
  985. endif;
  986.  
  987. if((guardar_sj3loot3)||(guardar_sj3loot3umb3));
  988. if((smite_ok)&&(looting_ok));
  989. set(approved);
  990. endif;
  991. endif;
  992.  
  993. if(guardar_looting3); //se quiser guardar pilhagem3 independente de afiada/julgamento
  994. if(looting_ok);
  995. set(approved);
  996. endif;
  997. endif;
  998.  
  999. if((guardar_sw_afiada4)||(guardar_sw_afiada5)); //se quiser guardar s4/s5 lisa independente.
  1000. if(sharpness_ok);
  1001. set(approved);
  1002. endif;
  1003. endif;
  1004.  
  1005. //if(knockback_ok);
  1006. //
  1007. //endif;
  1008.  
  1009. if(approved);
  1010. log("&f&1[&fAdvanced &7Fishing &ev2.0&1]: &bEncantamento &aAprovado.");
  1011. set(subir_item);
  1012. break;
  1013. else;
  1014. log("&f&1[&fAdvanced &7Fishing &ev2.0&1]: &bEncantamento &cReprovado.");
  1015. slotclick(36,l,false);wait(10ms);
  1016. slotclick(-999,l,false);wait(10ms);
  1017. endif;
  1018.  
  1019. endif;
  1020.  
  1021. // espada 276--------------------------------------
  1022.  
  1023.  
  1024.  
  1025. // machado pvp 279---------------------------------
  1026. /////log("machado pvp 279");
  1027. ifmatches(%#current_item%,%#axe%);
  1028. SLOT(1);
  1029. log("Machado pescado detectado... verificando encantamentos.");
  1030. slotclick(%#inv_itens%,l,false);wait(20ms);
  1031. slotclick(36,l,false);wait(20ms);
  1032.  
  1033. unset(&ench); unset(ok);
  1034. foreach(enchantments); //coloca o encanto na variavel '&ench.' caso nao tenha, pula o foreach.
  1035. If(ok);
  1036. set(&ench,%&ench%-%ENCHANTMENT%);
  1037. else;
  1038. set(&ench,%&ench%%ENCHANTMENT%);
  1039. Set(ok);
  1040. endif;
  1041. next;
  1042.  
  1043. if(&ench == NULL);
  1044. log("");
  1045. log("Encantamento do item e: &cNenhum.");
  1046. log("");
  1047. else;
  1048. log("");
  1049. log("Encantamento do item e: &a%&ench%");
  1050. log("");
  1051. endif;
  1052.  
  1053. unset(efficiency_ok);
  1054. unset(unbreaking_ok);
  1055. unset(fortune_ok);
  1056. unset(silktouch_ok);
  1057. unset(fortune_or_silk);
  1058.  
  1059. unset(m_sharpness_ok);
  1060. unset(m_arthropods_ok);
  1061. unset(m_smite_ok);
  1062. unset(m_unbreaking_ok);
  1063.  
  1064.  
  1065. //verificador do encantamento: 'sharpness' -------------------
  1066.  
  1067. foreach(&enchantment_axe_sharpness[],&current_ench); //comparar encantos da array com o do item
  1068. ifmatches(%&ench%,%&current_ench%);
  1069. set(m_sharpness_ok);
  1070. log("&aM_Sharpness OK");
  1071. endif;
  1072. next;
  1073.  
  1074. //verificador do encantamento: 'sharpness' ---------------------
  1075.  
  1076.  
  1077. //verificador do encantamento: 'smite' -------------------
  1078.  
  1079. foreach(&enchantment_axe_smite[],&current_ench); //comparar encantos da array com o do item
  1080. ifmatches(%&ench%,%&current_ench%);
  1081. set(m_smite_ok);
  1082. log("&aM_Smite OK");
  1083. endif;
  1084. next;
  1085.  
  1086. //verificador do encantamento: 'smite' ---------------------
  1087.  
  1088. //verificador do encantamento: 'Arthropods' -------------------
  1089.  
  1090. foreach(&enchantment_axe_arthropods[],&current_ench); //comparar encantos da array com o do item
  1091. ifmatches(%&ench%,%&current_ench%);
  1092. set(m_arthropods_ok);
  1093. log("&aM_Arthropods OK");
  1094. endif;
  1095. next;
  1096.  
  1097. //verificador do encantamento: 'Arthropods' ---------------------
  1098.  
  1099.  
  1100. //verificador do encantamento: 'eficiencia' -------------------
  1101.  
  1102. foreach(&enchantment_tools_efficiency[],&current_ench); //comparar encantos da array com o do item
  1103. ifmatches(%&ench%,%&current_ench%);
  1104. set(efficiency_ok);
  1105. log("&aEfficiency OK");
  1106. endif;
  1107. next;
  1108.  
  1109. //verificador do encantamento: 'eficiencia' ---------------------
  1110.  
  1111.  
  1112. //verificador do encantamento: 'Inquebravel' ---------------------
  1113.  
  1114. if(efficiency_ok); //este if e apenas para pular o codigo caso o 'Efficiency' n?o tenha sido aprovado.
  1115. foreach(&enchantment_tools_unbreaking[],&current_ench); //comparar encantos da array com o do item
  1116. ifmatches(%&ench%,%&current_ench%);
  1117. set(unbreaking_ok);
  1118. LOG("&fUNBREAKING OK");
  1119. endif;
  1120. next;
  1121. endif;
  1122.  
  1123. //verificador do encantamento: 'Inquebravel' ---------------------
  1124.  
  1125. //verificador do encantamento: 'M Inquebravel' ---------------------
  1126.  
  1127. if(efficiency_ok); //este if e apenas para pular o codigo caso o 'Efficiency' n?o tenha sido aprovado.
  1128. foreach(&enchantment_axe_umbreaking[],&current_ench); //comparar encantos da array com o do item
  1129. ifmatches(%&ench%,%&current_ench%);
  1130. set(m_unbreaking_ok);
  1131. LOG("&fM_UNBREAKING OK");
  1132. endif;
  1133. next;
  1134. endif;
  1135.  
  1136. //verificador do encantamento: 'M Inquebravel' ---------------------
  1137.  
  1138.  
  1139. //verificador do encantamento: 'fortune' ---------------------
  1140.  
  1141. if((protection_ok)&&(unbreaking_ok));
  1142. foreach(&enchantment_tools_fortune[],&current_ench); //comparar encantos da array com o do item
  1143. ifmatches(%&ench%,%&current_ench%);
  1144. set(fortune_ok);
  1145. LOG("&cFortune OK");
  1146. endif;
  1147. next;
  1148. endif;
  1149.  
  1150. //verificador do encantamento: 'fortune' ---------------------
  1151.  
  1152. //verificador do encantamento: 'toque suave' -----------------
  1153.  
  1154. if((protection_ok)&&(unbreaking_ok));
  1155. foreach(&enchantment_tools_silktouch[],&current_ench); //comparar encantos da array com o do item
  1156. ifmatches(%&ench%,%&current_ench%);
  1157. set(silktouch_ok);
  1158. LOG("&cSilk Touch OK");
  1159. endif;
  1160. next;
  1161. endif;
  1162.  
  1163. //verificador do encantamento: 'toque suave' -----------------
  1164.  
  1165. unset(approved);
  1166.  
  1167. if(guardar_m_s5);
  1168. if(m_sharpness_ok);
  1169. set(approved);
  1170. endif;
  1171. endif;
  1172.  
  1173. if(guardar_m_s5j5a5);
  1174. if((m_sharpness_ok)&&(m_arthropods_ok)&&(m_smite_ok));
  1175. set(approved);
  1176. endif;
  1177. endif;
  1178.  
  1179. if(guardar_m_s5umb3);
  1180. if((m_sharpness_ok)&&(m_unbreaking_ok));
  1181. set(approved);
  1182. endif;
  1183. endif;
  1184.  
  1185. //veriricadores tools
  1186.  
  1187. if((guardar_eff4)||(guardar_eff5));
  1188. if(efficiency_ok);
  1189. set(approved);
  1190. endif;
  1191. endif;
  1192.  
  1193. if(guardar_fortune3);
  1194. if(fortune_ok);
  1195. set(approved);
  1196. endif;
  1197. endif;
  1198.  
  1199. if(guardar_silkt);
  1200. if(silktouch_ok);
  1201. set(approved);
  1202. endif;
  1203. endif;
  1204.  
  1205. if((guardar_eff4umb3fort3)||(guardar_eff5umb3fort3));
  1206. if((fortune_ok)&&(efficiency_ok)&&(unbreaking_ok));
  1207. set(approved);
  1208. endif;
  1209. endif;
  1210.  
  1211. if((guardar_eff4umb3silk1)||(guardar_eff5umb3silk1));
  1212. if((silktouch_ok)&&(efficiency_ok)&&(unbreaking_ok));
  1213. set(approved);
  1214. endif;
  1215. endif;
  1216.  
  1217. if(approved);
  1218. log("&f&1[&fAdvanced &7Fishing &ev2.0&1]: &bEncantamento &aAprovado.");
  1219. set(subir_item);
  1220. break;
  1221. else;
  1222. log("&f&1[&fAdvanced &7Fishing &ev2.0&1]: &bEncantamento &cReprovado.");
  1223. slotclick(36,l,false);wait(10ms);
  1224. slotclick(-999,l,false);wait(10ms);
  1225. endif;
  1226.  
  1227.  
  1228. endif;
  1229.  
  1230. // machado pvp 279---------------------------------
  1231. endif;
  1232. next;
  1233.  
  1234. if(subir_item);
  1235. break;
  1236. endif;
  1237. //verificador de itens encantados --------------------
  1238.  
  1239. Endunsafe;
  1240.  
  1241. //verificadores de inventario ----------------------------------------------------------------
  1242.  
  1243. loop;
  1244. endif;
  1245.  
  1246. //action -------------------------------------------------------------------------------------
  1247.  
  1248.  
  1249. //consequencias -------------------------------------------------------------------------------
  1250.  
  1251. LOG("CHEGUEI AQUI CONSEQUENCIAS");
  1252. if(inv_lotado);
  1253.  
  1254. elseif(without_lines);
  1255. unset(without_lines);
  1256. if(buy_lines);
  1257.  
  1258. #xcoord = %XPOS%; #zcoord = %ZPOS%;
  1259. echo("/home %&buyline_home%");wait(1500ms);
  1260. log("&6Aguardando teletransporte");
  1261. do(10);
  1262. wait(1);
  1263. until((%XPOS% != %#xcoord%)||(%ZPOS% != %#zcoord%));
  1264.  
  1265. keydown(jump);wait(500ms);keyup(jump);
  1266. keydown(forward);wait(500ms);keyup(forward);
  1267.  
  1268. elseif(pick_lines);
  1269.  
  1270. #xcoord = %XPOS%; #zcoord = %ZPOS%;
  1271. echo("/home %&pickline_home%");wait(1500ms);
  1272. log("&6Aguardando teletransporte");
  1273. do(10);
  1274. wait(1);
  1275. until((%XPOS% != %#xcoord%)||(%ZPOS% != %#zcoord%));
  1276.  
  1277. endif;
  1278. elseif(eat);
  1279. unset(eat);
  1280. log("eat");
  1281. keydown(jump);wait(800ms);keyup(jump);
  1282. do();
  1283. SLOT(1);
  1284. key(use);
  1285. while(%HUNGER% < 17);
  1286.  
  1287. elseif(subir_item);
  1288.  
  1289. unset(subir_item);
  1290. unset(go_trap);
  1291. log("&8[&7Conseq&8]: &bSubindo item no inventario");
  1292. IF(%GUI% != "GUIINVENTORY");
  1293. gui(inventory);
  1294. ENDIF;
  1295.  
  1296. Unsafe(0);
  1297. unset(#slots_some_item[]); //array q salvara os slots dos itens que sao iguais ao que sera slotclicado
  1298. unset(&itens[]); //array q sera salvo o id/stack de todos os itens do inventario
  1299. getslotitem(36,#slot36_id);//pega o id do item que sera slotclicado
  1300.  
  1301. for(#getslot_inc,9,44);
  1302. //o getslot procura-ra no inv os itens iguais ao item que sera slotclicado,
  1303. //e salvara seus slots na array #slots_some_item[] e caso nao encontre mais, break.
  1304.  
  1305. getslot(%#slot36_id%,#slot36_slot,#slot36_stack);
  1306. if(#slot36_slot != -1);
  1307. put(#slots_some_item[],%#slot36_slot%);
  1308. else;
  1309. break;
  1310. endif;
  1311.  
  1312. //
  1313.  
  1314. //essa parte coloca na array &itens[] o id/stack de cada item encontrado no inventario
  1315.  
  1316. getslotitem(%#getslot_inc%,#infor_id,#infor_stack);
  1317. put(&itens[],"%#infor_id% - %#infor_stack%);
  1318.  
  1319. //
  1320. next;
  1321.  
  1322. slotclick(36,l,true);
  1323.  
  1324. //essa parte transformara toda a array #slots_some_item[] em uma variavel '&': "&all_slots"
  1325.  
  1326. &all_slots = "";
  1327. unset(ok);
  1328. foreach(#slots_some_item[],#current_slotid);
  1329. If(ok);
  1330. set(&all_slots,%&all_slots% %#current_slotid%);
  1331. else;
  1332. set(&all_slots,%&all_slots%%#current_slotid%);
  1333. Set(ok);
  1334. endif;
  1335. next;
  1336.  
  1337. //se o #inv_checker que corresponde ao slot atual do inv for igual a um dos slots da var: "&all_slots"
  1338. //ele pula este slot, procura em outro at� que nao seje igual, querendo dizer que e onde o item foi movido.
  1339. for(#inv_checker,9,44);
  1340. getslotitem(%#inv_checker%,#id,#stk);
  1341. #analise = #inv_checker - 9;
  1342. ifmatches(%&all_slots%,%#inv_checker%);
  1343. else;
  1344. ifmatches(%&itens[%#analise%]%,"%#id% - %#stk%");
  1345. else;
  1346. break;
  1347. endif;
  1348. endif;
  1349. next;
  1350. #slotclick_true = %#inv_checker%;
  1351.  
  1352. //ir colocando os slots dos itens ignorados dentro da var "&slots_ignorados"
  1353. if(ok);
  1354. &slots_ignorados = "%&slots_ignorados% %#slotclick_true%";
  1355. else;
  1356. &slots_ignorados = "%&slots_ignorados%%#slotclick_true%";
  1357. set(ok);
  1358. endif;
  1359.  
  1360. log("foi movido pro slot %#slotclick_true%");
  1361. Endunsafe;
  1362.  
  1363. endif;
  1364.  
  1365. //consequencias -------------------------------------------------------------------------------
  1366.  
  1367. loop;
  1368.  
  1369.  
  1370.  
  1371.  
  1372. else;
  1373. log("");
  1374. LOG("&f&1[&7Advanced &fFishing &ev2.0&1]: &cDesativada");
  1375. log("");
  1376. GUI();
  1377. stop;
  1378. endif;
  1379. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement