def check_items(): while True: for i in xrange(1, 6): try: while True: items = market.newest(i) break for item in items: #print item["name"] if item["name"].startswith("Set: "): set_items = market.inventory(item["inventid"], item["seller"]) max_price = 0 for set_item in set_items: max_price += config.buy_items.get(set_item["name"], config.auto_buy) if item["item_price"] <= max_price: print "buying %s for %i (max was %i)" % (item["name"], item["item_price"], max_price) market.buy(item) else: max_price = config.buy_items.get(item["name"], config.auto_buy) if item["item_price"] <= max_price: print "buying %s for %i" % (item["name"], item["item_price"]) market.buy(item) else: pass #print "Found %s, but not in our price range (%i > %i)" % (item["name"], item["item_price"], max_price) except Exception as e: print e """for item, value in config.buy_items.iteritems():
def update_items(): if not config.bump: return while True: try: print "Removing items" market_items = market.inventory(-2) for market_item in market_items: #print "Removing %s" % market_item["name"] market.remove_from_market(market_item["id"]) deactivated_items = market.inventory() sorted_items = sorted(deactivated_items, key=lambda x: config.item_prices.get(x["name"], 0) + random.randint(1, 1000)) print "Bumping items" for deactivated_item in sorted_items: #print deactivated_item["name"] price = config.item_prices.get(deactivated_item["name"]) if price: #TODO: set price below other seller but not below our buy price #print "Selling %s for %i" % (deactivated_item["name"], price) market.sell(deactivated_item["id"], price) time.sleep(config.bump_time) except Exception as e: print e
def update_items(): if not config.bump: return while True: try: #print "Removing items" #market_items = market.inventory(-2) #for market_item in market_items: #print "Removing %s" % market_item["name"] #market.remove_from_market(market_item["id"]) #time.sleep(2) deactivated_items = market.inventory() sorted_items = sorted(deactivated_items, key=lambda x: config.item_prices.get( x["name"], 0) + random.randint(1, 1000)) print "Bumping items" for deactivated_item in sorted_items: #print deactivated_item["name"] #price = config.item_prices.get(deactivated_item["name"]) #print price #if price == None: #TODO: set price below other seller but not below our buy price #print "Selling %s for %i" % (deactivated_item["name"], price) price = market.selling_price(deactivated_item["name"]) if deactivated_item["name"] == "Chronos Hair": price = 15 if deactivated_item["name"] == "Chronos Force": price = 30 if deactivated_item["name"] == "Chronos Blood": price = 20 if deactivated_item["name"] == "Chronos DQ": price = 10 if deactivated_item["name"] == "Chronos Grip": price = 10 if deactivated_item[ "name"] == "Chronos Right Leg Motion Trail": price = 10 if deactivated_item[ "name"] == "Chronos Right Hand Motion Trail": price = 10 if deactivated_item["name"] == "Chronos Left Leg Motion Trail": price = 10 if deactivated_item[ "name"] == "Chronos Left Hand Motion Trail": price = 10 if deactivated_item[ "name"] == "Gladiator Right Leg Motion Trail": price = 10 if deactivated_item[ "name"] == "Gladiator Right Hand Motion Trail": price = 10 if deactivated_item[ "name"] == "Gladiator Left Leg Motion Trail": price = 10 if deactivated_item[ "name"] == "Gladiator Left Hand Motion Trail": price = 10 if deactivated_item["name"] == "Gladiator Hair": price = 15 if deactivated_item["name"] == "Gladiator Force": price = 45 if deactivated_item["name"] == "Gladiator Blood": price = 20 if deactivated_item["name"] == "Gladiator DQ": price = 10 if deactivated_item["name"] == "Gladiator Grip": price = 10 if deactivated_item["name"] == "Orc Blood": price = 49 if deactivated_item["name"] == "Music": price = 140 if deactivated_item["name"] == "Orc Hair": price = 30 if deactivated_item["name"] == "Orc Right Leg Motion Trail": price = 20 if deactivated_item["name"] == "Orc Right Hand Motion Trail": price = 20 if deactivated_item["name"] == "Orc Left Leg Motion Trail": price = 20 if deactivated_item["name"] == "Orc Left Hand Motion Trail": price = 20 if deactivated_item["name"] == "Orc Force": price = 110 if deactivated_item["name"] == "Orc Relax": price = 70 if deactivated_item["name"] == "Chronos Primary Gradient": price = 15 if deactivated_item["name"] == "Chronos Secondary Gradient": price = 15 if deactivated_item["name"] == "Gladiator Primary Gradient": price = 15 if deactivated_item["name"] == "Gladiator Secondary Gradient": price = 15 if deactivated_item["name"] == "Acid Blood": price = 0 if deactivated_item["name"] == "Organic Cucumber": price = 0 if deactivated_item["name"] == "Pickled Cucumbers": price = 0 # if 'Texture' in str(deactivated_item["name"]): # price = 0 if deactivated_item["name"] == "Head Texture": price = 220 if 'Bumpmap' in str(deactivated_item["name"]): price = 2000 # if 'Chronos' not in str(deactivated_item["name"]) and 'Gladiator' not in str(deactivated_item["name"]): # price = 0 if price > 0: if price < 10: price = 10 print "Selling %s for %i" % (deactivated_item["name"], price - 1) market.sell(deactivated_item["id"], price - 1) time.sleep(2) #else: #print deactivated_item["name"], "has no priice, remove it" #time.sleep(1) time.sleep(config.bump_time) except Exception as e: print e """for item, value in config.buy_items.iteritems():
def update_items(): if not config.bump: return while True: try: #print "Removing items" #market_items = market.inventory(-2) #for market_item in market_items: #print "Removing %s" % market_item["name"] #market.remove_from_market(market_item["id"]) #time.sleep(2) deactivated_items = market.inventory() sorted_items = sorted(deactivated_items, key=lambda x: config.item_prices.get(x["name"], 0) + random.randint(1, 1000)) print "Bumping items" for deactivated_item in sorted_items: #print deactivated_item["name"] #price = config.item_prices.get(deactivated_item["name"]) #print price #if price == None: #TODO: set price below other seller but not below our buy price #print "Selling %s for %i" % (deactivated_item["name"], price) price = market.selling_price(deactivated_item["name"]) if deactivated_item["name"] == "Chronos Hair": price = 15 if deactivated_item["name"] == "Chronos Force": price = 30 if deactivated_item["name"] == "Chronos Blood": price = 20 if deactivated_item["name"] == "Chronos DQ": price = 10 if deactivated_item["name"] == "Chronos Grip": price = 10 if deactivated_item["name"] == "Chronos Right Leg Motion Trail": price = 10 if deactivated_item["name"] == "Chronos Right Hand Motion Trail": price = 10 if deactivated_item["name"] == "Chronos Left Leg Motion Trail": price = 10 if deactivated_item["name"] == "Chronos Left Hand Motion Trail": price = 10 if deactivated_item["name"] == "Gladiator Right Leg Motion Trail": price = 10 if deactivated_item["name"] == "Gladiator Right Hand Motion Trail": price = 10 if deactivated_item["name"] == "Gladiator Left Leg Motion Trail": price = 10 if deactivated_item["name"] == "Gladiator Left Hand Motion Trail": price = 10 if deactivated_item["name"] == "Gladiator Hair": price = 15 if deactivated_item["name"] == "Gladiator Force": price = 45 if deactivated_item["name"] == "Gladiator Blood": price = 20 if deactivated_item["name"] == "Gladiator DQ": price = 10 if deactivated_item["name"] == "Gladiator Grip": price = 10 if deactivated_item["name"] == "Orc Blood": price = 49 if deactivated_item["name"] == "Music": price = 140 if deactivated_item["name"] == "Orc Hair": price = 30 if deactivated_item["name"] == "Orc Right Leg Motion Trail": price = 20 if deactivated_item["name"] == "Orc Right Hand Motion Trail": price = 20 if deactivated_item["name"] == "Orc Left Leg Motion Trail": price = 20 if deactivated_item["name"] == "Orc Left Hand Motion Trail": price = 20 if deactivated_item["name"] == "Orc Force": price = 110 if deactivated_item["name"] == "Orc Relax": price = 70 if deactivated_item["name"] == "Chronos Primary Gradient": price = 15 if deactivated_item["name"] == "Chronos Secondary Gradient": price = 15 if deactivated_item["name"] == "Gladiator Primary Gradient": price = 15 if deactivated_item["name"] == "Gladiator Secondary Gradient": price = 15 if deactivated_item["name"] == "Acid Blood": price = 0 if deactivated_item["name"] == "Organic Cucumber": price = 0 if deactivated_item["name"] == "Pickled Cucumbers": price = 0 # if 'Texture' in str(deactivated_item["name"]): # price = 0 if deactivated_item["name"] == "Head Texture": price = 220 if 'Bumpmap' in str(deactivated_item["name"]): price = 2000 # if 'Chronos' not in str(deactivated_item["name"]) and 'Gladiator' not in str(deactivated_item["name"]): # price = 0 if price > 0: if price < 10: price = 10 print "Selling %s for %i" % (deactivated_item["name"], price-1) market.sell(deactivated_item["id"], price-1) time.sleep(2) #else: #print deactivated_item["name"], "has no priice, remove it" #time.sleep(1) time.sleep(config.bump_time) except Exception as e: print e """for item, value in config.buy_items.iteritems():