[Finalizado][RESULTADO][Evento] Macro do Mês

Bem-vindo!

Ao se registrar conosco, você poderá discutir, compartilhar e enviar mensagens privadas com outros membros da nossa comunidade.

Inscreva-se agora!
Status
Não está aberto para novas respostas.

Hynn

Craftlandiano
Entrou
Out 12, 2011
Mensagens
6,669
Cubos
0
Nkj0GLG.jpg
//--------------------------------------------------//
SAIU O VENCEDOR DO EVENTO MACRO DO MÊS!
Depois de muitas análises e vários testes, finalmente saiu o vencedor do evento MACRO DO MÊS!!
Antes de mais nada, agradecemos a participação de todos. Sabemos que criar uma macro é trabalhoso e leva um tempo bom. Como o objetivo deste evento é proporcionar aos membros do fórum acesso às melhores macros sobre determinado tema, temos certeza que apesar do trabalho em criar a macro, todos os participantes estão orgulhosos de si por terem contribuído com a comunidade. :) Sendo assim, deixamos os parabéns para todos os que concorreram.
Bom, sem mais delongas, o vencedor do primeiro MACRO DO MÊS FOI O MEMBRO: [member=Sleepp]
Parabéns rapazinho. Sua macro se saiu muito bem, atendendo aos requisitos, bem como se saiu bem em todos os nossos critérios de avaliação.
//--------------------------------------------------//

Craftlandianos!
Está iniciando um novo evento em nosso fórum que vai deixar todo mundo automatizado!
Neste evento escolheremos o melhor desenvolvedor de macro do mês!
wRYYKy4.png
Nós definiremos um tema e com base nesse tema nós estabeleceremos o que a sua MACRO deverá conter e o que ela deverá fazer. Sendo assim, você terá liberdade para decidir como será a estrutura do seu script. O objetivo é que a macro seja funcional. Porém, teremos critérios de avaliação. O jogador que produzir a melhor macro seguindo nossos critérios de avaliação vencerá!
TNxlZv4.png
O vencedor deste evento receberá como premiação 500 cubos, além da medalha MACRO DEVELOPER!
nweGOLy.png
O tema escolhido deste mês é CONSTRUÇÃO! Você deverá produzir uma macro que possa construir uma CASA com tamanho de até 20x20. O modelo da casa deverá ser escolhido por você. Faça valer sua criatividade! Ela também será avaliada.
A macro deve ser compatível com a versão 1.5 do Minecraft.
Sendo assim, NÃO utilize blocos que não existam na versão 1.5.
6NHqKv9.png
Os scripts serão avaliados seguindo os seguintes critérios:
- Criatividade na construção;
- Organização do script;
- Performance na execução;
- Complexidade do script;
- Funcionalidades do script;
- Otimização para uso no servidor;
If7tuum.png
Segue abaixo as regras do evento:
- Não será permitido mais de uma inscrição por jogador;
- Não será tolerado plágio de outros trabalhos já postados;
- Não será permitido editar a sua macro após ser postada.
Sendo assim, caso você edite a sua postagem, você será automaticamente desclassificado(a);
- Não é permitido o uso de qualquer outro mod para auxiliar na execução da macro, bem como addons para o mod macro keybind;
* Qualquer postagem que não seja de inscrição para o evento será devidamente excluída.
OrU7Zw9.png
Para fins de organização do tópico, estamos definindo um modelo para postagem.
Por favor, utilize o modelo quando for postar:
Código:
Seu nick:
Servidor em que joga:
Servidor em que a macro foi testada:
Lista de blocos e a quantidade a ser utilizada:
Breve descrição de como utilizar:
[spoiler]
[code]
Código da macro
[/spoiler]
[/CODE]
Tome MUITO cuidado quando for fazer sua postagem.
Caso você edite a sua postagem, a mesma será desclassificada.
Obs: Caso sua macro seja integrada com algum outro evento do macro keybind, favor separar o código e especificar em sua inscrição.
Exemplo:
Código:
Seu nick: Hynn
Servidor em que joga: Todos
Servidor em que a macro foi testada: Origens
Lista de blocos e a quantidade a ser utilizada: 
- 85 madeiras;
- 15 escadas de madeira;
- 25 vidros;
- 100 pedras;
- 10 pedregulhos;
Breve descrição de como utilizar: Basta se posicionar olhando para a direção que deseja construir, mirar para o bloco do chão onde começará e acionar o botão da macro. 

Para instalar, coloque o primeiro código no evento OnChat e o segundo no botão que deseja ativar.
 
Código da macro:
- Evento OnChat:
[spoiler]
[code]
Código da macro
[/spoiler]


- Código principal:
Código:
Código da macro

[/CODE]
ZUAlotu.png
Se eu fizer a postagem para o evento e perceber que fiz algo errado, o que devo fazer?
Você pode entrar em contato com algum staffer responsável pelo evento e comunicar o ocorrido. Porém, não faça edições em sua postagem antes de comunicar, pois a mesma será automaticamente desclassificada.
Você disse no tópico que a construção deve ser 20x20. Mas eu posso fazer menor?
Com certeza você pode. O tamanho 20x20 é o tamanho máximo para sua construção. Sendo assim, não há um tamanho mínimo. Você pode fazer uma construção 5x5, caso queira. :P Faça esbanjar sua criatividade.
Posso fazer a macro para o Creative?
Sim, você pode. Porém, um dos critérios de avaliação que iremos por em pauta é justamente a macro funcionar para todos os servidores da Craftlandia. Como todos os servidores (exceto o Creative e Minigames) são survival, você com certeza perderá pontos na avaliação.
Eu jogo no Minecraft 1.7. Posso fazer a macro para a versão que uso?
Sim, você pode. Contudo, conforme informado acima, sua macro deve ser compatível também com a versão 1.5 do Minecraft.
/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
Este evento permanecerá aberto até o dia 01/07!
/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
Esperamos que todos participem e se divirtam desenvolvendo uma macro que possa ajudar os membros de nossa comunidade!
Desejamos nessa oportunidade uma boa sorte e que vença a melhor macro!
2d58Xfp.png
[member=FraanR]
[member=Hynn]
 
Seu nick: PearsonSM
Servidor em que joga: Minigames
Servidor em que a macro foi testada:
Beta (Agradecimentos especiais ao [member=[/COLOR]lucakiksd07] e ao [member=felicianoyt] por ajudarem a testar a macro)
Lista de blocos e a quantidade a ser utilizada:
HpYslET.png

1- Bloco para os pilares - Minimo: 15
2- Bloco para as paredes - Minimo: 64
3- Bloco para a base - Minimo: 31
4- Bloco para as janelas - Minimo: 26
5- Porta
6- Bloco para o teto - Minimo: 84
7- Escadas para o teto - Minimo: 38
8- Caso esteja sobre terreno rochoso, uma picareta normal. Caso não, deixe vazio!
9- Porta
Obs¹: Posicione os itens de acordo com a imagem!
Obs²: Os itens da imagem são os recomendados. Você pode substituir pelos seus, porem use o bom-senso!
Obs³: É recomendado estar com o inventario vazio. Caso seu inventario esteja cheio, pelo menos o primeiro slot do inventario deve estar vazio!
Obs⁴: Os itens acima são os mínimos, você pode utilizar mais!

Breve descrição de como utilizar:
Esteja em um espaço aberto dê no minimo 10x10x6. Vá para o lugar em que deseja que fique a porta da casa. Mire na direção que deseja construir e certifique-se de estar no meio do bloco (Para fazer isso mire pra baixo e se ajeite até a cruz estar no centro do bloco!). Depois só acionar a macro!
Obs¹: Macro otimizado para os servidores da craftlandia, por isso o delay.
Obs²: Macro pode não funcionar no modo criativo.
Obs³: Enquanto a macro estiver ligada, não mexer no mouse/teclado/inventario.

