tenho esse sóq é pra pig, mas pode usar pra qualquer outro mob, ele troca quando a durabilidade estiver no 100 se n me engano, eu usava ele especificamente pra upar machado no titan, mas ele nao para de bater mesmo se n tiver mob na frente e joga as espadas de ouro pra tras.
$${
if(sword1);
log("&4[Macro] &6Matar mobs desativado.");
unset(sword1);
stop();
else;
log("&4[Macro] &6Matar mobs ativado.");
set(sword1);
&dir = %DIRECTION%;
#un=1;
#bau=1;
set(nf);
ifmatches(%&dir%,N);&dir=NORTH;endif;
ifmatches(%&dir%,S);&dir=SOUTH;endif;
ifmatches(%&dir%,E);&dir=EAST;endif;
ifmatches(%&dir%,W);&dir=WEST;endif;
do;
if(%DURABILITY%<20);
if(%#un%=9);log("&4[Macro] &6Matar mobs desativado.");
unset(sword1);
stop();
endif;
log("&4[Macro] &6 Durabilidade baixa, espada trocada...");
look(0,90);
inc(#un);
inventoryup(1);
wait(500ms);
endif;
do(200);
look(%&dir%);
look(,-20);
wait(200ms);
key(attack);
loop;
if(nf);
wait(1);
gui(inventory);
wait(1);
getslotitem(35,#id,#stack);
NEXT;
look(+180,-);
wait(1);
#tempvar = 0;
#wl[283] = ID;
#wl[] = 283;
LOG("&3[%PLAYER%]&6Limpeza iniciada.");
FOR(#i,9,44);
GETSLOTITEM(%#i%,#item);
INDEXOF(#wl,#index,%#item%);
IF((#index != -1) && (%#item% != 0));
SLOTCLICK(%#i%);
SLOTCLICK(-999);
WAIT(60ms);
ENDIF;
NEXT;
if(%#stack%=0);
}$$ $${
gui();
else;
do;
wait(1);}$$
$${if(%#bau%=1);}$$
/home bau1
$${endif;}$$
$${if(%#bau%=2);}$$
/home bau2
$${endif;}$$
$${if(%#bau%=3);}$$
/home bau3
$${endif;}$$
$${if(%#bau%=4);}$$
/home bau4
$${endif;}$$
$${if(%#bau%=5);}$$
/home bau5
$${endif;}$$
$${if(%#bau%=6);}$$
/home bau6
$${endif;}$$
$${if(%#bau%=7);}$$
/home bau7
$${endif;}$$
$${if(%#bau%=8);}$$
/home bau8
$${endif;}$$
$${if(%#bau%=9);}$$
/home bau9
$${endif;}$$
$${wait(15);
key(use);
wait(1);
for(#i,54,80);
slotclick(%#i%,l,true);
wait(30ms);
next;
wait(500ms);
getslotitem(53,#id,#stack);
wait(500ms);
if(%#stack%!=0);
inc(#bau);
endif;
if(%#bau%=9);
unset(nf);
log(&4[Macro] &6Baús cheios! Apenas matará mobs agora.);
gui();
else;
gui();
endif;
until(%#stack%=0);}$$
/home meumob
$${endif;
endif;
loop;
endif;
}$$