@dj_d: Yes, what we've come up with here is far better than what I had before with the wiki solution. And don't worry about notification credit. I don't need to be notified for this particular script, since it is just a small part of one of my larger scripts. I don't think
notify works for multiple people anyway. (ps - you might consider using my Registry script to keep track of who uses your scripts... [/plug])
@Bale: Making and especially maintaining an autosell-price list for
all tradeable items would be much more of a chore than getting item prices manually, negating the whole point of writing the script. In my case, I need to be able to accurately appraise any tradeable item on the fly, including new items as soon as mafia supports them. It would be better to open mafia's itemlist and read the autosell from there -- but that would make the script huge and clunky and slow.
@asturia: I know for a fact there is a Greasemonkey script floating around that will do this. A little searching would probably turn it up. If you can't find it, I know someone who uses it and I could ask her where she got it. If you don't want to use Greasemonkey and want a mafia solution, you could try adding this function to the value.ash script, then calling it with
get_inventory() as the parameter.
Code:
int stack_value(int[item] stack) {
int result;
foreach i in stack
result = result + (stack[i]*get_value(i));
return result;
}
Note that this will only return the sum total of all your
tradeable items in inventory (not storage or closet).
A plea to the devs:
Please consider introducing these functions to ASH:
- [li]int autosell_price( item ) - returns the autosell price of an item. Current methods for accessing this (creating an independent map of data, or loading mafia's entire item database only for one info point) are hugely inefficient.[/li]
[li]int mall_price( item ) - returns the current lowest price for an item in the mall once per item per day, to prevent mallbots. This would allow item pricing without buying the item, but it would still be just as difficult as now to manipulate mall prices.[/li]
If there is some reason this cannot or should not be done, at least write us a note explaining why. Then I promise I won't whine about it again.