Codigo da macro:
$${
///////////////////////////////////// Macro feita por PearsonSM para o concurso "Macro do mes" da craftlandia
///////////////////////////////////// Copia nao comedia
::::::::::::::::: Inicio;
if(construtor);
log(&e[&a!&e] &4Obra cancelada);
unset(construtor);
stop;else;
log(&e[&a!&e] &fMacro Iniciado!);wait(500ms);
set(construtor);
log(&e[&a!&e] &fOla! Eu sou seu construtor &9PearsonSM&f.);wait(2000ms);
log(&e[&a!&e] &fCertifique-se de seguir as instrucoes do topico e estar com os itens necessarios.);wait(4000ms);
log(&e[&a!&e] &fEnquanto eu estiver trabalhando nao mexa no teclado mouse ou inventario.);wait(4000ms);
log(&e[&a!&e] &fAperte o mesmo botao a qualquer momento para cancelar a obra. Vamos comecar?);wait(4000ms);
log(&e[&a!&e] &fTestando itens!);wait(1000ms);
getslotitem(1,#n,#num1);slot(1);wait(300ms);if(%#num1%>14);else;log(&e[&a!&e] &4Erro:&f Quantidade minima nao encontrada!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
getslotitem(2,#n,#num2);slot(2);wait(300ms);if(%#num2%>63);else;log(&e[&a!&e] &4Erro:&f Quantidade minima nao encontrada!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
getslotitem(3,#n,#num3);slot(3);wait(300ms);if(%#num3%>30);else;log(&e[&a!&e] &4Erro:&f Quantidade minima nao encontrada!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
getslotitem(4,#n,#num4);slot(4);wait(300ms);if(%#num4%>25);else;log(&e[&a!&e] &4Erro:&f Quantidade minima nao encontrada!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
getslotitem(5,#p1,#num5);slot(5);wait(300ms);if(%#p1%=324);else;log(&e[&a!&e] &4Erro:&f Porta nao encontrada!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
getslotitem(6,#n,#num6);slot(6);wait(300ms);if(%#num6%>63);else;log(&e[&a!&e] &4Erro:&f Quantidade minima nao encontrada!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
getslotitem(7,#n,#num7);slot(7);wait(300ms);if(%#num7%>37);else;log(&e[&a!&e] &4Erro:&f Quantidade minima nao encontrada!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
getslotitem(9,#p2,#num9);slot(9);wait(300ms);if(%#p2%=324);else;log(&e[&a!&e] &4Erro:&f Porta nao encontra!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
gui(inventory);wait(300ms);
getslotitem(9,#v1,#num10);if(%#v1%=0);else;log(&e[&a!&e] &4Erro:&f O primeiro slot do iventario deve estar vazio!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
getslotitem(32,#n,#num11);if(%#num11%>19);else;log(&e[&a!&e] &4Erro:&f Quantidade minima nao encontrada!);log(&e[&a!&e] &4Obra cancelada);unset(construtor);stop;endif;
gui;
log(&e[&a!&e] &fItens OK! Iniciando construcao!);wait(500ms);
ifmatches(%DIRECTION%,N);
#fre=0;#dir=90;#tra=180;#esq=270;#por=315;
endif;
ifmatches(%DIRECTION%,S);
#fre=180;#dir=270;#tra=0;#esq=90;#por=135;
;endif;
ifmatches(%DIRECTION%,E);
#fre=90;#dir=180;#tra=270;#esq=0;#por=45;
endif;
ifmatches(%DIRECTION%,W);
#fre=270;#dir=0;#tra=90;#esq=180;#por=225;
endif;
look(%#fre%,0)
keydown(left);wait(700ms);
keyup(left);
look(%#fre%,90);wait(300ms);
::::::::::::::::: Parede-Esquerda;
slot(1);
#y=%YPOS%;
do;
keydown(JUMP);
key(use);
#v=%YPOS%;
dec(#v,%#y%);
WHILE(%#v%<2);
keyup(JUMP);
keydown(SNEAK);
keydown(FORWARD);wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(4);key(use);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
wait(1000ms);
slot(1);key(use);wait(300ms);key(use);
::::::::::::::::: Parede-Cima;
look(%#dir%,90);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
do(3);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(4);key(use);
loop;
do(2);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
loop;
do(3);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(4);key(use);
loop;

do(2);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
loop;
wait(1000ms);
slot(1);key(use);wait(300ms);key(use);
::::::::::::::::: Parede-Direita;
look(%#tra%,90);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
do(3);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(4);key(use);
loop;
do(2);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
loop;
wait(1000ms);
slot(1);key(use);wait(300ms);key(use);
::::::::::::::::: Parede-Baixo;
look(%#esq%,90);
do(2);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
loop;
do(3);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(4);key(use);
loop
do(2);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
loop;
wait(1000ms);
slot(1);key(use);wait(300ms);key(use);
::::::::::::::::: Parede-Inter1;
look(%#fre%,90);
do(3);
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);
loop;
::::::::::::::::: Portas;
wait(1000ms);
keyup(forward);
keydown(back);wait(800ms);
keyup(back);
keydown(left);wait(800ms);
slot(5);key(use);wait(200ms);
slot(9);
keydown(sneak);
keydown(left);wait(1000ms);
key(use);
::::::::::::::::: Parede-Inter2;
wait(1000ms);
slot(3);key(use);wait(300ms);
slot(2);key(use);wait(300ms);
::::::::::::::::: Sup-Inter1;
keyup(left);
keydown(jump);wait(300ms);
slot(2);key(use);wait(500ms);
slot(7);key(use);
keyup(JUMP);
keydown(sneak);
keydown(left);
wait(1000ms);
slot(1);key(use);wait(300ms);
slot(7);key(use);wait(300ms);
::::::::::::::::: Sup-Esquerda;
look(%#dir%,90);
keydown(forward);wait(300ms);keyup(forward);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
wait(1000ms);
slot(4);key(use);wait(300ms);
slot(7);key(use);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
wait(1000ms);
slot(1);key(use);wait(300ms);
slot(7);key(use);wait(300ms);
::::::::::::::::: Sup-Cima;
look(%#tra%,90);
keydown(forward);wait(300ms);keyup(forward);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
do(3);
wait(1000ms);
slot(4);key(use);wait(300ms);
slot(7);key(use);
loop;
do(2);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
loop;
do(3);
wait(1000ms);
slot(4);key(use);wait(300ms);
slot(7);key(use);
loop;
do(2);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
loop;
wait(1000ms);
slot(1);key(use);wait(300ms);
slot(7);key(use);wait(300ms);
::::::::::::::::: Sup-Direita;
look(%#esq%,90);
keydown(forward);wait(300ms);keyup(forward);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
do(3);
wait(1000ms);
slot(4);key(use);wait(300ms);
slot(7);key(use);
loop;
do(2);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
loop;
wait(1000ms);
slot(1);key(use);wait(300ms);
slot(7);key(use);wait(300ms);
::::::::::::::::: Sup-Baixo;
look(%#fre%,90);
keydown(forward);wait(300ms);keyup(forward);
do(2);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
loop;
do(3);
wait(1000ms);
slot(4);key(use);wait(300ms);
slot(7);key(use);
loop;
do(2);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
loop;
wait(1000ms);
slot(1);key(use);wait(300ms);
slot(7);key(use);wait(300ms);
::::::::::::::::: Sup-Inter2;
look(%#dir%,90);
keydown(forward);wait(300ms);keyup(forward);
do(3);
wait(1000ms);
slot(2);key(use);wait(300ms);
slot(7);key(use);
loop;
wait(1000ms);
::::::::::::::::: Sup-Inter3;
look(%#fre%,90);
keydown(back);wait(990ms);keyup(back);
do(2);
wait(1000ms);
slot(2);key(use);
keydown(jump);wait(300ms);keyup(jump);
keydown(sneak);
slot(7);key(use);
loop;
::::::::::::::::: Telhado;
wait(2000ms);
keyup(left);
slot(6);
look(%#fre%,0);
keydown(sneak);
keydown(right);wait(300ms);
keydown(forward);wait(200ms);keyup(forward);
do(4);
keydown(right);wait(780ms);keyup(right);
look(%#fre%,30);key(use);wait(100ms);
look(%#fre%,40);key(use);wait(100ms);
look(%#fre%,55);key(use);
loop;
keydown(sneak);
keydown(BACK);
look(%#esq%,80);wait(1000ms);
do(7);
key(use);wait(800ms);
loop;
keyup(back);
look(%#fre%,0);
keydown(RIGHT);wait(200ms);keyup(RIGHT);
do(7);
keydown(left);wait(780ms);keyup(left);
look(%#fre%,30);key(use);wait(100ms);
look(%#fre%,40);key(use);wait(100ms);
look(%#fre%,55);key(use);
loop;
look(%#tra%,0);
keydown(sneak);
keydown(RIGHT);wait(780ms);keyup(RIGHT);
do(7);
keydown(left);wait(780ms);keyup(left);wait(100ms);
look(%#tra%,40);key(use);wait(100ms);
look(%#tra%,50);key(use);
loop;
keyup(sneak);
::::::::::::::::: Entrar-casa;
slot(8);
look(%#fre%,0);
keydown(left);wait(1950ms);keyup(left);wait(200ms);
keydown(back);wait(500ms);keyup(back);wait(300ms);
keydown(forward);wait(300ms);keyup(forward);
key(use);wait(200ms);
look(%#por%,0);key(use);wait(200ms);
look(%#fre%,0)
keydown(forward);wait(800ms);keyup(forward);
look(%#esq%,0);
keydown(forward);wait(500ms);keyup(forward);
keydown(left);wait(500ms);keyup(left);
::::::::::::::::: Remover-Chao;
look(%#dir%,90);
do(11);
#y=%YPOS%;
do;
key(use);
key(attack);
#v=%#y%;
dec(#v,%YPOS%);
WHILE(%#v%<1);
keydown(forward);wait(500ms);
keydown(jump);wait(300ms);
keyup(jump);wait(75ms)
keyup(forward);
loop;
look(%#fre%,90);
keydown(forward);wait(300ms);
keydown(jump);wait(300ms);keyup(jump);
keyup(forward);wait(300ms);
look(%#esq%,90);
do(11);
#y=%YPOS%;
do;
key(use);
key(attack);
#v=%#y%;
dec(#v,%YPOS%);
WHILE(%#v%<1);
keydown(forward);wait(500ms);
keydown(jump);wait(300ms);
keyup(jump);wait(75ms)
keyup(forward);
loop;
look(%#fre%,90);
keydown(forward);wait(300ms);
keydown(jump);wait(300ms);keyup(jump);
keyup(forward);wait(300ms);
look(%#dir%,90);
do(11);
#y=%YPOS%;
do;
key(use);
key(attack);
#v=%#y%;
dec(#v,%YPOS%);
WHILE(%#v%<1);
keydown(forward);wait(500ms);
keydown(jump);wait(300ms);
keyup(jump);wait(75ms)
keyup(forward);
loop;
look(%#tra%,0);
keydown(forward);
wait(1000ms);
keydown(jump);wait(300ms);keyup(jump);
keyup(forward);wait(300ms);
look(%#esq%,90);
do(7);
#y=%YPOS%;
do;
key(use);
key(attack);
#v=%#y%;
dec(#v,%YPOS%);
WHILE(%#v%<1);
keydown(forward);wait(500ms);
keydown(jump);wait(300ms);
keyup(jump);wait(75ms)
keyup(forward);
loop;
wait(300ms);
look(%#tra%,0);
keydown(forward);(300ms);
keydown(jump);wait(300ms);keyup(jump);
keyup(forward);wait(300ms);
look(%#dir%,90);
do(7);
#y=%YPOS%;
do;
key(use);
key(attack);
#v=%#y%;
dec(#v,%YPOS%);
WHILE(%#v%<1);
keydown(forward);wait(500ms);
keydown(jump);wait(300ms);
keyup(jump);wait(75ms)
keyup(forward);
loop;
wait(300ms);
look(%#tra%,0);
keydown(forward);(300ms);
keydown(jump);wait(300ms);keyup(jump);
keyup(forward);wait(300ms);
look(%#esq%,90);
do(7);
#y=%YPOS%;
do;
key(use);
key(attack);
#v=%#y%;
dec(#v,%YPOS%);
WHILE(%#v%<1);
keydown(forward);wait(500ms);
keydown(jump);wait(300ms);
keyup(jump);wait(75ms)
keyup(forward);
loop;
::::::::::::::::: Chao;
gui(inventory);wait(500ms);
slotclick(32,l,TRUE);wait(500ms);
gui;
slot(6);
look(%#dir%,90);
keydown(jump);wait(350ms);keyup(jump);
key(use);
keydown(sneak);
do(6);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
look(%#fre%,90);
do(5);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
look(%#esq%,90);
do(10);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
look(%#tra%,90);
do(2);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
look(%#dir%,90);
slot(2);
do(2);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
slot(6);
do(2);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
look(%#tra%,90);
do(2);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
slot(2);
look(%#dir%,90);
do(5);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
look(%#fre%,90);
keydown(forward);wait(780ms);keyup(forward);
key(use);
look(%#esq%,90);
do(4);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
look(%#fre%,90);
keydown(forward);wait(780ms);keyup(forward);
key(use);
look(%#dir%,90);
do(4);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
look(%#fre%,90);
keydown(forward);wait(780ms);keyup(forward);
key(use);
look(%#esq%,90);
do(8);
keydown(forward);wait(780ms);keyup(forward);
key(use);
loop;
keyup(sneak);
::::::::::::::::: Trocar portas;
look(%#tra%,0);
keydown(forward);wait(400ms);keyup(forward);
look(%#dir%,90);
slot(8);
do(2);
#y=%YPOS%;
do;
key(use);
key(attack);
#v=%#y%;
dec(#v,%YPOS%);
WHILE(%#v%<1);
keydown(forward);wait(500ms);
keydown(jump);wait(300ms);
keyup(jump);wait(100ms);
keyup(forward);
loop;
look(%#esq%,90);
slot(6);wait(300ms);
keydown(jump);wait(250ms);keyup(jump);
key(use);
keydown(sneak);
keydown(forward);wait(780ms);keyup(forward);
key(use);wait(300ms);
look(%#fre%,60);
keydown(back);wait(780ms);keyup(back);
slot(2);
key(use);wait(300ms);
gui(inventory);wait(300ms);
getslot(324,#slot);
slotclick(%#slot%,l,TRUE);wait(500ms);
slotclick(9,l,TRUE);wait(500ms);
gui;
keydown(right);wait(780ms);keyup(right);
key(use);
keyup(sneak);
ACHIEVEMENTGET(Casa feita com macro!,137)
log(&e[&a!&e] &fMeu trabalho por aqui acabou, espero que goste da sua nova casa.);wait(3000ms);
log(&e[&a!&e] &fDecore-a do jeito que achar melhor!);wait(2000ms);
log(&e[&a!&e] &fMacro finalizado!);
unset(construtor);stop;endif;
}$$
 
Seu nick: SLEEP
Servidor em que joga: Titan 2.0
Servidor em que a macro foi testada: Titan 2.0
Lista de blocos e a quantidade a ser utilizada:

Obs: Deixe todos os itens na hotbar principal do inventário.
HmXv10n.png



- 12 Madeiras de Pinheiro;
- 110 Tábuas de Pinheiro;
- 36 Pedras;
- 13 Vidros;
- 60 Escadas de Pinheiro;
- 1 Porta;
- 10 Terras;
- 1 Pá de Pedra;

Não importa em qual slot da hotbar esta cada item, apenas ele deve estar lá.
Você deve ter no mínimo, 9 (nove) slots livres no seu inventário antes de ligar a macro.
A macro vai utilizar uma home para trabalhar, ou seja, caso não consiga marcar novas homes, apague uma antes de ligar a macro.

Tente não mexer no teclado, mouse ou inventário, não interfira no trabalho da macro em hipótese alguma.
Apesar de todos os ant-bugs que desenvolvi, o LAG é algo inevitável e pode acabar com a construção.

Breve descrição de como utilizar:

Instale os 2 (dois) códigos, lembrando que o primeiro é na parte OnChat, olhe para a direção (NORTE, SUL, LESTE, OESTE) onde deseja ser a fachada (frente) da casa, e ative a macro.
Para instalar, coloque o primeiro código no evento OnChat e o segundo no botão que deseja ativar.

Código da macro:
- Evento OnChat:
$${
IFMATCHES("%CHATCLEAN%","^A home \"sb_home\" foi definida com sucesso\!$");
SET(@sb_home_set);
ENDIF;
IFMATCHES("%CHATCLEAN%","^Você foi enviado\(a\) para a home \"sb_home\"\!$");
SET(@sb_home_tp);
ENDIF;
IFMATCHES("%CHATCLEAN%","^Kit \'nb\' recebido.$");
SET(@kit_nb);
ENDIF;
}$$

- Código principal:
$${

TOGGLE(sleepmacro);
IF(sleepmacro);
LOG("&4&l[Macro] &6Sleep Construtor &4[OFF]");
GUI(INVENTORY);
GUI();
STOP();
ELSE;
LOG("&2&l[Macro] &6Sleep Construtor &2[ON]");
UNSET(break);
ENDIF;

LOG("&e&l» &7Verificando Itens.");
GUI(INVENTORY);
GETSLOT(17,#sleep_slot,36);
GETSLOTITEM(%#sleep_slot%,#id_madeira,#stack_madeira);
GETSLOT(1,#sleep_slot,36);
GETSLOTITEM(%#sleep_slot%,#id_pedra,#stack_pedra);
GETSLOT(20,#sleep_slot,36);
GETSLOTITEM(%#sleep_slot%,#id_vidro,#stack_vidro);
GETSLOT(134,#sleep_slot,36);
GETSLOTITEM(%#sleep_slot%,#id_escada,#stack_escada);
GETSLOT(324,#sleep_slot,36);
GETSLOTITEM(%#sleep_slot%,#id_porta,#stack_porta);
GETSLOT(3,#sleep_slot,36);
GETSLOTITEM(%#sleep_slot%,#id_terra,#stack_terra);
GETSLOT(273,#sleep_slot,36);
GETSLOTITEM(%#sleep_slot%,#id_pa,#stack_pa);
SET(#stack_tabua,"");
SET(#getslot,"36");
DO;
GETSLOT(5,#sleep_slot,%#getslot%);
#getslot = %#sleep_slot% + 1;
GETSLOTITEM(%#sleep_slot%,#sleep_id,#sleep_stack);
INC(#stack_tabua,%#sleep_stack%);
UNTIL(%#sleep_slot%=-1);
SET(#slot_vazio,"");
SET(#getslot,"9");
DO;
GETSLOT(0,#sleep_slot,%#getslot%);
#getslot = %#sleep_slot% + 1;
IF((%#sleep_slot%!=-1)&&(%#sleep_slot%<36));
INC(#slot_vazio,1);
ENDIF;
UNTIL((%#sleep_slot%=-1)||(%#slot_vazio%>8));
GUI();
IF((%#id_madeira%=17)&&(%#stack_madeira%>=12));
ELSE;
LOG("&e&l» &7Você precisa de &e12 Madeiras de Pinheiro&7 na hotbar.");
SET(break);
ENDIF;
IF(%#stack_tabua%>=110);
ELSE;
LOG("&e&l» &7Você precisa de &e110 Tábuas de Pinheiro&7 na hotbar.");
SET(break);
ENDIF;
IF((%#id_pedra%=1)&&(%#stack_pedra%>=36));
ELSE;
LOG("&e&l» &7Você precisa de &e36 Pedras&7 na hotbar.");
SET(break);
ENDIF;
IF((%#id_vidro%=20)&&(%#stack_vidro%>=13));
ELSE;
LOG("&e&l» &7Você precisa de &e13 Vidros&7 na hotbar.");
SET(break);
ENDIF;
IF((%#id_escada%=134)&&(%#stack_escada%>=60));
ELSE;
LOG("&e&l» &7Você precisa de &e60 Escadas de Pinheiro&7 na hotbar.");
SET(break);
ENDIF;
IF((%#id_porta%=324)&&(%#stack_escada%>=1));
ELSE;
LOG("&e&l» &7Você precisa de &e1 Porta&7 na hotbar.");
SET(break);
ENDIF;
IF((%#id_terra%=3)&&(%#stack_terra%>=10));
ELSE;
LOG("&e&l» &7Você precisa de &e10 Terras&7 na hotbar.");
SET(break);
ENDIF;
IF((%#id_pa%=273)&&(%#stack_pa%>=1));
ELSE;
LOG("&e&l» &7Você precisa de &e1 Pá de Pedra&7 na hotbar.");
SET(break);
ENDIF;
IF(%#slot_vazio%>=9);
ELSE;
LOG("&e&l» &7Você precisa de &e9 Slots vazios&7 no inventário.");
SET(break);
ENDIF;
IF(break);
TOGGLE(sleepmacro);
LOG("&4&l[Macro] &6Sleep Construtor &4[OFF]");
STOP();
ELSE;
LOG("&e&l» &7Itens para construção verificados.");
WAIT(20T);
ENDIF;
LOG("&e&l» &7Verificando OnChat.");
SET(#tentativas,"");
UNSET(@sb_home_set);
WAIT(2T);
DO;
}$$/sethome sb_home$${
SET(#sleep_shield,"");
DO;
INC(#sleep_shield,1);
UNTIL((%#sleep_shield%>=150)||(@sb_home_set));
IF(%#sleep_shield%>=150);
INC(#tentativas,1);
IF(%#tentativas%<=3);
LOG("&e&l» &7Falha na verificação, tentando novamente.");
ELSE;
LOG("&e&l» &7OnChat não ou mal instalada.");
TOGGLE(sleepmacro);
LOG("&4&l[Macro] &6Sleep Construtor &4[OFF]");
STOP;
ENDIF;
ENDIF;
UNTIL(@sb_home_set);
LOG("&e&l» &7Macro OnChat verificada.");
WAIT(20T);
LOG("&e&l» &7Iniciando construção.");
DO;
SET(#sleep_shild,"");
UNSET(@sb_home_tp);
}$$/home sb_home$${
DO;
INC(#sleep_shild,1);
UNTIL((%#sleep_shild%>=150)||(@sb_home_tp));
WAIT(3T);
WHILE(!@sb_home_tp);
DO(2);
KEYDOWN(JUMP);
WAIT(4T);
KEYUP(JUMP);
WAIT(4T);
LOOP;
LOG("");
LOG("&e&l» &7Construindo a fachada da casa.");
LOG("");
WAIT(5T);
IFMATCHES("%DIRECTION%","(.*)",&sleep_dir,1,NONE);
IF(%&sleep_dir%="N");
SET(&sleep_dir_forward,"NORTH");
SET(&sleep_dir_back,"SOUTH");
SET(&sleep_dir_right,"EAST");
SET(&sleep_dir_left,"WEST");
SET(&getidrel_porta,"0>-2");
ELSEIF(%&sleep_dir%="S");
SET(&sleep_dir_forward,"SOUTH");
SET(&sleep_dir_back,"NORTH");
SET(&sleep_dir_right,"WEST");
SET(&sleep_dir_left,"EAST");
SET(&getidrel_porta,"0>+2");
ELSEIF(%&sleep_dir%="E");
SET(&sleep_dir_forward,"EAST");
SET(&sleep_dir_back,"WEST");
SET(&sleep_dir_right,"SOUTH");
SET(&sleep_dir_left,"NORTH");
SET(&getidrel_porta,"+2>0");
ELSEIF(%&sleep_dir%="W");
SET(&sleep_dir_forward,"WEST");
SET(&sleep_dir_back,"EAST");
SET(&sleep_dir_right,"NORTH");
SET(&sleep_dir_left,"SOUTH");
SET(&getidrel_porta,"-2>0");
ENDIF;
LOOK(%&sleep_dir_forward%);
ENDIF;
SET(#xpos_inicial,"%XPOS%");
SET(#ypos_inicial,"%YPOS%");
SET(#zpos_inicial,"%ZPOS%");
SET(#sleep_bloco,"1");
DO;
UNSET(shift);
IF(%#sleep_bloco%=1);
SET(&yaw,"-57");
SET(&pitch,"+23");
SET(#pick,"17");
ELSEIF(%#sleep_bloco%=2);
SET(&yaw,"+56");
SET(&pitch,"+23");
SET(#pick,"17");
ELSEIF(%#sleep_bloco%=3);
SET(&yaw,"+44");
SET(&pitch,"+29");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=4);
SET(&yaw,"+26");
SET(&pitch,"+35");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=5);
SET(&yaw,"-46");
SET(&pitch,"+29");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=6);
SET(&yaw,"-28");
SET(&pitch,"+35");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=7);
SET(&yaw,"+0");
SET(&pitch,"+38");
SET(#pick,"3");
ELSEIF(%#sleep_bloco%=8);
SET(&yaw,"-57");
SET(&pitch,"+9");
SET(#pick,"17");
ELSEIF(%#sleep_bloco%=9);
SET(&yaw,"+55");
SET(&pitch,"+9");
SET(#pick,"17");
ELSEIF(%#sleep_bloco%=10);
SET(&yaw,"+44");
SET(&pitch,"+12");
SET(#pick,"20");
ELSEIF(%#sleep_bloco%=11);
SET(&yaw,"+25");
SET(&pitch,"+15");
SET(#pick,"20");
ELSEIF(%#sleep_bloco%=12);
SET(&yaw,"-46");
SET(&pitch,"+11");
SET(#pick,"20");
ELSEIF(%#sleep_bloco%=13);
SET(&yaw,"-28");
SET(&pitch,"+15");
SET(#pick,"20");
ELSEIF(%#sleep_bloco%=14);
SET(&yaw,"+0");
SET(&pitch,"+17");
SET(#pick,"3");
ELSEIF(%#sleep_bloco%=15);
SET(&yaw,"-57");
SET(&pitch,"+24");
SET(#pick,"17");
ELSEIF(%#sleep_bloco%=16);
SET(&yaw,"+55");
SET(&pitch,"+24");
SET(#pick,"17");
ELSEIF(%#sleep_bloco%=17);
SET(&yaw,"+44");
SET(&pitch,"+29");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=18);
SET(&yaw,"+26");
SET(&pitch,"+35");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=19);
SET(&yaw,"-46");
SET(&pitch,"+29");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=20);
SET(&yaw,"-27");
SET(&pitch,"+35");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=21);
SET(&yaw,"+0");
SET(&pitch,"+38");
SET(#pick,"5");
ELSEIF(%#sleep_bloco%=22);
SET(&yaw,"+0");
SET(&pitch,"+66");
SET(#pick,"1");
SET(shift);
ELSEIF(%#sleep_bloco%=23);
SET(&yaw,"+0");
SET(&pitch,"+70");
SET(#pick,"324");
ENDIF;
SET(#xpos_atual,"%XPOS%");
SET(#ypos_atual,"%YPOS%");
SET(#zpos_atual,"%ZPOS%");
IF(shift);
KEYDOWN(SNEAK);
ENDIF;
LOOK(%&sleep_dir_forward%);
LOOK(%&yaw%,%&pitch%);
PICK(%#pick%);
WAIT(2T);
KEY(USE);
INC(#sleep_bloco,1);
DO;
LOOK(%&sleep_dir_forward%);
LOOK(%&yaw%,%&pitch%);
UNTIL((%HITID%=%#pick%)||(%HITID%=64));
WAIT(1T);
KEYUP(SNEAK);
IF(%#sleep_bloco%=15);
DO(2);
SET(#xpos_atual,"%XPOS%");
SET(#ypos_atual,"%YPOS%");
SET(#zpos_atual,"%ZPOS%");
DO;
GETID(%#xpos_atual%,%#ypos_atual%,%#zpos_atual%,#sleep_id);
IF(%#sleep_id%!=3);
LOOK(%&sleep_dir_forward%);
LOOK(+0,+90);
PICK(3);
KEYDOWN(JUMP);
WAIT(5T);
KEY(USE);
WAIT(1T);
KEYUP(JUMP);
WAIT(2T);
ENDIF;
UNTIL(%#sleep_id%=3);
LOOP;
ELSEIF(%#sleep_bloco%=22);
IFMATCHES("%&getidrel_porta%","(.*)>(.*)");
MATCH("%&getidrel_porta%","(.*)>(.*)",{&get_x,&get_z});
ENDIF;
DO(3);
DO;
LOOK(%&sleep_dir_forward%);
LOOK(+0,+58);
PICK(273);
KEY(ATTACK);
GETIDREL(%&get_x%,-1,%&get_z%,#id_1);
GETIDREL(%&get_x%,-2,%&get_z%,#id_2);
GETIDREL(%&get_x%,-3,%&get_z%,#id_3);
UNTIL((%#id_1%=0)&&(%#id_2%=0)&&(%#id_3%=0));
WAIT(2T);
LOOP;
DO;
LOOK(%&sleep_dir_forward%);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNTIL((%#xpos_atual%!=%XPOS%)||(%#zpos_atual%!=%ZPOS%));
WAIT(1T);
KEYUP(FORWARD);
WAIT(1T);
ELSEIF(%#sleep_bloco%=24);
DO(9);
LOOK(%&sleep_dir_forward%);
UNSPRINT;
KEYDOWN(FORWARD);
KEYDOWN(JUMP);
LOOP;
KEYUP(FORWARD);
KEYUP(JUMP);
WAIT(2T);
SET(#xpos_atual,"%XPOS%");
SET(#zpos_atual,"%ZPOS%");
DO;
LOOK(%&sleep_dir_back%);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNTIL((%#xpos_atual%!=%XPOS%)||(%#zpos_atual%!=%ZPOS%));
KEYUP(SNEAK);
KEYUP(FORWARD);
#ypos_inicial_up = %#ypos_inicial% + 1;
DO(3);
DO;
LOOK(%&sleep_dir_back%);
LOOK(+0,+65);
PICK(273);
KEY(ATTACK);
GETID(%#xpos_inicial%,%#ypos_inicial%,%#zpos_inicial%,#id_1);
GETID(%#xpos_inicial%,%#ypos_inicial_up%,%#zpos_inicial%,#id_2);
UNTIL((%#id_1%=0)&&(%#id_2%=0));
WAIT(2T);
LOOP;
DO(2);
SET(#xpos_atual,"%XPOS%");
SET(#zpos_atual,"%ZPOS%");
DO;
LOOK(%&sleep_dir_back%);
KEYDOWN(SNEAK);
KEYDOWN(BACK);
UNTIL((%#xpos_atual%!=%XPOS%)||(%#zpos_atual%!=%ZPOS%));
LOOP;
KEYUP(BACK);
DO(3);
SET(#xpos_atual,"%XPOS%");
SET(#zpos_atual,"%ZPOS%");
DO;
LOOK(%&sleep_dir_forward%);
KEYDOWN(SNEAK);
KEYDOWN(LEFT);
UNTIL((%#xpos_atual%!=%XPOS%)||(%#zpos_atual%!=%ZPOS%));
LOOP;
WAIT(2T);
KEYUP(SNEAK);
KEYUP(LEFT);
ENDIF;
WHILE(%#sleep_bloco%<24);
LOG("");
LOG("&e&l» &7Construindo as paredes da casa.");
LOG("");
SET(#sleep_parede,"1");
DO;
IF(%#sleep_parede%=1);
SET(&parede_look,"%&sleep_dir_forward%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=2);
SET(&parede_look,"%&sleep_dir_forward%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=3);
SET(&parede_look,"%&sleep_dir_forward%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=4);
SET(&parede_look,"%&sleep_dir_forward%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=5);
SET(&parede_look,"%&sleep_dir_forward%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=6);
SET(&parede_look,"%&sleep_dir_forward%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=7);
SET(&parede_look,"%&sleep_dir_forward%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=8);
SET(&parede_look,"%&sleep_dir_forward%");
SET(&parede_bloco,"<17.1><17.2><17.3>");
ELSEIF(%#sleep_parede%=9);
SET(&parede_look,"%&sleep_dir_right%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=10);
SET(&parede_look,"%&sleep_dir_right%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=11);
SET(&parede_look,"%&sleep_dir_right%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=12);
SET(&parede_look,"%&sleep_dir_right%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=13);
SET(&parede_look,"%&sleep_dir_right%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=14);
SET(&parede_look,"%&sleep_dir_right%");
SET(&parede_bloco,"<17.1><17.2><17.3>");
ELSEIF(%#sleep_parede%=15);
SET(&parede_look,"%&sleep_dir_back%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=16);
SET(&parede_look,"%&sleep_dir_back%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=17);
SET(&parede_look,"%&sleep_dir_back%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=18);
SET(&parede_look,"%&sleep_dir_back%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=19);
SET(&parede_look,"%&sleep_dir_back%");
SET(&parede_bloco,"<5.1><20.2><5.3>");
ELSEIF(%#sleep_parede%=20);
SET(&parede_look,"%&sleep_dir_back%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ELSEIF(%#sleep_parede%=21);
SET(&parede_look,"%&sleep_dir_back%");
SET(&parede_bloco,"<5.1><5.2><5.3>");
ENDIF;
SET(#ypos_atual,"%YPOS%");
DO;
DO(2);
LOOK(%&parede_look%);
LOOK(+0,+90);
IF(%YPOS%=%#ypos_atual%);
UNSPRINT;
KEYDOWN(FORWARD);
WAIT(5MS);
KEYDOWN(BACK);
WAIT(1MS);
ENDIF;
KEYUP(FORWARD);
KEYUP(BACK);
LOOP;
UNTIL(%YPOS%=%#ypos_inicial%);
DO(2);
KEYDOWN(BACK);
LOOP;
KEYUP(BACK);
WAIT(2T);
DO(3);
SET(#xpos_atual,"%XPOS%");
SET(#ypos_atual,"%YPOS%");
SET(#zpos_atual,"%ZPOS%");
IFMATCHES("%&parede_bloco%","<[\d]+.[\d]>");
MATCH("%&parede_bloco%","<([\d+]+.[\d])>",&replace,1,NONE);
MATCH("%&parede_bloco%","<([\d+]+).[\d]>",#bloco_id,1,NONE);
REPLACE(&parede_bloco,"<%&replace%>","");
ENDIF;
DO;
GETID(%#xpos_atual%,%#ypos_atual%,%#zpos_atual%,#sleep_id);
IF(%#sleep_id%!=%#bloco_id%);
LOOK(%&parede_look%);
LOOK(+0,+90);
PICK(%#bloco_id%);
KEYDOWN(JUMP);
WAIT(5T);
KEY(USE);
WAIT(1T);
KEYUP(JUMP);
WAIT(2T);
ENDIF;
UNTIL(%#sleep_id%=%#bloco_id%);
LOOP;
INC(#sleep_parede,1);
WHILE(%#sleep_parede%<22);
DO;
DO(2);
LOOK(%&sleep_dir_back%);
GETIDREL(0,-1,0,#sleep_id);
IF(%#sleep_id%!=17);
UNSPRINT;
KEYDOWN(FORWARD);
WAIT(5MS);
KEYDOWN(BACK);
WAIT(1MS);
ENDIF;
KEYUP(FORWARD);
KEYUP(BACK);
LOOP;
UNTIL(%#sleep_id%=17);
LOG("");
LOG("&e&l» &7Construindo o telhado da casa.");
LOG("");
SET(escada_break);
SET(#sleep_escada,"1");
DO;
UNSET(bloco);
IF(%#sleep_escada%=1);
SET(&escada_look,"%&sleep_dir_left%");
ELSEIF(%#sleep_escada%=2);
SET(&escada_look,"%&sleep_dir_left%");
ELSEIF(%#sleep_escada%=3);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=4);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=5);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=6);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=7);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=8);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=9);
SET(&escada_look,"%&sleep_dir_left%");
ELSEIF(%#sleep_escada%=10);
SET(&escada_look,"%&sleep_dir_back%");
ELSEIF(%#sleep_escada%=11);
SET(&escada_look,"%&sleep_dir_back%");
SET(bloco);
ELSEIF(%#sleep_escada%=12);
SET(&escada_look,"%&sleep_dir_back%");
SET(bloco);
ELSEIF(%#sleep_escada%=13);
SET(&escada_look,"%&sleep_dir_back%");
SET(bloco);
ELSEIF(%#sleep_escada%=14);
SET(&escada_look,"%&sleep_dir_back%");
SET(bloco);
ELSEIF(%#sleep_escada%=15);
SET(&escada_look,"%&sleep_dir_back%");
ELSEIF(%#sleep_escada%=16);
SET(&escada_look,"%&sleep_dir_right%");
ELSEIF(%#sleep_escada%=17);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=18);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=19);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=20);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=21);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=22);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=23);
SET(&escada_look,"%&sleep_dir_right%");
ELSEIF(%#sleep_escada%=24);
SET(&escada_look,"%&sleep_dir_forward%");
ELSEIF(%#sleep_escada%=25);
SET(&escada_look,"%&sleep_dir_forward%");
SET(bloco);
ELSEIF(%#sleep_escada%=26);
SET(&escada_look,"%&sleep_dir_forward%");
SET(bloco);
ELSEIF(%#sleep_escada%=27);
SET(&escada_look,"%&sleep_dir_forward%");
SET(bloco);
ELSEIF(%#sleep_escada%=28);
SET(&escada_look,"%&sleep_dir_forward%");
SET(bloco);
ELSEIF(%#sleep_escada%=29);
SET(&escada_look,"%&sleep_dir_left%");
ELSEIF(%#sleep_escada%=30);
SET(&escada_look,"%&sleep_dir_left%");
ELSEIF(%#sleep_escada%=31);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=32);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=33);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=34);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=35);
SET(&escada_look,"%&sleep_dir_left%");
ELSEIF(%#sleep_escada%=36);
SET(&escada_look,"%&sleep_dir_back%");
ELSEIF(%#sleep_escada%=37);
SET(&escada_look,"%&sleep_dir_back%");
SET(bloco);
ELSEIF(%#sleep_escada%=38);
SET(&escada_look,"%&sleep_dir_back%");
SET(bloco);
ELSEIF(%#sleep_escada%=39);
SET(&escada_look,"%&sleep_dir_back%");
ELSEIF(%#sleep_escada%=40);
SET(&escada_look,"%&sleep_dir_right%");
ELSEIF(%#sleep_escada%=41);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=42);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=43);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=44);
SET(&escada_look,"%&sleep_dir_right%");
SET(bloco);
ELSEIF(%#sleep_escada%=45);
SET(&escada_look,"%&sleep_dir_right%");
ELSEIF(%#sleep_escada%=46);
SET(&escada_look,"%&sleep_dir_forward%");
ELSEIF(%#sleep_escada%=47);
SET(&escada_look,"%&sleep_dir_forward%");
SET(bloco);
ELSEIF(%#sleep_escada%=48);
SET(&escada_look,"%&sleep_dir_forward%");
SET(bloco);
ELSEIF(%#sleep_escada%=49);
SET(&escada_look,"%&sleep_dir_left%");
ELSEIF(%#sleep_escada%=50);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=51);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=52);
SET(&escada_look,"%&sleep_dir_left%");
SET(bloco);
ELSEIF(%#sleep_escada%=53);
SET(&escada_look,"%&sleep_dir_left%");
ELSEIF(%#sleep_escada%=54);
SET(&escada_look,"%&sleep_dir_back%");
ELSEIF(%#sleep_escada%=55);
SET(&escada_look,"%&sleep_dir_back%");
ELSEIF(%#sleep_escada%=56);
SET(&escada_look,"%&sleep_dir_right%");
ELSEIF(%#sleep_escada%=57);
SET(&escada_look,"%&sleep_dir_right%");
ELSEIF(%#sleep_escada%=58);
SET(&escada_look,"%&sleep_dir_right%");
ELSEIF(%#sleep_escada%=59);
SET(&escada_look,"%&sleep_dir_right%");
ELSEIF(%#sleep_escada%=60);
SET(&escada_look,"%&sleep_dir_forward%");
ENDIF;
IF(escada_break);
UNSET(escada_break);
ELSE;
IF((%#sleep_escada%=29)||(%#sleep_escada%=49));
ELSE;
SET(#xpos_atual,"%XPOS%");
SET(#ypos_atual,"%YPOS%");
SET(#zpos_atual,"%ZPOS%");
DO;
DO(2);
LOOK(%&escada_look%);
LOOK(+0,+90);
IF(%YPOS%=%#ypos_atual%);
UNSPRINT;
KEYDOWN(RIGHT);
WAIT(1MS);
KEYDOWN(LEFT);
WAIT(1MS);
ENDIF;
KEYUP(RIGHT);
KEYUP(LEFT);
LOOP;
UNTIL((%HITID%!=134)&&(%XPOS%!=%#xpos_atual%)||(%ZPOS%!=%#zpos_atual%));
ENDIF;
ENDIF;
SET(#xpos_atual,"%XPOS%");
IF(%#sleep_escada%<=28);
#ypos_atual = %#ypos_inicial% + 3;
ELSEIF(%#sleep_escada%<=48);
#ypos_atual = %#ypos_inicial% + 4;
ELSE;
#ypos_atual = %#ypos_inicial% + 5;
ENDIF;
SET(#zpos_atual,"%ZPOS%");
DO;
GETID(%#xpos_atual%,%#ypos_atual%,%#zpos_atual%,#sleep_id);
IF(%#sleep_id%!=134);
LOOK(%&escada_look%);
LOOK(+0,+90);
PICK(134);
KEYDOWN(JUMP);
WAIT(5T);
KEY(USE);
WAIT(1T);
KEYUP(JUMP);
WAIT(2T);
ENDIF;
UNTIL(%#sleep_id%=134);
IF(bloco);
SET(#xpos_atual,"%XPOS%");
SET(#zpos_atual,"%ZPOS%");
DO;
LOOK(%&escada_look%);
LOOK(+0,+81);
KEYDOWN(SNEAK);
KEYDOWN(RIGHT);
UNTIL((%XPOS%!=%#xpos_atual%)||(%ZPOS%!=%#zpos_atual%));
KEYUP(RIGHT);
DO;
LOOK(%&escada_look%);
LOOK(+0,+81);
KEYDOWN(SNEAK);
KEYDOWN(LEFT);
UNTIL((%XPOS%=%#xpos_atual%)&&(%ZPOS%=%#zpos_atual%));
IF((%#sleep_escada%=28)||(%#sleep_escada%=48));
WAIT(5T);
ELSE;
WAIT(1T);
ENDIF;
KEYUP(LEFT);
DO;
LOOK(%&escada_look%);
LOOK(+180,+81);
KEYDOWN(SNEAK);
KEYDOWN(BACK);
UNTIL((%XPOS%!=%#xpos_atual%)||(%ZPOS%!=%#zpos_atual%));
WAIT(7T);
LOOK(%&escada_look%);
LOOK(+180,+81);
PICK(5);
WAIT(2T);
KEY(USE);
WAIT(2T);
IF((%#sleep_escada%=28)||(%#sleep_escada%=48));
LOOK(%&sleep_dir_left%);
ELSE;
SET(#xpos_atual,"%XPOS%");
SET(#zpos_atual,"%ZPOS%");
DO;
LOOK(%&escada_look%);
LOOK(+0,+90);
KEYDOWN(SNEAK);
KEYDOWN(BACK);
UNTIL((%HITID%=134)&&(%XPOS%!=%#xpos_atual%)||(%ZPOS%!=%#zpos_atual%));
ENDIF;
KEYUP(SNEAK);
KEYUP(BACK);
ENDIF;
INC(#sleep_escada,1);
WHILE(%#sleep_escada%<61);
DO;
SET(#sleep_shild,"");
UNSET(@sb_home_tp);
}$$/home sb_home$${
DO;
INC(#sleep_shild,1);
UNTIL((%#sleep_shild%>=150)||(@sb_home_tp));
WAIT(3T);
WHILE(!@sb_home_tp);
DO(2);
LOOK(%&sleep_dir_forward%);
KEYDOWN(JUMP);
WAIT(4T);
KEYUP(JUMP);
WAIT(4T);
LOOP;
LOG("");
LOG("&e&l» &7Salvando coordenadas.");
LOG("");
WAIT(5T);
DO;
LOOK(%&sleep_dir_forward%);
KEYDOWN(FORWARD);
PICK(273)
IF(%HITID%=64);
KEY(USE);
ENDIF;
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
UNTIL(%HITID%=20);
WAIT(20T);
DO;
LOOK(%&sleep_dir_forward%);
KEYDOWN(LEFT);
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
UNTIL(%HITID%=5);
WAIT(25T);
KEYUP(LEFT);
KEYUP(FORWARD);
SET(#xpos_fim,"%XPOS%");
SET(#zpos_fim,"%ZPOS%");
DO;
LOOK(%&sleep_dir_forward%);
KEYDOWN(RIGHT);
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
UNTIL(%HITID%=20);
WAIT(5T);
KEYUP(RIGHT);
DO;
LOOK(%&sleep_dir_forward%);
KEYDOWN(RIGHT);
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
UNTIL(%HITID%=5);
WAIT(25T);
KEYUP(RIGHT);
DO;
LOOK(%&sleep_dir_back%);
KEYDOWN(FORWARD);
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
UNTIL(%HITID%=20);
WAIT(30T);
KEYUP(LEFT);
KEYUP(FORWARD);
SET(#xpos_inicio,"%XPOS%");
SET(#ypos_inicio,"%YPOS%");
SET(#zpos_inicio,"%ZPOS%");
LOG("");
LOG("&e&l» &7Construindo o chão da casa.");
LOG("");
DO;
LOOK(%&sleep_dir_back%);
KEYDOWN(SNEAK);
KEYDOWN(BACK);
UNTIL((%XPOS%!=%#xpos_inicio%)||(%ZPOS%!=%#zpos_inicio%));
WAIT(3T);
KEYUP(SNEAK);
KEYUP(BACK);
#sleep_ypos = %#ypos_inicial% - 1;
SET(#centro_casa,"");
FOR(#sleep_xpos,%#xpos_inicio%,%#xpos_fim%);
FOR(#sleep_zpos,%#zpos_inicio%,%#zpos_fim%);
DO;
IF(%XPOS%<%#sleep_xpos%);
LOOK(EAST);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNSPRINT;
ELSEIF(%XPOS%>%#sleep_xpos%);
LOOK(WEST);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNSPRINT;
ELSE;
WAIT(10MS);
KEYUP(SNEAK);
KEYUP(FORWARD);
BREAK;
ENDIF;
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
LOOP;
DO;
IF(%ZPOS%<%#sleep_zpos%);
LOOK(SOUTH);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNSPRINT;
ELSEIF(%ZPOS%>%#sleep_zpos%);
LOOK(NORTH);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNSPRINT;
ELSE;
WAIT(10MS);
KEYUP(SNEAK);
KEYUP(FORWARD);
BREAK;
ENDIF;
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
LOOP;
GETIDREL(0,-2,0,#bloco_id);
IF(%#bloco_id%!=0);
DO(2);
DO;
GETID(%#sleep_xpos%,%#sleep_ypos%,%#sleep_zpos%,#bloco_id);
IF((%#bloco_id%!=0)&&(%#bloco_id%!=1));
DO;
LOOK(%&sleep_dir_forward%);
LOOK(+0,+90);
PICK(273);
KEY(ATTACK);
GETID(%#sleep_xpos%,%#sleep_ypos%,%#sleep_zpos%,#bloco_id);
UNTIL((%#bloco_id%=0)||(%#bloco_id%=1));
LOOK(%&sleep_dir_forward%);
LOOK(+0,+90);
PICK(1);
WAIT(2T);
IF(%YPOS%=%#ypos_inicial%);
KEY(USE);
ELSE;
KEYDOWN(JUMP);
WAIT(5T);
KEY(USE);
WAIT(1T);
KEYUP(JUMP);
WAIT(4T);
ENDIF;
ENDIF;
WAIT(2T);
GETID(%#sleep_xpos%,%#sleep_ypos%,%#sleep_zpos%,#bloco_id);
UNTIL(%#bloco_id%=1);
LOOP;
WAIT(2T);
ELSE;
ENDIF;
INC(#centro_casa,1);
IF(%#centro_casa%=18);
SET(#xpos_centro,"%#sleep_xpos%");
SET(#zpos_centro,"%#sleep_zpos%");
ENDIF;
NEXT;
NEXT;
DO;
IF(%XPOS%<%#xpos_centro%);
LOOK(EAST);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNSPRINT;
ELSEIF(%XPOS%>%#xpos_centro%);
LOOK(WEST);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNSPRINT;
ELSE;
WAIT(3T);
KEYUP(SNEAK);
KEYUP(FORWARD);
BREAK;
ENDIF;
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
LOOP;
DO;
IF(%ZPOS%<%#zpos_centro%);
LOOK(SOUTH);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNSPRINT;
ELSEIF(%ZPOS%>%#zpos_centro%);
LOOK(NORTH);
KEYDOWN(SNEAK);
KEYDOWN(FORWARD);
UNSPRINT;
ELSE;
WAIT(3T);
KEYUP(SNEAK);
KEYUP(FORWARD);
BREAK;
ENDIF;
IF(%YPOS%!=%#ypos_inicial%);
KEYDOWN(JUMP);
ELSE;
KEYUP(JUMP);
ENDIF;
LOOP;
GUI(INVENTORY);
DO(2);
FOR(#sleep_slot,36,44);
SLOTCLICK(%#sleep_slot%,L,TRUE);
WAIT(20MS);
NEXT;
LOOP;
GUI();
LOG("");
LOG("&e&l» &7Decorando a casa.");
LOG("");
DO;
SET(#sleep_shild,"");
UNSET(@kit_nb);
}$$/kit nb$${
DO;
INC(#sleep_shild,1);
UNTIL((%#sleep_shild%>=150)||(@kit_nb));
WAIT(3T);
WHILE(!@kit_nb);
SET(#kit_nb,"1");
DO;
UNSET(shift);
IF(%#kit_nb%=1);
SET(&yaw,"+0");
SET(&pitch,"+345");
SET(#pick,"50");
ELSEIF(%#kit_nb%=2);
SET(&yaw,"-180");
SET(&pitch,"+345");
SET(#pick,"50");
ELSEIF(%#kit_nb%=3);
SET(&yaw,"+34");
SET(&pitch,"+18");
SET(#pick,"54");
ELSEIF(%#kit_nb%=4);
SET(&yaw,"-130");
SET(&pitch,"+19");
SET(#pick,"58");
ELSEIF(%#kit_nb%=5);
SET(&yaw,"-35");
SET(&pitch,"+23");
SET(#pick,"323");
ENDIF;
LOOK(%&sleep_dir_forward%);
LOOK(%&yaw%,%&pitch%);
PICK(%#pick%);
WAIT(2T);
KEY(USE);
INC(#kit_nb,1);
WAIT(2T);
IF(%#kit_nb%=6);
WAIT(5T);
TYPE("Lar doce Lar");
WAIT(5T);
DO(3);
PRESS(RETURN);
WAIT(5T);
LOOP;
TYPE("Dev. SLEEP");
WAIT(5T);
PRESS(ESCAPE);
ENDIF;
WHILE(%#kit_nb%<6);
LOG("&e&l» &7Fim de construção.");
TOGGLE(sleepmacro);
LOG("&4&l[Macro] &6Sleep Construtor &4[OFF]");
STOP();

}$$
 
Seu nick: Nugou
Servidor em que joga: Todos
Servidor em que a macro foi testada: Ares
Lista de blocos e a quantidade a ser utilizada:
- 300 madeiras de pinheiro;
- 1122 tábuas de carvalho;
- 296 escadas de carvalho;
- 108 vidros;
- 2 portas;
- 26 cercas;
- 8 terras;

Breve descrição de como utilizar:
- So olhar para o lado que será a frente da casa.
- A macro inicia no fundo direito da casa.
- as 2 portas e 1 pack de cada item deve esta na hotbar.

Para instalar, coloque o código no botão que deseja ativar.

Código da macro:
$${
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;
}$$
 
Nick: [member=OwenWinner] (fórum) e OwenVIGOR (servidor)
Servidor em que joga: Fenix
Servidor em que a macro foi testada: Fenix
Lista de blocos e quantidade a ser utilizada:
  • 58 madeiras refinadas de carvalho
  • 12 cercas
  • 6 baús simples
  • 2 folhas de pinheiro
  • 2 estantes
  • 1 pedra luminosa
  • 1 vidro
  • 1 fornalha
  • 1 madeira bruta de carvalho
Como ilustra a imagem a seguir (a ordem dos itens não importa):

03x8rxX.png
Descrição de como utilizar: Esse macro construirá para você um aconchegante lar, não muito grande, mas muito estiloso e aconchegante. Como percebem, esse macro exige pouquíssimos itens para funcionar, tanto que todos os materiais cabem na hot-bar. Para garantir o pleno funcionamento do macro, garanta que todos os itens requeridos estão com você na hot-bar. É necessário também preparar um terreno específico para a construção, o qual mostrarei logo a seguir. Um dos requisitos apresentados no tópico seria a complexidade do script, que eu interpretei como "o quão complexo você precisa ser para realizar uma tarefa", e, para quem é desse mundo da programação, sabe que devemos prezar sempre para o método mais simples, e utilizar os mais complexos apenas para uma tarefa igualmente complexa. Portanto, todos os códigos do macro são simples, dado que a casa a ser construída é igualmente simples. Vamos lá, sem mais delongas, vamos para as instruções de fato de como utilizar o macro:
  • Terreno para iniciar a construção
Há um terreno que precisa ser preparado antes de se instalar o macro. Não mostrarei passo a passo de como fazê-lo, mas deixarei as prints para que fique claro como que o terreno, escavado no subsolo, deve ficar:
C867htS.png
qZAdx3w.png
DW2yyJK.png
YMCn3Q8.png
HCQ44R0.png
4EImUTi.png
j3d1uQ5.png
KPA0D3n.png
DG4MiWb.png
PgJf6Xp.png
Nota: a madeira no meio não está inclusa nas 58 exigidas para a construção.
  • Terreno feito, como instalar o macro.
Creio que todos devam saber como se instala um macro. Mas, vamos lá:
  • Aperte ESC
  • Vá em Options
  • Agora, vá em Controls
  • E então em Macro Settings
  • Selecione alguma letra que não esteja em vermelho
  • Digite $$<casa.txt>
  • Agora vá em Edit File
  • No campo à digitar, digite casa e clique em Create
  • Cole o código que mostrarei a seguir.
$${
if(x);
log("&3[Macro] &6Seu macro foi &4desligado&6.");
unset(x);
stop();
else;
log("&3[Macro] &6Seu macro foi &2ligado&6! Construíndo o chão...");
set(x);
&dir=%DIRECTION%;
ifmatches(%&d%,N);&dir=NORTH;endif;
ifmatches(%&d%,S);&dir=SOUTH;endif;
ifmatches(%&d%,E);&dir=EAST;endif;
ifmatches(%&d%,W);&dir=WEST;endif;
pick(5);
look(NORTH);look(0,-320);
key(use);
wait(1);
look(NORTH);look(0,-290);
key(use);
wait(1);
look(NORTH);look(180,-320);
key(use);
wait(1);
look(NORTH);look(180,-290);
key(use);
wait(1);
look(NORTH);look(90,-290);
key(use);
wait(1);
look(NORTH);look(270,-290);
key(use);
wait(1);
look(NORTH);look(45,-310);
key(use);
wait(1);
look(NORTH);look(135,-310);
key(use);
wait(1);
look(NORTH);look(225,-310);
key(use);
wait(1);
look(NORTH);look(305,-310);
key(use);
wait(1);
log("&3[Macro] &6Chão construído! Construíndo o teto...");
wait(3);
look(NORTH);look(0,310);
key(use);
wait(1);
key(use);
wait(1);
look(%&dir%);look(45,310);
key(use);
wait(1);
look(%&dir%);look(-90,310);
key(use);
wait(1);
look(%&dir%);look(-45,310);
key(use);
wait(1);
key(use);
wait(1);
look(%&dir%);look(-45,310);
key(use);
wait(1);
look(%&dir%);look(-45,310);
key(use);
wait(1);
key(use);
wait(1);
look(%&dir%);look(-45,310);
key(use);
wait(1);
look(%&dir%);look(-45,310);
key(use);
wait(1);
key(use);
wait(1);
look(NORTH);look(0,1000);
pick(89);
key(use);
wait(1);
pick(20);
key(use);
wait(1);
log("&3[Macro] &6Teto construído! Construíndo paredes...");
wait(3);
pick(5);
look(NORTH);look(0,0);
key(use);
wait(1);
look(NORTH);look(0,-20);
key(use);
wait(1);
look(NORTH);look(0,30);
key(use);
wait(1);
look(NORTH);look(25,0);
key(use);
wait(1);
look(NORTH);look(25,-20);
key(use);
wait(1);
look(NORTH);look(25,30);
key(use);
wait(1);
look(NORTH);look(50,0);
key(use);
wait(1);
look(NORTH);look(50,-20);
key(use);
wait(1);
look(NORTH);look(50,30);
key(use);
wait(1);
look(NORTH);look(-30,0);
key(use);
wait(1);
look(NORTH);look(-30,-20);
key(use);
wait(1);
look(NORTH);look(-30,30);
key(use);
wait(1);
look(NORTH);look(-50,0);
key(use);
wait(1);
look(NORTH);look(-50,-20);
key(use);
wait(1);
look(NORTH);look(-50,30);
key(use);
wait(1);
look(NORTH);look(90,0);
key(use);
wait(1);
look(NORTH);look(90,-20);
key(use);
wait(1);
look(NORTH);look(90,30);
key(use);
wait(1);
look(NORTH);look(130,0);
key(use);
wait(1);
look(NORTH);look(130,-20);
key(use);
wait(1);
look(NORTH);look(130,30);
key(use);
wait(1);
look(NORTH);look(150,0);
key(use);
wait(1);
look(NORTH);look(150,-20);
key(use);
wait(1);
look(NORTH);look(150,30);
key(use);
wait(1);
look(NORTH);look(180,0);
key(use);
wait(1);
look(NORTH);look(180,-20);
key(use);
wait(1);
look(NORTH);look(180,30);
key(use);
wait(1);
look(NORTH);look(210,0);
key(use);
wait(1);
look(NORTH);look(210,-20);
key(use);
wait(1);
look(NORTH);look(210,30);
key(use);
wait(1);
look(NORTH);look(240,0);
key(use);
wait(1);
look(NORTH);look(240,-20);
key(use);
wait(1);
look(NORTH);look(240,30);
key(use);
wait(1);
look(NORTH);look(270,0);
key(use);
wait(1);
look(NORTH);look(270,-20);
key(use);
wait(1);
look(NORTH);look(270,30);
key(use);
wait(1);
log("&3[Macro] &6Paredes construídas! Construíndo a decoração...");
wait(3);
pick(54);
look(NORTH);look(0,0);
key(use);
wait(1);
look(NORTH);look(0,-20);
key(use);
wait(1);
look(NORTH);look(0,30);
key(use);
wait(1);
pick(18:2);
look(NORTH);look(90,0);
key(use);
wait(1);
look(NORTH);look(90,-20);
key(use);
wait(1);
pick(17);
look(NORTH);look(90,40);
key(use);
wait(1);
pick(54);
look(NORTH);look(180,-20);
key(use);
wait(1);
look(NORTH);look(180,40);
key(use);
wait(1);
look(NORTH);look(180,0);
key(use);
wait(1);
pick(47);
look(NORTH);look(270,-20);
key(use);
wait(1);
look(NORTH);look(270,30);
key(use);
wait(1);
pick(61);
look(NORTH);look(270,5);
key(use);
wait(1);
pick(85);
look(NORTH);look(45,0);
key(use);
wait(1);
look(NORTH);look(45,-20);
key(use);
wait(1);
look(NORTH);look(45,30);
key(use);
wait(1);
look(NORTH);look(135,0);
key(use);
wait(1);
look(NORTH);look(135,-20);
key(use);
wait(1);
look(NORTH);look(135,30);
key(use);
wait(1);
look(NORTH);look(225,0);
key(use);
wait(1);
look(NORTH);look(225,-20);
key(use);
wait(1);
look(NORTH);look(225,30);
key(use);
wait(1);
look(NORTH);look(305,0);
key(use);
wait(1);
look(NORTH);look(305,-20);
key(use);
wait(1);
look(NORTH);look(305,30);
key(use);
wait(1);
log("&3[Macro] &6Casa construída! Pressione a tecla escolhida para desligar o macro.");
endif;
}$$

Olhando para qualquer direção, aperte a tecla escolhida. Enquanto o macro estiver em execução, não movimente o mouse nem o teclado. Isso afetará o funcionamento do mesmo.
Atenciosamente, [member=OwenWinner].
 
Evento fechado.



Evento finalizado, tag [Finalizado] adicionada e movido para área correspondente.

Obs: está mensagem é automatica
 
Status
Não está aberto para novas respostas.

Users who are viewing this thread

Voltar
Topo