Script keeps reverting outfits

Fluxxdog

Active member
Alright, getting frustrating here. I have a snippet of code that, when I am done for the day, changes my gear to maximize ADV and MP for rollover.
Code:
if(my_adventures() == 0 && my_fullness()==fullness_limit() && my_inebriety() == inebriety_limit())
	sweettooth();
else 
	print("Ready for battle!","blue");}
The sweetooth() uses a cli_execute("10000 adv, mp") command. This is done through a mood...
Code:
Always, call afterbattle.ash
When the mood finishes though, it changes back to the outfit I was wearing before the mood started. The CLI command works fine. The mood works fine for the most part, but I always have to run it manually at the end of the day as well. And then the clothes revert.
Am I missing something?
Is this expected behavior?
Is there a way to keep the clothes on that the maximize command provides?
TIA y'all!
 

StDoodle

Minion
The mood could be your issue; is there some particular reason you have your outfit linked into your mood? That seems odd...

Also, by 'cli_execute("10000 adv, mp")' I assume you meant 'cli_execute(maximize 10000 adv, mp")' right?
 

slyz

Developer
The problem is that your script is run as a mood. Run it as a betweenBattle script instead.

betweenBattleScripts aren't run in a checkpoint, and therefore can make persistent changes to your outfit. Mood actions are inside a checkpoint, so changes will be reverted before any further adventuring takes place.

See this post by holatuwol for slightly more detail.
 

Fluxxdog

Active member
To Doodle: yeah, maximize. Sorry, frustrated.
To slyz: Oh hell yes! Big help! Gotta bump the BBB script... or even better have it called in my own script package. One new question: Is there any way to get a script to run or trigger AFTER a battle instead of just before?
 

slyz

Developer
Well, it's just a matter of point of view I guess. 'between' means after the last battle AND before the next one?

But seriously: here's another quote from Jason
The betweenBattleScript is called in exactly the same cases as mood triggers: before each automated adventure attempt, and after each relay browser combat.

I guess you are talking about the fact that the BBS isn't triggered after the last adventure spend - my solution would be to detect if you only have one adventure left, use adventure() to spend it, then switch outfits and do other RO stuff. It would probably result in Mafia going into an error state afterwards though, so it might not always be a good idea.

The simplest solution, of course, would be to do all those things in a logout script, and have your turn-burning script use
Code:
cli_execute("quit");
 

Fluxxdog

Active member
OK, revisiting this because after some major playing around and experimenting, I'm still irritated.
Whenever a bBS runs, if it changes equipment, it ALWAYS changes equipment back when mafia stops adventuring, whether running out of adventures, meeting the goal(s), an abort() function, ESC is pressed, or the adventure tab's "Stop Now" or "Stop After" buttons are used, whether the change is part of the bBS script or call using the cli_execute() function. Is there any way to stop it from doing that?

The way I have things set up is for "semi-auto" adventuring. As I'm going along, I may have my script(s) make changes, such as swapping gear or exchanging familiars. When it reaches a halt condition, for example a semi-rare counter coming up so I can change locations if need be, it will switch gear back to what it was when I started. Causes erroneous errors (wrap your mind around that) when you have changed familiars with familiar specific gear.
 

Fluxxdog

Active member
I guess nobody's found a way to stop this :/ Is there any way to prevent mafia from trying to equip a Portable Motorcycle on a Stocking Mimic when it switches familiars as part of a bBS?
 

Theraze

Active member
Familiar gear swapping on bBS scripts is another one of those joyous bugs that's been acknowledged, but not actually fixed yet.
 

Fluxxdog

Active member
What about swapping the rest of your gear that's been changed with a bBS? Is that supposed to be a feature, and if so, is there any way around it? The post by holatuwol says it doesn't change gear back, but I see nothing but. When I swap out stinky cheese from one gear, morph it in to another (eyes) and equip them, and then later when the auto-adventuring stops, it strips the eyes and tries to equip gear that I don't have anymore because I folded the cheese. Which means I have to go through and manually re-equip the gear I had automatically changed.

What's worse, if I run the bBS as a standalone script, mafia doesn't even blink and lets everything be without trying to switch back one thing. It gets very aggravating after the first time. And this has been happening for a long time.
 

Theraze

Active member
You MIGHT be able to bypass it by making another checkpoint, but if it's an internal checkpoint instead of using the backup outfit, that still won't work...
 

Fluxxdog

Active member
Checkpoints made once auto-adventuring starts aren't considered when switching gear back at the end of auto-adventuring. If I start with the Swashbuckling Getup, it'll always attempt to revert back to that when I'm done auto-ing (...that's not a word, bleh) even if I have a Juju Mojo gaze or a special sauce glove with my chefstaff where it's gonna stick the parrot, or worse yet, my 92 turns of Super Vision with my GAP is now replaced by swashbuckling pants. No matter how intelligently I design the logic in my scripts, mafia will not respect it and change gear just because it was done while auto-adventuring.
 
Top