Can an ASH script get a list of current conditions?

Fluxxdog

Active member
When you use the Adventure tab, there are quite a few options available. The most obvious one of items, there's also choice adventures, you can also put in meat, a level requirement, stat requirement, etc. And as far as I can tell...

There's no way for an ash script to retrieve this information! ...Or am I mistaken?

Is there a way for an ash script to read your current goals? Say I need to get my next level as a Pastamancer and I decide to level up in the Haunted Gallery. I forgot that I had my Louvre Goal set to pick up some quick moxie from earlier. I'd want my bBS to say "Hey! He's trying to get Mysticality, not Moxie! Let's get that goal switched..."
 

Theraze

Active member
Goals (conditions), or choice adventures?

To display your current conditions in gCLI, use "conditions add" with no additional text...
 
Last edited:

Bale

Minion
Therzae, that information is useless to an ash script. It can only provide information to the gCLI.

The only way for an ash script to get condition information is by using is_goal(). This function will allow you to check if a specific item is a goal. Other goals are invisible to an ash script, though the goals command will display them from the CLI.
 

Theraze

Active member
Yeah... I was just pondering though whether it's possible to capture the string returned from the CLI command to a string that's mutable by the ASH system... If not, then no, there's no way to do it. :) That, and I'm still not certain of whether choice adventures is actually what is being queried, in which case you can getproperties, or it's the conditions, or some odd blend between the two...
 

Fluxxdog

Active member
I thought as much :/ I do know if you use cli_execute("goal check") it will return false if there are stills goals left, but it seems to have a weird effect on counting goals if used in a script while auto-adventuring. Not exactly a bug since it's being used outside its normal purposes.
 

Theraze

Active member
Hmm... if I'm understanding properly, in your post over here (http://kolmafia.us/showthread.php?5...turn-a-map-value&p=37425&viewfull=1#post37425) you use a cli execution to populate your mana_gear listing... or is this:
Code:
[SIZE=3][FONT=Courier New][COLOR=#0000bb]cli_execute[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"whatif equip "[/COLOR][COLOR=#007700]+[/COLOR][COLOR=#0000bb]gear[/COLOR][COLOR=#007700]+[/COLOR][COLOR=#dd0000]"; quiet"[/COLOR][COLOR=#007700]);[/COLOR][/FONT][/SIZE]
not actually getting your information for what the mp max is?

If so, you should be able to put your conditions into a list...
 

Fluxxdog

Active member
Hmm... if I'm understanding properly, in your post over here (http://kolmafia.us/showthread.php?5...turn-a-map-value&p=37425&viewfull=1#post37425) you use a cli execution to populate your mana_gear listing... or is this:
Code:
[SIZE=3][FONT=Courier New][COLOR=#0000bb]cli_execute[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"whatif equip "[/COLOR][COLOR=#007700]+[/COLOR][COLOR=#0000bb]gear[/COLOR][COLOR=#007700]+[/COLOR][COLOR=#dd0000]"; quiet"[/COLOR][COLOR=#007700]);[/COLOR][/FONT][/SIZE]
not actually getting your information for what the mp max is?

If so, you should be able to put your conditions into a list...
whatif and speculate get the information but return true as a cli_execute(). In the next line:
PHP:
numeric_modifier("_spec", "Buffed MP Maximum")
...is what actually pulls out my speculated new max MP. cli_execute ALWAYS return true or false. the saved data called "_spec" is rather black box without tearing apart mafia's code to see how it works, quite beyond my ability at the moment.

I guess i'll have to try something else. I don't really want to add a FReq for a boolean conditions_exist() function.
 

Theraze

Active member
Shame. Yeah, doing 5000 item checks, plus all the for loops for meat/level/stats... No good.
 
Top