$${
//Macro de reparação
//Desenvolvido por Nugou
if(rep)
log(&d[Macro]&c Up rep &4[OFF]);
keyup(sneak);
keyup(forward);
keyup(left);
keyup(right);
unset(rep);
stop;
else;
set(rep);
prompt(&delay,$$?,Vc é VIP?(s ou n));
ifmatches(%&delay%,^[S|s]);#delay=5;endif;
ifmatches(%&delay%,^[N|n]);#delay=10;endif;
prompt(#andar,$$?,Quantos andares?(ate 6));
if(%#andar%=0);
log(&d[Macro]&c A quantidade de andar é igual a zero !!!);
log(&d[Macro]&6 Finalizando macro ....);
unset(rep);
stop;
endif;
if(%#andar%>6);
log(&d[Macro]&c A quantidade de andar é maior que 6 !!!);
log(&d[Macro]&6 Finalizando macro ....);
unset(rep);
stop;
endif;
if(%#andar%>1);
prompt(#nt,$$?,Deseja começar por qual andar?);
else;
#nt=1;
endif;
if(%#nt%>%#andar%);
log(&d[Macro]&c O andar selecionado é maior que a quantidade de andar !!!);
log(&d[Macro]&6 Finalizando macro ....);
unset(rep);
stop;
endif;
if(%#nt%=0);
log(&d[Macro]&c O andar selecionado é igual a zero !!!);
log(&d[Macro]&6 Finalizando macro ....);
unset(rep);
stop;
endif;
#enx=1;
#bau=1;
#temp=0;
do;
do;
if(%#nt%=1);}$$/home rep1$${endif;
if(%#nt%=2);}$$/home rep2$${endif;
if(%#nt%=3);}$$/home rep3$${endif;
if(%#nt%=4);}$$/home rep4$${endif;
if(%#nt%=5);}$$/home rep5$${endif;
if(%#nt%=6);}$$/home rep6$${endif;
wait(%#delay%);
ifmatches(%DIRECTION%,N);&dir=NORTH;endif;
ifmatches(%DIRECTION%,S);&dir=SOUTH;endif;
ifmatches(%DIRECTION%,W);&dir=WEST;endif;
ifmatches(%DIRECTION%,E);&dir=EAST;endif;
look(%&dir%);
//condição primaria
//norte
ifmatches(%&dir%,NORTH);
getidrel(+1,0,0,&bl1);//direita
getidrel(-1,0,0,&bl2);//esquerda
ifmatches(%&bl1%,air);
&ld1=left;
&ld2=right;
endif;
ifmatches(%&bl2%,air);
&ld1=right;
&ld2=left;
endif;
&lok1=NORTH;
&lok2=SOUTH;
endif;
//sul
ifmatches(%&dir%,SOUTH);
getidrel(-1,0,0,&bl1);//direita
getidrel(+1,0,0,&bl2);//esquerda
ifmatches(%&bl1%,air);
&ld1=left;
&ld2=right;
endif;
ifmatches(%&bl2%,air);
&ld1=right;
&ld2=left;
endif;
&lok1=SOUTH;
&lok2=NORTH;
endif;
//leste
ifmatches(%&dir%,WEST);
getidrel(0,0,-1,&bl1);//direita
getidrel(0,0,+1,&bl2);//esquerda
ifmatches(%&bl1%,air);
&ld1=left;
&ld2=right;
endif;
ifmatches(%&bl2%,air);
&ld1=right;
&ld2=left;
endif;
endif;
&lok1=WEST;
&lok2=EAST;
//oeste
ifmatches(%&dir%,EAST);
getidrel(0,0,+1,&bl1);//direita
getidrel(0,0,-1,&bl2);//esquerda
ifmatches(%&bl1%,air);
&ld1=left;
&ld2=right;
endif;
ifmatches(%&bl2%,air);
&ld1=right;
&ld2=left;
endif;
&lok1=EAST;
&lok2=WEST;
endif;
///////////////////////////////////////////////
///////////////////////////////////////////////
do;
do;
look(%&lok1%);
look(,+70);
slot(%#enx%);
ifmatches(%GUI%,CHAT|INVENTORY);
log(&d[Macro]&c Chat ou inventario aberto !!!&6 Feche-o para continuar);
break;
endif;
keydown(forward);
key(use);
if(%DURABILITY%<20);
inc(#enx,1);
if(%#enx%=10);
keyup(forward);
keyup(sneak);
log(&d[Macro]&c Reparando enxadas...);
}$$
/sethome reptemp
/home repen
$${
wait(%#delay%);
#enx=1;
do;
slot(%#enx%);
do(3);
key(use);
loop;
inc(#enx,1);
until(%#enx%=10);
#enx=1;
log(&d[Macro]&c Enxadas reparadas!!!);
//verifica o inventario
gui(inventory);
wait(500ms);
getslotitem(35,#ir,#qir);
if(%#qir%=0);
gui();
}$$
/home repen
$${
wait(%#delay%);
ifmatches(%DIRECTION%,N);&dir=NORTH;endif;
ifmatches(%DIRECTION%,S);&dir=SOUTH;endif;
ifmatches(%DIRECTION%,W);&dir=WEST;endif;
ifmatches(%DIRECTION%,E);&dir=EAST;endif;
do;
look(%&dir%);
//f1-a
if(%#bau%=1);look(-35,-35);endif;
if(%#bau%=2);look(-13,-40);endif;
if(%#bau%=3);look(+13,-40);endif;
if(%#bau%=4);look(+35,-35);endif;
//f2-a
if(%#bau%=5);look(-35,-20);endif;
if(%#bau%=6);look(-13,-25);endif;
if(%#bau%=7);look(+13,-25);endif;
if(%#bau%=8);look(+35,-20);endif;
//f3-a
if(%#bau%=9);look(-35,+5);endif;
if(%#bau%=10);look(-13,+10);endif;
if(%#bau%=11);look(+13,+10);endif;
if(%#bau%=12);look(+35,+5);endif;
//f4-a
if(%#bau%=13);look(-35,+20);endif;
if(%#bau%=14);look(-13,+25);endif;
if(%#bau%=15);look(+13,+25);endif;
if(%#bau%=16);look(+35,+20);endif;
wait(1);
key(use);
wait(2);
for(#i,0,53);
slotclick(%#i%,l,true);
wait(100ms);
next;
getslotitem(54,#id,#stack);
wait(250ms);
ifmatches(%#stack%,0);
gui();
wait(250ms);
#bau=%#bau%+1;
else;
gui();
endif;
if(%#bau%=17);
log(&d[Macro]&c Acabo os baus !!!);
log(&d[Macro]&6 Finalizando macro !!!);
unset(rep);
stop;
endif;
until(%#stack%!=0);
else;
gui();
endif;
}$$
/home reptemp
$${
wait(%#delay%);
endif;
endif;
while((%HITID%="dirt")|(%HITID%="farmland"));
keyup(forward);
look(+180,);
ifmatches(%DIRECTION%,N);#cord=%XPOS%;endif;
ifmatches(%DIRECTION%,S);#cord=%XPOS%;endif;
ifmatches(%DIRECTION%,E);#cord=%ZPOS%;endif;
ifmatches(%DIRECTION%,W);#cord=%ZPOS%;endif;
wait(200ms);
do;
ifmatches(%DIRECTION%,N);#cord1=%XPOS%;endif;
ifmatches(%DIRECTION%,S);#cord1=%XPOS%;endif;
ifmatches(%DIRECTION%,E);#cord1=%ZPOS%;endif;
ifmatches(%DIRECTION%,W);#cord1=%ZPOS%;endif;
inc(#temp,1);
if(%#temp%=50);
break;
endif;
keydown(%&ld1%);
keydown(sneak);
while(%#cord%=%#cord1%);
keyup(%&ld1%);
keyup(sneak);
do;
if(%#temp%=50);
break;
else;
#temp=0;
endif;
look(&lok2);
look(,+70);
slot(%#enx%);
ifmatches(%GUI%,CHAT|INVENTORY);
log(&d[Macro]&c Chat ou inventario aberto !!!&6 Feche-o para continuar);
do;
ifmatches(%GUI%,CHAT|INVENTORY);
else;
#s=1;
endif;
until(%#s%=1);
endif;
keydown(forward);
key(use);
if(%DURABILITY%<20);
inc(#enx,1);
if(%#enx%=10);
keyup(forward);
keyup(sneak);
log(&d[Macro]&c Reparando enxadas...);
}$$
/sethome reptemp
/home repen
$${
wait(%#delay%);
#enx=1;
do;
slot(%#enx%);
do(3);
key(use);
loop;
inc(#enx,1);
until(%#enx%=10);
#enx=1;
log(&d[Macro]&c Enxadas reparadas!!!);
//verifica o inventario
gui(inventory);
wait(500ms);
getslotitem(35,#ir,#qir);
if(%#qir%=0);
gui();
}$$
/home repen
$${
wait(%#delay%);
ifmatches(%DIRECTION%,N);&dir=NORTH;endif;
ifmatches(%DIRECTION%,S);&dir=SOUTH;endif;
ifmatches(%DIRECTION%,W);&dir=WEST;endif;
ifmatches(%DIRECTION%,E);&dir=EAST;endif;
do;
look(%&dir%);
//f1-a
if(%#bau%=1);look(-35,-35);endif;
if(%#bau%=2);look(-13,-40);endif;
if(%#bau%=3);look(+13,-40);endif;
if(%#bau%=4);look(+35,-35);endif;
//f2-a
if(%#bau%=5);look(-35,-20);endif;
if(%#bau%=6);look(-13,-25);endif;
if(%#bau%=7);look(+13,-25);endif;
if(%#bau%=8);look(+35,-20);endif;
//f3-a
if(%#bau%=9);look(-35,+5);endif;
if(%#bau%=10);look(-13,+10);endif;
if(%#bau%=11);look(+13,+10);endif;
if(%#bau%=12);look(+35,+5);endif;
//f4-a
if(%#bau%=13);look(-35,+20);endif;
if(%#bau%=14);look(-13,+25);endif;
if(%#bau%=15);look(+13,+25);endif;
if(%#bau%=16);look(+35,+20);endif;
wait(1);
key(use);
wait(2);
for(#i,0,53);
slotclick(%#i%,l,true);
wait(100ms);
next;
getslotitem(54,#id,#stack);
wait(250ms);
ifmatches(%#stack%,0);
gui();
wait(250ms);
#bau=%#bau%+1;
else;
gui();
endif;
if(%#bau%=17);
log(&d[Macro]&c Acabo os baus !!!);
log(&d[Macro]&6 Finalizando macro !!!);
unset(rep);
stop;
endif;
until(%#stack%!=0);
else;
gui();
endif;
}$$
/home reptemp
$${
wait(%#delay%);
endif;
endif;
while((%HITID%="dirt")|(%HITID%="farmland"));
keyup(forward);
look(+180,);
ifmatches(%DIRECTION%,N);#cord=%XPOS%;endif;
ifmatches(%DIRECTION%,S);#cord=%XPOS%;endif;
ifmatches(%DIRECTION%,E);#cord=%ZPOS%;endif;
ifmatches(%DIRECTION%,W);#cord=%ZPOS%;endif;
do;
ifmatches(%DIRECTION%,N);#cord1=%XPOS%;endif;
ifmatches(%DIRECTION%,S);#cord1=%XPOS%;endif;
ifmatches(%DIRECTION%,E);#cord1=%ZPOS%;endif;
ifmatches(%DIRECTION%,W);#cord1=%ZPOS%;endif;
keydown(%&ld2%);
keydown(sneak);
if(%#temp%=50);
break;
else;
inc(#temp,1);
endif;
while(%#cord%=%#cord1%);
keyup(%&ld2%);
keyup(sneak);
endif;
until(%#cord%=%#cord1%);
inc(#nt,1);
until(%#nt%>%#andar%);
log(&d[Macro]&c Fim do ultimo andar !!!);
log(&d[Macro]&c Voltando ao primeiro andar !!!);
#nt=1;
loop;
endif;
}$$