I wanna write a macro that sells items, say Stem, to buyer shop opened by players.
If I'm using the console, I can just type
Code: Select all
buyer 0
Code: Select all
buyer 1
Then I would use
Code: Select all
buyer #buyer_index #Stem_index #amount
The thing is that when using macro, it seems that there's no way to lookup the buyer index.
So a dumb way would be to loop through, say 1 to 10, and do the sell command anyway.
However when trying to sell things to a player who's not buying it, the bots gets disconnected to server.
Anyone has a solution to this?
Btw here's my stupid code:
Code: Select all
macro sell_to_player {
$itemIdx = @inventory (Stem)
$sellQty = @invamount (Stem)
$buyerIdx = 0
while ($buyerIdx <= 10) as dumbSell
do buyer $buyerIdx $itemIdx $sellQty
$buyerIdx++
end dumbSell
}