Price question

Winterbay

Active member
I've been using farm.ash on a multi for a while since that is more fun than to farm yourself and it keeps having a problem with trying to go to the conservatory to farm piles of dusty animal bones. This seems to be due to an incorrectly high price for said bones.

When I log in mafia automatically updates my prices from kolmafia.us and if I then do, before doing anything else, a historical_price() on the dusty bones I get a price of 1600+.
Doing mall_price() on them though generally gives a price between 300 and 600.

Is there really such a change in that price over every day or is something else wonky?
 

xKiv

Active member
Not according to kolmarket, which shows mostly around 300, with a 800 meat peak, in the last week.
Perhaps nobody who did a search for them actually bothered to send the updated prices back? (by killing mafia without proper logout, or never logging out, or whatever)
ETA: but according to my mallprices.txt, the 1635 price is less than a day old ... does somebody upload bogus data?
 
Last edited:

Winterbay

Active member
I think the time stamp in mallprices.txt is set when mafia gets the price and for most cases this is when you log in, which I guess was less than a day ago.
I've set mine to updated prices to and from the kolmafia services and I've not had to kill mafia for any reason in the last couple of days at least.
 

xKiv

Active member
I think the time stamp in mallprices.txt is set when mafia gets the price and for most cases this is when you log in,

Yes, but it is set to the value that came from the server (unless that value is in the future).
I have a lot of timestamps in my mallprices.txt that are only used once ... except 1275685220 (roughly last midnight my time, which *is* when I last logged in ...) which updates 1042 prices at once. Now *that* is suspicious, no matter how good the prices themselves are [1]. And now all those prices are on the server with those timestamps, so deleting and re-updating won't help ...

[1] don't tell me there were 1042 distinct items bought at the same second, all by mafia users with price sharing enabled.

===

Anyway, searchmall (the CLI command) doesn't update historical prices; you need to eighter actually buy the item (buy, retrieve) or call mall_price (the ASH function). That should fix the price for now, unless there are some server-side shenanigans going on. Doesn't tell anyone where are those bad prices coming from though.

===

ETA: problem found - the prices at server have timestamps ~1278909072, which is 36 days in the future.

Could please some administrator nuke those? Otherwise we get 36 more days of non-updateable prices.
Also, the server should probably start rejecting such updates.
 
Last edited:

zarqon

Well-known member
I doubt the server is in the future, since the script doesn't really even consider the local time of the server, it simply compares timestamps between submitted prices vs. the cache. If I'm not mistaken, the timestamps are generated by mafia when it searches the mall or buys an item. This means that someone somewhere played mafia on a machine with erroneous datetime settings, and screwed everybody up.

How to prevent this? I could edit the script to reject prices from the future, but I'd have to look into time zones -- I doubt those are included in the timestamps...? Which means I'd need to leave a buffer (reject if > now + 24hrs (- server offset?)).

I suppose that's better than nothing -- at least it would fix this problem. (after another month) I'll send an update to fewyn.
 

Winterbay

Active member
It's already been fixed by heeheehee who got the script from fewyn. There is a bug post related to this somewhere in the bug report section.
 
Top