Buying Items from Mall while in Ronin

I seem to be unable to buy items from the mall through KoLMafia while in Ronin. I tried entering "buy 1 item" in the cli and it doesn't do anything. Entering "ash buy(1, $item[item])" gives me false. I can buy items from the mall manually though and the commands work fine outside of Ronin.

Where am I going wrong?
 

lostcalpolydude

Developer
Staff member
> help buy
buy [using storage] item [@ limit] [, another]... - buy from NPC store or the Mall.
So "buy using storage" is what you want. I don't remember if there's an equivalent ASH way to do it.
 

ereinion

Member
> ashref buy

boolean buy( int, item )
int buy( int, item, int )
boolean buy( coinmaster, int, item )
int buy_price( coinmaster, item )
boolean buy_using_storage( int, item )
int buy_using_storage( int, item, int )
boolean buys_item( coinmaster, item )
suggests buy_using_storage( int, item ) is the function you want.
 

Bale

Minion
buy_using_storage()

The code sample on that page is the very useful buypull alias, re-formated as a function.

Code:
alias buypull => ash if(in_hardcore()) print("You cannot pull items in hardcore.", "red"); else {matcher input = create_matcher("(?:(\\d+)\\s+)?(.+)", $string[%%]); if(input.find()) {item topull = to_item(input.group(2)); int q = input.group(1) == ""? 1: input.group(1).to_int(); if(topull == $item[none]) print('Unknown items: '+q+" "+input.group(2), "red"); else if(pulls_remaining() >= q) {if(storage_amount(topull) < q) buy_using_storage(q-storage_amount(topull), topull, get_property("autoBuyPriceLimit").to_int()); take_storage(q, topull);} else print((pulls_remaining() == 0? "No": "Only "+pulls_remaining())+" pulls remaining for today.", "red");} else print("Unparseable input.", "red");}

If you use that, then you can buypull to purchase and pull the item you purchased in a single command.
 
Last edited:
Thanks guys, I figured something new had been implemented, but I was looking in the wrong direction (was looking for a setting rather than a new function). Time to update all my buys in my scripts :(.

Edit:
Turns out it wasn't that bad, thanks again folks!
 
Last edited:
Top