This is a scenario from eatdrink.ash. You use mall_price to figure out how much you should pay. You buy the item for up to that amount, actually a bit more:
buy(1, it, mall_price(it)*1.25)
Buy() fails because the price has gone way up. The problem is, mall_price still mistakenly thinks the price is low. I want to recalculate and make sure it's a good value at the new price, then try again.
So It would be great if mall_price updated the price on an item it if a buy() command for that item fails because the item was unavailable for that price, and the limit price was equal to or greater than the mall_price amount. Or at the very least, if buy(quant, it, price) fails, set mallprice(it) = max(mallprice(it), price+1).
Did that all make sense? Any reasons that won't work? The workaround in eatdrink.ash otherwise is pretty ugly.
buy(1, it, mall_price(it)*1.25)
Buy() fails because the price has gone way up. The problem is, mall_price still mistakenly thinks the price is low. I want to recalculate and make sure it's a good value at the new price, then try again.
So It would be great if mall_price updated the price on an item it if a buy() command for that item fails because the item was unavailable for that price, and the limit price was equal to or greater than the mall_price amount. Or at the very least, if buy(quant, it, price) fails, set mallprice(it) = max(mallprice(it), price+1).
Did that all make sense? Any reasons that won't work? The workaround in eatdrink.ash otherwise is pretty ugly.