I've been trying to incorporate this into a wider script. Unfortunately, I've just learned that it only buys one item at a time - inconvenient if you're using it to farm regs.
If I wanted this to purchase, say, 20 nightshade, how could I change it?
For the record, I'm using the correct syntax and I've var dumped to check the value of !amount...it is correct, but the script keeps dbl clicking the buy option in these lines:
{
wait 5
set !clickx #CONTPOSX - 44
set !clicky #CONTPOSY - 150
click !clickx !clicky d dmc
setshopitem #shopItemID !amount <--- at this point, vardump tells me !mount is 20
set !clickx #CONTPOSX + 44
set !clicky #CONTPOSY + 207
click !clickx !clicky dmc <--- At this point, the script clicks 'buy' with only one nightshade on the contract
set #RESULT !amount
repeat
until #CONTNAME <> bill_gump
break
}