Get Slimy

uknowforkids

New member
Thanks, Bale - that solves that problem. Sadly, now I'm getting a different error message - I'm prompted to input a value for int adv_to_use, and when I do so, I'm told "You can't wear that outfit." I first tried saving outfits named maxml and minml, then tried changing the values to my outfit names:
string max_ml_outfit = "Slime Tube f=purse rat";
string min_ml_outfit = "Items f=volleyball";

Both options give me the same error message.

Thanks again for the help!
 
Last edited:

Bale

Minion
I know there was (is?) a bug associated with changing outfit names not updating to the new name in mafia. Trying logging out and back in again. If that's the problem, it will fix it.
 

uknowforkids

New member
Sadly, that isn't working - I've also tried renaming the outfit names to single-word names, in case that was the problem, but that's not doing it. Perhaps I'm just not meant to be diving into such slimy depths. Thanks for your thoughts!
 

kain

Member
the whole outfit name needs to be "outfitname f=familiar" ... the **whole** part in quotes is your outfit name.
 

Alhifar

Member
Sorry about that typo. I must have forgotten to verify the script this time before uploading it. I'll fix the version on my site as soon as I get home.
 

Bale

Minion
Newest version is always at http://alhifar.dyndns.org/mafia/scriptlets/slime.ash and the script will prompt you to update whenever a new version is released.

One thing about your script puzzles me. On line 244 you use adventure( 1 , $location[The Slime Tube] ), but on line 210 you use page_text = run_adv( page_text ) which, as near as I can tell, does exactly the same thing. While I think your function run_adv() is rather brilliant, and I admire its latent ability to search for a specific choice adventure, I cannot figure out why it is in this script. Wouldn't it be more efficient to use adventure() in both places?

Please illuminate me.

One other thing, I believe that restore_hp( my_hp() + slime_damage() + expected_damage( $monster[slime1] ) + 10 ) is an error. You don't need to restore that much. Remove "my_hp() +" from that function.

Been very busy with your script. :) It served me as a marvelous starting place for my own script to slide down the tub.
 

Rinn

Developer
The script is tattering out of combat, calling adventure(1, $location[The Slime Tube]) will attempt to keep adventuring until a turn is used which will never occur.
 

Alhifar

Member
Rinn got the first part, and you are correct on the second part. I'm really surprised nobody has noticed that before.
 

Bale

Minion
In thanks for using your code as a base, here's some of my code for things your script doesn't do yet. This is where I am prepping to coat myself with fresh slime. I hope you like it.

Code:
int extra_ml = (squeezes * 20 + numeric_modifier("Monster Level")) %100;
switch {
case extra_ml <= current_mcd():
	change_mcd(0);
	break;
case extra_ml <= numeric_modifier("ur-kel's aria of annoyance", "Monster Level")
  && have_skill($skill[Ur-Kel's Aria of Annoyance]):
	cli_execute("uneffect Ur-kels");
	break;
case extra_ml <= current_mcd()+ numeric_modifier("ur-kel's aria of annoyance", "Monster Level")
  && have_skill($skill[Ur-Kel's Aria of Annoyance]):
		cli_execute("uneffect Ur-kels");
		change_mcd(0);
}
old_action = "";
boolean boozey_up = false;
if(my_familiar() == $familiar[Frumious Bandersnatch]
  && get_property("_banderRunaways"). to_int() < floor(numeric_modifier("Familiar Weight") + familiar_weight($familiar[Frumious Bandersnatch]))/ 5) {
	if(have_effect($effect[Ur-Kel's Aria of Annoyance]) > 0
	  && have_skill($skill[Ur-Kel's Aria of Annoyance]) )
		cli_execute("uneffect Ur-kels");
	if(have_effect($effect[Ode to Booze]) < 1 && have_skill($skill[Ode to Booze])) {
		use_skill( 1 , $skill[Ode to Booze]);
		boozey_up = true;
	}
	if(have_effect( $effect[Ode to Booze] ) > 0) {
		old_action = get_property( "battleAction" );
		set_property("battleAction", "try to run away");
	} else abort("Problem casting \"Ode to Booze\" to help your Bandersnatch run away. Probably too many AT Buffs.");
} else if(use_tatter_like) {
	old_action = get_property( "battleAction" );
	if(have_skill($skill[Ambidextrous Funkslinging]))
		set_property("battleAction", "item "+ which_tatter.to_string()+ ", "+ which_tatter.to_string() );
	else
		set_property("battleAction", "item "+ which_tatter.to_string() );
}
 

kain

Member
that looks nice Bale ... I haven't written code for bander+ode/navel ring runaways yet ... but I thought about it a lot ... too bad I don't have that thought->computer interface yet.

so far I've burned 2300+ tattered scraps/smoke bombs with a slightly modified Alhifar script.
 

Bale

Minion
Will add navel rings to my script soon. I've got someone who will lend me his and I'll try it out then. That should save me scraps for another 3 runaways.
 

Alhifar

Member
I'll probably be integrating most of that into my script. Thanks a bunch, Bale!

My only question: from my understanding, if you set your battleAction to "item <item>" and you have funkslinging, mafia will automatically try to throw two. Am I mistaken? (I don't have the skill on any of my characters or I would check myself.)
 

Bale

Minion
You are mistaken. That works in a CCS, but apparently not as a battleAction. I added that code specifically because it was using only a single tatter each round. I was also surprised it doesn't work the same way as in a CCS.
 

Alhifar

Member
That's good to know. I found one more question, though. Where exactly do you use "boozey_up"? Other than that, I have to greatly thank you for posting that bit of code. My lack of a snatch probably would have kept me from adding that myself.
 

Bale

Minion
Oh, I use boozey_up later on to tell me if I'm meant to shrug ode after running away, presumably to use the AT slot for Aria. However if someone started the fight with Ode, I want to end the fight with Ode, so I don't automatically shrug it. That part of code isn't perfect yet and this is a compromise that works for the way I use the script.
 

Rubix314

New member
I'm rather new to the whole Mafia thing, but I'd like to be able to use it for Slime Tube runs. For alhifar's script, how exactly do we edit the options part? Do I name my ML outfit "maxml"?
 

Alhifar

Member
Exactly. You will also want to set what familiars you want to be using for the different outfits, and set whether you want to use tatters/poppers/etc with use_tatter_like.
 
Top