How do I access Session Results from an ash asript?

patmo98

New member
I'm trying to write a script that auto-collects hobo parts. Mafia know when a hobo is overkiled because it can see that a hobo part wad dropped. I can see it appear in the Session Results tab. Is there any way to find out how many mafia thinks I have from inside an ash script?
 

jasonharper

Developer
There is currently no ASH access to the session tally, and it would be problematic to add this - pseudo-items like the hobo parts aren't really representable by the ASH 'item' type. Also, consider that the player can clear the tally at any time, and that hobo parts could be collected by other players adventuring at the same time.

Take a look at my part collector script (in the Turn-Burning Scripts section), it has the necessary code for visiting Richard and parsing the actual part counts, which may be a better solution for you.
 

patmo98

New member
Take a look at my part collector script (in the Turn-Burning Scripts section), it has the necessary code for visiting Richard and parsing the actual part counts, which may be a better solution for you.

I just wanted it so I could double check to see if I really was overkilling each time without more sever hits.
Example:

int part_count = get_count();
#Using the session result should be pretty safe as long as the user isn't changing things while the script runs. Even then it will just abort.

while( something )
{
adventure( 1 in square );
assert( part_count+1 == get_count() );
part_count = get_count();
}

By the way, your script is what I'm using to parse richard's text and I'm really grateful for it. I just wanted something that would do the same thing as this code you wrote.

if(item_amount($item[hobo nickel]) != nickels) {
abort("You got a hobo nickel - adjust your combat strategy!");
}
 

patmo98

New member
There is currently no ASH access to the session tally, and it would be problematic to add this - pseudo-items like the hobo parts aren't really representable by the ASH 'item' type.

Sorry for the double post.

Couldn't the session data be accessible as "string [int] session_results"?
 
Top