Getting Mall Prices for Data Analysis

macman104

Member
I'm not going to lie, this is a 100% request for a script. I'm hoping based on previous involvement here, I'll get a slide on the "show us some work on the script" statement, and I won't have to.

Basically, I will provide a data file (we'll call it, inData.dat). Simply an item name, one item per line. It will be an exact string of the item. I would like to search for the item in the mall, pull the first price (I don't care what it is), and print it out to a data file (outData.dat). I don't plan on running this more than once a day. The file will not be more than 30 items, just some investment items, that I want to monitor.

I'm pretty sure I can work out the reading stuff into a map, but I haven't had the time to work on any scripts that utilize the new function like visit_url and the substring functions and such. I'm a little worried this might be viewed as too risky, and giving out the possibility for mallbotting, which if it can't be done without giving that functionality as well, maybe someone might be willing to contact me via pm.

Thanks.

EDIT: I am aware that Fnord runs something like this that checks every item, but a) I don't know how often it runs, and b) it isn't always up-to-date on what items are available, c) I'd have to then write something to go through his lists, and parse out the items I want, which I don't really want to do.
 

holatuwol

Developer
Well, it's only along mallbot lines if there was a way for KoLmafia to read local, non-tabulated, data files (I'm not sure there is one, at the moment, but I believe I've taken all measures to prevent it).

If you combine the "mirror" command with the "echo" command for logging which item you're searching for and the searchmall command to do the searching, you get something close.  You won't get the minimum price of the item in the mall, but rather a full list of the search results for that search, strictly with quantities and prices (you won't get the name of the item, for example, which is why "echo" is needed).

There used to be a "with limit" parameter for this that limited the search to a certain number of items (1, in this case), but I managed to break it somewhere along the way.  This breakage has been fixed and will be available in the next release.
 

macman104

Member
Sounds good, I'll look into that. And once the limit ability is back in place, I can just have it search one store, ya?
 
Top