Get Slimy

matt.chugg

Moderator
Will spend one adventure in the slime tube

Will check the amount of turns of coated in clime, and attempt to remove the effect using a chamois is the amount of turns are less than minslimturns (default 6), if chamois fails and usevipbath== true will attempt to take a bath, if at this point the effect is stil lthere it will stop.

if if passes the slimecheck it will calculate how much damage you will recieve from the slime hit (including elemental resistance now) and only allow the adventure to procede if you have enough.

contemplating adding another variable wastetimecleaning or something to rest at campground to remove effect if bath and chamois fail.
contemplating adding auto heal to ensure enough hp instead of failing
 

Attachments

Last edited:
hmm, is there any point me having minslimeturns, since its capable of caculating if you have enough hp to win, it could choose when to remove the effect without user specification
 
hmm, is there any point me having minslimeturns, since its capable of caculating if you have enough hp to win, it could choose when to remove the effect without user specification

As long as it heals you if you have enough maxhp but not enough hp (at least for me, healing is cheap, but I don't want to overuse shammies).
It's not enough to rely on normal healing to do this part due to the very high level of damage that slime can do.
 
As long as it heals you if you have enough maxhp but not enough hp (at least for me, healing is cheap, but I don't want to overuse shammies).
It's not enough to rely on normal healing to do this part due to the very high level of damage that slime can do.

I really need to look at bales recover script!
 
My recovery script isn't exactly what he needs. He's saying he wants the script to heal instead of using a chamois if expected slime damage is less than maxhp. That would be a definite improvement over setting an explicit slime level.
 
can mafia be instructed to heal to a certain level from ash? (and doesn't this depend on a users restore hp settings?) I thought I might be able to call your script directly to heal to a certain amount of hp?


otherwise I have to do a fair amount of actual healing scripting and you seem to have that corner of the mafia world covered:P

Personally I have around 3k scrolls of drastic healing, and used one inbetween every turn while doing the slime tunnel using mafias settings.

but I think I see what you are saying now, remove the minslimeturns setting, and only use a chamois if expected damage is greater than max hp (or potentially if hp can't be recovered)

this is also going to assume you only need 1 round to kill the thing... the chances are that it won't be that close to max hp, it will either be significantly lower or greater than so I should probably take into account a players strength.

ALSO I havn't figured out what the expected damage is, with zero turns of slime, probably based on monster level as a normal monster would be
 
can mafia be instructed to heal to a certain level from ash? (and doesn't this depend on a users restore hp settings?) I thought I might be able to call your script directly to heal to a certain amount of hp?

I thing restore_hp() and restore_mp() are what you're looking for. I think they can be passed a target value. A value of 0 will respect the autorestore settings.
 
Exactly as StormCrow42 says.

If x != 0, restore_hp(int x) and restore_mp(int x) will heal up to x. If current hp/mp is greater than x, then they will not heal. If current hp/mp are less than x, but the auto-restore target is greater than x, it will heal up to auto-restore target instead.
 
This is excellent :) Can I suggest a few additional enhancements?

* User configures script with names of two outfits: one with maximum +ML, and one with minimum +ML
* User configures script to set whether use of tattered scraps is desired
* Before adventuring, check to see how many turns of Covered in Slime are present. If 0, switch to minimum ML outfit, uneffect Ur-Kel (if user has that skill), and/or set combat action to use tattered scraps; otherwise, ensure maximum ML outfit is worn, ensure that Ur-Kel is active (and cast it if not), and set combat action to normal kill technique

This takes the script to a new level of complexity, but I think it's worth it.
 
I don't have the means to test it, but the following should do everything you've asked. If anything doesn't work exactly how you would expect, or how you would like, just yell at me.
 
Last edited:
loooks like alhifar has it covered, although perhaps could take into acount the previous point about having it auto heal upto required level of hp in can_survive_slime.

Also, what about the vip bath ?

I ascended hc yesterday, so don't have chance to test just yet until I level up a little.
 
This version should auto heal up to the hp needed, plus it takes into account the damage that the slime should do. As well, it will try to use the VIP Hottub if you have uses left.
 
Last edited:
This version should auto heal up to the hp needed, plus it takes into account the damage that the slime should do. As well, it will try to use the VIP Hottub if you have uses left.

The logic seems off in this one; I tried to run some turns using it, and it was just scrapping away from every fight, then using a chamois, etc...

Also, looking at it, it seems like if you set the use_tatter_like variable to false, and don't currently have the effect coated in slime, it will go into an infinite loop...

But if you can fix these issues, then that would be awesome as this is exactly what I'm looking for. :)
 
Some unexpected behavior I'm seeing from the script:

CLI pane said:
> slime.ash.txt 5

Putting on OasisFarmer...
You are already wearing "OasisFarmer."
battleAction => item tattered scrap of paper

Visit to The Slime Tube: The Slime Tube in progress...

[3115] The Slime Tube
Encounter: pulsing Slime nodule
Strategy: item tattered scrap of paper
You acquire an effect: Coated in Slime (duration: 10 Adventures)

Visit to The Slime Tube: The Slime Tube in progress...

[3115] The Slime Tube
Encounter: squirming Slime nodule
Strategy: item tattered scrap of paper
You lose 5 hit points

Visit to The Slime Tube: The Slime Tube in progress...

[3115] The Slime Tube
Encounter: glistening Slime lump
Strategy: item tattered scrap of paper
You lose 5 hit points
You acquire an item: slimy fermented bile bladder
You lose 2 hit points

Visit to The Slime Tube: The Slime Tube in progress...

[3115] The Slime Tube
Encounter: Engulfed!
Manual control requested for choice #337

What seems to be happening is that the adventure() routine is continuing to execute without rechecking conditions after the first tattered scrap use. I assume this is just part of the way adventure() is set up: it keeps firing until a turn is actually consumed. Is there a workaround?
 
You are correct. I completely forgot that adventure() works that way. Give me a few minutes, and I'll replace it with a manual adventuring section.

salien: If you set use_tatter_like to false, it should simply adventure for the number of turns you tell it to with your max ml outfit on. If it doesn't... Turn on debug logging and send me the debug log, please! EDIT: Scratch that, I know what's going on. I'll fix that in the next version as well.

EDIT: Alright, here's the latest version. If THIS doesn't work, I will need debug logs to see why it isn't working, unless you can come up with a good hypothesis, like gemelli did.
 
Last edited:
Great start.

[Suggestions...]
This takes the script to a new level of complexity, but I think it's worth it.

Indeed. The suggestions above would make this the script an amazing escape from tedium. It is what everyone will want/need to deal with the upper levels of the tube, as a few of us have already found out. ;)
 
You are correct. I completely forgot that adventure() works that way. Give me a few minutes, and I'll replace it with a manual adventuring section.

salien: If you set use_tatter_like to false, it should simply adventure for the number of turns you tell it to with your max ml outfit on. If it doesn't... Turn on debug logging and send me the debug log, please! EDIT: Scratch that, I know what's going on. I'll fix that in the next version as well.

EDIT: Alright, here's the latest version. If THIS doesn't work, I will need debug logs to see why it isn't working, unless you can come up with a good hypothesis, like gemelli did.

The logic you're using to decide when to uneffect covered in slime is backwards.

Code:
else if( slime_damage() < my_maxhp() )
        {
            if( !chamois() ) abort( "Slime removal failed! You won't survive another turn!" );
            if( !restore_hp( my_hp() + slime_damage() + expected_damage( $monster[slime1] ) + 10 ) ) abort( "Unable to restore HP!" );
        }
Why would you uneffect covered in slime if the estimated damage is less then your maxhp? It should be >=, and in addition you should be attempting to restore hp in the else case. Right now you're just gonna get in an infinite loop of lowering ml, tattering, uneffecting covered in slime, then repeating the process.

Also you shouldn't be decrementing adv_to_use if you tatter because it shouldn't be taking an adventure.

Edit: You're also calculating slime damage incorrectly based on slime resistance, it should be (100 - elemental_resistance($element[slime])) / 100.0

Anyone who would have ran this script would have been in for a pretty big surprise.
 
Last edited:
Back
Top