Universal Recovery Script

jokermage

New member
As a work around: Please put your bejeweled pledge pin in slots 1 or 2.

I'm not sure if that would have worked, since I had +Muscle or +MaxHP accessories in all three slots. I probably should have just left the wire bracelets equipped for adventuring, especially considering how often I was using combat skills. Now that I think about it, I could have saved maybe 3000 to 4000 MP that way.
 

Bale

Minion
How were you affording 3000 MP in Hardcore/Ronin? I figure it must have been in hardcore mode or else mafia's auto-switching of accessories wouldn't have been triggered. (That function can be very troublesome for healing...)
 

jokermage

New member
Island war farming for shell necklaces and war steins mostly. I fought all the frats without a sidequest and then did the junkyard and orchard as a hippie for Bailey Beetles (aka battered hubcap suppliers) and the daily income. Then I fought all the hippies (with no frat sidequests). I attacked with shieldbutt for all adventures so that is a minimum of 10000 mp. but sometimes they take more than hit to go down. I have a lot of +items and my green pixie up so i had plenty of stuff to trade. By the time I finished the war I had 300,000 or so meat.

Not the most effective way of getting meat but it was very satisfying. Especially using olfaction on bailey beetles.

*goes swimming like Scrooge McDuck in his pile of hubcaps*
 
Last edited:
Getting a divide by zero error?

I'm in Badmoon.

Code:
> restore hp

Restoring HP! Currently at 6 of 16 HP, 27 of 27 MP... Target HP = 16.
Division by zero (Universal_recovery.ash, line 644)
Autorecovery failed.
 

Bale

Minion
But... that's...

I'm already checking if(count(skills) < 1) return $skill[none];

How could that have slipped through? Just two questions: Do you have any healing skills? If so, which ones?
 

Rinn

Developer
is it possible

Code:
int skill_cost(skill it) {
    if(can_interact() || !switch_gear)
        return mp_cost(it);
    item [slot] gear = mp_gear();
    if(gear[$slot[acc3]] == $item[none])
        return mp_cost(it);
    int bonus = numeric_modifier("Mana Cost");
    foreach key in gear {
        bonus = bonus + numeric_modifier(gear[key], "Mana Cost");
        bonus = bonus - numeric_modifier(equipped_item(key), "Mana Cost");
    }
    return mp_cost(it) + bonus;
}
is calculating a skill cost of 0 instead if 1 if the reduction bonus is greater then the base skill cost?
 

Bale

Minion
Good thought!! That is possible! It tries to account for gear switching in ronin, but I forgot that a low MP skill with a high MP reduction could go to 0. Somehow I didn't think of it. Fortunately that possibility is VERY easy to fix.


Universal recovery v 3.0 released!


Changelog:
version 3.0 June 24, 2009
  • Bugfix
  • Upgrade version to 3.0 to reflect condition of relative perfection
 
Last edited:

Muhandes

Member
With 3.0:

Division by zero (Universal_recovery.ash, line 646)
Autorecovery failed.

I think it happens because I have no healing skills
 
Last edited:

Bale

Minion
But... I'm checking for that already... REALLY! I'm going to have to look at the code very carefully. >sigh<

Were you in Ronin or mallmode?
 
Just updated, still same error:

Code:
Restoring HP! Currently at 19 of 30 HP, 0 of 72 MP... Target HP = 30.
Division by zero (Universal_recovery.ash, line 646)
Autorecovery failed.

I have no healing skills except for saucy salve (Which is combat) and to test this I clicked the relay restore button.
 

Bale

Minion
I don't really understand it, but I put in a work-around that should guarantee the error won't happen. This is just a quick fix until I can figure it out.

Are people getting this error in ronin, mallcore or both?
 

Attachments

  • Universal_recovery.ash
    62.4 KB · Views: 38

bespite

New member
Don't know how much this helps but just started badmoon and
[37] Sleazy Back Alley
Encounter: drunken half-orc hobo
Round 0: bespite wins initiative!
Round 1: bespite attacks!
Round 2: bespite attacks!
You acquire an item: moxie weed
You gain 1 Roguishness
Restoring HP! Currently at 4 of 6 HP, 3 of 4 MP... Target HP = 6.
Division by zero (Universal_recovery.ash, line 644)
Autorecovery failed.
You gain 1 Roguishness
 

Bale

Minion
What version are you using? It is specified on the first line of the script. Please check, just in case.

I think I'm safe in assuming that you have no healing skills.
 

th3y

Member
Could you add auto-uneffect Cunctatitis to the script?
This is a killer in Hardcore.

My two low-value-units-of-monetary exchange - in HC, I would prefer to punt out to the mini-browser or at least have a preference to control this. The SGEEA is way too valuable (for resetting olfaction) to have a script automatically consume it without my making an explicit decision.

-That's what TH3Y think
 

Bale

Minion
Bale
Could you add auto-uneffect Cunctatitis to the script?
This is a killer in Hardcore.

I recommend putting this into your moods.

Trigger on gaining Cunctatitis: (choose your favorite of the following)
  • cast Disco Power Nap
  • use ancient Magi-Wipes
  • use SGEEA
  • soak

I'd rather not add it to my script because there are so many ways of getting rid of it, it has nothing to do with healing and this is just one of a lot of bad status effects in the game so if I add one, I'd wonder which of the others I should add.

Anyway, as a special service to you, on gaining Cunctatitis: call un-cunctatitis.ash

Code:
void main() {
	if(have_effect($effect[Cunctatitis])) {
		switch {
		case have_skill($skill[Disco Power Nap]):
			use_skill(1, $skill[Disco Power Nap]);
			break;
		case item_amount($item[ancient Magi-Wipes]):
			use(1, $item[ancient Magi-Wipes]);
			break;
		case !in_bad_moon() && item_amount($item[Clan VIP Lounge key]) > 0 && get_property("_hotTubSoaks"). to_int() <5
			cli_execute("soak");
			break;
		case item_amount($item[soft green echo eyedrop antidote]):
			use(1, $item[soft green echo eyedrop antidote]);
			break;
		default:
			print("I feel like I should uneffect Cunctatitis, but... meh, I'll do it tomorrow.", "red");
		}
	}
}

That code might not agree with your decisions about getting rid of cunctatitis, so feel free to delete any method you don't like. Perhaps you'd rather not use a SGEEA for it, or maybe you won't use your hot tub for the purpose. I included everything so that you can just delete anything you won't do. You could also change their order if you disagree with me about which ones are most important.

Also, you could always change that print command to an abort.

Warning: I've never tested this script (I whipped it up on the spot just for you), so I don't guarantee that it will work.
 

Attachments

  • un-cunctatitis.ash
    664 bytes · Views: 27

mredge73

Member
thanks a lot
I may be mistaking but is it your recovery script that auto-cures poison and beating up or does mafia just do this automatically?
that was the only reason that I asked, I thought that your script handled the negative effects that usually result in quick death and I thought that this one would qualify.

PS
After I realized that cunctatitis was what was killing me so fast I had added it to my moods and used the cli command "uneffect cunctatitis", not sure what that uses by default so I think I will replace that with your little helpful script. thanks again.
 
Top