Fiz um negócio pelo celular aqui e o @salgadias testou
(as duas homes estão listadas no começo do código, e devem ser setadas olhando para as placas
. Personalize como preferir.)
Código:
$${
&home_compra = "/home placa_warp_loja";
&home_venda = "/home placa_warp_vip";
toggle(a);
If(!a);
Log("&2Comp&fra e v&4ende&7: &c&lOFF&4!");
Stop;
endif;
Log("&2Comp&fra e v&4ende&7: &a&lON&2!");
Unsafe(0);
do();
Gui();
wait(500ms);
until(%GUI%=="NONE");
Gui(inventory);
#vazio=0;
for(#slot,9,44);
getslotitem(%#slot%,#oq,#stack);
If(#stack==0);
inc(#vazio,1);
endif;
next;
Gui();
log("&7Slots vazios no inventário: &6%#vazio%");
If(#vazio < 36);
log("&7Inicie a macro com o inventario vazio!");
toggle(a);
Log("&2Comp&fra e v&4ende&7: &c&lOFF&4!");
Stop;
endif;
endunsafe;
Echo("%&home_compra%");
wait(3000ms);
Echo("/menuloja on");
Wait(700ms);
Echo("/esconder");
Wait(700ms);
log("&7iniciando...");
unset(dev);
Do();
Do();
If(%GUI%!="GUICHEST");
If(dev);
log("menu da loja esta fechado");
endif;
do();
keydown(sneak);
wait(200ms);
Key(attack);
If(dev);
log("Key(attack)");
endif;
wait(500ms);
until(%GUI%=="GUICHEST");
Else;
If(dev);
log(menu de loja esta aberto);
endif;
Slotclick(2,l,false);
If(dev);
log(slotclick no 2);
endif;
Unsafe(0);
#vazio=0;
for(#slot,9,44);
getslotitem(%#slot%,#oq,#stack);
If(#stack==0);
inc(#vazio,1);
endif;
next;
endunsafe;
If(dev);
log("vazio: %#vazio%");
endif;
If(#vazio==0);
Gui();
log("&7Inventario cheio. Iniciando venda.");
break;
endif;
Wait(300ms);
endif;
Loop;
Look(,90);
wait(300ms);
Do();
Echo(%&home_venda%);
If(dev);
log("%&home_venda%");
endif;
Do(30);
Wait(200ms);
ifmatches(%HITID%,"wall_sign|68");
If(dev);
log("vejo Placa");
endif;
break;
endif;
loop;
ifmatches(%HITID%,"wall_sign|68");
If(dev);
log("vejo Placa");
endif;
break;
endif;
Loop;
Do();
If(%GUI%!="GUICHEST");
do();
keydown(sneak);
wait(200ms);
Key(attack);
If(dev);
log("key(attack)");
endif;
wait(500ms);
until(%GUI%=="GUICHEST");
Else;
Slotclick(7,l,false);
if(dev);
log("slotclick 7");
endif;
Unsafe(0);
#vazio=0;
for(#slot,9,44);
getslotitem(%#slot%,#oq,#stack);
If(#stack==0);
inc(#vazio,1);
endif;
next;
If(dev);
log("vazios: %#vazio%");
endif;
endunsafe;
If(#vazio>=36);
Gui();
log("&7Inventario vazio. Venda finalizada.");
break;
endif;
Wait(300ms);
endif;
Loop;
Look(,90);
Wait(500ms);
Do();
If(dev);
log("%&home_compra%");
endif;
Echo(%&home_compra%);
Do(30);
Wait(200ms);
ifmatches(%HITID%,"wall_sign|68");
break;
endif;
loop;
ifmatches(%HITID%,"wall_sign|68");
break;
endif;
Loop;
Loop;
}$$;