Advertisement
KananGamer

[Macro] Mineração v1.0 by: Useems

Aug 14th, 2019
3,903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.52 KB | None | 0 0
  1. $${ unset(&home_mine[]); unset(&home_sell[]); unset(#save_item[]); unset(&function[]); unset(&function2[]);
  2.  
  3. // //
  4. // Créditos: Useems //
  5. // Canal no youtube: https://www.youtube.com/channel/UCyuwm8kuKcvyOsf0TrdXTWQ //
  6. // Versão atual da Macro: 1.0 //
  7. // //
  8.  
  9. // --------------- CONFIGURAÇÕES --------------- //
  10.  
  11. // Homes de mineração
  12. &home_mine[] = "minerar";
  13. &home_mine[] = "minerar2";
  14.  
  15. // Homes de vender minérios
  16. &home_sell[] = "vender";
  17. &home_sell[] = "vender2";
  18.  
  19. // Itens para manter no inventário
  20. #save_item[] = 351; // Lapis Lazuli
  21. #save_item[] = 371; // Pepita de ouro
  22.  
  23. // Configurações específicas
  24. #teleport_delay = 1500; // Tempo que demora para se teleportar com /home
  25. #break_block = 21; // Id do bloco que você irá quebrar (Lapis Lazuli).
  26. #pick_durability = 500; // Quando a picareta chegar nessa durabilidade, ela será reparada.
  27. #full_slot = 30; // Slot que a macro irá conferir para ver se o inventário está cheio.
  28. vender_itens = true; // Você deseja vender seus itens? (true/false)
  29. alt_tab = true; // Deseja poder usar alt + tab (minimizar seu jogo)? (true/false)
  30. divulgar_macro = true; // Você deseja enviar no chat global do servidor uma mensagem automática da macro? Obs: Isso me ajudará muito a divulga-la, ficaria grato! (true/false)
  31.  
  32. // Configurações avançadas
  33. #check_inventory_limit = 200; // Quando chegar a esse valor (será somado automaticamente no loop), venderá os itens (se alt_tab não for true)
  34. #check_sell_tab_limit = 1200; // Quando chegar a esse valor (será somado automaticamente no loop), venderá os itens (se alt_tab for true)
  35.  
  36. // -------------------------------------------- //
  37.  
  38. if(!started);
  39. set(started);
  40. log("&6&l[&3&lM&7&lacro&3&lM&7&lineraçao&6&l] &4&lDESATIVADO");
  41. stop();
  42. else;
  43. unset(started);
  44. log("&6&l[&3&lM&7&lacro&3&lM&7&lineraçao&6&l] &2&lATIVADO");
  45. &function[] = "home_mine"; #look = 0; #check_sell_tab = 0; #limit = 0; &pos = ""; #poslimit = 0; #check_inventory = 0; &macro_message = "&6Macro de mineraçao (v1.0) By: &aUseems. &6Confira no &4&lyoutube!";
  46.  
  47. // Prompt
  48. prompt(&change_config,$$?,"Deseja modificar as configurações? sim/nao (ou pressione ENTER para continuar)");
  49.  
  50. ifmatches(%&change_config%,"sim");
  51. prompt(&divulgar_macro_simnao,$$?,"Deseja divulgar a macro quando for vender seus itens e/ou inicia-la? Isso me ajudará muito, ficaria grato! sim/nao");
  52. if(%&divulgar_macro_simnao%="sim")
  53. set(divulgar_macro);
  54. elseif(%&divulgar_macro_simnao%="nao");
  55. unset(divulgar_macro);
  56. endif;
  57.  
  58. do;
  59. prompt(#teleport_delay,$$?,"Quanto demora para se teleportar (em milissegundos)?");
  60. while(%#teleport_delay%=0);
  61.  
  62. prompt(&vender_itens_simnao,$$?,"Você deseja vender seus itens? sim/nao (ou pressione ENTER para continuar)");
  63. if(%&vender_itens_simnao%="sim")
  64. set(vender_itens);
  65. elseif(%&vender_itens_simnao%="nao");
  66. unset(vender_itens);
  67. endif;
  68.  
  69. prompt(&alt_tab_simnao,$$?,"Você deseja poder minimizar o jogo? Você não poderá jogar fora seus itens! sim/nao (ou pressione ENTER para continuar)");
  70. if(%&alt_tab_simnao%="sim")
  71. set(alt_tab);
  72. elseif(%&alt_tab_simnao%="nao");
  73. unset(alt_tab);
  74. endif;
  75.  
  76. set(first);
  77. do;
  78. prompt(&home,$$?,"Digite as homes para minerar (ou pressione ENTER para continuar)");
  79. if(%&home%!="");
  80. if(first);
  81. unset(&home_mine[]);
  82. unset(first);
  83. endif;
  84. &home_mine[] = %&home%;
  85. endif;
  86. while(%&home%!="");
  87.  
  88. set(first);
  89. do;
  90. prompt(&home,$$?,"Digite as homes para vender minérios (ou pressione ENTER para continuar)");
  91. if(%&home%!="");
  92. if(first);
  93. unset(&home_sell[]);
  94. unset(first);
  95. endif;
  96. &home_sell[] = %&home%;
  97. endif;
  98. while(%&home%!="");
  99.  
  100. if(!alt_tab);
  101. set(first);
  102. do;
  103. prompt(#items,$$?,"Digite o id dos itens que deseja manter (ou pressione ENTER para continuar)");
  104. if(%#items%!=0);
  105. if(first);
  106. unset(&save_item[]);
  107. unset(first);
  108. endif;
  109. &save_item[] = %#items%;
  110. endif;
  111. while(%#items%!=0);
  112. endif;
  113. endif;
  114. // End Prompt
  115.  
  116. if(divulgar_macro);
  117. echo("/g Iniciando %&macro_message%");
  118. endif;
  119.  
  120. do;
  121. if(&function[0]);
  122. arraysize(&function,#function_size);
  123. dec(#function_size);
  124.  
  125. for(#func,0,%#function_size%);
  126. &func = %&function[%#func%]%;
  127.  
  128. // Safe Functions
  129. ifmatches(%&func%,"home_mine");
  130. arraysize(&home_mine,#size);
  131. dec(#size);
  132. random(#home,0,%#size%);
  133. echo("/home %&home_mine[%#home%]%");
  134. wait(%#teleport_delay%ms);
  135. next; endif;
  136.  
  137. ifmatches(%&func%,"home_sell");
  138. arraysize(&home_sell,#size);
  139. dec(#size);
  140. random(#home,0,%#size%);
  141. echo("/home %&home_sell[%#home%]%");
  142. wait(%#teleport_delay%ms);
  143. next; endif;
  144.  
  145. ifmatches(%&func%,"sell_items");
  146. if(%DURABILITY%<%#pick_durability%);
  147. echo("/fix all");
  148. endif;
  149.  
  150. if(!alt_tab);
  151. look(-180,+0);
  152.  
  153. for(#clean,9,44);
  154. if(%#clean%!=36);
  155. getslotitem(%#clean%,#id);
  156. arraysize(#save_item,#save_item_size);
  157. #i = 0;
  158.  
  159. do;
  160. ifmatches(%#id%,%#save_item[%#i%]%);
  161. set(found);
  162. break();
  163. endif;
  164. inc(#i);
  165. while(#i<#save_item_size);
  166.  
  167. if(found);
  168. unset(found);
  169. else;
  170. slotclick(%#clean%);
  171. wait(110ms);
  172. slotclick(-999);
  173. endif;
  174. endif;
  175. next;
  176. gui();
  177. look(-180,+0);
  178. endif;
  179.  
  180. wait(100ms);
  181.  
  182. do(15);
  183. key(attack);
  184. loop;
  185.  
  186. if(!alt_tab);
  187. gui(inventory);
  188. getslotitem(%#full_slot%,#lastslot);
  189. gui();
  190. else;
  191. #lastslot = 0;
  192. endif;
  193.  
  194. if(%#lastslot%=0);
  195. if(divulgar_macro);
  196. echo("/g %&macro_message%");
  197. endif;
  198. wait("%#teleport_delay%ms");
  199. &function2[] = "home_mine";
  200. else;
  201. #check_inventory = %#check_inventory_limit%;
  202.  
  203. if(alt_tab);
  204. #check_sell_tab = %#check_sell_tab_limit%;
  205. endif;
  206. endif;
  207. next; endif;
  208. next;
  209.  
  210. unset(&function[]);
  211.  
  212. if(&function2[0]);
  213. arraysize(&function2,#function_size);
  214. dec(#function_size);
  215.  
  216. for(#i,0,%#function_size%);
  217. &function[] = %&function2[%#i%]%;
  218. next;
  219. endif;
  220.  
  221. unset(&function2[]);
  222. else;
  223. if((vender_itens)&&(%#check_inventory%>=%#check_inventory_limit%));
  224. #check_inventory = 0;
  225. keyup(forward);
  226.  
  227. #lastslot = 0;
  228.  
  229. if(!alt_tab);
  230. gui(inventory);
  231. getslotitem(%#full_slot%,#lastslot);
  232. endif;
  233.  
  234. if((%#lastslot%>0)||((alt_tab)&&(%#check_sell_tab%>=%#check_sell_tab_limit%)));
  235. #check_sell_tab = 0;
  236. &function[] = "home_sell";
  237. &function[] = "sell_items";
  238. else;
  239. gui();
  240. endif;
  241. else;
  242. ifmatches(%#look%,-1);
  243. if(%DIRECTION%="N");
  244. #look = 0;
  245. elseif(%DIRECTION%="S");
  246. #look = 180;
  247. elseif(%DIRECTION%="E");
  248. #look = 90;
  249. elseif(%DIRECTION%="W");
  250. #look = 270;
  251. endif;
  252. endif;
  253.  
  254. ifmatches(%HITID%,%#break_block%);
  255. look(%#look%,50);
  256. keydown(forward);
  257. key(attack);
  258. slot(1);
  259. inc(#check_inventory);
  260.  
  261. if(alt_tab);
  262. inc(#check_sell_tab);
  263. endif;
  264.  
  265. if(%#limit%!=4);
  266. #limit=0;
  267. endif;
  268.  
  269. &pos2 = "%XPOS%, %YPOS%, %ZPOS%";
  270.  
  271. if(%&pos%="");
  272. &pos = %&pos2%;
  273. endif;
  274.  
  275. if(%&pos%=%&pos2%);
  276. inc(#poslimit);
  277. else;
  278. &pos = "";
  279. #poslimit = 0;
  280. endif;
  281.  
  282. if(%#poslimit%>100);
  283. &function[] = "home_mine";
  284. endif;
  285. else;
  286. wait(45ms);
  287. keyup(forward);
  288.  
  289. if(%#limit%>=4);
  290. if(%#limit%>=5);
  291. #look = -1; #limit = 0;
  292. &function[] = "home_mine";
  293. else;
  294. getidrel(0,-1,0,#id);
  295.  
  296. ifmatches(%#id%,%#break_block%);
  297. look(%#look%,90);
  298. #look = -1;
  299. do(15);
  300. key(attack);
  301. loop;
  302. endif;
  303. else;
  304. inc(#limit);
  305. endif;
  306. endif;
  307. else;
  308. inc(#limit);
  309. #look = -1;
  310. look(+90,50);
  311. wait(100ms);
  312. endif;
  313. endif;
  314. endif;
  315. endif;
  316. loop;
  317. endif;
  318. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement