$${
if(pot);
unset(pot);
log("&6&l[MACRO] &bAuto-pot &4OFF, &7Macro feito por Eduarte");
stop();
else;
set(pot);
log("&6&l[MACRO] &bAuto-pot &aON, &7Macro feito por Eduarte");
endif;
prompt(#vezes,$$?,"Quantos baus simples deseja fazer?. Maximo 6 baus");
log("fazendo %#vezes% baus de pots");
#bau=1;
do(%#vezes%);
log("&6&lPegando os frascos");
do;
look(north);wait(5ms);look(-35,+20);
key(use);
wait(3);
until(%GUI%="GUICHEST");
for(#slot,0,53);
getslotitem(%#slot%,#id,#stack);
if(%#stack%!=0);
slotclick(%#slot%,l,true);
break;
endif;
next;
wait(1);
gui();
log("&6&lPegando os fungos");
do;
look(north);wait(5ms);look(-20,+20);
key(use);
wait(3);
until(%GUI%="GUICHEST");
#temp=54;
for(#slot,0,53);
getslotitem(%#slot%,#id,#stack);
if(%#stack%!=0);
slotclick(%#slot%);
wait(150ms);
slotclick(%#temp%);
wait(150ms);
inc(#temp);
if(%#temp%>62);
break;
endif;
endif;
next;
wait(1);
gui();
log("&6&lEnchendo de água os frascos");
slot(9);
do(32);
look(north);
look(+0,+70);
pick(374);
key(use);
wait(500ms);
loop;
log("&6&lColocando frascos e fungo na mesa de pot");
#mesa=1;
#slot=13;
#slot_fungo=4;
do(9);
do;
if(%#mesa%=1);look(north);wait(5ms);look(-42,+42);endif;
if(%#mesa%=2);look(north);wait(5ms);look(-28,+50);endif;
if(%#mesa%=3);look(north);wait(5ms);look(+0,+50);endif;
if(%#mesa%=4);look(north);wait(5ms);look(+28,+50);endif;
if(%#mesa%=5);look(north);wait(5ms);look(+42,+42);endif;
if(%#mesa%=6);look(north);wait(5ms);look(-60,+48);endif;
if(%#mesa%=7);look(north);wait(5ms);look(-48,+58);endif;
if(%#mesa%=8);look(north);wait(5ms);look(+48,+58);endif;
if(%#mesa%=9);look(north);wait(5ms);look(+60,+48);endif;
wait(50ms);
key(use);
wait(3);
until(%GUI%="GUIBREWINGSTAND");
inc(#mesa);
do(3);
slotclick(%#slot%,l,true);
inc(#slot);
wait(100ms);
loop;
slotclick(%#slot_fungo%,l,true);
inc(#slot_fungo);
wait(250ms);gui();wait(250ms);
loop;
log("&6&lPegando ingredientes");
#temp=54;
#ingrediente=1;
do(2);
#fim=%#temp%+9;
do;
if(%#ingrediente%=1);look(north);wait(5ms);look(+0,+25);endif;
if(%#ingrediente%=2);look(north);wait(5ms);look(+20,+22);endif;
key(use);
wait(3);
until(%GUI%="GUICHEST");
inc(#ingrediente);
for(#slot,0,53);
getslotitem(%#slot%,#id,#stack);
if(%#stack%!=0);
slotclick(%#slot%);
wait(150ms);
slotclick(%#temp%);
wait(150ms);
inc(#temp);
if(%#temp%=%#fim%);
break;
endif;
endif;
next;
wait(1);
gui();
loop;
log("&6&lColocando ingredientes nas mesas de pot");
#slot=4;
do(2);
#mesa=1;
do(9);
do;
if(%#mesa%=1);look(north);wait(5ms);look(-42,+42);endif;
if(%#mesa%=2);look(north);wait(5ms);look(-28,+50);endif;
if(%#mesa%=3);look(north);wait(5ms);look(+0,+50);endif;
if(%#mesa%=4);look(north);wait(5ms);look(+28,+50);endif;
if(%#mesa%=5);look(north);wait(5ms);look(+42,+42);endif;
if(%#mesa%=6);look(north);wait(5ms);look(-60,+48);endif;
if(%#mesa%=7);look(north);wait(5ms);look(-48,+58);endif;
if(%#mesa%=8);look(north);wait(5ms);look(+48,+58);endif;
if(%#mesa%=9);look(north);wait(5ms);look(+60,+48);endif;
wait(50ms);
key(use);
wait(3);
until(%GUI%="GUIBREWINGSTAND");
inc(#mesa);
slotclick(%#slot%,l,true);
inc(#slot);
wait(250ms);gui();wait(250ms);
loop;
loop;
log("&6&lColetando as pots");
#mesa=1;
do(9);
do;
if(%#mesa%=1);look(north);wait(5ms);look(-42,+42);endif;
if(%#mesa%=2);look(north);wait(5ms);look(-28,+50);endif;
if(%#mesa%=3);look(north);wait(5ms);look(+0,+50);endif;
if(%#mesa%=4);look(north);wait(5ms);look(+28,+50);endif;
if(%#mesa%=5);look(north);wait(5ms);look(+42,+42);endif;
if(%#mesa%=6);look(north);wait(5ms);look(-60,+48);endif;
if(%#mesa%=7);look(north);wait(5ms);look(-48,+58);endif;
if(%#mesa%=8);look(north);wait(5ms);look(+48,+58);endif;
if(%#mesa%=9);look(north);wait(5ms);look(+60,+48);endif;
wait(50ms);
key(use);
wait(3);
until(%GUI%="GUIBREWINGSTAND");
inc(#mesa);
for(#slot,0,2);
slotclick(%#slot%,l,true);
wait(100ms);
next;
wait(250ms);gui();wait(250ms);
loop;
log("&6&lGuardando as pots");
do;
do;
if(%#bau%=1);look(north);wait(5ms);look(+38,+20);endif;
if(%#bau%=2);look(north);wait(5ms);look(+38,+0);endif;
if(%#bau%=3);look(north);wait(5ms);look(+38,-15);endif;
wait(50ms);
key(use);
wait(3);
until(%GUI%="GUICHEST");
for(#slot,54,89);
getslotitem(%#slot%,#id,#stack);
if(%#stack%!=0);
slotclick(%#slot%,l,true);
wait(150ms);
endif;
next;
getslotitem(53,#id,#stack);
if(%#stack%!=0);
inc(#bau);
if(%#bau%>3);
break;
endif;
endif;
gui();
wait(500ms);
until(%#stack%=0);
loop;
unset(pot);
log("&6&lPots feitas");
}$$