$${
//Macro Mega Fazendeiro para 1.8
//Desenvolvido por Nugou
if(cc)
log(&6[Macro]&b Mega Fazendeiro &4[Off]);
unset(cc);
unset(@rec);
unset(@des);
keyup(sneak);
keyup(forward);
keyup(left);
keyup(right);
keyup(jump);
unset(sai);
if(!vender);
if(pos);
#xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
if(%#plant%=1);}$$/sethome fungotemp$${endif;
if(%#plant%=2);}$$/sethome canatemp$${endif;
if(%#plant%=3);}$$/sethome trigotemp$${endif;
if(%#plant%=4);}$$/sethome cenouratemp$${endif;
if(%#plant%=5);}$$/sethome batatatemp$${endif;
set(reload);
log(&6[Macro]&b Posição salva!);
elseif(reload);
log(&6[Macro]&b Posição não reconhecida);
log(&6[Macro]&b Posição não será salva!);
log(&6[Macro]&b Sua home foi atualizada para antiga posição);
endif;
endif;
stop;
else;
unset(sai);
set(cc);
set(@rec);
set(@pergunta);
@&chave[%@#idp%]=%KEYNAME%;
if(!@des);
unset(reset);for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;#plant=0;
do;
unset(pos);
clearchat;
log(&b ==== &6Qual sua plantação? &b====);
log( &61 &b- &7Plant de &3Fungo &6Status: %&at[1]%);
log( &62 &b- &7Plant de &3Cana &6Status: %&at[2]%);
log( &63 &b- &7Plant de &3Trigo &6Status: %&at[3]%);
log( &64 &b- &7Plant de &3Cenoura &6Status: %&at[4]%);
log( &65 &b- &7Plant de &3Batata &6Status: %&at[5]%);
log( &60 &b- &fContinuar);
if(KEY_1);wait(1t);if(!p1);&item="nether_wart";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[1],&aSelecionado);#plant=1;#piso=1;#piso1=0;#blo=0;set(p1);endif;endif;
if(KEY_2);wait(1t);if(!p2);&item="reeds";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[2],&aSelecionado);#plant=2;#piso=0;#piso1=-1;#blo=-1;set(p2);endif;endif;
if(KEY_3);wait(1t);if(!p3);&item="wheat_seeds";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[3],&aSelecionado);#plant=3;#piso=0;#piso1=-1;#blo=-1;set(p3);endif;endif;
if(KEY_4);wait(1t);if(!p4);&item="carrots";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[4],&aSelecionado);#plant=4;#piso=0;#piso1=-1;#blo=-1;set(p4);endif;endif;
if(KEY_5);wait(1t);if(!p5);&item="potatoes";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[5],&aSelecionado);#plant=5;#piso=0;#piso1=-1;#blo=-1;set(p5);endif;endif;
if(KEY_0);break;endif;
loop;
if(%#plant%=0);
log(&6[Macro]&b Você não seleciono nenhuma opção);
log(&6[Macro]&b Mega Fazendeiro &4[Off]);
unset(cc);
stop;
endif;
wait(500ms);
set(&cor[1],&6&l»);set(&cor[2],&0);unset(p1);unset(vender);
do;
clearchat;
log(&b====&6O que fazer?&b====);
log( &61 &b- %&cor[1]%Colher &f--- %&cor[2]%Vender);
log( &60 &b- &fContinuar);
if(KEY_1);wait(1t);if(!p1);set(&cor[1],&6&l»);set(&cor[2],&0);unset(vender);set(p1);else;set(&cor[1],&0);set(&cor[2],&6&l»);unset(p1);set(vender);endif;endif;
if(KEY_0);break;endif;
loop;
wait(500ms);
endif;
if(!vender);
if(!@des);
if(reload);
unset(reset);set(&cor[1],&6&l»);set(&cor[2],&0);set(p1);set(repos);set(reload);
do;
clearchat;
log(&b====&6Continuar de onde paro?&b====);
log( &61 &b- %&cor[1]%Sim &f--- %&cor[2]%Não );
log( &60 &b- &fContinuar);
if(KEY_1);wait(1t);if(!p1);set(&cor[1],&6&l»);set(&cor[2],&0);unset(reset);set(repos);set(p1);set(reload);else;set(&cor[1],&0);set(&cor[2],&6&l»);unset(p1);unset(reload);set(reset);unset(repos);endif;endif;
if(KEY_0);break;endif;
loop;
endif;
if(reset);
prompt(#andar[%#plant%],$$?,Quantos andares?(ate 6));
if(%#andar[%#plant%]%=0);
log(&6[Macro]&b A quantidade de andar é igual a zero !!!);
log(&6[Macro]&b Finalizando macro ....);
unset(cc);
set(reload);
unset(pos);
stop;
endif;
if(%#andar[%#plant%]%>6);
log(&6[Macro]&b A quantidade de andar é maior que 6 !!!);
log(&6[Macro]&b Finalizando macro ....);
unset(cc);
set(reload);
unset(pos);
stop;
endif;
if(%#andar[%#plant%]%>1);
prompt(#nt[%#plant%],$$?,Deseja começar por qual andar?);
else;
#nt[%#plant%]=1;
endif;
if(%#nt[%#plant%]%>%#andar[%#plant%]%);
log(&6[Macro]&b O andar selecionado é maior que a quantidade de andar !!!);
log(&6[Macro]&b Finalizando macro ....);
unset(cc);
set(reload);
unset(pos);
stop;
endif;
if(%#nt[%#plant%]%=0);
log(&6[Macro]&b O andar selecionado é igual a zero !!!);
log(&6[Macro]&b Finalizando macro ....);
unset(cc);
set(reload);
unset(pos);
stop;
endif;
#rod=1;
endif;
set(pos);
#fil=1;
#bau=4;
#temp=0;
&det="air|stone_slab|wooden_slab|sandstone_slab|cobblestone_slab|brick_slab|stone_brick_slab|nether_brick_slab|quartz_slab|reeds|nether_wart|wheat|carrots|potatoes";
&terrain="grass|sand|soul_sand|dirt|farmland";
log(&6[Macro]&b Mega Fazendeiro &2[On]);
for(#i,1,9);
getslotitem(%#i%,&id);
ifmatches(%&id%,pickaxe|axe);
&fer=%&id%;
break;
endif;
next;
endif;
do;
do;
#x=%XPOS%;#z=%ZPOS%;wait(100ms);
if(repos);
do(2);
if(%#plant%=1);}$$/home fungotemp$${endif;
if(%#plant%=2);}$$/home canatemp$${endif;
if(%#plant%=3);}$$/home trigotemp$${endif;
if(%#plant%=4);}$$/home cenouratemp$${endif;
if(%#plant%=5);}$$/home batatatemp$${endif;
wait(10);
until((%XPOS%=%#xtemp[%#plant%]%)&&(%ZPOS%=%#ztemp[%#plant%]%));
wait(500ms);
unset(repos);
else;
if(%#nt[%#plant%]%=1);if(%#plant%=1);}$$/home fungo1$${elseif(%#plant%=2);}$$/home cana1$${elseif(%#plant%=3);}$$/home trigo1$${elseif(%#plant%=4);}$$/home cenoura1$${elseif(%#plant%=5);}$$/home batata1$${endif;endif;
if(%#nt[%#plant%]%=2);if(%#plant%=1);}$$/home fungo2$${elseif(%#plant%=2);}$$/home cana2$${elseif(%#plant%=3);}$$/home trigo2$${elseif(%#plant%=4);}$$/home cenoura2$${elseif(%#plant%=5);}$$/home batata2$${endif;endif;
if(%#nt[%#plant%]%=3);if(%#plant%=1);}$$/home fungo3$${elseif(%#plant%=2);}$$/home cana3$${elseif(%#plant%=3);}$$/home trigo3$${elseif(%#plant%=4);}$$/home cenoura3$${elseif(%#plant%=5);}$$/home batata3$${endif;endif;
if(%#nt[%#plant%]%=4);if(%#plant%=1);}$$/home fungo4$${elseif(%#plant%=2);}$$/home cana4$${elseif(%#plant%=3);}$$/home trigo4$${elseif(%#plant%=4);}$$/home cenoura4$${elseif(%#plant%=5);}$$/home batata4$${endif;endif;
if(%#nt[%#plant%]%=5);if(%#plant%=1);}$$/home fungo5$${elseif(%#plant%=2);}$$/home cana5$${elseif(%#plant%=3);}$$/home trigo5$${elseif(%#plant%=4);}$$/home cenoura5$${elseif(%#plant%=5);}$$/home batata5$${endif;endif;
if(%#nt[%#plant%]%=6);if(%#plant%=1);}$$/home fungo6$${elseif(%#plant%=2);}$$/home cana6$${elseif(%#plant%=3);}$$/home trigo6$${elseif(%#plant%=4);}$$/home cenoura6$${elseif(%#plant%=5);}$$/home batata6$${endif;endif;
do(2);log(&6[Macro]&b Teleportando....);wait(5);until((%XPOS%!=%#x%)|(%ZPOS%!=%#z%));
wait(1);
#xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
if(%#plant%=1);}$$/sethome fungotemp$${endif;
if(%#plant%=2);}$$/sethome canatemp$${endif;
if(%#plant%=3);}$$/sethome trigotemp$${endif;
if(%#plant%=4);}$$/sethome cenouratemp$${endif;
if(%#plant%=5);}$$/sethome batatatemp$${endif;
endif;
#xf=%XPOS%;#zf=%ZPOS%;
if(%#plant%=1);
#temp´=0;
do;
keydown(forward);
keydown(jump);
keydown(sneak);
inc(#temp);
if(%#temp%=25);
break;
endif;
until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%- 1));
#temp=0;
wait(500ms);
keyup(forward);
keyup(sneak);
keyup(jump);
wait(1);
#xf=%XPOS%;#zf=%ZPOS%;
do;
keydown(back);
keydown(sneak);
inc(#temp);
if(%#temp%=50);
break;
endif;
until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%- 1));
#temp=0;
if(%#plant%=1);wait(10t);else;wait(5t);endif;
keyup(back);
keyup(sneak);
else;
do(3);keydown(jump);wait(5t);loop;
keyup(jump);
endif;
wait(1);
if(!reload);
ifmatches(%DIRECTION%,N);&dir=NORTH;#frente_z[1%#plant%]=-1;#frente_x[1%#plant%]=0;#frente_z[2%#plant%]=1;#frente_x[2%#plant%]=0;endif;
ifmatches(%DIRECTION%,S);&dir=SOUTH;#frente_z[1%#plant%]=1;#frente_x[1%#plant%]=0;#frente_z[2%#plant%]=-1;#frente_x[2%#plant%]=0;endif;
ifmatches(%DIRECTION%,W);&dir=WEST;#frente_z[1%#plant%]=0;#frente_x[1%#plant%]=-1;#frente_z[2%#plant%]=0;#frente_x[2%#plant%]=1;endif;
ifmatches(%DIRECTION%,E);&dir=EAST;#frente_z[1%#plant%]=0;#frente_x[1%#plant%]=1;#frente_z[2%#plant%]=0;#frente_x[2%#plant%]=-1;endif;
look(%&dir%);
//condição primaria
//norte
ifmatches(%&dir%,NORTH);
getidrel(+1,%#piso%,0,&bl1);//direita
getidrel(-1,%#piso%,0,&bl2);//esquerda
ifmatches(%&bl1%,%&det%);
&ld[1%#plant%]=left;
&ld[2%#plant%]=right;
endif;
ifmatches(%&bl2%,%&det%);
&ld[1%#plant%]=right;
&ld[2%#plant%]=left;
endif;
&lok[1%#plant%]=NORTH;
&lok[2%#plant%]=SOUTH;
endif;
//sul
ifmatches(%&dir%,SOUTH);
getidrel(-1,%#piso%,0,&bl1);//direita
getidrel(+1,%#piso%,0,&bl2);//esquerda
ifmatches(%&bl1%,%&det%);
&ld[1%#plant%]=left;
&ld[2%#plant%]=right;
endif;
ifmatches(%&bl2%,%&det%);
&ld[1%#plant%]=right;
&ld[2%#plant%]=left;
endif;
&lok[1%#plant%]=SOUTH;
&lok[2%#plant%]=NORTH;
endif;
//leste
ifmatches(%&dir%,WEST);
getidrel(0,%#piso%,-1,&bl1);//direita
getidrel(0,%#piso%,+1,&bl2);//esquerda
ifmatches(%&bl1%,%&det%);
&ld[1%#plant%]=left;
&ld[2%#plant%]=right;
endif;
ifmatches(%&bl2%,%&det%);
&ld[1%#plant%]=right;
&ld[2%#plant%]=left;
endif;
&lok[1%#plant%]=WEST;
&lok[2%#plant%]=EAST;
endif;
//oeste
ifmatches(%&dir%,EAST);
getidrel(0,%#piso%,+1,&bl1);//direita
getidrel(0,%#piso%,-1,&bl2);//esquerda
ifmatches(%&bl1%,%&det%);
&ld[1%#plant%]=left;
&ld[2%#plant%]=right;
endif;
ifmatches(%&bl2%,%&det%);
&ld[1%#plant%]=right;
&ld[2%#plant%]=left;
endif;
&lok[1%#plant%]=EAST;
&lok[2%#plant%]=WEST;
endif;
endif;
///////////////////////////////////////////////
///////////////////////////////////////////////
do;
#xq=%XPOS%;#zq=%ZPOS%;
do;
if(%#plant%!=2);look(%&lok[%#rod%%#plant%]%);look(,90);else;look(%&lok[%#rod%%#plant%]%);endif;
ifmatches(%GUI%,CHAT|INVENTORY);
keyup(forward);
log(&6[Macro]&b Chat ou inventario aberto !!!&6 Feche-o para continuar);
do;until(%GUI%="NONE");
endif;
keydown(forward);
if(%#plant%!=2);
if(%#plant%!=1);keydown(sneak);endif;
if((%#xq%!=%XPOS%)|(%#zq%!=%ZPOS%));#xq=%XPOS%;#zq=%ZPOS%;pick(%&fer%);key(attack);else;pick(%&item%);key(use);endif;
else;
getidrel(0,0,0,&blc);if((%&blc%!="reeds"));look(,90);wait(50ms);pick(%&item%);key(use);wait(10ms);else;if(%HITID%="reeds");key(attack);endif;endif;
endif;
if(KEY_P);
keyup(forward);
wait(1);
if(KEY_P);
unset(pos);set(reload);
keyup(forward);
#xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
if(%#plant%=1);}$$/sethome fungotemp$${endif;
if(%#plant%=2);}$$/sethome canatemp$${endif;
if(%#plant%=3);}$$/sethome trigotemp$${endif;
if(%#plant%=4);}$$/sethome cenouratemp$${endif;
if(%#plant%=5);}$$/sethome batatatemp$${endif;
log(&6[Macro]&b Macro Pausado ....);
log(&6[Macro]&b Aperte &6P &bnovamente para voltar a macro....);
wait(2);
do;
if(KEY_P);
wait(1);
if(KEY_P);
if((%XPOS%=%#xtemp[%#plant%]%)&&(%ZPOS%=%#ztemp[%#plant%]%));
log(&6[Macro]&b Voltando a funcionar !!!);
else;
do(2);
log(&6[Macro]&b Teleportando....);
if(%#plant%=1);}$$/home fungotemp$${endif;
if(%#plant%=2);}$$/home canatemp$${endif;
if(%#plant%=3);}$$/home trigotemp$${endif;
if(%#plant%=4);}$$/home cenouratemp$${endif;
if(%#plant%=5);}$$/home batatatemp$${endif;
wait(10);
until((%XPOS%=%#xtemp[%#plant%]%)&&(%ZPOS%=%#ztemp[%#plant%]%));
if(%#plant%=1);
#xf=%XPOS%;#zf=%ZPOS%;
#temp=0;
do;
keydown(forward);
keydown(jump);
keydown(sneak);
inc(#temp);
if(%#temp%=25);
break;
endif;
until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%- 1));
#temp=0;
wait(500ms);
keyup(forward);
keyup(sneak);
keyup(jump);
wait(1);
#xf=%XPOS%;#zf=%ZPOS%;
do;
keydown(back);
keydown(sneak);
inc(#temp);
if(%#temp%=50);
break;
endif;
until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%- 1));
#temp=0;
if(%#plant%=1);wait(10t);else;wait(1t);endif;
keyup(back);
keyup(sneak);
else;
do(3);keydown(jump);wait(5t);loop;
keyup(jump);
endif;
endif;
wait(1);
set(pos);unset(reload);
break;
endif;
endif;
loop;
endif;
endif;
getidrel(%#frente_x[%#rod%%#plant%]%,%#piso%,%#frente_z[%#rod%%#plant%]%,&block);
getidrel(%#frente_x[%#rod%%#plant%]%,%#piso1%,%#frente_z[%#rod%%#plant%]%,&block1);
while(((%&block%="nether_wart")|(%&block%="reeds")|(%&block%="wheat")|(%&block%="carrots")|(%&block%="potatoes")|(%&block%="air"))&&((%&block1%="dirt")|(%&block1%="farmland")|(%&block1%="grass")|(%&block1%="sand")|(%&block1%="soul_sand")));
if(%#plant%!=2);key(attack);endif;
keyup(forward);
if(%#plant%=1);getidrel(0,0,0,&piso);else;getidrel(0,-1,0,&piso);endif;
ifmatches(%&piso%,%&terrain%);
look(+180,);
ifmatches(%DIRECTION%,N);#ladox[1]=1;#ladox[2]=-1;#ladoz[1]=0;#ladoz[2]=0;endif;
ifmatches(%DIRECTION%,S);#ladox[1]=-1;#ladox[2]=1;#ladoz[1]=0;#ladoz[2]=0;endif;
ifmatches(%DIRECTION%,W);#ladox[1]=0;#ladox[2]=0;#ladoz[1]=-1;#ladoz[2]=1;endif;
ifmatches(%DIRECTION%,E);#ladox[1]=0;#ladox[2]=0;#ladoz[1]=1;#ladoz[2]=-1;endif;
set(mudar);
for(#i,1,2);
getidrel(%#ladox[%#i%]%,%#blo%,0,&block);
ifmatches(%&block%,air);
unset(mudar);
break;
endif;
getidrel(0,%#blo%,%#ladoz[%#i%]%,&block);
ifmatches(%&block%,air);
unset(mudar);
break;
endif;
next;
if(mudar);
unset(mudar);
do;
#x=%XPOS%;#z=%ZPOS%;#temp=0;
do;
inc(#temp);
if(%#temp%=50);
break;
endif;
keydown(%&ld[%#rod%%#plant%]%);
keydown(sneak);
look(,90);
ifmatches(%HITID%,%&terrain%);key(use);endif;
pick(%&item%);
until((%XPOS%=%#x%+1)|(%XPOS%=%#x%-1)|(%ZPOS%=%#z%+1)|(%ZPOS%=%#z%- 1));
getidrel(0,%#blo%,0,&block);
if(%#temp%=50);
break;
else;
#temp=0;
endif;
until((%&block%="soul_sand")|(%&block%="farmland")|(%&block%="dirt")|(%&block%="grass")|(%&block%="sand"));
else;
#temp=50;
endif;
if(%#plant%=1);wait(10t);else;wait(5t);endif;
keyup(%&ld[%#rod%%#plant%]%);
keyup(sneak);
wait(500ms);
if(%#plant%=1);}$$/sethome fungotemp$${endif;
if(%#plant%=2);}$$/sethome canatemp$${endif;
if(%#plant%=3);}$$/sethome trigotemp$${endif;
if(%#plant%=4);}$$/sethome cenouratemp$${endif;
if(%#plant%=5);}$$/sethome batatatemp$${endif;
#xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
if(%#rod%=1);#rod=2;else;#rod=1;endif;
else;
do(5);
log(&6[Macro]&b Teleportando....);
if(%#plant%=1);}$$/home fungotemp$${endif;
if(%#plant%=2);}$$/home canatemp$${endif;
if(%#plant%=3);}$$/home trigotemp$${endif;
if(%#plant%=4);}$$/home cenouratemp$${endif;
if(%#plant%=5);}$$/home batatatemp$${endif;
wait(10);
until((%XPOS%=%#xtemp[%#plant%]%)&&(%ZPOS%=%#ztemp[%#plant%]%));
wait(1);
if(%#plant%=1);
#temp=0;
do;
keydown(forward);
keydown(jump);
keydown(sneak);
inc(#temp);
if(%#temp%=25);
break;
endif;
until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%- 1));
#temp=0;
wait(500ms);
keyup(forward);
keyup(sneak);
keyup(jump);
wait(1);
#xf=%XPOS%;#zf=%ZPOS%;
do;
keydown(back);
keydown(sneak);
inc(#temp);
if(%#temp%=50);
break;
endif;
until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%- 1));
if(%#plant%=1);wait(10t);else;wait(2t);endif;
keyup(back);
#temp=0;
keyup(sneak);
else;
do(3);keydown(jump);wait(5t);loop;
keyup(jump);
endif;
wait(1);
endif;
do;gui(inventory);wait(1);until(%GUI%="GUIINVENTORY");
#vazio=0;
for(#i,9,44);
getslotitem(%#i%,&id);
ifmatches(%&id%,"air");
inc(#vazio);
endif;
if((%#i%>=9)&&(%#i%<=35));
ifmatches(%&id%,%&item%);
slotclick(%#i%,l,true);
wait(100ms);
endif;
endif;
next;
if(%#plant%=3);
for(#i,36,44);
getslotitem(%#i%,&id);
if(%&id%="wheat");
slotclick(%#i%,l,true);
wait(70ms);
endif;
next;
for(#i,9,35);
getslotitem(%#i%,&id);
if(%&id%="wheat_seeds");
slotclick(%#i%,l,true);
wait(70ms);
endif;
next;
endif;
if(%#vazio%<4);
do;gui();until(%GUI%="NONE");
#x=%XPOS%;#z=%ZPOS%;
#xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
if(%#plant%=1);}$$/sethome fungotemp$${endif;
if(%#plant%=2);}$$/sethome canatemp$${endif;
if(%#plant%=3);}$$/sethome trigotemp$${endif;
if(%#plant%=4);}$$/sethome cenouratemp$${endif;
if(%#plant%=5);}$$/sethome batatatemp$${endif;
log(&6[Macro]&b %#vazio% slot disponivel -- Indo guarda);
do;
log(&6[Macro]&b Teleportando....);
if(%#plant%=1);}$$/home fungobau$${endif;
if(%#plant%=2);}$$/home canabau$${endif;
if(%#plant%=3);}$$/home trigobau$${endif;
if(%#plant%=4);}$$/home cenourabau$${endif;
if(%#plant%=5);}$$/home batatabau$${endif;
wait(2);
until((%XPOS%!=%#x%)|(%ZPOS%!=%#z%));
unset(pos);set(reload);
do(3);keydown(jump);wait(5t);loop;
keyup(jump);
wait(1);
#x = %XPOS%;
#z = %ZPOS%;
wait(1);
do;
#exit = 0;
do;
ifmatches(%DIRECTION%,N);getidrel(0,%#bau%,-2,&vbau);&dir_bau=North;#pos = %XPOS%;#posf = %#x% + (%#fil% - 1);endif;
ifmatches(%DIRECTION%,S);getidrel(0,%#bau%,2,&vbau);&dir_bau=South;#pos = %XPOS%;#posf = %#x% - (%#fil% - 1);endif;
ifmatches(%DIRECTION%,W);getidrel(-2,%#bau%,0,&vbau);&dir_bau=West;#pos = %ZPOS%;#posf = %#z% - (%#fil% - 1);endif;
ifmatches(%DIRECTION%,E);getidrel(2,%#bau%,0,&vbau);&dir_bau=East;#pos = %ZPOS%;#posf = %#z% + (%#fil% - 1);endif;
look(%&dir_bau%);
if(%#bau% = 4);look(,-62);endif;
if(%#bau% = 3);look(,-50);endif;
if(%#bau% = 2);look(,-25);endif;
if(%#bau% = 1);look(,0);endif;
if(%#bau% = 0);look(,35);endif;
if(%#pos% != %#posf%);keydown(right);keydown(sneak);endif;
until(%#pos% = %#posf%);
wait(100ms);
keyup(right);
keyup(sneak);
wait(1);
if((%&vbau%="chest")|(%&vbau%="trapped_chest"));
do;
if(%HIT%="PLAYER");random(#r,1,10);#xt = %XPOS%;#zt = %ZPOS%;
do;keydown(sneak);keydown(back);until((%XPOS%=%#xt%-1)|(%XPOS%=%#xt%+1)|(%ZPOS%=%#zt%-1)|(%ZPOS%=%#zt%+ 1));
keyup(back);wait(%#r%);#xt = %XPOS%;#zt = %ZPOS%;
do;keydown(sneak);keydown(forward);until((%XPOS%=%#xt%-1)|(%XPOS%=%#xt%+1)|(%ZPOS%=%#zt%-1)|(%ZPOS%=%#zt%+ 1));
keyup(forward);
endif;
key(use);
wait(1);
until(%GUI%="GUICHEST");
wait(10ms);
#sbv = 0;
for(#i,0,53);
getslotitem(%#i%,&id);
if(%&id% = "air");
#sbv = 1;
break;
endif;
next;
if(%#sbv% = 1);
for(#i,54,89);
getslotitem(%#i%,&id);
ifmatches(%&id%,%&item%|wheat|written_book);
slotclick(%#i%,l,true);
wait(10ms);
endif;
next;
#exit = 0;
for(#i,0,53);
getslotitem(%#i%,&id);
if(%&id% = "air");
#exit = 1;
if(%#plant%!=2);
if(%#plant%!=3);
do(3);slotclick(0,l,true);wait(100ms);loop;
else;
for(#i,0,54);
getslotitem(%#i%,&id);
if(%&id%="wheat_seeds");
slotclick(%#i%,l,true);
wait(100ms);
break;
endif;
next;
endif;
endif;
break;
endif;
next;
if(%#exit% = 0);
dec(#bau);
gui();
if(%#bau% = -1);
#bau = 4;
inc(#fil);
endif;
endif;
gui();
else;
dec(#bau);
if(%#bau% = -1);
#bau = 4;
inc(#fil);
endif;
gui();
endif;
else;
log(&6[Macro] &bAcabo os baus!!!);
log(&6[Macro]&b Mega Fazendeiro &4[Off]);
unset(cc);
stop;
endif;
until(%#exit% = 1);
do(2);
log(&6[Macro]&b Teleportando....);
if(%#plant%=1);}$$/home fungotemp$${endif;
if(%#plant%=2);}$$/home canatemp$${endif;
if(%#plant%=3);}$$/home trigotemp$${endif;
if(%#plant%=4);}$$/home cenouratemp$${endif;
if(%#plant%=5);}$$/home batatatemp$${endif;
wait(10);
until((%#xtemp[%#plant%]%=%XPOS%)&&(%#ztemp[%#plant%]%=%ZPOS%));
wait(1);
#xf=%XPOS%;#zf=%ZPOS%;
if(%#plant%=1);
#temp=0;
do;
keydown(forward);
keydown(jump);
keydown(sneak);
inc(#temp);
if(%#temp%=25);
break;
endif;
until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%- 1));
#temp=0;
wait(500ms);
keyup(forward);
keyup(sneak);
keyup(jump);
wait(1);
#xf=%XPOS%;#zf=%ZPOS%;
do;
keydown(back);
keydown(sneak);
inc(#temp);
if(%#temp%=50);
break;
endif;
until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%- 1));
#temp=0;
keyup(back);
keyup(sneak);
endif;
set(pos);unset(reload);
else;
do;gui();wait(1);until(%GUI%="NONE");
log(&6[Macro]&b %#vazio% slot disponivel -- continuando a colheita);
endif;
until(%#temp%=50);
inc(#nt[%#plant%]);
until(%#nt[%#plant%]%>%#andar[%#plant%]%);
unset(reload);
log(&6[Macro]&b Fim do ultimo andar !!!);
log(&6[Macro]&b Voltando ao primeiro andar !!!);
#nt[%#plant%]=1;
#rod=1;
loop;
else;
if(%#plant%=1);#xplant=722;endif;
if(%#plant%=2);#xplant=725;endif;
if(%#plant%=3);#xplant=721;endif;
if(%#plant%=4);#xplant=718;endif;
if(%#plant%=5);#xplant=717;endif;
#bau =4;
#fil =1;
if(!@des);
set(&cor[1],&6&l»);set(&cor[2],&0);unset(p1);set(wv);
do;
clearchat;
log(&b====&6Vender na?&b====);
log( &61 &b- %&cor[1]%Warp Vip &f--- %&cor[2]%Warp Loja);
log( &60 &b- &fContinuar);
if(KEY_1);wait(1t);if(!p1);set(&cor[1],&6&l»);set(&cor[2],&0);set(wv);set(p1);else;set(&cor[1],&0);set(&cor[2],&6&l»);unset(p1);unset(wv);endif;endif;
if(KEY_0);break;endif;
loop;
wait(500ms);
endif;
do;
#x=%XPOS%;#z=%ZPOS%;
do(2);
log(&6[Macro]&b Teleportando....);
if(%#plant%=1);}$$/home fungobau$${endif;
if(%#plant%=2);}$$/home canabau$${endif;
if(%#plant%=3);}$$/home trigobau$${endif;
if(%#plant%=4);}$$/home cenourabau$${endif;
if(%#plant%=5);}$$/home batatabau$${endif;
wait(2);
until((%XPOS%!=%#x%)|(%ZPOS%!=%#z%));
do(3);keydown(jump);wait(5t);loop;
keyup(jump);
wait(1);
#x = %XPOS%;
#z = %ZPOS%;
do;
#exit = 0;
do;
ifmatches(%DIRECTION%,N);getidrel(0,%#bau%,-2,&vbau);&dir_bau=North;#pos = %XPOS%;#posf = %#x% + (%#fil% - 1);endif;
ifmatches(%DIRECTION%,S);getidrel(0,%#bau%,2,&vbau);&dir_bau=South;#pos = %XPOS%;#posf = %#x% - (%#fil% - 1);endif;
ifmatches(%DIRECTION%,W);getidrel(-2,%#bau%,0,&vbau);&dir_bau=West;#pos = %ZPOS%;#posf = %#z% - (%#fil% - 1);endif;
ifmatches(%DIRECTION%,E);getidrel(2,%#bau%,0,&vbau);&dir_bau=East;#pos = %ZPOS%;#posf = %#z% + (%#fil% - 1);endif;
look(%&dir_bau%);
if(%#bau% = 4);look(,-62);endif;
if(%#bau% = 3);look(,-50);endif;
if(%#bau% = 2);look(,-25);endif;
if(%#bau% = 1);look(,0);endif;
if(%#bau% = 0);look(,35);endif;
if(%#pos% != %#posf%);keydown(right);keydown(sneak);endif;
until(%#pos% = %#posf%);
wait(100ms);
keyup(right);
keyup(sneak);
wait(1);
if((%&vbau%="chest")|(%&vbau%="trapped_chest"));
do;
if(%HIT%="PLAYER");random(#r,1,10);#xt = %XPOS%;#zt = %ZPOS%;
do;keydown(sneak);keydown(back);until((%XPOS%=%#xt%-1)|(%XPOS%=%#xt%+1)|(%ZPOS%=%#zt%-1)|(%ZPOS%=%#zt%+ 1));
keyup(back);wait(%#r%);#xt = %XPOS%;#zt = %ZPOS%;
do;keydown(sneak);keydown(forward);until((%XPOS%=%#xt%-1)|(%XPOS%=%#xt%+1)|(%ZPOS%=%#zt%-1)|(%ZPOS%=%#zt%+ 1));
keyup(forward);
endif;
key(use);
wait(1);
until(%GUI%="GUICHEST");
wait(10ms);
#sbv = 0;
if(%#plant%=3);&item=wheat;endif;
for(#i,0,53);
getslotitem(%#i%,&id);
if(%&id%=%&item%);
#sbv = 1;
break;
endif;
next;
if(%#sbv% = 1);
for(#i,0,53);
getslotitem(%#i%,&id);
ifmatches(%&id%,%&item%);
slotclick(%#i%,l,true);
wait(10ms);
endif;
next;
#exit = 1;
for(#i,54,89);
getslotitem(%#i%,&id);
if(%&id% = "air");
#exit = 0;
break;
endif;
next;
if(%#exit% = 0);
dec(#bau);
gui();
if(%#bau% = -1);
#bau = 4;
inc(#fil);
endif;
endif;
gui();
else;
dec(#bau);
if(%#bau% = -1);
#bau = 4;
inc(#fil);
endif;
gui();
endif;
else;
set(sai);
break;
endif;
until(%#exit% = 1);
if(wv);
do;}$$/warp vip$${wait(5);until((%XPOS%=702)&&(%ZPOS%=656));
do;
look(South);
Keydown(forward);
Until(%ZPOS%=671);
do;
keydown(sneak);
Until(%ZPOS%=673);
do;
keyup(forward);
look(East);
keyup(sneak);
Keydown(forward);
Until(%XPOS%=726);
Keyup(forward)
looks(-14,,1);
do;
key(use);
wait(100ms);
while(%GUI%="NONE");
keyup(sneak);
keyup(jump);
WAIT(1000ms);
do(4);
slotclick(16,l,true);
wait(750ms);
loop;
loop;
endif;
loop;
else;
do(2);
log(&6[Macro]&b Teleportando....);
if(%#plant%=1);}$$/home venderfungo$${endif;
if(%#plant%=2);}$$/home vendercana$${endif;
if(%#plant%=3);}$$/home vendertrigo$${endif;
if(%#plant%=4);}$$/home vendercenoura$${endif;
if(%#plant%=5);}$$/home venderbatata$${endif;
wait(5);
key(use);
wait(100ms);
while(%GUI%="NONE");
WAIT(1000ms);
do(4);
slotclick(16,l,true);
wait(750ms);
loop;
endif;
loop;
endif;
if(sai);
unset(sai);
log(&6[Macro] &bAcabo os baus!!!);
log(&6[Macro]&b Mega Fazendeiro &4[Off]);
unset(cc);
unset(vender);
unset(@rec);
stop;
endif;
loop;
endif;
endif;
}$$