automacro vend {
location payon
cart "White Potion" > 0
call open_shop
timeout 10
}
macro open_shop {
do move 167 65
}
automacro open_shop_now {
run-once 1
location payon 167 65
call open_my_shop
}
macro open_my_shop {
do move 167 64
pause 1
do openshop
release open_shop_now
}
automacro get_whites {
location payon 167 64
console /Shop closed./
cart "White Potion" < 1
exclusive 1
call go_buy
}
macro go_buy {
do move payon 141 85
do move payon_in01 11 49
do talk @npc (5 49)
do store
pause 3
do buy 5 265
pause 3
do cart add White Potion
pause 3
do talk @npc (5 49)
do store
pause 3
do buy 5 265
pause 3
do cart add White Potion
pause 3
do move payon_in01 16 51
do move payon 167 64
}
So basically what it does is it vends then when item is sold out, it purchases said item.
However, the hole in this is that the automacro won't initiate unless it had pots in the cart initially. It will only start running when there is pots in the cart prior to running the bot and then macro. I ran this 3x without pots in the cart to test the autobuy pathing but only when I bought pots and placed them in the cart did the automacro run. Can anyone help me fix this? I want the whole sequence to run with or without pots in the cart.
For the first part, when you vend your white pots, dont vend all of it, left 1 pot in your cart and change a bit on this code
automacro get_whites {
location payon 167 64
console /Shop closed./ cart "White Potion" = 1
exclusive 1
call go_buy
}
For second part, your automacro "open_shop_now" only trigger when at location 167 65.
macro go_buy {
do move payon 141 85
.
.
.
pause 3
do move payon_in01 16 51 do move payon 167 65
}