Ash access to "Advs Used:"

Ethelred

Member
Is there an ash function to access the "Advs Used:" displayed in the session results section of the Mafia Main Interface window? I can't seem to find it. I can find turns used this ascension and turns used since the beginning, but not turns used today. Tried checking for a pref, but came up blank there as well. Perhaps due to my own lack of creativity. Thanks for any help with this.
 

Pazleysox

Member
Is there an ash function to access the "Advs Used:" displayed in the session results section of the Mafia Main Interface window? I can't seem to find it. I can find turns used this ascension and turns used since the beginning, but not turns used today. Tried checking for a pref, but came up blank there as well. Perhaps due to my own lack of creativity. Thanks for any help with this.

There's actually a way to do it, but it's a little complicated. I figured out it will only work by running 2 seperate scripts. 1 you have to run before you use any turns.

PHP:
// use this script before you use any turns
void main()
{
 string[int] thing;
 thing[0]=my_adventures();
 map_to_file(thing,"my_adventures");
}
This will create a file called "my_adventures", and store your current number of adventures. If you want to remember what you started with, always run this first.
PHP:
//use this script whenever you want to recall what you started the day with, and what you currently have left
void main()

{
 string[int] thing;
file_to_map( "my_adventures.txt" , thing);
for i from 0 to (count(thing) - 1) {
   print("Started day with " + thing[i] + " turns.  Currently have " + my_adventures());
}}
This will print out the data stored in the file "my_adventures.txt", and tells you how many adventures you currently have. You will have to do the math by yourself.

If there's another way to do this, it's completely beyond me!
 
Last edited:
That assumes you don't gain any adventures.

Code:
if(get_property("_turncount").to_int() == 0)
{
    set_property("_turncount", my_turncount());
}

...

int spent = my_turncount() - get_property("_turncount").to_int();
print("You spent: " + spent + " turns today. Terrible!", "red");
 

xKiv

Active member
_properties are reset by rollover, not by session ;)
You would have to set it to 0 manually in a loginScript if you really want *session* adventure used.
 
_properties are reset by rollover, not by session ;)
You would have to set it to 0 manually in a loginScript if you really want *session* adventure used.

The original post did ask for turns used today. Although, it did refer to a session results section. But yeah, they could adapt it for a close session approximation.
 

Ethelred

Member
_properties are reset by rollover, not by session
wink.png

You would have to set it to 0 manually in a loginScript if you really want *session* adventure used.

The original post did ask for turns used today. Although, it did refer to a session results section. But yeah, they could adapt it for a close session approximation.

I did mention session results, but I generally play all my turns for the day in a single session. So I was lumping the two together, which led to some confusion. I ended up adopting an approach similar to that suggested by cheesecookie, which satified my needs. Thanks to all those who supplied suggestions and sorry for posing a somewhat ill-formed problem.
 
Last edited:
Top