restore_mp

fronobulax

Developer
Staff member
I'm getting a loop trying to buy MMJ. I think it is my call to restore_mp.

Code:
> Restoring MP! Currently at 13697 of 20887 HP, 360 of 30210 MP, current meat: 682179 ... Target MP = 3022.

buy 13 magical mystery juice for 100 each from Gouda's Grimoire and Grocery

buy 1 magical mystery juice for 100 each from Gouda's Grimoire and Grocery

buy 13 magical mystery juice for 100 each from Gouda's Grimoire and Grocery

buy 1 magical mystery juice for 100 each from Gouda's Grimoire and Grocery

buy 13 magical mystery juice for 100 each from Gouda's Grimoire and Grocery

buy 1 magical mystery juice for 100 each from Gouda's Grimoire and Grocery

Any ideas? This is the classic case where I would swear the change is KoL or KoLmafia but I've been wrong before ;-)
 

lostcalpolydude

Developer
Staff member
It looks like a script is using "buy" instead of "acquire" (or ASH equivalents), and then failing to use the items at the end of the loop.
 

Bale

Minion
It likes like Universal Recovery, but I'd need a lot more information to begin to debug that.

Though UR does not announce where it is purchasing items from, nor does KoLmafia so there must be something else happening.
 

fronobulax

Developer
Staff member
I do use UR but I am not certain of the interaction between UR and restore_mp.

A message like
buy 1 Connery's Elixir of Audacity for 1034 each from 1832792 on 20150104
is definitely KoLmafia (because I wrote it) but I have not looked at the code to see whether it logs NPC stores or not.

As I think of it I'm not sure why a restore is happening.

Code:
int tomeSummons = 3 - get_property("_clipartSummons").to_int();
if (tomeSummons < 1) return false;
boolean ok = restore_mp(2 * tomeSummons);

Since I should be restoring to 2, 4 or 6 MP and I have 360?

I fear this is an interaction between scripts and settings that has not bit me before.
 
Top