Universal Recovery Script

Winterbay

Active member
Very well, the only problem there is that I have no healing spells yet (BM PM level 4) so trying to cast a healing spell is rather pointless. Does it check for what skills you have access to or does it just try to cast spells that have been set as beeing available once (I do have a couple of them permed)?
 

fronobulax

Developer
Staff member
What do you expect UR to tell you?
I expect it to be silent about the backup site unless there is a problem that causes it to go to the backup site. That said, if I understand what you are saying, UR currently cannot detect that there is an issue with with the main site and so always fetches from the backup site. That being the case, I'd probably be silent about where the update is coming from but that is an arbitrary preference with no rational reason for it. I picked this nit under the now known to be mistaken assumption that using the backup site was conditional based upon the detection of a failure of the primary site. That ain't the case.
 
I figured out the cause of my earlier problem: uncertain. Since I'm level 42 the effect on my stats is trivial as far as combats, so I didn't bother to remove it and forgot about it. I obtained it from eating thousands of yummy tummy beans, if anyone was curious.
 

Bale

Minion
That being the case, I'd probably be silent about where the update is coming from but that is an arbitrary preference with no rational reason for it.
Sadly I cannot do that either. UR isn't printing that statement -- mafia is printing that in response to the price update. Sorry.


I figured out the cause of my earlier problem: uncertain. Since I'm level 42 the effect on my stats is trivial as far as combats, so I didn't bother to remove it and forgot about it. I obtained it from eating thousands of yummy tummy beans, if anyone was curious.

OH! That is SO cool! I didn't even know that effect exists! Well, I did back when I first looked up probability potion, but then again maybe I didn't. Yeah, I probably did. Meh, I'm not sure.

No wonder your CLI feedback didn't make any sense. I think I'll have my script just use a SGEEA to remove that in aftercore since it can cause several kinds of angst and there's no good use for it.
 

StDoodle

Minion
It also might work if you assume the effect gave the biggest negative effect at all times. Or maybe that won't work, I don't really know.
 

Fluxxdog

Active member
OK, this has me at a loss. I have UR set to recover at 25% HP. I hadn't paid much attention until today when I saw this:
Code:
Calling Universal Recovery for type=HP, amount=878
Restoring HP! Currently at 387 of 958 HP, 1049 of 1049 MP, current meat: 1011312 ... Target HP = 958.
Try to heal HP from inventory.
Using 1 dark potion of healing...
You gain 16 hit points
You gain 15 Mana Points
Finished using 1 dark potion of healing.
Using 1 phonics down...
You acquire an effect: Tingly Elbows (duration: 5 Adventures)
You gain 47 hit points
You gain 47 Mana Points
Finished using 1 phonics down.
Try to heal HP with skills.
Casting Cannelloni Cocoon 1 times...
You gain 508 hit points
Cannelloni Cocoon was successfully cast.
Uses several items and THEN cats Canneloni Caccoon. My Mana auto-recover is turned off, and as you can see, I was at max MP anyway.
 

Bale

Minion
That's distinctly troubling for several reasons. Please answer a few questions for me.

