Veja um tutorial aqui: http://forum.craftlandia.com.br/ipb/index.php?/topic/859206-upando-sem-erros-todas-as-skills/#entry7438608
Macro
$${
if(teste);
unset(teste);
LOG(Macro Encerrado!);
stop();
else;
set(teste);
LOG(Macro Iniciado!);
#item = 291;
Do();
PICK(#item);
IF(DURABILITY < 30);
LOOK(0,90);
KEY(use);
WAIT(300ms);
ELSE;
LOOK(0,0);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(45,0);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(90,0);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(135,0);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(180,0);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(225,0);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(270,0);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(315,0);
PICK(#item);
KEY(use);
WAIT(10ms);
IF(DURABILITY < 20);
LOOK(0,90);
KEY(use);
WAIT(300ms);
EndIf;
LOOK(0,30);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(45,30);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(90,30);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(135,30);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(180,30);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(225,30);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(270,30);
PICK(#item);
KEY(use);
WAIT(10ms);
LOOK(315,30);
PICK(#item);
KEY(use);
WAIT(10ms);
ENDIF;
Loop;
ENDIF;
}$$