mall_autosell: autosell "junk" (minimum price) items from your store
mall_autosell 1.1
This is my first script! mall_autosell requires ZLib.
mall_autosell searches through all of your items in the mall. If the mall price of these items is close to the minimum sell price, it takes those items out of your store and autosells them instead. The user can configure what percent above minimum is "close", the default is 5% -- so something that has a minimum mall price of 200 meat, will be autosold if the current mall price is 210 or lower, by default. The user can also configure a maximum mall price to apply this to, to prevent autoselling "expensive" items, with a default of 5000 meat. All sales are output in the CLI.
The idea is, if something is in the mall at minimum price, it is almost certainly common, and your copies of the item are probably not going to be bought. Better to just autosell them, IMO. This makes it easier to sell stuff, too, since you can just put everything in your mall instead of looking up the price and then deciding whether to mallsell or autosell.
NOTE: there's no way in ash (that I can find) to find the price that you are selling an item for. So this script uses the mall price. This means you could have an item in your store priced at 999,999,999, but if the mall price is 100 it will be autosold.
Comments are welcome. I've tested it quite a bit, but if you're paranoid, you can first test the script results by running the following code in the gCLI:
1.1 - added easier test mode, and a few misc. tweaks
1.0 - initial release.
mall_autosell 1.1
This is my first script! mall_autosell requires ZLib.
mall_autosell searches through all of your items in the mall. If the mall price of these items is close to the minimum sell price, it takes those items out of your store and autosells them instead. The user can configure what percent above minimum is "close", the default is 5% -- so something that has a minimum mall price of 200 meat, will be autosold if the current mall price is 210 or lower, by default. The user can also configure a maximum mall price to apply this to, to prevent autoselling "expensive" items, with a default of 5000 meat. All sales are output in the CLI.
The idea is, if something is in the mall at minimum price, it is almost certainly common, and your copies of the item are probably not going to be bought. Better to just autosell them, IMO. This makes it easier to sell stuff, too, since you can just put everything in your mall instead of looking up the price and then deciding whether to mallsell or autosell.
NOTE: there's no way in ash (that I can find) to find the price that you are selling an item for. So this script uses the mall price. This means you could have an item in your store priced at 999,999,999, but if the mall price is 100 it will be autosold.
Comments are welcome. I've tested it quite a bit, but if you're paranoid, you can first test the script results by running the following code in the gCLI:
Code:
ash import "mall_autosell"; testsell();
1.1 - added easier test mode, and a few misc. tweaks
1.0 - initial release.
Attachments
Last edited: