Mall Price Checking Bot

kiter

New member
Can someone help me write a bot which checks the average of the lowest three mall prices every 30 minutes and be able to save the data into an excel document. Similar to the one on Items of Loathing, except for one unique item.
 

Spiny

Member
Nope, mafia frowns on mallbots and has safeguards implemented preventing anyone from using mafia to create a mallbot.
 

slyz

Developer
Mafia only returns the price of the 5th item in the mall when you do a search from a script, in order to prevent people from using it to make mallbots. And you wouldn't be able to write an excel document, only save the data in a tab delimited plain text file.
 

StDoodle

Minion
And you wouldn't be able to write an excel document, only save the data in a tab delimited plain text file.

Actually, you can specify any file extension you want, so you can specify an xls file and on Windows, you'll be able to open it as an excel spreadsheet. (At least in OpenOffice.org, though, you get a prompt for character encoding yada yada...). So, this "works":

PHP:
void main() {
    string [int] bob;
    string randtxt;
    int rndln;
    int rndind;
    for x from 0 to 25 {
        rndln = random(8) + 3;
        randtxt = "";
        for s from 0 to rndln {
            rndind = random(26);
            randtxt = randtxt + substring("abcdefghijklmnopqrstuvwxyz", rndind, rndind+1);
        }
        bob[x] = randtxt;    
    }
    map_to_file(bob,"testing.xls");
}
Nothing you can do about mall checking though; it's not a bug, it's a feature! ;)
 
Last edited:

mredge73

Member
You actually can do it, but you have to actually purchase the item to get the lowest price.
If price data is all you are collecting then: buy the item, collect the value in a datafile, then sell it back for a net loss of 0.
That is the best you can do using mafia, this probably will not be useful for high value items.

Code:
//Purchase item return average price
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
int PurchaseItem(int howmany, item IT)
{
    int startmeat=my_meat();
    buy( howmany, IT );
    int endmeat=my_meat();
    int itemcost=(startmeat-endmeat)/howmany;
    return itemcost;
}
 

kiter

New member
Is there a way to average the 5th 6th and 7th lowest mall price then, because i mainly need to track inflation on an hourly basis
 

mredge73

Member
No, not that I know of.

If I was you, I would get the lowest price using the above function. Then average it by mall_price().
This will give you the average between the lowest and the 5th highest.
It may still not work, I am not sure how often mall_price() actually fetches a new price. It may only do it once a day/hour/week/month/leapyear?

It looks like you need to find another tool to do this, you are not the first to ask these questions. If I remember right someone else was trying to do exactly the same thing about 6 months ago and ran into similar issues.
 
Last edited:

xKiv

Active member
But does items of loathing reflect on prices actually available in the mall? I think it (just like kolmarket) lists prices at which items are actually *bought*, which is sometimes lower (stock gets bought out), sometimes higher (raffles => meat pastes at 100k, ...) and sometimes downright bogus (look at TPS drinks ...).
If you want prices of *available* items, Eleron has a bot for that, with dumps at http://www.houeland.com/kol/malldump/ (not real time data, but better than nothing). Don't increase lag by making your own bot.
 

icon315

Member
Items of loathing tells the minimum price on items....as it can not tell what has been bought or just taken out
 

xKiv

Active member
Huh ... it looks like it now. The published crawler source really just averages lowest three prices ...
But it used to be that, say, vespers were listed at 8M except on some days - and those were the days when they were traded, according to kolmarket.
 
Top