I added a couple of functions in revision 17937 to make it a little easier for scripts to handle choice adventures:
Not all choices are always available. If you were expecting choice 2 to exist, doing run_choice( 2 ) will not work; you will remain in the choice.
I suspect that most code will not care about this and those that do can come up with the same data by parsing the page returned by visit_url, but these functions call internal KoLmafia methods which already do all of that.
Code:
Visiting a Science Tent
Encounter: Dr. Gordon Stuart, a Scientist
[color=green]> ash last_choice()[/color]
Returned: 1201
[color=green]> ash available_choice_options()[/color]
Returned: aggregate string [int]
1 => Great!
[color=green]> choice 1[/color]
I suspect that most code will not care about this and those that do can come up with the same data by parsing the page returned by visit_url, but these functions call internal KoLmafia methods which already do all of that.