$${
if(nav);
keyup(forward);keyup(jump);log("");log("&6->&7Macro Desativado");log("");
unset(nav);
stop();
else;
log("");log("&6->&7Macro Ativado");log("");
set(nav);
endif;
//cte's
#tg0=0;
#tg1=19891;
#tg2=41421;
#tg3=66818;
#tg4=100000;
#tg5=149660;
#tg6=241421;
#tg7=502733;
#tg8=1000000;
set(&xpos,"");set(&zpos,"");
unset(xpos);unset(zpos);unset(key0);unset(key1);unset(key2);unset(key3);unset(key4);unset(key5);unset(key6);unset(key7);unset(key8);unset(key9);unset(keyback);unset(keyreturn);unset(keysubtract);
log("");log("&6Navegação Ativada");log("&7Digite X e Z");log("");achievementget("Digite X:",345);
do;
set(#xpos,%&xpos%);
if(((KEY_0)||(KEY_NUMPAD0))&&(!key0));
set(&xpos,"%&xpos%0");
achievementget("X: %&xpos%",345);
set(key0);
elseif((!KEY_0)&&(!KEY_NUMPAD0));
unset(key0);
endif;
if(((KEY_1)||(KEY_NUMPAD1))&&(!key1));
set(&xpos,"%&xpos%1");
achievementget("X: %&xpos%",345);
set(key1);
elseif((!KEY_1)&&(!KEY_NUMPAD1));
unset(key1);
endif;
if(((KEY_2)||(KEY_NUMPAD2))&&(!key2));
set(&xpos,"%&xpos%2");
achievementget("X: %&xpos%",345);
set(key2);
elseif((!KEY_2)&&(!KEY_NUMPAD2));
unset(key2);
endif;
if(((KEY_3)||(KEY_NUMPAD3))&&(!key3));
set(&xpos,"%&xpos%3");
achievementget("X: %&xpos%",345);
set(key3);
elseif((!KEY_3)&&(!KEY_NUMPAD3));
unset(key3);
endif;
if(((KEY_4)||(KEY_NUMPAD4))&&(!key4));
set(&xpos,"%&xpos%4");
achievementget("X: %&xpos%",345);
set(key4);
elseif((!KEY_4)&&(!KEY_NUMPAD4));
unset(key4);
endif;
if(((KEY_5)||(KEY_NUMPAD5))&&(!key5));
set(&xpos,"%&xpos%5");
achievementget("X: %&xpos%",345);
set(key5);
elseif((!KEY_5)&&(!KEY_NUMPAD5));
unset(key5);
endif;
if(((KEY_6)||(KEY_NUMPAD6))&&(!key6));
set(&xpos,"%&xpos%6");
achievementget("X: %&xpos%",345);
set(key6);
elseif((!KEY_6)&&(!KEY_NUMPAD6));
unset(key6);
endif;
if(((KEY_7)||(KEY_NUMPAD7))&&(!key7));
set(&xpos,"%&xpos%7");
achievementget("X: %&xpos%",345);
set(key7);
elseif((!KEY_7)&&(!KEY_NUMPAD7));
unset(key7);
endif;
if(((KEY_8)||(KEY_NUMPAD8))&&(!key8));
set(&xpos,"%&xpos%8");
achievementget("X: %&xpos%",345);
set(key8);
elseif((!KEY_8)&&(!KEY_NUMPAD8));
unset(key8);
endif;
if(((KEY_9)||(KEY_NUMPAD9))&&(!key9));
set(&xpos,"%&xpos%9");
achievementget("X: %&xpos%",345);
set(key9);
elseif((!KEY_9)&&(!KEY_NUMPAD9));
unset(key9);
endif;
if(((KEY_SUBTRACT)||(KEY_MINUS))&&(!keysubtract));
set(&xpos,"%&xpos%-");
achievementget("X: %&xpos%",345);
set(keysubtract);
elseif((!KEY_SUBTRACT)&&(!KEY_MINUS));
unset(keysubtract);
endif;
if((KEY_BACK)&&(!keyback));
set(&xpos,"");
achievementget("X: ",345);
set(keyback);
elseif(!KEY_BACK);
unset(keyback);
endif;
if((KEY_RETURN)&&(!keyreturn));
set(xpos);
set(keyreturn);
elseif(!KEY_RETURN);
unset(keyreturn);
endif;
if((%#xpos%>=5000)||(%&xpos%="--")||(%#xpos%<=-5000));
set(&xpos,"");
achievementget("X: ",345);
endif;
until(xpos);
if((xpos)&&(%#xpos%=null)||(%#xpos%>=5000)||(%&xpos%="--")||(%#_xpos%<=-5000));
log("");
log("&6Algo está errado !");
log("&6Desligando macro..");
log("");
unset(nav);
stop;
else;
log("");
log("&7Coordenada &cX &7definida!");
log("&6X --> %&xpos%");
log("");
endif;
achievementget("Digite Z:",345);
do;
set(#zpos,%&zpos%);
if(((KEY_0)||(KEY_NUMPAD0))&&(!key0));
set(&zpos,"%&zpos%0");
achievementget("Z: %&zpos%",345);
set(key0);
elseif((!KEY_0)&&(!KEY_NUMPAD0));
unset(key0);
endif;
if(((KEY_1)||(KEY_NUMPAD1))&&(!key1));
set(&zpos,"%&zpos%1");
achievementget("Z: %&zpos%",345);
set(key1);
elseif((!KEY_1)&&(!KEY_NUMPAD1));
unset(key1);
endif;
if(((KEY_2)||(KEY_NUMPAD2))&&(!key2));
set(&zpos,"%&zpos%2");
achievementget("Z: %&zpos%",345);
set(key2);
elseif((!KEY_2)&&(!KEY_NUMPAD2));
unset(key2);
endif;
if(((KEY_3)||(KEY_NUMPAD3))&&(!key3));
set(&zpos,"%&zpos%3");
achievementget("Z: %&zpos%",345);
set(key3);
elseif((!KEY_3)&&(!KEY_NUMPAD3));
unset(key3);
endif;
if(((KEY_4)||(KEY_NUMPAD4))&&(!key4));
set(&zpos,"%&zpos%4");
achievementget("Z: %&zpos%",345);
set(key4);
elseif((!KEY_4)&&(!KEY_NUMPAD4));
unset(key4);
endif;
if(((KEY_5)||(KEY_NUMPAD5))&&(!key5));
set(&zpos,"%&zpos%5");
achievementget("Z: %&zpos%",345);
set(key5);
elseif((!KEY_5)&&(!KEY_NUMPAD5));
unset(key5);
endif;
if(((KEY_6)||(KEY_NUMPAD6))&&(!key6));
set(&zpos,"%&zpos%6");
achievementget("Z: %&zpos%",345);
set(key6);
elseif((!KEY_6)&&(!KEY_NUMPAD6));
unset(key6);
endif;
if(((KEY_7)||(KEY_NUMPAD7))&&(!key7));
set(&zpos,"%&zpos%7");
achievementget("Z: %&zpos%",345);
set(key7);
elseif((!KEY_7)&&(!KEY_NUMPAD7));
unset(key7);
endif;
if(((KEY_8)||(KEY_NUMPAD8))&&(!key8));
set(&zpos,"%&zpos%8");
achievementget("Z: %&zpos%",345);
set(key8);
elseif((!KEY_8)&&(!KEY_NUMPAD8));
unset(key8);
endif;
if(((KEY_9)||(KEY_NUMPAD9))&&(!key9));
set(&zpos,"%&zpos%9");
achievementget("Z: %&zpos%",345);
set(key9);
elseif((!KEY_9)&&(!KEY_NUMPAD9));
unset(key9);
endif;
if(((KEY_SUBTRACT)||(KEY_MINUS))&&(!keysubtract));
set(&zpos,"%&zpos%-");
achievementget("Z: %&zpos%",345);
set(keysubtract);
elseif((!KEY_SUBTRACT)&&(!KEY_MINUS));
unset(keysubtract);
endif;
if((KEY_BACK)&&(!keyback));
set(&zpos,"");
achievementget("Z: ",345);
set(keyback);
elseif(!KEY_BACK);
unset(keyback);
endif;
if((KEY_RETURN)&&(!keyreturn));
set(zpos);
set(keyreturn);
elseif(!KEY_RETURN);
unset(keyreturn);
endif;
if((%#zpos%>=5000)||(%&zpos%="--")||(%#zpos%<=-5000));
set(&zpos,"");
achievementget("Z: ",345);
endif;
until(zpos);
if((zpos)&&(%#zpos%=null)||(%#zpos%>=5000)||(%&zpos%="--")||(%#_zpos%<=-5000));
log("");
log("&6Algo está errado !");
log("&6Desligando macro..");
log("");
unset(nav);
stop;
else;
log("");
log("&7Coordenada &cZ &7definida!");
log("&6Z --> %&zpos%");
log("");
endif;
do();
if(%#xpos%>0);look(90,0);keydown(forward);endif;
if(%#xpos%<0);look(270,0);keydown(forward);endif;
if((%XPOS%>20)||(%XPOS%<-20));keyup(forward);break;endif;
loop;
#it=0;set(aindalonge);unset(perto);
do();
inc(#it,1);
#dxpos=%#xpos%-%XPOS%;#dzpos=%#zpos%-%ZPOS%;
wait(100ms);
#temp=(%#dxpos%*100000)/(%#dzpos%);
if(%#temp%<0);
#temp=%#temp%*(-1);
unset(inverter);
else;
set(inverter);
endif;
if(aindalonge);
if((%#temp%>=%#tg0%)&&(%#temp%<%#tg1%));#ang=0;endif;
if((%#temp%>=%#tg1%)&&(%#temp%<%#tg2%));#ang=11;endif;
if((%#temp%>=%#tg2%)&&(%#temp%<%#tg3%));#ang=23;endif;
if((%#temp%>=%#tg3%)&&(%#temp%<%#tg4%));#ang=34;endif;
if((%#temp%>=%#tg4%)&&(%#temp%<%#tg5%));#ang=45;endif;
if((%#temp%>=%#tg5%)&&(%#temp%<%#tg6%));#ang=56;endif;
if((%#temp%>=%#tg6%)&&(%#temp%<%#tg7%));#ang=67;endif;
if(%#temp%>=%#tg7%);#ang=79;endif;
if(inverter);#ang=%#ang%*(-1);unset(inverter);endif;
if(%#dzpos%>0);inc(#ang,180);endif;
if(%#ang%<0);inc(#ang,360);endif;
if((%#dzpos%=0)&&(%#dxpos%>0));#ang=90;endif;
if((%#dzpos%=0)&&(%#dxpos%<0));#ang=270;endif;
look(%#ang%,0);
keydown(forward);
wait(10ms);
sprint();
wait(10ms);
keydown(jump);
wait(10ms);
keyup(jump);
#temp=(%#dxpos%*%#dxpos%)+(%#dzpos%*%#dzpos%);
if(%#temp%<32);
log("");log("&7Chegando próximo !!");log("");
keyup(jump);keyup(forward);wait(50ms);
unset(aindalonge);set(perto);
endif;
endif;
unset(xok);unset(zok);
if(%#dxpos%=0);set(xok);endif;
if((perto)&&!(xok)&&!(%#dxpos%=0));
keydown(sneak);
if(%#dxpos%<0);
look(270,0);
wait(10ms);
keydown(forward);
endif;
if(%#dxpos%>0);
look(90,0);
wait(10ms);
keydown(forward);
endif;
wait(500ms);
keyup(forward);
endif;
if(%#dzpos%=0);set(zok);endif;
if((perto)&&(xok)&&!(zok)&&!(%#dzpos%=0));
keydown(sneak);
if(%#dzpos%<0);
look(0,0);
wait(10ms);
keydown(forward);
endif;
if(%#dzpos%>0);
look(180,0);
wait(10ms);
keydown(forward);
endif;
wait(500ms);
keyup(forward);
endif;
if((xok)&&(zok));
keyup(forward);keyup(sneak);
log("");log("&7Você chegou ao destino !!");log("&7Desligando navegação");log("");
unset(nav);
stop;
endif;
if(%#it%>10);
#it=0;unset(velo);
foreach(effects);
if(%EFFECTID%=1);
#temp=%EFFECTTIME%;
if(%#temp%>5);
set(velo);
else;
unset(velo);
endif;
endif;
next;
if(%HUNGER%<8);set(comer);else;unset(comer);endif;
if((comer)||!(velo));
getslot(320,#slotcomida);
if(%#slotcomida%=-1);getslot(350,#slotcomida);endif;
if(%#slotcomida%=-1);getslot(364,#slotcomida);endif;
if(%#slotcomida%=-1);getslot(366,#slotcomida);endif;
getslot(373,#slotpot);
if(!(velo)&&!(%#slotpot%=-1));
for(#slot,1,9);
slot(%#slot%);
ifmatches(%ITEMNAME%,((Potion of Swiftness)|(Poção da Agilidade)));
do(40);key(use);loop;
set(velo);
break;
endif;
next;
endif;
if((comer)&&!(%#slotcomida%=-1));
for(#slot,1,9);
slot(%#slot%);
ifmatches(%ITEM%,"^320$|^350$|^364$|^366$");
do();
key(use);
while((%HUNGER%<20)&&!(%ITEM%=0));
unset(comer);
break;
endif;
next;
endif;
slot(1);
endif;
endif;
loop;
}$$