Universal Recovery Script

Bale

Minion
Well, you could use

set lastGuildStoreOpen = 46

to fix it... Though I wonder how that happened.
 

AlbinoRhino

Active member
I thought of that but then I decided to wait and see if it increments to 48 when I open the guild. Just out of curiosity. Won't happen until tomorrow though, as my 40 turns are gone today.
 

slyz

Developer
UR didn't warn you that you should open your guild store because it thinks it's already opened. I thought Mafia wasn't tracking correctly on what ascension you are, but your character page shows 47 ascensions. I don't really know why the lastGuildStoreOpen preference is set to 47 if you haven't opened the store yet.

I guess the simplest fix would be to set it to the right number (46 if you didn't open the store yet, or 47 if you did) by typing set lastGuildStoreOpen = 46 in the gCLI. If you did open the guild store, check if the preference was correctly set to 47.

What I don't understand is that nothing needs to be reset upon ascending for Mafia to know if the store is open or not: when guild_store_available() is called, Mafia will visit guild.php if it hasn't been done yet, and will only set lastGuildStoreOpen = knownAscensions if store.php is in the page KoL returns (before any GM/other script modifies anything).

EDIT: ninja'd...
lastGuildStoreOpen won't increment to 48, mafia will set it at 47 if it was 46 and store.php is on the guild page, or leave it alone if it's already 47.
 
Last edited:

AlbinoRhino

Active member
Well I logged in without any mafia or scripts and searched "store" in the frame source. I found this in the javascript :

Code:
if (i.q==0 && i.g==0 && i.t==1) { shown++; 
contents += '<div style="width:100%; padding-bottom: 3px;" rel="managestore.php?action=additem&qty1=NUM&item1=IID&price1=&limit1=&ajax=1&pwd=a5fd9cf9770fe065b5347e9932b494cb" id="pircm_'+i.id+'"><b>Stock in Mall:</b> <a href="#" rel="1" class="small dojaxy">['+one+']</a>';
if (some) { contents += ' <a href="#" rel="?" class="small dojaxy">[some]</a> <a href="#" rel="'+i.n+'" class="small dojaxy">[all]</a>';}
contents += '</div>';
}
Appears like it is part of the right-click menu ?

Could the "...managestore.php..." reference have caused lastGuildStoreOpen to increment ?
 

jasonharper

Developer
Yeah, that "managestore.php" was the culprit - it was looking for "store.php" without any context, so that matched. Should be fixed in r8300.
 

slyz

Developer
Yup, that's it. You can go ahead and post a bug report, it's an easy fix. If something changed on the KoL side, those might start popping up. Don't forget to say what mafia build you are using.

EDIT: wow, ninja'd again =)
EDIT2: so it wasn't a server side change, bug reports won't start popping up!
 
Last edited:

heeheehee

Developer
Staff member
gCLI output:
Code:
> restore hp

Restoring HP! Currently at 3 of 48 HP, 11 of 65 MP, current meat: 5445 ... Target HP = 34.
Restoring MP! Currently at 3 of 48 HP, 11 of 65 MP, current meat: 5445 ... Target MP = 20.
[stuff related to restoring MP]
_meatperhp => 3.5555556
Casting Cannelloni Cocoon 1 times...
You gain 45 hit points
Cannelloni Cocoon was successfully cast.

Uhh... I'm pretty sure that Disco Power Nap reaches that target HP for much cheaper (as does Tongue of the Walrus). Logic error?

Possibly required background: character is an AT (not level 9 yet) in hardcore (so can't interact), has Disco Power Nap as well as Tongue of the Walrus, has finished Doc's quest for herbs, and... has KGE outfit. Not sure if that last bit's relevant, as it's been properly using seltzers for MP.
 

Bale

Minion
Actually, Disco Power Nap only restores 40 HP and Tongue of the Walrus restores 35 HP. To restore 45 HP would require two Tongues of the Walrus for 20MP, the same as Cannelloni Cocoon. That's why it cast Cocoon. Now you would presumably have settled for 38 HP and cast tongue once if you were doing it yourself. How should my script know that? How can I replicate that logic? If you can answer that question clearly and concisely in a way that applies to most people, I'll try to implement it.

I'm not criticizing your complaint, this is a known weakness of the script even though it is not a bug.
 
Last edited:

Terrabull

Member
UR really REALLY likes to buy Medicinal Herbs. I just had a situation where I have nine Plump Juicy Grubs on hand in Bird Form, and wanted to restore two hundred HP (two grubs worth). I clicked my HP and UR buys Medicinal Herbs and uses them. This is especially frustrating as I'm in HC and the spleen is precious wad space I could be using. I know I had enough grubs/moths because I was healing up in preparation for losing BF and losing the easy recovery.
I have to be careful to manually restore my HP all the time if I have spleen I haven't used (because I'm farming equipment or feathers.)
Could UR be less Spleen greedy when you are in HC or through an option please.

Perhaps it could also give more priority to bird restores, as they are much easier to find than any other restore.
 
Last edited:

slyz

Developer
I have to be careful to manually restore my HP all the time if I have spleen I haven't used (because I'm farming equipment or feathers.)
Could UR be less Spleen greedy when you are in HC or through an option please.

Alternativley, you could uncheck the herbs in the Restore tab when you don't want UR to use them.
 

slyz

Developer
This would entail some way of keeping track of slimeling charges. I think this could be the purpose of a different script (a Between Battle script or an extension of Zarqon's).
 

Bale

Minion
As slyz says, that's rather outside of this scripts area of expertise and the script has no way of knowing if your slimeling is hungry.
 

Spiny

Member
Perhaps it could also give more priority to bird restores, as they are much easier to find than any other restore.

Granted, the only character I've had bird form with while using UR was not able to use medicinal herbs in run, but there is a setting in the script itself that deals with this...

Code:
float bird_threshold = .10;    // This means 10% usage minimum.
   // Player can insist that birdform items will be fully exploited. At 0, the script will ALWAYS use a
   // birdform item regardless of waste, but at 1.00, the script will only use the item if it is 100%
   // without waste. (At .30 it will only require 30% usage.)

The only possible conflicting thing is that medicinal herbs are generally only used when the script needs a full heal item and I think that is looked for first, which might mean changing this setting wouldn't do what you want. I haven't really looked at the script in depth for quite a while, so I may be mistaken.
 
Last edited:

Bale

Minion
The script already does give priority to birdform restores. I'll have to take a look to see if there's any case where it might use herbs instead, but that seems weird from what I remember.
 

Terrabull

Member
Hmmmm, this doesn't seem like desirable behavior. Not really annoying, just kinda redundant.
Code:
Restoring HP! Currently at 136 of 579 HP, 83 of 223 MP, current meat: 5636856 ... Target HP = 579.
_meatpermp => 4.3636365
_meatperhp => 0.6545455
Casting Lasagna Bandages 13 times...
You gain 260 hit points
Lasagna Bandages was successfully cast.
Restoring MP! Currently at 396 of 579 HP, 5 of 223 MP, current meat: 5636856 ... Target MP = 112.
Get thee to a nunnery!
You gain 183 hit points
You gain 218 Muscularity Points
Casting Lasagna Bandages 1 times...
You gain 11 hit points
Lasagna Bandages was successfully cast.
 

Bale

Minion
If anyone's wondering why I've been so quiet and without updates lately, here's what I've been working on:


Click on the little picture for a big picture.

I think it'll be ready soon. Comments or suggestions?
 
Top