Skip to content

Instantly share code, notes, and snippets.

@Adamantcheese
Created October 18, 2019 02:54
Show Gist options
  • Save Adamantcheese/3fe7c97327477df90c98b08d5894f121 to your computer and use it in GitHub Desktop.
Save Adamantcheese/3fe7c97327477df90c98b08d5894f121 to your computer and use it in GitHub Desktop.
WoW Classic Vendor Bid Assist
Basically shove in the vendor price of an item and it'll spit out the maximum bid you should put to assure that you get the item (assuming nobody goes above you). There's also a value for minimum profit so that you avoid bidding on stuff you don't care about. Works well for most things, adjust the 1.04 to something else for super high gold values (adjust down).
import math
def roundTensAH(input):
return math.floor((input * 1.04) / 10.0) * 10
vendorPrice = int(input("Enter vendor price as an integer (g*10000+s*100+c): "))
minimumProfit = 150
adjustment = 0
baseBid = math.ceil(vendorPrice/1.04)
curBid = baseBid
while roundTensAH(curBid + adjustment) <= roundTensAH(baseBid):
adjustment += 1
bidCalc = math.ceil(vendorPrice / 1.04) + adjustment
if bidCalc >= vendorPrice or vendorPrice - bidCalc < minimumProfit:
print("Don't bid; max bid for minimum profit is", str(vendorPrice - minimumProfit) + ";", "calculated bid of", bidCalc, "exceeds this")
else:
print("You should bid: ", bidCalc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment