I have my bot buying arrows just fine, but it is buying the most expensive kind. I read through the wiki, but didn't find a way to specify which arrows 'best | cheapest | etc" to buy.
<!-- Shopping options, how many of what do you want to keep in your inventory -->
<option name="HEALING_POTION" value="20" />
<option name="MANA_POTION" value="20" />
<option name="ARROW_QUIVER" value="2" />
<option name="THROWN_BAG" value="0" />
<option name="POISON" value="0" />
Is there a profile setting to choose which arrows (or pots for that matter) for the bot to buy at the vendor? I'd rather have the bot buy the 100 gold quivers rather than the 10000 gold quivers since the difference in DPS is not substantial (for me to notice anyways).
local numberToBuy = numberyouwant - inventory:itemTotalCount(nameorid) -- change "numberyouwant" to how many you want in total in your bag
if numberToBuy > 0 then -- buy some
player:openStore(npcname)
store:buyItem(nameIdOrIndex, numberToBuy)
end
You would add it just after player:merchant command that does your other merchant stuff. Make sure you disable arrow options in the profile so player:merchant doesn't try to buy them.
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.