$${
if(on);
log("&6[Macro] &bConstrutor &4[Off]");
keyup(forward);
keyup(back);
keyup(sneak);
unset(on);
stop;
else;
set(on);
log("&6[Macro] &bConstrutor &2[On]");
//terra
//64 == 1 pack
//tabua
//1122 = 18 packs
//madeira
//300 = 5 pack
//cerca
//26 = 1 pack
//escada
//296 = 5 pack
//vidro
//108 = 2 pack
//porta
//2
//Variaveis
#d_ver = 500;
#l_side = 82;
#l_hit = 70;
#tabua = 5;
#madeira = 17;
#vidro = 20;
#terra = 3;
#escada = 135;
#porta = 324;
#cerca = 85;
unset(cancelar);
set(inv);
//Main
ifmatches(%DIRECTION%,N); &dir_1 = "NORTH"; &dir_2 = "SOUTH"; &dir_3 = "WEST"; &dir_4 = "EAST"; endif;
ifmatches(%DIRECTION%,S); &dir_1 = "SOUTH"; &dir_2 = "NORTH"; &dir_3 = "EAST"; &dir_4 = "WEST"; endif;
ifmatches(%DIRECTION%,W); &dir_1 = "WEST"; &dir_2 = "EAST"; &dir_3 = "SOUTH"; &dir_4 = "NORTH"; endif;
ifmatches(%DIRECTION%,E); &dir_1 = "EAST"; &dir_2 = "WEST"; &dir_3 = "NORTH"; &dir_4 = "SOUTH"; endif;
for(#passo,1,32);
ifmatches(%&dir_1%,"NORTH"); &l_dir[1] = EAST; &l_dir[2] = WEST; &l_dir[3] = NORTH; &l_dir[4] = SOUTH; endif;
ifmatches(%&dir_1%,"SOUTH"); &l_dir[1] = WEST; &l_dir[2] = EAST; &l_dir[3] = SOUTH; &l_dir[4] = NORTH; endif;
ifmatches(%&dir_1%,"WEST"); &l_dir[1] = NORTH; &l_dir[2] = SOUTH; &l_dir[3] = WEST; &l_dir[4] = EAST; endif;
ifmatches(%&dir_1%,"EAST"); &l_dir[1] = SOUTH; &l_dir[2] = NORTH; &l_dir[3] = EAST; &l_dir[4] = WEST; endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); &l_sid[1] = E; &l_sid[2] = W; &l_sid[3] = N; &l_sid[4] = S; endif;
ifmatches(%&dir_1%,"WEST|EAST"); &l_sid[1] = N; &l_sid[2] = S; &l_sid[3] = W; &l_sid[4] = E; endif;
if(%#passo% == 1);//Verificação de item
log("&6[Macro] &bVerificando o inventario... Aguarde um momento!");
do;
gui(inventory);
wait(%#d_ver%ms);
until(%GUI% == "GUIINVENTORY");
wait(1);
#tabua_temp = 0;
#madeira_temp = 0;
#vidro_temp = 0;
#terra_temp = 0;
#escada_temp = 0;
#porta_temp = 0;
#cerca_temp = 0;
for(#i,9,44);
getslotitem(%#i%,#item_id,#item_stack);
if(%#item_id% == %#tabua%);//Tabua
inc(#tabua_temp,%#item_stack%);
endif;
if(%#item_id% == %#madeira%);//Madeira
inc(#madeira_temp,%#item_stack%);
endif;
if(%#item_id% == %#vidro%);//Vidro
inc(#vidro_temp,%#item_stack%);
endif;
if(%#item_id% == %#terra%);//Terra
inc(#terra_temp,%#item_stack%);
endif;
if(%#item_id% == %#escada%);//Escada
inc(#escada_temp,%#item_stack%);
endif;
if(%#item_id% == %#porta%); //Porta
inc(#porta_temp,%#item_stack%);
endif;
if(%#item_id% == %#cerca%); //Cerca
inc(#cerca_temp,%#item_stack%);
endif;
wait(%#d_action%ms);
next;
gui();
if(%#tabua_temp% < 1122);//Tabua
log("&6[Macro] &fItem: &6Tabua &finsuficiente para a construção");
set(cancelar);
endif;
if(%#madeira_temp% < 300);//Madeira
log("&6[Macro] &fItem: &6Madeira &finsuficiente para a construção");
set(cancelar);
endif;
if(%#vidro_temp% < 108);//Vidro
log("&6[Macro] &fItem: &6Vidro &finsuficiente para a construção");
set(cancelar);
endif;
if(%#terra_temp% < 8);//Terra
log("&6[Macro] &fItem: &6Terra &finsuficiente para a construção");
set(cancelar);
endif;
if(%#escada_temp% < 296);//Escadas
log("&6[Macro] &fItem: &6Escadas &finsuficiente para a construção");
set(cancelar);
endif;
if(%#porta_temp% < 2);//Porta
log("&6[Macro] &fItem: &6Porta &finsuficiente para a construção");
set(cancelar);
endif;
if(%#cerca_temp% < 26);//Cerca
log("&6[Macro] &fItem: &6Porta &finsuficiente para a construção");
set(cancelar);
endif;
if(cancelar);
unset(cancelar);
break;
else;
log("&6[Macro] &bInventario pronto!");
endif;
endif;
if(%#passo% == 1);//Verificação de Terreno
#z_temp_0 = %ZPOS%;
#y_temp_0 = %YPOS%;
#x_temp_0 = %XPOS%;
ifmatches(%&dir_1%,"NORTH"); #z_temp_1 = %ZPOS% - 15; #y_temp_1 = %YPOS% + 12; #x_temp_1 = %XPOS% - 18; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp_1 = %ZPOS% + 15; #y_temp_1 = %YPOS% + 12; #x_temp_1 = %XPOS% + 18; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp_1 = %ZPOS% + 18; #y_temp_1 = %YPOS% + 12; #x_temp_1 = %XPOS% - 15; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp_1 = %ZPOS% - 18; #y_temp_1 = %YPOS% + 12; #x_temp_1 = %XPOS% + 15; endif;
log("&6[Macro] &bVerificando terreno... Aguarde um momento!");
unsafe();
for(#y,%#y_temp_0%,%#y_temp_1%);
for(#x,%#x_temp_0%,%#x_temp_1%);
for(#z,%#z_temp_0%,%#z_temp_1%);
getid(%#x%,%#y%,%#z%,#ver);
if(%#ver% != 0);
log("&6[Macro] &bBloco detectado: X: %#x% | Y: %#y% | Z: %#z%");
set(cancelar);
endif;
next;
next;
next;
endunsafe;
if(cancelar);
unset(cancelar);
break;
else;
log("&6[Macro] &bTerreno verificado! Tudo pronto para a construção");
endif;
endif;
if((%#passo% == 1)|(%#passo% == 12)|(%#passo% == 32));//construção do piso
if(%#passo% == 1);
#y_temp = %YPOS% + 1;
do;
keydown(sneak);
look(%&dir_1%);
look(,90);
keydown(jump);
wait(%#d_action%ms);
keyup(jump);
pick(%#tabua%);
key(use);
until(%YPOS% == %#y_temp%);
endif;
#cont = 0;
do;
for(#i,1,2);
if(%#passo% == 1);
if(%#i% == 1);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 18; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 18; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 18; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 18; endif;
endif;
if(%#i% == 2);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 18; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 18; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 18; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 18; endif;
endif;
#cont_temp = 15;
endif;
if(%#passo% == 12);
if(%#i% == 1);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 16; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 16; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 16; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 16; endif;
endif;
if(%#i% == 2);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 16; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 16; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 16; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 16; endif;
endif;
#cont_temp = 13;
endif;
if(%#passo% == 32);
if(%#i% == 1);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 20; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 20; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 20; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 20; endif;
endif;
if(%#i% == 2);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 20; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 20; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 20; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 20; endif;
endif;
#cont_temp = 5;
endif;
do;//fileira
keydown(sneak);
look(%&l_dir[%#i%]%);
look(,%#l_side%);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
pick(%#tabua%);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
inc(#cont);
if(%#i% == 1);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 2; endif;
endif;
if(%#i% == 2);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 2; endif;
endif;
do;
look(%&l_dir[%#i%]%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"^WEST$|^EAST$"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"^NORTH$|^SOUTH$"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
if(%#cont% == %#cont_temp%);
break;
endif;
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 1; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 1; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 1; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 1; endif;
do;
look(%&dir_2%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_2%);
look(,%#l_side%);
pick(%#tabua%);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"^WEST$|^EAST$"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"^NORTH$|^SOUTH$"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
next;
if(inv);
do;
gui(inventory);
wait(%#d_ver%ms);
until(%GUI% == "GUIINVENTORY");
wait(1);
for(#i,9,35);
slotclick(%#i%,l,true);
wait(%#d_ver%ms);
next;
gui();
wait(1);
endif;
until(%#cont% == %#cont_temp%);
endif;
if((%#passo% == 2)|(%#passo% == 4)); //construção da parede lateral
for(#i,3,4);
#y_temp = %YPOS% + 2;
do;
look(WEST);
look(,90);
keydown(sneak);
keydown(jump);
wait(%#d_action%ms);
keyup(jump);
pick(%#madeira%);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
keyup(jump);
#cont = 2;
do;
ifmatches(%#cont%,"^2$|^5$|^7$|^9$|^11$|^14$");
if(%#i% == 3);
#pick[2] = %#madeira%;
#pick[1] = %#tabua%;
endif;
if(%#i% == 4);
#pick[1] = %#madeira%;
#pick[2] = %#tabua%;
endif;
endif;
ifmatches(%#cont%,"^1$|^6$|^10$|^15$");
if(%#i% == 3);
#pick[2] = %#madeira%;
#pick[1] = %#madeira%;
endif;
if(%#i% == 4);
#pick[1] = %#madeira%;
#pick[2] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^3$|^4$|^8$|^12$|^13$");
if(%#i% == 3);
#pick[2] = %#madeira%;
#pick[1] = %#vidro%;
endif;
if(%#i% == 4);
#pick[1] = %#madeira%;
#pick[2] = %#vidro%;
endif;
endif;
look(%&l_dir[%#i%]%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
for(#j,2,1);
do;
keyup(back);
look(%&l_dir[%#i%]%);
look(,90);
wait(%#d_ver%ms);
pick(%#pick[%#j%]%);
key(use);
wait(%#d_ver%ms);
getidrel(0,-%#j%,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
inc(#cont);
endif;
until(%#cont% == 16);
next;
endif;
if(%#passo% == 3);//preparo da segunda parede
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 18; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 18; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 18; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 18; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 2; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#passo% == 5); //Descer ao primeiro andar
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 2; endif;
do;
look(%&dir_4%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 2; endif;
do;
keydown(forward);
keydown(sneak);
wait(3);
break;
loop;
keyup(forward);
endif;
if(%#passo% == 6);//parte 1 frente
for(#i,1,2);
#cont = 2;
#y_temp = %YPOS% + 2;
if(%#i% == 1);
#pick[1] = %#madeira%;
#pick[2] = %#tabua%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#tabua%;
endif;
do;
for(#j,1,2);
do;
look(%&l_dir[%#i%]%);
look(,90);
keydown(jump);
keydown(sneak);
pick(%#pick[%#j%]%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
until(%YPOS% == %#y_temp%);
do;
ifmatches(%#cont%,"^1$|^6$|^11$|^16$");
if(%#i% == 1);
#pick[1] = %#tabua%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#tabua%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^2$|^3$|^4$|^5$|^12$|^13$|^14$|^15$");
if(%#i% == 1);
#pick[1] = %#vidro%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#vidro%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^7$|^10$");
if(%#i% == 1);
#pick[1] = %#madeira%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^8$|^9$");
if(%#i% == 1);
#pick[1] = %#terra%;
#pick[2] = %#terra%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#madeira%;
endif;
endif;
look(%&l_dir[%#i%]%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
for(#j,2,1);
do;
look(%&l_dir[%#i%]%);
look(,90);
pick(%#pick[%#j%]%);
key(use);
wait(%#d_ver%ms);
getidrel(0,-%#j%,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
inc(#cont);
endif;
until(%#cont% == 17);
keyup(back);
next;
endif;
if(%#passo% == 7);//preparo frente parte 2
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 7; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 7; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 7; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 7; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 2; endif;
do;
look(%&dir_1%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
do;
look(%&dir_1%);
look(,%#l_side%);
keydown(sneak);
keydown(forward);
wait(3);
break;
loop;
keyup(forward);
endif;
if(%#passo% == 8);//parte 2 frente
for(#i,1,2);
#cont = 2; //12
if(%#i% == 1);
#pick[1] = %#tabua%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#tabua%;
#pick[1] = %#madeira%;
endif;
for(#j,2,1);
do;
look(%&dir_1%);
look(,90);
keydown(sneak);
keydown(jump);
pick(%#pick[%#j%]%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
do;
ifmatches(%#cont%,"^1$|^4$");
if(%#i% == 1);
#pick[1] = %#tabua%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#tabua%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^2$|^3$");
if(%#i% == 1);
#pick[1] = %#vidro%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#vidro%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^5$");
if(%#i% == 1);
#pick[1] = %#madeira%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#madeira%;
endif;
endif;
look(%&dir_1%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
for(#j,2,1);
do;
look(%&dir_1%);
look(,90);
pick(%#pick[%#j%]%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-%#j%,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
inc(#cont);
endif;
until(%#cont% == 6);
#cont = 1;
do;
ifmatches(%#cont%,"^1$|^2$");
if(%#i% == 1);
#pick[1] = %#terra%;
#pick[2] = %#terra%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^3$");
if(%#i% == 1);
#pick[1] = %#madeira%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#madeira%;
endif;
endif;
look(%&l_dir[%#i%]%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
for(#j,2,1);
do;
look(%&l_dir[%#i%]%);
look(,90);
pick(%#pick[%#j%]%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-%#j%,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
inc(#cont);
endif;
until(%#cont% == 4);
#cont = 1;
do;
ifmatches(%#cont%,"^1$|^4$");
if(%#i% == 1);
#pick[1] = %#tabua%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#tabua%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^2$|^3$");
if(%#i% == 1);
#pick[1] = %#vidro%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#vidro%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^5$");
if(%#i% == 1);
#pick[1] = %#madeira%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#madeira%;
endif;
endif;
look(%&dir_2%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
for(#j,2,1);
do;
look(%&dir_2%);
look(,90);
pick(%#pick[%#j%]%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-%#j%,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
inc(#cont);
endif;
until(%#cont% == 5);
next;
endif;
if(%#passo% == 9);//preparo da construção do fundo
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 5; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 5; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 5; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 5; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
wait(1);
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 14; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 14; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 14; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 14; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#passo% == 10);//construção do fundo da casa
for(#i,1,2);
#cont = 2;
#y_temp = %YPOS% + 2;
if(%#i% == 1);
#pick[1] = %#madeira%;
#pick[2] = %#tabua%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#tabua%;
endif;
do;
for(#j,1,2);
do;
look(%&l_dir[%#i%]%);
look(,90);
keydown(jump);
keydown(sneak);
pick(%#pick[%#j%]%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
until(%YPOS% == %#y_temp%);
do;
ifmatches(%#cont%,"^1$|^5$|^7$|^10$|^12$|^16$");
if(%#i% == 1);
#pick[1] = %#tabua%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#tabua%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^2$|^3$|^4$|^8$|^9$|^13$|^14$|^15$");
if(%#i% == 1);
#pick[1] = %#vidro%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#vidro%;
#pick[1] = %#madeira%;
endif;
endif;
ifmatches(%#cont%,"^6$|^11$");
if(%#i% == 1);
#pick[1] = %#madeira%;
#pick[2] = %#madeira%;
endif;
if(%#i% == 2);
#pick[2] = %#madeira%;
#pick[1] = %#madeira%;
endif;
endif;
look(%&l_dir[%#i%]%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
for(#j,2,1);
do;
look(%&l_dir[%#i%]%);
look(,90);
pick(%#pick[%#j%]%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-%#j%,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick[%#j%]%);
next;
inc(#cont);
endif;
until(%#cont% == 17);
keyup(back);
next;
endif;
if(%#passo% == 11);//preparo pra construção do teto
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 2; endif;
do;
look(%&dir_2%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_2%);
look(,%#l_side%);
pick(%#tabua%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 2; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#passo% == 13); //preparo para quebrar espaço da escada
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 7; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 7; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 7; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 7; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 3; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#passo% == 14);//quebrar espaço da escada
}$$/gamemode 0$${
&look_x[1] = -45; #look_z[1] = 29;
&look_x[2] = -30; #look_z[2] = 35;
&look_x[3] = +0; #look_z[3] = 40;
&look_x[4] = +30; #look_z[4] = 35;
&look_x[5] = -70; #look_z[5] = 35;
&look_x[6] = -40; #look_z[6] = 55;
&look_x[7] = +0; #look_z[7] = 60;
&look_x[8] = +40; #look_z[8] = 50;
ifmatches(%&dir_1%,"NORTH");
#pos_x[1] = -2; #pos_z[1] = 2;
#pos_x[2] = -2; #pos_z[2] = 1;
#pos_x[3] = -2; #pos_z[3] = 0;
#pos_x[4] = -2; #pos_z[4] = -1;
#pos_x[5] = -1; #pos_z[5] = 2;
#pos_x[6] = -1; #pos_z[6] = 1;
#pos_x[7] = -1; #pos_z[7] = 0;
#pos_x[8] = -1; #pos_z[8] = -1;
endif;
ifmatches(%&dir_1%,"SOUTH");
#pos_x[1] = 2; #pos_z[1] = -2;
#pos_x[2] = 2; #pos_z[2] = -1;
#pos_x[3] = 2; #pos_z[3] = 0;
#pos_x[4] = 2; #pos_z[4] = 1;
#pos_x[5] = 1; #pos_z[5] = -2;
#pos_x[6] = 1; #pos_z[6] = -1;
#pos_x[7] = 1; #pos_z[7] = 0;
#pos_x[8] = 1; #pos_z[8] = 1;
endif;
ifmatches(%&dir_1%,"WEST");
#pos_x[1] = 2; #pos_z[1] = 2;
#pos_x[2] = 1; #pos_z[2] = 2;
#pos_x[3] = 0; #pos_z[3] = 2;
#pos_x[4] = -1; #pos_z[4] = 2;
#pos_x[5] = 2; #pos_z[5] = 1;
#pos_x[6] = 1; #pos_z[6] = 1;
#pos_x[7] = 0; #pos_z[7] = 1;
#pos_x[8] = -1; #pos_z[8] = 1;
endif;
ifmatches(%&dir_1%,"EAST");
#pos_x[1] = -2; #pos_z[1] = -2;
#pos_x[2] = -1; #pos_z[2] = -2;
#pos_x[3] = 0; #pos_z[3] = -2;
#pos_x[4] = 1; #pos_z[4] = -2;
#pos_x[5] = -2; #pos_z[5] = -1;
#pos_x[6] = -1; #pos_z[6] = -1;
#pos_x[7] = 0; #pos_z[7] = -1;
#pos_x[8] = 1; #pos_z[8] = -1;
endif;
do(3);
for(#i,1,8);
do;
look(%&dir_3%);
look(%&look_x[%#i%]%,%#look_z[%#i%]%);
//wait(500ms);
key(attack);
getidrel(%#pos_x[%#i%]%,-1,%#pos_z[%#i%]%,#block);
until(%#block% == 0);
next;
wait(%#d_ver%ms);
loop;
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 4; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 4; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 4; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 4; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
&look_x[1] = -25; #look_z[1] = 35;
&look_x[2] = +0; #look_z[2] = 35;
&look_x[3] = +30; #look_z[3] = 30;
&look_x[4] = +45; #look_z[4] = 30;
&look_x[5] = -40; #look_z[5] = 55;
&look_x[6] = +0; #look_z[6] = 60;
&look_x[7] = +40; #look_z[7] = 50;
&look_x[8] = +65; #look_z[8] = 35;
ifmatches(%&dir_1%,"NORTH");
#pos_x[1] = -2; #pos_z[1] = 1;
#pos_x[2] = -2; #pos_z[2] = 0;
#pos_x[3] = -2; #pos_z[3] = -1;
#pos_x[4] = -2; #pos_z[4] = -2;
#pos_x[5] = -1; #pos_z[5] = 1;
#pos_x[6] = -1; #pos_z[6] = 0;
#pos_x[7] = -1; #pos_z[7] = -1;
#pos_x[8] = -1; #pos_z[8] = -2;
endif;
ifmatches(%&dir_1%,"SOUTH");
#pos_x[1] = 2; #pos_z[1] = -1;
#pos_x[2] = 2; #pos_z[2] = 0;
#pos_x[3] = 2; #pos_z[3] = 1;
#pos_x[4] = 2; #pos_z[4] = 2;
#pos_x[5] = 1; #pos_z[5] = -1;
#pos_x[6] = 1; #pos_z[6] = 0;
#pos_x[7] = 1; #pos_z[7] = 1;
#pos_x[8] = 1; #pos_z[8] = 2;
endif;
ifmatches(%&dir_1%,"WEST");
#pos_x[1] = 1; #pos_z[1] = 2;
#pos_x[2] = 0; #pos_z[2] = 2;
#pos_x[3] = -1; #pos_z[3] = 2;
#pos_x[4] = -2; #pos_z[4] = 2;
#pos_x[5] = 1; #pos_z[5] = 1;
#pos_x[6] = 0; #pos_z[6] = 1;
#pos_x[7] = -1; #pos_z[7] = 1;
#pos_x[8] = -2; #pos_z[8] = 1;
endif;
ifmatches(%&dir_1%,"EAST");
#pos_x[1] = -1; #pos_z[1] = -2;
#pos_x[2] = 0; #pos_z[2] = -2;
#pos_x[3] = 1; #pos_z[3] = -2;
#pos_x[4] = 2; #pos_z[4] = -2;
#pos_x[5] = -1; #pos_z[5] = -1;
#pos_x[6] = 0; #pos_z[6] = -1;
#pos_x[7] = 1; #pos_z[7] = -1;
#pos_x[8] = 2; #pos_z[8] = -1;
endif;
do(3);
for(#i,1,8);
do;
look(%&dir_3%);
look(%&look_x[%#i%]%,%#look_z[%#i%]%);
//wait(500ms);
key(attack);
getidrel(%#pos_x[%#i%]%,-1,%#pos_z[%#i%]%,#block);
until(%#block% == 0);
next;
wait(%#d_ver%ms);
loop;
&look_x[1] = +45; #look_z[1] = 29;
&look_x[2] = +30; #look_z[2] = 35;
&look_x[3] = +0; #look_z[3] = 40;
&look_x[4] = -30; #look_z[4] = 35;
&look_x[5] = +70; #look_z[5] = 35;
&look_x[6] = +60; #look_z[6] = 55;
&look_x[7] = +0; #look_z[7] = 60;
&look_x[8] = -40; #look_z[8] = 50;
ifmatches(%&dir_1%,"NORTH");
#pos_x[1] = 2; #pos_z[1] = 2;
#pos_x[2] = 2; #pos_z[2] = 1;
#pos_x[3] = 2; #pos_z[3] = 0;
#pos_x[4] = 2; #pos_z[4] = -1;
#pos_x[5] = 1; #pos_z[5] = 2;
#pos_x[6] = 1; #pos_z[6] = 1;
#pos_x[7] = 1; #pos_z[7] = 0;
#pos_x[8] = 1; #pos_z[8] = -1;
endif;
ifmatches(%&dir_1%,"SOUTH");
#pos_x[1] = -2; #pos_z[1] = -2;
#pos_x[2] = -2; #pos_z[2] = -1;
#pos_x[3] = -2; #pos_z[3] = 0;
#pos_x[4] = -2; #pos_z[4] = 1;
#pos_x[5] = -1; #pos_z[5] = -2;
#pos_x[6] = -1; #pos_z[6] = -1;
#pos_x[7] = -1; #pos_z[7] = 0;
#pos_x[8] = -1; #pos_z[8] = 1;
endif;
ifmatches(%&dir_1%,"WEST");
#pos_x[1] = 2; #pos_z[1] = -2;
#pos_x[2] = 1; #pos_z[2] = -2;
#pos_x[3] = 0; #pos_z[3] = -2;
#pos_x[4] = -1; #pos_z[4] = -2;
#pos_x[5] = 2; #pos_z[5] = -1;
#pos_x[6] = 1; #pos_z[6] = -1;
#pos_x[7] = 0; #pos_z[7] = -1;
#pos_x[8] = -1; #pos_z[8] = -1;
endif;
ifmatches(%&dir_1%,"EAST");
#pos_x[1] = -2; #pos_z[1] = 2;
#pos_x[2] = -1; #pos_z[2] = 2;
#pos_x[3] = 0; #pos_z[3] = 2;
#pos_x[4] = 1; #pos_z[4] = 2;
#pos_x[5] = -2; #pos_z[5] = 1;
#pos_x[6] = -1; #pos_z[6] = 1;
#pos_x[7] = 0; #pos_z[7] = 1;
#pos_x[8] = 1; #pos_z[8] = 1;
endif;
do(3);
for(#i,1,8);
do;
look(%&dir_4%);
look(%&look_x[%#i%]%,%#look_z[%#i%]%);
//wait(500ms);
key(attack);
getidrel(%#pos_x[%#i%]%,-1,%#pos_z[%#i%]%,#block);
until(%#block% == 0);
next;
wait(%#d_ver%ms);
loop;
endif;
if(%#passo% == 15);//volta ao primeiro andar
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 2; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(forward);
keydown(sneak);
wait(2);
break;
loop;
keyup(forward);
endif;
if(%#passo% == 16);//colocar porta
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 4; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 4; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 4; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 4; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 3; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
&look_x[1] = -55; #look_z[1] = +0;
&look_x[2] = +0; #look_z[2] = +0;
&look_x[3] = -55; #look_z[3] = 45;
&look_x[4] = +0; #look_z[4] = 45;
ifmatches(%&dir_1%,"NORTH");
#pos_x[1] = -1; #pos_y[1] = 1; #pos_z[1] = -1;
#pos_x[2] = 0; #pos_y[2] = 1; #pos_z[2] = -1;
#pos_x[3] = -1; #pos_y[3] = 0; #pos_z[3] = -1;
#pos_x[4] = 0; #pos_y[4] = 0; #pos_z[4] = -1;
endif;
ifmatches(%&dir_1%,"SOUTH");
#pos_x[1] = 1; #pos_y[1] = 1; #pos_z[1] = 1;
#pos_x[2] = 0; #pos_y[2] = 1; #pos_z[2] = 1;
#pos_x[3] = 1; #pos_y[3] = 0; #pos_z[3] = 1;
#pos_x[4] = 0; #pos_y[4] = 0; #pos_z[4] = 1;
endif;
ifmatches(%&dir_1%,"WEST");
#pos_x[1] = -1; #pos_y[1] = 1; #pos_z[1] = 1;
#pos_x[2] = -1; #pos_y[2] = 1; #pos_z[2] = 0;
#pos_x[3] = -1; #pos_y[3] = 0; #pos_z[3] = 1;
#pos_x[4] = -1; #pos_y[4] = 0; #pos_z[4] = 0;
endif;
ifmatches(%&dir_1%,"EAST");
#pos_x[1] = 1; #pos_y[1] = 1; #pos_z[1] = 1;
#pos_x[2] = 1; #pos_y[2] = 1; #pos_z[2] = 0;
#pos_x[3] = 1; #pos_y[3] = 0; #pos_z[3] = 1;
#pos_x[4] = 1; #pos_y[4] = 0; #pos_z[4] = 0;
endif;
do(3);
for(#i,1,4);
do;
look(%&dir_1%);
look(%&look_x[%#i%]%,%#look_z[%#i%]%);
//wait(500ms);
key(attack);
getidrel(%#pos_x[%#i%]%,%#pos_y[%#i%]%,%#pos_z[%#i%]%,#block);
until(%#block% == 0);
next;
wait(%#d_ver%ms);
loop;
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 6; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 6; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 6; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 6; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
do(3);
for(#i,1,4);
do;
look(%&dir_1%);
look(%&look_x[%#i%]%,%#look_z[%#i%]%);
//wait(500ms);
key(attack);
getidrel(%#pos_x[%#i%]%,%#pos_y[%#i%]%,%#pos_z[%#i%]%,#block);
until(%#block% == 0);
next;
wait(%#d_ver%ms);
loop;
ifmatches(%&dir_1%,"NORTH");
#pos_x[1] = 0; #pos_z[1] = -1;
#pos_x[2] = 0; #pos_z[2] = -1;
endif;
ifmatches(%&dir_1%,"SOUTH");
#pos_x[1] = 0; #pos_z[1] = 1;
#pos_x[2] = 0; #pos_z[2] = 1;
endif;
ifmatches(%&dir_1%,"WEST");
#pos_x[1] = -1; #pos_z[1] = 0;
#pos_x[2] = -1; #pos_z[2] = 0;
endif;
ifmatches(%&dir_1%,"EAST");
#pos_x[1] = 1; #pos_z[1] = 0;
#pos_x[2] = 1; #pos_z[2] = 0;
endif;
}$$/gamemode 1$${
for(#i,1,2);
if(%#i% == 1);
keydown(left);
wait(2);
keyup(left);
endif;
if(%#i% == 2);
keydown(right);
wait(2);
keyup(right);
endif;
do;
look(%&dir_1%);
look(,70);
pick(%#porta%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(%#pos_x[%#i%]%,0,%#pos_z[%#i%]%,#block);
until(%#block% != 0);
next;
do(5);
keydown(forward);
keydown(right);
wait(%#d_action%ms);
loop;
keyup(forward);
keyup(right);
endif;
if((%#passo% == 17)|(%#passo% == 19));//preparo escada
if(%#passo% == 17);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 6; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 6; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 6; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 6; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 3; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#passo% == 19);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 4; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 4; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 4; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 4; endif;
do;
look(%&dir_1%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 7; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 7; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 7; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 7; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 3; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
wait(%#d_ver%ms);
for(#i,1,3);
#y_temp = %YPOS% + 1;
do;
look(%&dir_2%);
look(,90);
keydown(sneak);
keydown(jump);
pick(%#tabua%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
do;
if(%#passo% == 17); look(%&dir_3%); endif;
if(%#passo% == 19); look(%&dir_4%); endif;
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
if(%#passo% == 17); look(%&dir_3%); endif;
if(%#passo% == 19); look(%&dir_4%); endif;
look(,%#l_side%);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
break;
endif;
loop;
do(2);
if(%#passo% == 17); look(%&dir_3%); endif;
if(%#passo% == 19); look(%&dir_4%); endif;
keydown(sneak);
keydown(forward);
wait(1);
loop;
keyup(forward);
if(%#i% != 3);
do;
look(%&dir_2%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
wait(%#d_ver%ms);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_2%);
look(,%#l_side%);
pick(%#tabua%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
break;
endif;
loop;
endif;
next;
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 4; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 4; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 4; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 4; endif;
do;
look(%&dir_1%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
endif;
if((%#passo% == 18)|(%#passo% == 20));//escada
do(3);
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
wait(1);
loop;
keyup(forward);
wait(%#d_ver%ms);
for(#i,1,4);
#y_temp = %YPOS% + 1;
do;
look(%&dir_1%);
look(,90);
keydown(sneak);
keydown(jump);
pick(%#escada%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
do;
if(%#passo% == 18); look(%&dir_3%); endif;
if(%#passo% == 20); look(%&dir_4%); endif;
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
look(%&dir_1%);
look(,90);
pick(%#escada%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#escada%);
break;
endif;
loop;
if(%#i% != 4);
do(3);
if(%#passo% == 18); look(%&dir_3%); endif;
if(%#passo% == 20); look(%&dir_4%); endif;
keydown(sneak);
keydown(forward);
if(%#passo% == 18); keydown(right); endif;
if(%#passo% == 20); keydown(left); endif;
wait(1);
loop;
keyup(forward);
keyup(left);
keyup(right);
endif;
next;
endif;
if(%#passo% == 21); //cercado
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 2; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 2; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 3; endif;
do;
look(%&dir_1%);
look(,75);
keydown(sneak);
keydown(back);
pick(%#cerca%);
key(use);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 1; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 1; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 1; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 1; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 3; endif;
do;
look(%&dir_3%);
look(,75);
keydown(sneak);
keydown(back);
pick(%#cerca%);
key(use);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 1; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 1; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 1; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 1; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
look(%&dir_4%);
look(-15,55);
wait(%#d_ver%ms);
pick(%#cerca%);
key(use);
wait(%#d_ver%ms);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 1; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 1; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 1; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 1; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 5; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 5; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 5; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 5; endif;
do;
look(%&dir_2%);
look(,75);
keydown(sneak);
keydown(back);
pick(%#cerca%);
key(use);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 7; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 7; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 7; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 7; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 4; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 4; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 4; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 4; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
//segunda parte
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 3; endif;
do;
look(%&dir_1%);
look(,75);
keydown(sneak);
keydown(back);
pick(%#cerca%);
key(use);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 1; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 1; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 1; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 1; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 3; endif;
do;
look(%&dir_4%);
look(,75);
keydown(sneak);
keydown(back);
pick(%#cerca%);
key(use);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 1; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 1; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 1; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 1; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
look(%&dir_3%);
look(+15,55);
wait(%#d_ver%ms);
pick(%#cerca%);
key(use);
wait(%#d_ver%ms);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 1; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 1; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 1; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 1; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 5; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 5; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 5; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 5; endif;
do;
look(%&dir_2%);
look(,75);
keydown(sneak);
keydown(back);
pick(%#cerca%);
key(use);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
endif;
if(%#passo% == 22);//inicio segundo andar
do;
look(%&dir_2%);
look(,90);
keydown(sneak);
keydown(jump);
pick(%#madeira%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#madeira%);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 8; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 8; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 8; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 8; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
look(%&dir_3%);
look(,90);
pick(%#madeira%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#madeira%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 2; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 15; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 15; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 15; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 15; endif;
do;
look(%&dir_1%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_1%);
look(,90);
pick(%#madeira%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#madeira%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 2; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 18; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 18; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 18; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 18; endif;
do;
look(%&dir_4%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
look(%&dir_4%);
look(,90);
pick(%#madeira%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#madeira%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 2; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 15; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 15; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 15; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 15; endif;
do;
look(%&dir_2%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_2%);
look(,90);
pick(%#madeira%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#madeira%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 2; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 18; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 18; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 18; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 18; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
look(%&dir_3%);
look(,90);
pick(%#madeira%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#madeira%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 2; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if((%#passo% == 23)|(%#passo% == 25)); //paredes do segundo andar
for(#i,1,5);
if(%#i% == 1);
#y_temp = %YPOS% + 1;
do;
look(%&dir_1%);
look(,90);
keydown(jump);
pick(%#madeira%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 15; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 15; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 15; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 15; endif;
#cont = 2;
do;
ifmatches(%#cont%,"^1$|^2$|^8$|^14$|^15$");
#pick = %#madeira%;
endif;
ifmatches(%#cont%,"^3$|^4$|^5$|^6$|^7$|^9$|^10$|^11$|^12$|^13$");
#pick = %#vidro%;
endif;
look(%&dir_1%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_1%);
look(,90);
wait(%#d_ver%ms);
keydown(sneak);
pick(%#pick%);
key(use);
wait(%#d_ver%ms);
#block = -1;
if(%YPOS% == %#y_temp%);
getidrel(0,-1,0,#block);
endif;
wait(%#d_ver%ms);
until(%#block% == %#pick%);
inc(#cont);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 3; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#i% == 2);
#y_temp = %YPOS% + 1;
do;
look(%&dir_1%);
look(,90);
keydown(jump);
pick(%#madeira%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 13; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 13; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 13; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 13; endif;
#cont = 2;
do;
ifmatches(%#cont%,"^1$|^2$|^7$|^12$|^13$");
#pick = %#madeira%;
endif;
ifmatches(%#cont%,"^3$|^4$|^5$|^6$|^8$|^9$|^10$|^11$");
#pick = %#vidro%;
endif;
look(%&dir_2%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_2%);
look(,90);
keydown(sneak);
pick(%#pick%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick%);
inc(#cont);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 3; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#i% == 3);
#y_temp = %YPOS% + 1;
do;
look(%&dir_1%);
look(,90);
wait(%#d_ver%ms);
keydown(jump);
pick(%#madeira%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 11; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 11; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 11; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 11; endif;
#cont = 2;
do;
ifmatches(%#cont%,"^1$|^2$|^6$|^10$|^11$");
#pick = %#madeira%;
endif;
ifmatches(%#cont%,"^3$|^4$|^5$|^7$|^8$|^9$");
#pick = %#vidro%;
endif;
look(%&dir_1%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_1%);
look(,90);
keydown(sneak);
pick(%#pick%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#pick%);
inc(#cont);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 3; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#i% == 4);
#y_temp = %YPOS% + 1;
do;
look(%&dir_1%);
look(,90);
wait(%#d_ver%ms);
keydown(jump);
pick(%#madeira%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 9; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 9; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 9; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 9; endif;
#cont = 2;
do;
look(%&dir_2%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_2%);
look(,90);
keydown(sneak);
pick(%#madeira%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#madeira%);
inc(#cont);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 3; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#i% == 5);
#y_temp = %YPOS% + 1;
do;
look(%&dir_1%);
look(,90);
wait(%#d_action%ms);
keydown(jump);
pick(%#madeira%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 7; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 7; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 7; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 7; endif;
do;
look(%&dir_1%);
look(,%#l_side%);
keydown(back);
keydown(sneak);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_1%);
look(,90);
keydown(sneak);
pick(%#madeira%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#madeira%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 3; endif;
do;
look(%&dir_1%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
next;
endif;
if((%#passo% == 24)|(%#passo% == 26)); //preparo da parede do segundo andar
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 9; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 9; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 9; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 9; endif;
do;
look(%&dir_2%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
do(2);
look(%&dir_2%);
look(,%#l_side%);
keydown(forward);
keydown(sneak);
wait(1);
loop;
keyup(forward);
if(%#passo% == 24);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 18; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 18; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 18; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 18; endif;
do;
look(%&dir_4%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 2; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#passo% == 26);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 2; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
do(2);
look(%&dir_3%);
look(,%#l_side%);
keydown(forward);
keydown(sneak);
wait(1);
loop;
keyup(forward);
endif;
endif;
if((%#passo% == 27)|(%#passo% == 30)); //extensão de fora do telhado leste e oeste
for(#i,1,5);
if(%#i% == 1);
if(%#passo% == 27);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 2; endif;
endif;
if(%#passo% == 30);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 2; endif;
endif;
do;
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,%#l_side%);
pick(%#tabua%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
if(%#passo% == 27);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 2; endif;
endif;
if(%#passo% == 30);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 2; endif;
endif;
do;
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,%#l_hit%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#i% == 2);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 3; endif;
do;
look(%&dir_4%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
look(%&dir_4%);
look(,%#l_side%);
pick(%#tabua%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
endif;
if(%#i% == 3);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 21; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 21; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 21; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 21; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
look(%&dir_3%);
look(,%#l_side%);
pick(%#tabua%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 2; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#i% == 4);
do(2);
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,%#l_side%);
keydown(sneak);
keydown(back);
wait(1);
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 20; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 20; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 20; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 20; endif;
do;
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,%#l_side%);
keydown(sneak);
if(%#passo% == 27); keydown(right); endif;
if(%#passo% == 30); keydown(left); endif;
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(right);
keyup(left);
do;
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,%#l_side%);
pick(%#escada%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#escada%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(right);
keyup(left);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 3; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
do(2);
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,%#l_side%);
keydown(sneak);
keydown(forward);
wait(1);
loop;
keyup(forward);
endif;
if(%#i% == 5);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 1; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 1; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 1; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 1; endif;
#z_temp = %ZPOS% + 1;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(forward);
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
#y_temp = %YPOS% + 1;
do;
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,90);
keydown(jump);
keydown(sneak);
pick(%#escada%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 20; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 20; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 20; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 20; endif;
#z_temp = %ZPOS% - 20;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,90);
pick(%#escada%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#escada%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 3; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
do(2);
if(%#passo% == 27); look(%&dir_2%); endif;
if(%#passo% == 30); look(%&dir_1%); endif;
look(,%#l_side%);
keydown(sneak);
keydown(forward);
wait(1);
loop;
keyup(forward);
endif;
next;
endif;
if((%#passo% == 28)|(%#passo% == 31));//construção do telhado leste e oeste
for(#i,1,5);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 2; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
look(%&dir_3%);
look(,%#l_side%);
pick(%#tabua%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 21; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 21; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 21; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 21; endif;
do;
look(%&dir_4%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
look(%&dir_4%);
look(,%#l_side%);
pick(%#tabua%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 2; endif;
do;
look(%&dir_4%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
#y_temp = %YPOS% + 1;
do;
if(%#passo% == 28); look(%&dir_2%); endif;
if(%#passo% == 31); look(%&dir_1%); endif;
look(,90);
keydown(jump);
keydown(sneak);
pick(%#escada%);
wait(%#d_action%ms);
keyup(jump);
key(use);
wait(%#d_ver%ms);
until(%YPOS% == %#y_temp%);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% + 20; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% - 20; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% - 20; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% + 20; endif;
do;
look(%&dir_3%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(back);
do;
if(%#passo% == 28); look(%&dir_2%); endif;
if(%#passo% == 31); look(%&dir_1%); endif;
look(,90);
pick(%#escada%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#escada%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
loop;
keyup(back);
if(%#i% != 5);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 3; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
if(%#passo% == 28);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 2; endif;
endif;
if(%#passo% == 31);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 2; endif;
endif;
do;
if(%#passo% == 28); look(%&dir_2%); endif;
if(%#passo% == 31); look(%&dir_1%); endif;
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
else;
if(%#passo% == 28);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 3; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 3; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 3; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 3; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
if(%#passo% == 31);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 2; endif;
do;
look(%&dir_3%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITX% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITZ% == %#z_temp%); break; endif; endif;
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% - 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% + 2; endif;
do;
look(%&dir_2%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(back);
do;
look(%&dir_2%);
look(,%#l_side%);
keydown(sneak);
pick(%#tabua%);
wait(%#d_ver%ms);
key(use);
wait(%#d_ver%ms);
getidrel(0,-1,0,#block);
wait(%#d_ver%ms);
until(%#block% == %#tabua%);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
loop;
keyup(back);
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 2; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 2; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 2; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 2; endif;
do;
look(%&dir_2%);
look(,%#l_hit%);
keydown(sneak);
keydown(forward);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%HITZ% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%HITX% == %#x_temp%); break; endif; endif;
loop;
keyup(forward);
endif;
endif;
if(inv);
do;
gui(inventory);
wait(%#d_ver%ms);
until(%GUI% == "GUIINVENTORY");
wait(1);
for(#i,9,35);
slotclick(%#i%,l,true);
wait(%#d_ver%ms);
next;
gui();
wait(1);
endif;
next;
endif;
if(%#passo% == 29);//preparo para o lado oeste do telhado
ifmatches(%&dir_1%,"NORTH"); #z_temp = %ZPOS% + 11; endif;
ifmatches(%&dir_1%,"SOUTH"); #z_temp = %ZPOS% - 11; endif;
ifmatches(%&dir_1%,"WEST"); #x_temp = %XPOS% + 11; endif;
ifmatches(%&dir_1%,"EAST"); #x_temp = %XPOS% - 11; endif;
do;
look(%&dir_1%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[3]%)|(%HITSIDE% == %&l_sid[4]%));
keyup(sneak);
endif;
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%ZPOS% == %#z_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%XPOS% == %#x_temp%); break; endif; endif;
until(%XPOS% == %#x_temp%);
keyup(back);
do(2);
look(%&dir_1%);
look(,%#l_side%);
keydown(sneak);
keydown(forward);
wait(1);
loop;
keyup(forward);
ifmatches(%&dir_1%,"NORTH"); #x_temp = %XPOS% - 16; endif;
ifmatches(%&dir_1%,"SOUTH"); #x_temp = %XPOS% + 16; endif;
ifmatches(%&dir_1%,"WEST"); #z_temp = %ZPOS% + 16; endif;
ifmatches(%&dir_1%,"EAST"); #z_temp = %ZPOS% - 16; endif;
do;
look(%&dir_4%);
look(,%#l_side%);
keydown(sneak);
keydown(back);
if((%HITSIDE% == %&l_sid[1]%)|(%HITSIDE% == %&l_sid[2]%));
keyup(sneak);
endif;
keydown(sneak);
ifmatches(%&dir_1%,"NORTH|SOUTH"); if(%XPOS% == %#x_temp%); break; endif; endif;
ifmatches(%&dir_1%,"WEST|EAST"); if(%ZPOS% == %#z_temp%); break; endif; endif;
until(%ZPOS% == %#z_temp%);
keyup(back);
endif;
if(inv);
do;
gui(inventory);
wait(%#d_ver%ms);
until(%GUI% == "GUIINVENTORY");
wait(1);
for(#i,9,35);
slotclick(%#i%,l,true);
wait(%#d_ver%ms);
next;
gui();
wait(1);
endif;
next;
log("&6[Macro] &bConstrutor &4[Off]");
unset(on);
stop;
endif;
}$$