any way to put "if mp 100%, use X skill Y times" in the mood?

i'm interested in, if when auto adventuring in boris, and i hit max mp, go ahead and spend it on say ten mp of laugh it off, but since its not a status, i can't (as far as i know). burn mp option is also for buffs, but again, its not a buff, and the "if low on hp, use" doesn't even have boris's laugh it off, cause its puny, kinda just want it for when to autoadv nicely, gotta stay on regen, but want to go ahead and burn the extra mp on laugh it off, kinda looking to just spend like 10-15 if maxed out... any advice?
 

Theraze

Active member
Couldn't you do this as an always applying trigger, something like if (my_mp() == my_maxmp()) cast(10, $skill[laugh it off]); or something like that?
 
dunno, hence the question, im asking if/how, i know little to none about it.

EDIT: tried it, heres how it went
trigger on: unconditional trigger
check for: if (my_mp() == my_maxmp())
command: cast(10, $skill[laugh it off])
and it became always, cast(10, $skill[laugh it off])
 
Last edited:

Theraze

Active member
try it as trigger unconditional,, ashq if (my_mp() == my_maxmp()) cast(10, $skill[laugh it off]);
 
um... i did. try it. didnt work. said that above. will repaste it here though.
heres how it went, here's what i put in the areas.
trigger on: unconditional trigger
check for: if (my_mp() == my_maxmp())
command: cast(10, $skill[laugh it off])
and it became always, cast(10, $skill[laugh it off])
also, this isnt for an ashscript, but for the moodsetup area in the adventure tab in mafia.
 
ah, alright, thanks, ill give it a shot.
still didn't work, says in red
[null] does not match anything in the status effect database.
in the graphical cli, and still says
always, cast(10, $skill[laugh it off])

EDIT: i even tried adv once with the current setup, it stopped, saying
"Unable to invoke cast(10,"
 
Function 'cast( int, skill )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. ()
is what i got in red in the cli.
 

Winterbay

Active member
For unconditional triggers you do not need the "check for" box in the GUI so enter "unconditional trigger" and then the "ashq"-command in the command box and it... should work :)
 

Winterbay

Active member
1) Pick "unconditional trigger"
2) In the "Command" box enter: ashq if(my_mp() == my_maxmp()) {use_skill(Y, $skill[X]);}
3) Accept
 
cool, got it. so far, on my boris mood setup, i just have
if Song of Accompaniment < 1; cast Song of Accompaniment
ashq if (my_mp() == my_maxmp()) cast(10, $skill[laugh it off]);

however, when forcing execution of the ashq one, it says in the cli
Function 'cast( int, skill )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. ()

why... why u no work, command... anyway, should i update my zlib script, dl some other script that knows what the hell im tryiing to do?
 
For unconditional triggers you do not need the "check for" box in the GUI so enter "unconditional trigger" and then the "ashq"-command in the command box and it... should work :)

and some time later, i reread this part and understood wat you meant by "you do not need the "check for" box in the GUI" might havemissed that bit earlier, but i think igot it now, just mafia still isnt cooperating properly. possibly mine own failures still. forever, even. --i must learn to speak ts language--
 

Theraze

Active member
Apologies, I'd gotten one part off and Winterbay had it right. Cast is the gCLI command, use_skill is the ASH command. Do exactly what Winterbay said and you should be working properly. That means you want use_skill(10 not cast(10. :)
 
okay, but for some reason, when i put them into the mood, after some time, they disappear, one character's completely disappeared in the same session, the first one, that had remained after loging off, now only had the song of accompainment bit still attached.
there were three of the, one for the muscle buff in the store, one for accompainmet, and one for if max mp, use ten on laughing.
ashq if(my_mp() == my_maxmp()) {use_skill(10, $skill[laugh it off]);}
if Song of Accompaniment < 1; cast Song of Accompaniment
when an effect is lost, Go Get 'Em, Tiger!, use 5 ben gal balm.

next day, he only has accompaniment. and for some reason, it auto casts song of accompaniment after every turn...
 
alright, got the bit about it auto casting songs after one turn, for some reason, it was set to auto boost buffs at 5% or more mp... but the mood's things keep disappearing, and i dont know how to fix this problem...

i log off and on again, and all the things in the borisbuff are just gone, like its just newly made... still can't getthem to be saved on a more permanent basis.

anyone got any idea as to why it doesn't stay?
 
ashq if(my_mp() == my_maxmp()) {use_skill(10, [laugh it off])}
now gets a warning in mafia and quits, "Expected ), found [ ()" haven't changed it nor mafia, and it just quit today, used it yesterday.
someone in chat suggested changing the [ types to ( type, but that got me "Unknown variable 'laugh' ()"
presumably cause the [ denotes skill, i dunno... any advice? i might dl a newer version, see if it is still a problem, and double check its completely correct, since for a while, it kept getting erased in mafia's moods, possibly cause it didn't make sense before it was finished.

EDIT: for those that saw this, found out the problem,
ashq if(my_mp() == my_maxmp()) {use_skill(10, $skill[laugh it off]);} is a workign version from another account of
ashq if(my_mp() == my_maxmp()) {use_skill(10, [laugh it off])} mine, the second what i logged on with today.
no $skill, no ; although not sure if the ; is important or not, probably is to show a break from the use skill part and the if mp is maxed part...
 
Last edited:
Top