From KoLMafia
Jump to: navigation, search

Function Syntax

int shop_price(item it )

  • it is the item to check

Returns the price of a given item that are currently for sale in your mall store. If the item is not currently for sale then 999999999 is returned.

Code Samples

Following example creates a function that notifies you if items in your shop are above a given percent. The current example is set to 10%.

void pricecheck_shop (float cutoff) {
   int[item] shop = get_shop();
   foreach it in shop {
      float over = historical_price(it)*cutoff;
      if (shop_price(it)> over) {
         float percent = shop_price(it)*1.0/historical_price(it);
         percent = percent*100;
         print(""+it+" is overpriced by "+to_int(percent)+"%.", "blue");
pricecheck_shop (1.1);
Changing historical_price to mall_price would give more accurate results but take longer. Also note, KoLMafia uses the 5th price.

See Also