muczachan
Member
> call scripts/Universal_recovery.ash
Undefined reference to function 'max' (Universal_recovery.ash, line 422)
Are you using some outside library for this function, possibly? (Today's version: 3.41)
> call scripts/Universal_recovery.ash
Undefined reference to function 'max' (Universal_recovery.ash, line 422)
The new KolMafia build is required. Download it here!
If they make you happy, they make us happy.
- tiny program improvements that make me happy
I'm glad. Most of those improvements don't fix any problems. They just make the code a little bit cleaner and faster. I feel that fewer lines to do the same thing is an improvement.
_BalesUniversalRecovery => 3.41
86 prices updated from http://zachbardon.com/mafiatools/updateprices.php?action=getmap
0 prices updated from http://nixietube.info/mallprices.txt
Pricelist updated.
Restoring MP! Currently at 806 of 806 HP, 1092 of 1491 MP... Target MP = 1491, current meat: 0.
In mallmode, best MP restorative is: magical mystery juice @ 752.8302 meat total.
Trying to use 8 magical mystery juice
Searching for magical mystery juice...
Desired purchase quantity not reached (wanted 8, got 0)
Failed to use an item from the mall.
Current HP: 806, MP: 1092
In mallmode, best MP restorative is: magical mystery juice @ 752.8302 meat total.
Trying to use 8 magical mystery juice
Running out of meat! Time to take some out of the closet...
Requests complete.
> closet take 200 meat
Removing meat from closet...
Requests complete.
Restoring MP! Currently at 806 of 806 HP, 1092 of 1491 MP... Target MP = 1491, current meat: 200.
In mallmode, best MP restorative is: magical mystery juice @ 752.8302 meat total.
Trying to use 8 magical mystery juice
Purchasing magical mystery juice (2 @ 100)...
You acquire magical mystery juice (2)
Desired purchase quantity not reached (wanted 8, got 2)
You need 6 more magical mystery juice to continue.
Failed to use an item from the mall.
Current HP: 806, MP: 1092
In mallmode, best MP restorative is: magical mystery juice @ 752.8302 meat total.
Trying to use 8 magical mystery juice
Running out of meat! Time to take some out of the closet...
Requests complete.
Restoring MP! Currently at 806 of 806 HP, 1092 of 1491 MP... Target MP = 1491, current meat: 0.
In mallmode, best MP restorative is: magical mystery juice @ 752.8302 meat total.
Trying to use 8 magical mystery juice
Running out of meat! Time to take some out of the closet...
Requests complete.
> use 2 MMJ
Using 2 magical mystery juice...
You gain 106 Mana Points
Finished using 2 magical mystery juice.
Validating adventure sequence...
Condition set: broken petri dish (40)
broken petri dish (40)
Requests complete.
Visit to Lab: Knob Goblin Laboratory in progress...
Changing auto-attack: attack with weapon
[27084] Knob Goblin Laboratory
Encounter: Knob Goblin Mad Scientist
Strategy: attack with weapon
Round 0: Genevieve Alfredo loses initiative!
Round 1: Genevieve Alfredo attacks!
Round 2: Genevieve Alfredo attacks!
Round 3: Genevieve Alfredo attacks!
Round 3: Got spits on your opponent. Yech.
Round 4: Genevieve Alfredo attacks!
Round 5: Genevieve Alfredo attacks!
Round 5: Got spits on your opponent. Yech.
Round 5: A smile crosses Got's serene countenance.
Round 5: knob goblin mad scientist takes 566 damage.
You gain 80 Meat
You acquire an item: Knob Goblin steroids
You acquire an item: broken petri dish
You gain 4 Muscleboundness
You gain 8 Mysteriousness
You gain 3 Sarcasm
if (item_amount(doodad) >= n || (purchase && retrieve_item(n, doodad))) return use(n, doodad);
if (item_amount(doodad) == 0) return false;
return use(item_amount(doodad), doodad);
Yep. I did that to ensure minimal execution time. I only use 1 of zlib's functions, so I don't use it. I just give you credit in the comments.Sorry, I was under the mistaken impression that you were importing ZLib, so I wanted to let you know use_upto() was available. But after looking at the script just now I saw that you just pasted some ZLib functions in there rather than import it.
// That's enough of zarqon. Now update current price list
cli_execute("update prices http://zachbardon.com/mafiatools/updateprices.php?action=getmap");
Probably. I figure though that there is a much more noticable difference of having to verify zlib.ash every time my script is called. And I don't want my users to have to download more than 1 file if it isn't necessary. Serious question: Does it bother you?I see. In that case, you could minimize runtime by a few more ms by hardcoding the filename in update_heal_map()!
It would be more meaningful to return an integer. That way the user could make use of the exact number that had been used.use_upto() still isn't ideal since it returns the nearly worthless result of use(). I suppose I could note the number in inventory beforehand and then return whether the amount had decreased appropriately, but that still wouldn't work for items that are not consumed upon use. Meh.