Are you in aftercore? (The high HP and MP make me think aftercore even though you are healing from inventory.) What are your purchase settings? (Is mafia set to purchase from the mall & is UR set to follow mafia's settings or otherwise?) What is your class and level? Can you think of anything else that might be relevant or unusual about your situation?
 

Fluxxdog

Active member
That's distinctly troubling for several reasons. Please answer a few questions for me.

Are you in aftercore? (The high HP and MP make me think aftercore even though you are healing from inventory.) What are your purchase settings? (Is mafia set to purchase from the mall & is UR set to follow mafia's settings or otherwise?) What is your class and level? Can you think of anything else that might be relevant or unusual about your situation?
Aftercore: Yes
Purchaase: NPC only
Class: LV 17 Pastamancer with Cannelloni Cocoon
Other: When I noticed it, I was adventuring in the Slime Tube and had just finished a fight. The clan's hot tub was also available to me at the time.
 

Bale

Minion
I think I've solved half the problem. It's the sort of thing that is pretty unlikely without being in aftercore with your mall purchasing turned off, so I've missed it until now. It's buried in code that I haven't even looked at in a long time. I will definitely fix that bug which has doubtlessly caused trouble for others though in much less obvious ways.

Now I'm trying to uncover the other half of the problem.

Edit: Found the other half of the bug. Also buried in code I haven't bothered with in a long time. I'll try to fix this and post an update by tomorrow.
 
Last edited:

fronobulax

Developer
Staff member
Probably a cut and paste error...
Restoring HP! Currently at 4 of 16 HP, 7 of 7 MP, current meat: 28 ... Target HP = 16.
Insufficient meat to fully restore MP without wasting restoratives!
Did not fully restore HP for some reason.
Insufficient meat is preventing the restoration of HP.

Tangentially, I was kind of expecting to Rest at the Campground but this is definitely a case where doing so would be suboptimal. My goal as a player is to get healed and continue adventuring. The script's (much more noble) goal is to heal efficiently and leave the decision to be inefficient up to me.
 

heeheehee

Developer
Staff member
MP to cast a skill. Granted, that's also troubling that it tries to restore MP even if your max MP isn't enough to cast the skill. Perhaps another small addition for Bale to sneak into the next update?
 

Bale

Minion
Actually, fronobulax was right. That was a copy-paste error. I just fixed it along with the two bugs that Fluxxdog has just found for me.

Big update coming shortly. I was planning on adding some more before my next update, but there've been too many bug fixes lately so I need to roll it out now.
 

Bale

Minion
Universal recovery v 3.7 released!


Changelog:
Universal Recovery version 3.7 May 11, 2010
& relay UI version 1.1
  • Added options to script controlled by relay_Universal_recovery v1.1
    • New option to use inventory in mallmode (not recommended!)
    • New option to use disco rests even when Hp or Mp are not fully restored
    • Added buttons to restore HP or MP
  • less complaint about not opening guild store for mmj if character is a level 9 AT
  • fixed bugs where plump juicy grubs might not be used as a priority
  • fixed bug where it restored mp to cast a healing skill, even when the player has no healing skill
  • fixed bug which caused items to be used even though it would be followed by a full heal
  • small error in CLI feedback fixed
 
Last edited:

fronobulax

Developer
Staff member
Actually, fronobulax was right.
That almost belongs in my sig.

I confess it did not even occur to me that it was restoring MP to cast a healing spell. Perhaps that was because the character in question was brand new and had no skills except the initial class skill. But thanks.
 
Can we get simple slimeling support in aftercore? They usually give about 640 mp per antique piece. Maybe it could feed the slimeling at the midpoint between min and max mp, or something

Also, can you control how mafia burns mp? Casting leash instead of empathy would be nice.
 

Spiny

Member
An interesting thing happened today, Bale. I logged into a clan account and out of habit, since I haven't used that account thru mafia, I set up UR for it. I used the 5/11/10 build and made changes via the relay browser interface (the updated one you made).

Here's what happened:

Code:
baleUr_BirdThreshold => 0.1
baleUr_DontUseHotTub => false
baleUr_UseInventoryInMallmode => false
baleUr_UseMmjStock => false
baleUr_Verbosity => 1
baleUr_Purchase => 1
hpAutoRecovery => 0.5
mpAutoRecovery => -0.05
Searching for "anti-anti-antidote"...
Requests complete.

Purchasing anti-anti-antidote (4 @ 30)...
You acquire anti-anti-antidote (4)
You spent 120 Meat
Requests complete.

Purchases complete.
Updating recoveryScript_map_v2.txt from '' to '2009-11-19T03:48:59-06:00'...
recoveryScript_map_v2.txt => 2009-11-19T03:48:59-06:00
...recoveryScript_map_v2.txt updated.
0 prices updated from http://nixietube.info/mallprices.txt
Pricelist updated.
_meatpermp => 3.353846
_meatperhp => 1.0061538
_version_BalesUniversalRecovery => 3.7
[color=red]Map modified within foreach (Universal_recovery_051110.ash, line 1446)[/color]

Do note that I always rename your script with the date of the build so I know which is which in case I want to reference back, for whatever strange reason, to an older build. I presume all is well, but that red line thru me off.
 

Bale

Minion
WTF? Please confirm for me that your line 1446 is this:

Code:
		if(reserve_purch == reserve || heal[reserve].minmp < heal[reserve_purch].minmp)

Even if that's wrong, there isn't any line anywheres near that line that modifies the map within a foreach. That error seems completely implausible.

Can we get simple slimeling support in aftercore? They usually give about 640 mp per antique piece. Maybe it could feed the slimeling at the midpoint between min and max mp, or something

Also, can you control how mafia burns mp? Casting leash instead of empathy would be nice.
I don't think any of that are things that I want to have a script making decisions about. I don't think any of those are applicable for a recovery script either.

Well... maybe I'd consider the aftercore slimeling since I can tell when it's running out of charges if it is a simple as feeding it antiques from the mall. Is it really that simple?
 
Last edited:
Top