Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${ unset(&home_mine[]); unset(&home_sell[]); unset(#save_item[]); unset(&function[]); unset(&function2[]);
- // //
- // Créditos: Useems //
- // Canal no youtube: https://www.youtube.com/channel/UCyuwm8kuKcvyOsf0TrdXTWQ //
- // Versão atual da Macro: 1.0 //
- // //
- // --------------- CONFIGURAÇÕES --------------- //
- // Homes de mineração
- &home_mine[] = "minerar";
- &home_mine[] = "minerar2";
- // Homes de vender minérios
- &home_sell[] = "vender";
- &home_sell[] = "vender2";
- // Itens para manter no inventário
- #save_item[] = 351; // Lapis Lazuli
- #save_item[] = 371; // Pepita de ouro
- // Configurações específicas
- #teleport_delay = 1500; // Tempo que demora para se teleportar com /home
- #break_block = 21; // Id do bloco que você irá quebrar (Lapis Lazuli).
- #pick_durability = 500; // Quando a picareta chegar nessa durabilidade, ela será reparada.
- #full_slot = 30; // Slot que a macro irá conferir para ver se o inventário está cheio.
- vender_itens = true; // Você deseja vender seus itens? (true/false)
- alt_tab = true; // Deseja poder usar alt + tab (minimizar seu jogo)? (true/false)
- 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)
- // Configurações avançadas
- #check_inventory_limit = 200; // Quando chegar a esse valor (será somado automaticamente no loop), venderá os itens (se alt_tab não for true)
- #check_sell_tab_limit = 1200; // Quando chegar a esse valor (será somado automaticamente no loop), venderá os itens (se alt_tab for true)
- // -------------------------------------------- //
- if(!started);
- set(started);
- log("&6&l[&3&lM&7&lacro&3&lM&7&lineraçao&6&l] &4&lDESATIVADO");
- stop();
- else;
- unset(started);
- log("&6&l[&3&lM&7&lacro&3&lM&7&lineraçao&6&l] &2&lATIVADO");
- &function[] = "home_mine"; #look = 0; #check_sell_tab = 0; #limit = 0; &pos = ""; #poslimit = 0; #check_inventory = 0; ¯o_message = "&6Macro de mineraçao (v1.0) By: &aUseems. &6Confira no &4&lyoutube!";
- // Prompt
- prompt(&change_config,$$?,"Deseja modificar as configurações? sim/nao (ou pressione ENTER para continuar)");
- ifmatches(%&change_config%,"sim");
- 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");
- if(%&divulgar_macro_simnao%="sim")
- set(divulgar_macro);
- elseif(%&divulgar_macro_simnao%="nao");
- unset(divulgar_macro);
- endif;
- do;
- prompt(#teleport_delay,$$?,"Quanto demora para se teleportar (em milissegundos)?");
- while(%#teleport_delay%=0);
- prompt(&vender_itens_simnao,$$?,"Você deseja vender seus itens? sim/nao (ou pressione ENTER para continuar)");
- if(%&vender_itens_simnao%="sim")
- set(vender_itens);
- elseif(%&vender_itens_simnao%="nao");
- unset(vender_itens);
- endif;
- 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)");
- if(%&alt_tab_simnao%="sim")
- set(alt_tab);
- elseif(%&alt_tab_simnao%="nao");
- unset(alt_tab);
- endif;
- set(first);
- do;
- prompt(&home,$$?,"Digite as homes para minerar (ou pressione ENTER para continuar)");
- if(%&home%!="");
- if(first);
- unset(&home_mine[]);
- unset(first);
- endif;
- &home_mine[] = %&home%;
- endif;
- while(%&home%!="");
- set(first);
- do;
- prompt(&home,$$?,"Digite as homes para vender minérios (ou pressione ENTER para continuar)");
- if(%&home%!="");
- if(first);
- unset(&home_sell[]);
- unset(first);
- endif;
- &home_sell[] = %&home%;
- endif;
- while(%&home%!="");
- if(!alt_tab);
- set(first);
- do;
- prompt(#items,$$?,"Digite o id dos itens que deseja manter (ou pressione ENTER para continuar)");
- if(%#items%!=0);
- if(first);
- unset(&save_item[]);
- unset(first);
- endif;
- &save_item[] = %#items%;
- endif;
- while(%#items%!=0);
- endif;
- endif;
- // End Prompt
- if(divulgar_macro);
- echo("/g Iniciando %¯o_message%");
- endif;
- do;
- if(&function[0]);
- arraysize(&function,#function_size);
- dec(#function_size);
- for(#func,0,%#function_size%);
- &func = %&function[%#func%]%;
- // Safe Functions
- ifmatches(%&func%,"home_mine");
- arraysize(&home_mine,#size);
- dec(#size);
- random(#home,0,%#size%);
- echo("/home %&home_mine[%#home%]%");
- wait(%#teleport_delay%ms);
- next; endif;
- ifmatches(%&func%,"home_sell");
- arraysize(&home_sell,#size);
- dec(#size);
- random(#home,0,%#size%);
- echo("/home %&home_sell[%#home%]%");
- wait(%#teleport_delay%ms);
- next; endif;
- ifmatches(%&func%,"sell_items");
- if(%DURABILITY%<%#pick_durability%);
- echo("/fix all");
- endif;
- if(!alt_tab);
- look(-180,+0);
- for(#clean,9,44);
- if(%#clean%!=36);
- getslotitem(%#clean%,#id);
- arraysize(#save_item,#save_item_size);
- #i = 0;
- do;
- ifmatches(%#id%,%#save_item[%#i%]%);
- set(found);
- break();
- endif;
- inc(#i);
- while(#i<#save_item_size);
- if(found);
- unset(found);
- else;
- slotclick(%#clean%);
- wait(110ms);
- slotclick(-999);
- endif;
- endif;
- next;
- gui();
- look(-180,+0);
- endif;
- wait(100ms);
- do(15);
- key(attack);
- loop;
- if(!alt_tab);
- gui(inventory);
- getslotitem(%#full_slot%,#lastslot);
- gui();
- else;
- #lastslot = 0;
- endif;
- if(%#lastslot%=0);
- if(divulgar_macro);
- echo("/g %¯o_message%");
- endif;
- wait("%#teleport_delay%ms");
- &function2[] = "home_mine";
- else;
- #check_inventory = %#check_inventory_limit%;
- if(alt_tab);
- #check_sell_tab = %#check_sell_tab_limit%;
- endif;
- endif;
- next; endif;
- next;
- unset(&function[]);
- if(&function2[0]);
- arraysize(&function2,#function_size);
- dec(#function_size);
- for(#i,0,%#function_size%);
- &function[] = %&function2[%#i%]%;
- next;
- endif;
- unset(&function2[]);
- else;
- if((vender_itens)&&(%#check_inventory%>=%#check_inventory_limit%));
- #check_inventory = 0;
- keyup(forward);
- #lastslot = 0;
- if(!alt_tab);
- gui(inventory);
- getslotitem(%#full_slot%,#lastslot);
- endif;
- if((%#lastslot%>0)||((alt_tab)&&(%#check_sell_tab%>=%#check_sell_tab_limit%)));
- #check_sell_tab = 0;
- &function[] = "home_sell";
- &function[] = "sell_items";
- else;
- gui();
- endif;
- else;
- ifmatches(%#look%,-1);
- if(%DIRECTION%="N");
- #look = 0;
- elseif(%DIRECTION%="S");
- #look = 180;
- elseif(%DIRECTION%="E");
- #look = 90;
- elseif(%DIRECTION%="W");
- #look = 270;
- endif;
- endif;
- ifmatches(%HITID%,%#break_block%);
- look(%#look%,50);
- keydown(forward);
- key(attack);
- slot(1);
- inc(#check_inventory);
- if(alt_tab);
- inc(#check_sell_tab);
- endif;
- if(%#limit%!=4);
- #limit=0;
- endif;
- &pos2 = "%XPOS%, %YPOS%, %ZPOS%";
- if(%&pos%="");
- &pos = %&pos2%;
- endif;
- if(%&pos%=%&pos2%);
- inc(#poslimit);
- else;
- &pos = "";
- #poslimit = 0;
- endif;
- if(%#poslimit%>100);
- &function[] = "home_mine";
- endif;
- else;
- wait(45ms);
- keyup(forward);
- if(%#limit%>=4);
- if(%#limit%>=5);
- #look = -1; #limit = 0;
- &function[] = "home_mine";
- else;
- getidrel(0,-1,0,#id);
- ifmatches(%#id%,%#break_block%);
- look(%#look%,90);
- #look = -1;
- do(15);
- key(attack);
- loop;
- endif;
- else;
- inc(#limit);
- endif;
- endif;
- else;
- inc(#limit);
- #look = -1;
- look(+90,50);
- wait(100ms);
- endif;
- endif;
- endif;
- endif;
- loop;
- endif;
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement