Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- ////////////////
- &home_plant = "/home cana"; //// começo do nome da home da plantação
- #andares = 1; //// numero de andares;
- //// ex: /home cana1, /home cana2, /home cana3, etc.;
- &home_armazenar_cana = "/home baus_cana";
- &home_vender_cana = "/home vendacana";
- &sethome_temp_plant = "/sethome temp_plant";
- &sethome_temp_baus = "/sethome temp_baus";
- #numero_de_slots_vazios_pra_guardar = 6;
- #distancia_entre_fileiras = 5;
- #andar = 1;
- #armazenar = 1; /// coloque 1 se for armazenar, ou 0 se for vender;
- #bau = 1;
- #coluna_baus = 1;
- toggle(a);
- if(!a);
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &aColhe cana de lado&f: &4&lOFF&f&l!");
- keyup(forward); keyup(left); keyup(right); keyup(sneak);
- stop;
- endif;
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &aColhe cana de lado&f: &2&lON&f&l!");
- wait(2000ms);
- ifmatches(%PLAYER%,"lomexicano"); set(developer); log("&b&ka&1&ka&d&ka&5&ka&c&ka&4&ka&1&l&nM&2&l&no&3&l&nd&4&l&no &5&l&nd&6&l&ne&7&l&ns&8&l&ne&9&l&nn&0&l&nv&1&l&no&2&l&nl&3&l&nv&4&l&ne&5&l&nd&6&l&no&7&l&nr&b&ka&1&ka&d&ka&5&ka&c&ka&4&ka"); else; unset(developer); endif;
- echo("%&home_plant%%#andar%"); if(developer); log("%&home_plant%%#andar%"); endif;
- log(" ");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fAguardando 12s por garantia");
- for(#valor_garantia,1,6);
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r %#valor_garantia%/6");
- wait(2000ms);
- next;
- if((#bau < 0)||(#bau > 5)); #bau = 1; endif;
- if(#coluna_baus <= 0); #coluna_baus = 1; endif;
- ifmatches(%DIRECTION%,"N"); set(&frente,"North"); set(&direita,"East"); endif;
- ifmatches(%DIRECTION%,"S"); set(&frente,"South"); set(&direita,"West"); endif;
- ifmatches(%DIRECTION%,"E"); set(&frente,"East"); set(&direita,"South"); endif;
- ifmatches(%DIRECTION%,"W"); set(&frente,"West"); set(&direita,"North"); endif;
- ifmatches(%&frente%,"North"); getidrel(+0,+0,-1,&cana); endif;
- ifmatches(%&frente%,"South"); getidrel(+0,+0,+1,&cana); endif;
- ifmatches(%&frente%,"East"); getidrel(+1,+0,+0,&cana); endif;
- ifmatches(%&frente%,"West"); getidrel(-1,+0,+0,&cana); endif;
- &id_cana = "reeds|^83$|^338$";
- &id_vazio = "^0$|air";
- &id_agua = "water|^8$|^9$";
- &id_placa = "wall_sign|^68$";
- &id_bau = "^54$|^146$|chest";
- ifmatches(%&cana%,"%&id_cana%");
- else;
- log(" "); log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &4INICIE NA PLANTACAO!"); log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &aColhe cana de lado&f: &4&lOFF&f&l!"); log(" "); toggle(a); stop;
- endif;
- look(%&frente%); look(,+90);
- echo(%&sethome_temp_plant%); if(developer); log("%&sethome_temp_plant%"); endif;
- wait(750ms);
- echo(%&sethome_temp_plant%); if(developer); log("%&sethome_temp_plant%"); endif;
- wait(750ms);
- look(%&direita%);
- match(%&sethome_temp_plant%,"^/sethome (.+)",{&home_temp_plant});
- &home_temp_plant = "/home %&home_temp_plant%";
- match(%&sethome_temp_baus%,"^/sethome (.+)",{&home_temp_baus});
- &home_temp_baus = "/home %&home_temp_baus%";
- set(indo);
- unset(guardar);
- unset(proxima_fileira);
- unset(proximo_andar);
- unset(se_pa_te_no_fim);
- unset(dei_sethome);
- unset(bau_cheio);
- unset(mudar_de_coluna);
- #xtrap = %XPOS%;
- #ytrap = %YPOS%;
- #ztrap = %ZPOS%;
- if(#distancia_entre_fileiras <= 0); #distancia_entre_fileiras = 1; endif;
- do();
- do();
- unsafe(0);
- unset(#vazios);
- gui(inventory);
- for(#slot,9,44);
- getslotitem(%#slot%,&oq);
- ifmatches(%&oq%,"%&id_vazio%");
- inc(#vazios,1);
- endif;
- next;
- gui();
- endunsafe;
- if(#vazios < #numero_de_slots_vazios_pra_guardar);
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fPoucos slots vazios &7(&f%#vazios%&7)");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &aIniciando armazenamento&f!");
- set(guardar);
- break;
- else;
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fVarios slots vazios &7(&f%#vazios%&7)");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fProsseguindo...");
- endif;
- pick(diamond_axe,diamond_pickaxe);
- look(%&direita%);
- do();
- key(attack);
- do();
- unsafe(0);
- look(%&direita%);
- ifmatches(%HITID%,%&id_cana%);
- keyup(left); keyup(right);
- endif;
- endunsafe;
- ifmatches(%HITID%,%&id_cana%);
- keydown(sneak);
- keyup(left); keyup(right);
- if(%GUI% == "NONE");
- do(5);
- key(attack);
- wait(4ms);
- ifmatches(%HITID%,%&id_cana%); else; break; endif;
- loop;
- if(indo); look(+10,); else; look(-10); endif;
- do(5);
- key(attack);
- wait(4ms);
- ifmatches(%HITID%,%&id_cana%); else; break; endif;
- loop;
- elseif(%GUI% == "GUICHAT");
- log(" ");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &6Chat &faberto!");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fAguardando...");
- do(40);
- wait(500ms);
- if(%GUI% == "NONE");
- break;
- endif;
- loop;
- if(%GUI% != "NONE");
- log(" ");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &4Muito tempo com chat aberto&f! &7(mais 3s)");
- do(6);
- wait(500ms);
- if(%GUI% == "NONE");
- break;
- endif;
- loop;
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fRetomando...");
- if(%GUI% != "NONE"); wait(500ms); gui(); endif;
- key(attack);
- else;
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fRetomando...");
- endif;
- else;
- if(!developer); gui(); wait(100ms); key(attack); endif;
- endif;
- else;
- key(attack);
- break;
- endif;
- loop;
- unsafe(0);
- look(%&direita%);
- if(indo);
- keyup(sneak);
- keydown(left);
- else;
- keyup(sneak);
- keydown(right);
- endif;
- if(indo);
- ifmatches(%&frente%,"North"); getidrel(+0,+0,-1,&parede); endif;
- ifmatches(%&frente%,"South"); getidrel(+0,+0,+1,&parede); endif;
- ifmatches(%&frente%,"East"); getidrel(+1,+0,+0,&parede); endif;
- ifmatches(%&frente%,"West"); getidrel(-1,+0,+0,&parede); endif;
- else;
- ifmatches(%&frente%,"North"); getidrel(+0,+0,+1,&parede); endif;
- ifmatches(%&frente%,"South"); getidrel(+0,+0,-1,&parede); endif;
- ifmatches(%&frente%,"East"); getidrel(-1,+0,+0,&parede); endif;
- ifmatches(%&frente%,"West"); getidrel(+1,+0,+0,&parede); endif;
- endif;
- endunsafe;
- ifmatches(%&parede%,"%&id_vazio%|%&id_cana%|wall_sign|^68$|ladder|^65$");
- else;
- keyup(left); keyup(right);
- if(!se_pa_te_no_fim);
- set(proxima_fileira);
- if(developer); log("proxima fileira - id %&parede%"); endif;
- else;
- if(developer); log("proximo andar - id %&parede%"); endif;
- unset(proxima_fileira);
- unset(se_pa_te_no_fim);
- set(proximo_andar);
- endif;
- break;
- endif;
- loop;
- if(proxima_fileira);
- unset(proxima_fileira);
- keydown(sneak);
- keyup(left);
- keyup(right);
- #coluna_alterada = 0;
- #distancia_ate_o_final = #distancia_entre_fileiras;
- #distancia_entre_fileiras_plus = #distancia_entre_fileiras + 1;
- &coordenadas = "%XPOS%%ZPOS%";
- do();
- unsafe(0);
- ifmatches(%&direita%,"North"); getidrel(+0,+0,-1,&parede_encostada); endif;
- ifmatches(%&direita%,"South"); getidrel(+0,+0,+1,&parede_encostada); endif;
- ifmatches(%&direita%,"East"); getidrel(+1,+0,+0,&parede_encostada); endif;
- ifmatches(%&direita%,"West"); getidrel(-1,+0,+0,&parede_encostada); endif;
- ifmatches(%&parede_encostada%,"%&id_vazio%|%&id_cana%|wall_sign|^68$|ladder|^65$");
- else;
- keyup(right); keyup(left); keyup(forward);
- do(6);
- ifmatches(%HITID%,%&id_cana%);
- key(attack);
- wait(10ms);
- else;
- break;
- endif;
- loop;
- set(guardar);
- set(proximo_andar);
- break;
- endif;
- ifmatches(%&direita%,"North");
- getidrel(+0,+0,-%#distancia_entre_fileiras%,&parede_longe);
- getidrel(+0,+0,-%#distancia_entre_fileiras_plus%,&parede_mais_longe);
- endif;
- ifmatches(%&direita%,"South");
- getidrel(+0,+0,+%#distancia_entre_fileiras%,&parede_longe);
- getidrel(+0,+0,+%#distancia_entre_fileiras_plus%,&parede_mais_longe);
- endif;
- ifmatches(%&direita%,"East");
- getidrel(+%#distancia_entre_fileiras%,+0,+0,&parede_longe);
- getidrel(+%#distancia_entre_fileiras_plus%,+0,+0,&parede_mais_longe);
- endif;
- ifmatches(%&direita%,"West");
- getidrel(-%#distancia_entre_fileiras%,+0,+0,&parede_longe);
- getidrel(-%#distancia_entre_fileiras_plus%,+0,+0,&parede_mais_longe);
- endif;
- ifmatches(%&parede_mais_longe%,"%&id_vazio%|%&id_cana%|wall_sign|^68$|ladder|^65$");
- else;
- #distancia_ate_o_final = 0;
- endif;
- ifmatches(%&parede_longe%,"%&id_vazio%|%&id_cana%|wall_sign|^68$|ladder|^65$");
- else;
- #coluna_alterada = #distancia_entre_fileiras;
- #distancia_ate_o_final = 0;
- set(se_pa_te_no_fim);
- if(developer); log("se pa ta no fim - id %&parede_longe%); endif;
- endif;
- ifmatches("%XPOS%%ZPOS%","%&coordenadas%");
- else;
- inc(#coluna_alterada,1);
- dec(#distancia_ate_o_final,1);
- set(&coordenadas,"%XPOS%%ZPOS%");
- endif;
- if(#coluna_alterada >= #distancia_entre_fileiras);
- if(indo);
- ifmatches(%&direita%,"North"); getidrel(+1,-1,+0,&chao); endif;
- ifmatches(%&direita%,"South"); getidrel(-1,-1,+1,&chao); endif;
- ifmatches(%&direita%,"East"); getidrel(+0,-1,+1,&chao); endif;
- ifmatches(%&direita%,"West"); getidrel(+0,-1,-1,&chao); endif;
- else;
- ifmatches(%&direita%,"North"); getidrel(-1,-1,+0,&chao); endif;
- ifmatches(%&direita%,"South"); getidrel(+1,-1,+0,&chao); endif;
- ifmatches(%&direita%,"East"); getidrel(+0,-1,-1,&chao); endif;
- ifmatches(%&direita%,"West"); getidrel(+0,-1,+1,&chao); endif;
- endif;
- if(developer); log(chao %&chao%); endif;
- ifmatches(%&chao%,"%&id_agua%|%&id_vazio%");
- else;
- keyup(forward); keyup(right); keyup(left);
- keyup(sneak);
- toggle(indo); if(developer); if(!indo); log("voltando") else; log(indo); endif; endif;
- do(6);
- ifmatches(%HITID%,%&id_cana%);
- key(attack);
- wait(10ms);
- else;
- break;
- endif;
- loop;
- look(%&frente%); look(,+90);
- echo(%&sethome_temp_plant%); if(developer); log("%&sethome_temp_plant%"); endif;
- wait(750ms);
- look(%&frente%); look(,+90);
- echo(%&sethome_temp_plant%); if(developer); log("%&sethome_temp_plant%"); endif;
- wait(750ms);
- break;
- endif;
- else;
- if(#distancia_ate_o_final > 2);
- keyup(sneak);
- else;
- keydown(sneak);
- endif;
- keydown(forward);
- endif;
- ifmatches(%HITID%,%&id_cana%);
- key(attack);
- endif;
- endunsafe;
- loop;
- endif;
- if((guardar)|(proximo_andar));
- break;
- endif;
- loop;
- if(guardar);
- unset(guardar);
- #x = %XPOS%; #z = %ZPOS%;
- if(#armazenar == 0);
- if(developer); log("vender"); endif;
- ////// PROCESSO DE VENDA;
- do();
- do();
- look(,90);
- echo(%&home_vender_cana%); if(developer); log("%&home_vender_cana%"); endif;
- do(20);
- wait(400ms);
- until((%XPOS% != %#x%)||(%ZPOS% != %#z%));
- until((%XPOS% != %#x%)||(%ZPOS% != %#z%));
- if(developer);
- if((%XPOS% != %#x%)||(%ZPOS% != %#z%));
- log("mudanca de coordenada detectada.");
- endif;
- endif;
- wait(1000ms);
- echo("/esconder"); wait(400ms)
- echo("/menuloja off"); wait(400ms);
- do(3);
- ifmatches(%HITID%,%&id_placa%);
- if(developer);
- log("placa detectada");
- endif;
- break;
- else;
- wait(1000ms);
- endif;
- loop;
- ifmatches(%HITID%,%&id_placa%);
- break;
- endif;
- loop;
- do();
- key(attack);
- wait(400ms);
- unsafe(0);
- gui(inventory);
- getslot(reeds,#slot);
- gui();
- endunsafe;
- if(#slot < 0);
- if(developer); log("inventario vazio detectado"); endif;
- break;
- endif;
- loop;
- else;
- //// PROCESSO DE ARMAZENAMENTO;
- if(developer); log("armazenar"); endif;
- do();
- look(,90);
- if(!dei_sethome);
- echo(%&home_armazenar_cana%);
- if(developer); log("%&home_armazenar_cana%"); endif;
- else;
- echo(%&home_temp_baus%);
- if(developer); log("%&home_temp_baus%"); endif;
- endif;
- do(20);
- wait(400ms);
- look(0,308);
- ifmatches(%HITID%,%&id_bau%);
- wait(300ms);
- break;
- endif;
- loop;
- ifmatches(%HITID%,%&id_bau%);
- break;
- endif;
- loop;
- do();
- do();
- do(); gui(); until(%GUI% == "NONE");
- if(#bau < 1); #bau = 1; endif;
- if(#bau == 1);
- look(0,308);
- elseif(#bau == 2);
- look(0,328);
- elseif(#bau == 3);
- look(0,358);
- elseif(#bau == 4);
- look(0,33);
- elseif(#bau == 5);
- look(0,50);
- elseif(#bau > 5);
- inc(#coluna_baus,1);
- #bau = 1;
- set(mudar_de_coluna);
- break;
- endif;
- if(!dei_sethome);
- echo(%&sethome_temp_baus%);
- wait(750ms);
- echo(%&sethome_temp_baus%);
- wait(750ms);
- set(dei_sethome);
- else;
- wait(500ms);
- endif;
- keyup(sneak); wait(100ms);
- do(5);
- key(use);
- wait(400ms);
- if(%GUI% != "GUICHEST");
- wait(400ms);
- endif;
- if(%GUI% != "GUICHEST");
- wait(400ms);
- endif;
- keyup(sneak);
- until(%GUI% == "GUICHEST");
- if(%GUI% != "GUICHEST");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fParece que o bau nao abriu...");
- else;
- if(developer); log("bau abriu"); endif;
- unsafe(0);
- for(#slot,54,89);
- getslotitem(%#slot%,&oq);
- ifmatches(%&oq%,%&id_cana%);
- slotclick(%#slot%,l,true);
- getslotitem(%#slot%,&oq);
- ifmatches(%&oq%,%&id_vazio%);
- else;
- set(bau_cheio);
- break;
- endif;
- endif;
- next;
- gui();
- if(bau_cheio);
- inc(#bau,1);
- break;
- else;
- if(#slot >= 89);
- break;
- endif;
- endif;
- endunsafe;
- endif;
- loop;
- if(mudar_de_coluna);
- #x = %XPOS%;
- #z = %ZPOS%;
- #x_final = #x+1;
- do();
- if((%XPOS% < %#x%)||(%ZPOS% != %#z%));
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &cErro de posicionamento.");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fTentando resolver...");
- do();
- if(dei_sethome);
- echo(%&home_temp_baus%);
- if(developer); log(%&home_temp_baus%); endif;
- else;
- echo(%&home_armazenar_cana%);
- if(developer); log(%&home_armazenar_cana%); endif;
- endif;
- do(20);
- wait(500ms);
- until((%XPOS% == %#x%)&&(%ZPOS% == %#z%));
- until((%XPOS% == %#x%)&&(%ZPOS% == %#z%));
- elseif(%XPOS% == %#x_final%);
- ifmatches(%HITID%,%&id_bau%);
- keyup(right);
- keyup(sneak);
- unset(dei_sethome);
- unset(mudar_de_coluna);
- set(mudei_de_coluna);
- #bau = 1;
- break;
- else;
- unsafe(0);
- getidrel(0,3,-2,&bau1); getidrel(0,2,-2,&bau2);
- getidrel(0,1,-2,&bau3); getidrel(0,0,-2,&bau4);
- getidrel(0,-1,-2,&bau5);
- unset(tem_bau_aqui);
- ifmatches(%&bau1%,"chest");
- ifmatches(%&bau2%,"chest");
- ifmatches(%&bau3%,"chest");
- ifmatches(%&bau4%,"chest");
- ifmatches(%&bau5%,"chest");
- set(tem_bau_aqui);
- endif;
- endif;
- endif;
- endif;
- endif;
- endunsafe;
- if(!tem_bau_aqui);
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &cParece que acabaram os baus.");
- log("&e&l[&2&lMA&f&lC&4&lRO&e&l]&r &fVoltando para o primeiro...");
- unset(dei_sethome);
- do();
- echo(%&home_armazenar_cana%)
- do(20);
- wait(500ms);
- unsafe(0);
- getidrel(0,3,-2,&bau1); getidrel(0,2,-2,&bau2);
- getidrel(0,1,-2,&bau3); getidrel(0,0,-2,&bau4);
- getidrel(0,-1,-2,&bau5);
- unset(tem_bau_aqui);
- ifmatches(%&bau1%,"chest");
- ifmatches(%&bau2%,"chest");
- ifmatches(%&bau3%,"chest");
- ifmatches(%&bau4%,"chest");
- ifmatches(%&bau5%,"chest");
- set(tem_bau_aqui);
- endif;
- endif;
- endif;
- endif;
- endif;
- endunsafe;
- if(tem_bau_aqui);
- break;
- endif;
- loop;
- if(tem_bau_aqui);
- #x = %XPOS%;
- #z = %ZPOS%;
- #bau = 1;
- #coluna = 1;
- break;
- endif;
- loop;
- endif;
- endif;
- elseif(%XPOS% < %#x_final%);
- keydown(sneak);
- keydown(right);
- endif;
- loop;
- endif;
- if((!mudar_de_coluna)&&(!bau_cheio)&&(!mudei_de_coluna));
- break;
- else;
- if(bau_cheio);
- unset(bau_cheio);
- endif;
- if(mudei_de_coluna);
- unset(mudei_de_coluna);
- endif;
- endif;
- loop;
- endif;
- endif;
- if(proximo_andar);
- inc(#andar,1);
- if(#andar > #andares);
- #andar = 1;
- endif;
- endif;
- #x = %XPOS%;
- #z = %ZPOS%;
- do(4);
- if(proximo_andar);
- ifmatches(%HITID%,%&id_cana%);
- key(attack);
- endif;
- echo("%&home_plant%%#andar%");
- if(developer); log("%&home_plant%%#andar%"); endif;
- set(indo);
- else;
- echo("%&home_temp_plant%"); if(developer); log("%&home_temp_plant%"); endif;
- endif;
- do(30);
- wait(300ms);
- until((%XPOS% != %#x%)||(%ZPOS% != %#z%));
- until((%XPOS% != %#x%)||(%ZPOS% != %#z%));
- if(proximo_andar);
- unset(proximo_andar);
- endif;
- if(proxima_fileira);
- unset(proxima_fileira);
- endif;
- if(se_pa_te_no_fim);
- unset(se_pa_te_no_fim);
- endif;
- wait(1500ms);
- ifmatches(%DIRECTION%,"N"); set(&frente,"North"); set(&direita,"East"); endif;
- ifmatches(%DIRECTION%,"S"); set(&frente,"South"); set(&direita,"West"); endif;
- ifmatches(%DIRECTION%,"E"); set(&frente,"East"); set(&direita,"South"); endif;
- ifmatches(%DIRECTION%,"W"); set(&frente,"West"); set(&direita,"North"); endif;
- if(developer); log("Frente %&frente% | direita %&direita%"); endif;
- loop;
- //X POSITIVO = LESTE
- //X NEGATIVO = OESTE
- // Y POSITIVO = CIMA
- // Y NEGATIVO = BAIXO
- //Z POSITIVO = SUL
- //Z NEGATIVO = NORTE
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement