$${
if(edu_esc2);
log("&4[MACRO] &2Escavacao lucrosa [&4OFF&2]");
achievementget("Macro feito por Eduarte",277);
unset(edu_esc2);
unset(@economia);
unset(@crazy);
stop();
else;
log("&4[MACRO] &2Escavacao lucrosa [ON]");
set(edu_esc2);
set(@economia);
set(@crazy);
endif;
IFMATCHES(%DIRECTION%,N);&edu_direction = NORTH;ENDIF;
IFMATCHES(%DIRECTION%,S);&edu_direction = SOUTH;ENDIF;
IFMATCHES(%DIRECTION%,W);&edu_direction = WEST;ENDIF;
IFMATCHES(%DIRECTION%,E);&edu_direction = EAST;ENDIF;
//variaveis gerais
#edu_bloco=13;
//variaveis baus
#bau_dima=1;
#bau_bar=1;
#bau_bone1=1;
#bau_bone2=1;
#bau_polvora1=1;
#bau_polvora2=1;
#bau_disco1=1;
#bau_disco2=1;
//variaveis venda
#venda_bone=0;
#venda_polvora=0;
#venda_disco=0;
#last_venda=1;
do;
//primeira etapa
do(40);
do(10);
look(%&edu_direction%);look(,55);
pick(%#edu_bloco%);key(use);wait(1ms);
pick(277);key(attack);
if(@economia2);unset(@economia2);wait(6);
endif
loop;
if(%DURABILITY%<250);
gui();
GETSLOTITEM(8,#idd,#stack);
if(%#idd%=0);
wait(5);echo(/bau);wait(7);gui();wait(2);
endif;
do(10);
look(%&edu_direction%);look(,90);pick(277);key(use);wait(1);
log("&6&lReparando");
until(%DURABILITY%>250);
endif;
if(%HITID%=87);
pick(278);key(attack);wait(3);
endif;
loop;
//primeira etapa
gui(inventory);
wait(800ms);
getslotitem(39,#id);
if(%#id%!=%#edu_bloco%);
#edu_clear=1;
endif;
wait(50ms);
getslotitem(34,#id,#stack);
gui();
wait(200ms);
if((%#stack%=0)&&(%#edu_clear%=0));
else;
//grande else
#edu_clear=0;
do;}$$/home bausesc$${wait(5);getidrel(0,-1,0,#antbug);until(%#antbug%=35);
look(WEST);wait(2ms);
gui(inventory);
wait(600ms);
for(#pes,11,44);
GETSLOTITEM(%#pes%,#id,#stack);
if((%#id%=%#edu_bloco%)||(%#id%=277)||(%#id%=387)||(%#id%=264)||(%#id%=0)||(%#id%=278)||(%#id%=352)||(%#id%=289)||(%#id%=2267));
else;
slotclick(%#pes%);
slotclick(-999);
wait(100ms);
endif;
next;
gui();
wait(1);
//guardando dimas
log("&bGuardando diamantes/livros");
do;
do;
if(%#bau_dima%=1);look(WEST);wait(2ms);look(-35,32);endif;
if(%#bau_dima%=2);look(WEST);wait(2ms);look(-20,36);endif;
if(%#bau_dima%=3);look(WEST);wait(2ms);look(-,38);endif;
if(%#bau_dima%=4);look(WEST);wait(2ms);look(287,36);endif;
if(%#bau_dima%=5);look(WEST);wait(2ms);look(305,32);endif;
wait(100ms);
key(use);
wait(3);
ifmatches(%GUI%,Chest);break;endif;
loop;
getslotitem(53,#id,#stack);
if(%#stack%=0);
for(#slotn,56,87);
GETSLOTITEM(%#slotn%,#id,#stack);
if((%#id%=264)||(%#id%=387));
slotclick(%#slotn%,l,true);
wait(100ms);
endif;
next;
endif;
getslotitem(53,#id,#stack);
wait(100ms);
if(%#stack%!=0);
inc(#bau_dima);
endif;
gui();
if(%#bau_dima%>5);
#bau_dima=1;
endif;
until(%#stack%=0);
//guardando ossos
log("&fGuardando ossos");
do;
do;
if(%#bau_bone1%=1);look(WEST);wait(2ms);look(-35,18);endif;
if(%#bau_bone1%=2);look(WEST);wait(2ms);look(-20,20);endif;
if(%#bau_bone1%=3);look(WEST);wait(2ms);look(-,23);endif;
if(%#bau_bone1%=4);look(WEST);wait(2ms);look(287,20);endif;
if(%#bau_bone1%=5);look(WEST);wait(2ms);look(305,18);endif;
wait(100ms);
key(use);
wait(3);
ifmatches(%GUI%,Chest);break;endif;
loop;
getslotitem(53,#id,#stack);
if(%#stack%=0);
for(#slotn,56,87);
GETSLOTITEM(%#slotn%,#id,#stack);
if(%#id%=352);
slotclick(%#slotn%,l,true);
wait(100ms);
endif;
next;
endif;
getslotitem(53,#id,#stack);
wait(100ms);
if(%#stack%!=0);
inc(#bau_bone1);
endif;
gui();
if(%#bau_bone1%>5);
#venda_bone=1;
break;
endif;
until(%#stack%=0);
//guardando polvora
log("&8Guardando polvoras");
do;
do;
if(%#bau_polvora1%=1);look(WEST);wait(2ms);look(-35,3);endif;
if(%#bau_polvora1%=2);look(WEST);wait(2ms);look(-20,3);endif;
if(%#bau_polvora1%=3);look(WEST);wait(2ms);look(-,3);endif;
if(%#bau_polvora1%=4);look(WEST);wait(2ms);look(290,3);endif;
if(%#bau_polvora1%=5);look(WEST);wait(2ms);look(305,3);endif;
wait(100ms);
key(use);
wait(3);
ifmatches(%GUI%,Chest);break;endif;
loop;
getslotitem(53,#id,#stack);
if(%#stack%=0);
for(#slotn,56,87);
GETSLOTITEM(%#slotn%,#id,#stack);
if(%#id%=289);
slotclick(%#slotn%,l,true);
wait(100ms);
endif;
next;
endif;
getslotitem(53,#id,#stack);
wait(100ms);
if(%#stack%!=0);
inc(#bau_polvora1);
endif;
gui();
if(%#bau_polvora1%>5);
#venda_polvora=1;
break;
endif;
until(%#stack%=0);
//guardando discos
log("&9Guardando Discos");
do;
do;
if(%#bau_disco1%=1);look(WEST);wait(2ms);look(-38,-15);endif;
if(%#bau_disco1%=2);look(WEST);wait(2ms);look(-20,-15);endif;
if(%#bau_disco1%=3);look(WEST);wait(2ms);look(-,-15);endif;
if(%#bau_disco1%=4);look(WEST);wait(2ms);look(288,-15);endif;
if(%#bau_disco1%=5);look(WEST);wait(2ms);look(305,-13);endif;
wait(100ms);
key(use);
wait(3);
ifmatches(%GUI%,Chest);break;endif;
loop;
getslotitem(53,#id,#stack);
if(%#stack%=0);
for(#slotn,56,87);
GETSLOTITEM(%#slotn%,#id,#stack);
if(%#id%=2267);
slotclick(%#slotn%,l,true);
wait(100ms);
endif;
next;
endif;
getslotitem(53,#id,#stack);
wait(100ms);
if(%#stack%!=0);
inc(#bau_disco1);
endif;
gui();
if(%#bau_disco1%>5);
#venda_disco=1;
break;
endif;
until(%#stack%=0);
//vendendo ossos
if(%#venda_bone%=1);
log("&fIniciando vendas dos ossos");
do;
do;
if(%#bau_bone2%=1);look(WEST);wait(2ms);look(-35,18);endif;
if(%#bau_bone2%=2);look(WEST);wait(2ms);look(-20,20);endif;
if(%#bau_bone2%=3);look(WEST);wait(2ms);look(-,23);endif;
if(%#bau_bone2%=4);look(WEST);wait(2ms);look(287,20);endif;
if(%#bau_bone2%=5);look(WEST);wait(2ms);look(305,18);endif;
wait(100ms);
key(use);
wait(3);
ifmatches(%GUI%,Chest);break;endif;
loop;
getslotitem(53,#id,#stack);
if(%#stack%!=0)
for(#slot,0,53);
getslotitem(%#slot%,#id,#stack);
if(%#id%=352);
slotclick(%#slot%,l,true);wait(100ms);
endif;
next;
endif;
getslotitem(53,#id,#stack);
wait(500ms);
if((%#bau_bone2%=5)&&(%#stack%=0)&&(%#last_venda%= 1));
#stack=1;
#last_venda=0;
endif;
if(%#stack%=0);
inc(#bau_bone2);gui();wait(100ms);
else;
echo(/warp vip);
wait(5);
do(1000);
if(%YPOS%=4);echo(/warp vip);wait(7);endif;if(%YPOS%=5);break();wait(5);endif;loop;
do(300);
look(south);look(,60);keydown(forward);
if(%HITID%=54);keydown(jump);wait(400ms);keyup(jump);wait(200ms);endif;
UNTIL(%ZPOS%=685);
keydown(sneak);wait(20ms);keyup(sneak);keyup(forward);wait(100ms);
do(550);
look(east);look(,60);keydown(forward);
if((%HITID%=86)||(%HITID%=54));keydown(jump);wait(400ms);keyup(jump);wait(200ms);endif;
UNTIL(%XPOS%=737);wait(300ms);keyup(forward);
look(east);look(,78);@#crazy2=0;
do(20);key(attack);wait(200ms);until(%@#crazy2%=1);look(east);wait(1);@#crazy2=0;
do(30);key(attack);wait(200ms);until(%@#crazy2%=1);
do;}$$/home bausesc$${wait(5);getidrel(0,-1,0,#antbug);until(%#antbug%=35);
endif;
if(%#bau_bone2%>5);
#venda_bone=0;
#bau_bone2=1;
#bau_bone1=1;
#last_venda=1;
#stack=0;
log("&f&lvenda dos ossos concluida");
break;
endif;
loop;
endif;
//vendendo polvora
if(%#venda_polvora%=1);
log("&8iniciando venda das polvoras");
do;
do;
if(%#bau_polvora2%=1);look(WEST);wait(2ms);look(-35,3);endif;
if(%#bau_polvora2%=2);look(WEST);wait(2ms);look(-20,3);endif;
if(%#bau_polvora2%=3);look(WEST);wait(2ms);look(-,3);endif;
if(%#bau_polvora2%=4);look(WEST);wait(2ms);look(290,3);endif;
if(%#bau_polvora2%=5);look(WEST);wait(2ms);look(305,3);endif;
wait(100ms);
key(use);
wait(3);
ifmatches(%GUI%,Chest);break;endif;
loop;
getslotitem(53,#id,#stack);
if(%#stack%!=0)
for(#slot,0,53);
getslotitem(%#slot%,#id,#stack);
if(%#id%=289);
slotclick(%#slot%,l,true);wait(100ms);
endif;
next;
endif;
getslotitem(53,#id,#stack);
wait(500ms);
if((%#bau_polvora2%=5)&&(%#stack%=0)&&(%#last_venda%= 1));
#stack=1;
#last_venda=0;
endif;
if(%#stack%=0);
inc(#bau_polvora2);gui();wait(100ms);
else;
//venda polvora
echo(/warp vip);
wait(5);
do(1000);
if(%YPOS%=4);echo(/warp vip);wait(7);endif;if(%YPOS%=5);break();wait(5);endif;loop;
do(300);
look(west);look(,60);keydown(forward);
if(%HITID%=54);keydown(jump);wait(400ms);keyup(jump);wait(200ms);endif;
UNTIL(%XPOS%=684);
keydown(sneak);wait(20ms);keyup(sneak);keyup(forward);wait(100ms);
do(300);
look(north);look(,60);keydown(forward);
if(%HITID%=54);keydown(jump);wait(400ms);keyup(jump);wait(200ms);endif;
UNTIL(%ZPOS%=636);
wait(300ms);keyup(forward);wait(100ms);
do(100);
look(west);look(,60);keydown(forward);
UNTIL(%XPOS%=681);
keydown(sneak);wait(20ms);keyup(sneak);keyup(forward);wait(100ms);
look(north);look(,78);@#crazy2=0;
do(20);key(attack);wait(200ms);until(%@#crazy2%=1);look(north);wait(1);@#crazy2=0;
do(30);key(attack);wait(200ms);until(%@#crazy2%=1);
do;}$$/home bausesc$${wait(5);getidrel(0,-1,0,#antbug);until(%#antbug%=35);
endif;
if(%#bau_polvora2%>5);
#venda_polvora=0;
#bau_polvora2=1;
#bau_polvora1=1;
#last_venda=1;
#stack=0;
log("&7&lvenda das polvoras concluida");
break;
endif;
loop;
endif;
//vendendo discos
if(%#venda_disco%=1);
log("&9Iniciando venda dos discos");
do;
do;
if(%#bau_disco2%=1);look(WEST);wait(2ms);look(-38,-15);endif;
if(%#bau_disco2%=2);look(WEST);wait(2ms);look(-20,-15);endif;
if(%#bau_disco2%=3);look(WEST);wait(2ms);look(-,-15);endif;
if(%#bau_disco2%=4);look(WEST);wait(2ms);look(288,-15);endif;
if(%#bau_disco2%=5);look(WEST);wait(2ms);look(305,-13);endif;
wait(100ms);
key(use);
wait(3);
ifmatches(%GUI%,Chest);break;endif;
loop;
getslotitem(53,#id,#stack);
if(%#stack%!=0)
for(#slot,0,53);
getslotitem(%#slot%,#id,#stack);
if(%#id%=2267);
slotclick(%#slot%,l,true);wait(100ms);
endif;
next;
endif;
getslotitem(53,#id,#stack);
wait(500ms);
if((%#bau_disco2%=5)&&(%#stack%=0)&&(%#last_venda%= 1));
#stack=1;
#last_venda=0;
endif;
if(%#stack%=0);
inc(#bau_disco2);gui();wait(100ms);
else;
//venda disco
echo(/warp vip);
wait(5);
do(1000);
if(%YPOS%=4);echo(/warp vip);wait(7);endif;if(%YPOS%=5);break();wait(5);endif;loop;
do(120);keydown(forward);look(EAST);look(,60);
if(%HITID%=54);keydown(jump);wait(400ms);keyup(jump);wait(200ms);endif;
if(%XPOS%=714);keydown(sneak);endif;until(%XPOS%=715);wait(350ms);
keyup(sneak);keyup(forward);
do(300);keydown(forward);look(NORTH);look(,60);
if(%HITID%=54);keydown(jump);wait(400ms);keyup(jump);wait(200ms);endif;
if(%ZPOS%=633);keydown(sneak);endif;until(%ZPOS%=632);wait(350ms);
keyup(sneak);keyup(forward);
look(west);@#crazy2=0;
do(20);key(attack);wait(200ms);until(%@#crazy2%=1);look(west);look(,-63);wait(1);@#crazy2=0;
do(30);key(attack);wait(200ms);until(%@#crazy2%=1);
do;}$$/home bausesc$${wait(5);getidrel(0,-1,0,#antbug);until(%#antbug%=35);
endif;
if(%#bau_disco2%>5);
#venda_disco=0;
#bau_disco2=1;
#bau_disco1=1;
#last_venda=1;
#stack=0;
log("&1&lvenda dos discos concluida");
break;
endif;
loop;
endif;
do;}$$/home trapesc$${wait(5);getidrel(0,-1,0,#antbug);until(%#antbug%=42);
key(attack);wait(500ms);gui(inventory);wait(100ms);
gui(inventory);
wait(600ms);
for(#slot,11,35);
GETSLOTITEM(%#slot%,#id,#stack);
if(%#id%=%#edu_bloco%);
slotclick(%#slot%,l,true);wait(70ms);
endif;
next;
getslotitem(39,#id,#stack);
if(%#id%!=%#edu_bloco%);
log("Sem barro. indo pegar mais");
#pack_bar=0;
for(#slot,36,42);
getslotitem(%#slot%,#id,#stack);
if(%#stack%=0);
inc(#pack_bar,1);
log(%#pack_bar%);
endif;
next;
do;}$$/home bausesc$${gui();wait(4);getidrel(0,-1,0,#antbug);until(%#antbug%=35);
do;
do;
if(%#bau_bar%=1);;look(north);wait(100ms);look(-38,32);endif;
if(%#bau_bar%=2);look(north);wait(100ms);look(-20,37);endif;
if(%#bau_bar%=3);look(north);wait(100ms);look(0,39);endif;
if(%#bau_bar%=4);look(north);wait(100ms);look(20,37);endif;
if(%#bau_bar%=5);look(north);wait(100ms);look(38,32);endif;
wait(100ms);
key(use);
wait(3);
ifmatches(%GUI%,Chest);break;endif;
loop;
for(#slot,0,53);
getslotitem(%#slot%,#id,#stack);
if(%#id%=%#edu_bloco%);
slotclick(%#slot%,l,true);wait(100ms);
dec(#pack_bar,1);
log(%#pack_bar%);
endif;
if(%#pack_bar%<1);
break;
endif;
next;
if(%#slot%!=53);
%2