Feature - Implemented Add ASH commands for refresh_shop(), shop_price(item)

heeheehee

Developer
Staff member
Both of these two functions relate to mall store management. They should be fairly self-explanatory (refresh_shop() refreshes Mafia's view of your mall store, shop_price(item) is the price of the item in your mall store; I think it defaults to 0 for an item not in stock, but that didn't really bother me).

I found it odd that refresh_stash() existed, but not refresh_shop().
 

Attachments

  • ash_shop.patch
    2.3 KB · Views: 39

Veracity

Developer
Staff member
I assume that a "shopbot" is something that manages your own store, as opposed to a "mallbot" which does mall searches and buys from other stores. Not that I've ever heard the term.

Is a "shopbot" a problem? How so?
 

Theraze

Active member
Eh, I said shopbot instead of mallbot. But that got me thinking and so I sent you a quick and dirty shopbot line through PM. :)
 

Theraze

Active member
True. It function as both a mall-bot and a shop-bot, since it used the mall-buy to (re)populate your shop using the new function.
 

Veracity

Developer
Staff member
A script that repeatedly queries the mall, searching for items that are cheaper than a target price is a mallbot.
The fact that the "target price" is based on the price you have the item in your store for doesn't change that.
The availability of a function to fetch the price you have in your store - because your script "forgot" it? - doesn't change that.

Should we remove map_to_file and file_to_map because they could be used to "remember" the prices you assign to items and therefore obviate shop_price? Or perhaps we should remove the "<" comparison, since you can use it to determine if the mall_price of an item is "less than" your target price.
 

Theraze

Active member
Not unless you want to. :)

But no, I've just seen patches that modify the shop and mall area be rejected in the past due to concern regarding bots. Just figured I'd bring it up. If a dev (you) says that it's not a concern, it's not a concern. It's not anything that actually affects me, except for potentially the accuracy of when I run networth.
If mall_price is higher than my shop_price, use my shop_price and don't believe the lies that I'll get 999 million for those hippo pants. Curses.
 

heeheehee

Developer
Staff member
For what it's worth, I use shop_price(item) for restocking in roughly the following way:
Code:
int new_price = (shopQty * shop_price(it) + ppu * num) / (shopQty + num);
(ppu is price per unit, computed via mall_price after purchase)

I don't see anything morally reprehensible with using a script to keep your store stocked (for reasons such as keeping the prices of certain goods low despite attempts at mall manipulation --- the recent stupidity with reagent potions was actually what motivated this. Yes, the dips were a consequence of this script; no, I haven't been making buckets of profit here).
 
Last edited:
Top