Unable to reliably change outfits in a mood script

ElCarrot

New member
I am trying to change the outfit that I use in a an unconditional trigger in my mood - but when I try to use the method

cli_execute("outfit MinLvl");

Where the outfit can be any outfit, it only changes the outfit to whatever is currently being worn.

The script is:

Code:
if(have_effect($effect[Coated in Slime]) <6) {
	print("Using chamois.", "blue");
	visit_url("clan_slimetube.php?action=chamois&pwd");

	if(have_effect($effect[Coated in Slime]) > 0) {
	abort("Failed to use a chamois. You'll need to find some other way to clean yourself up.");	
	}
	
	// Now change to minlvl outfit so that the next adventure has max turns
	print ("changing to min level outfit", "blue");
	cli_execute("outfit MinLvl");
	if( equipped_amount( $item[nasty rat mask] ) == 0) {
	abort("Failed to change outfits");
	}		
} else {
	if( equipped_amount( $item[nasty rat mask] ) > 0) { 
		print ("changing to max level outfit", "blue");
		cli_execute("outfit Slime");
		if( equipped_amount( $item[nasty rat mask] ) > 0) {
		abort("Failed to change outfits");
		}		
	}
}

I can see it changing the outfit to whatever is currently being worn (instead of the desired outfit), and yet when I check to see if the nasty rat mask is being worn - it returns a result as though it had actually changed the outfit.

Am I doing something wrong here? Or are we simply not allowed to change outfits in scripts called from moods?

Thanks
TheCarrot
 

Bale

Minion
At the beginning of a mood your outfit is checkpointed. At the end of a mood your outfit is automatically restored to the checkpoint.

Any outfit changes during a mood is reverted. This is because a mood can require someone to wear the Knob guard outfit for the lab store or the hippy outfit for the hippy stand. Mafia wants to make sure it gets you back into the correct gear.

If you want to change equipment you need to use a betweenBattleScript. Note that betweenBattleScripts will not be called from the relay browser.
 
Top