Results 1 to 7 of 7

Thread: Ash access to "Advs Used:"

  1. #1
    Senior Member
    Join Date
    Sep 2006
    Posts
    329

    Default Ash access to "Advs Used:"

    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.

  2. #2

    Default

    That is not available. Currently there is just my_session_meat(), which was only added 2 months ago.

  3. #3
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    256

    Default

    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.
    Originally Posted by Ethelred View Post
    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 Code:
    // use this script before you use any turns
    void main()
    {
     
    string[intthing;
     
    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 Code:
    //use this script whenever you want to recall what you started the day with, and what you currently have left
    void main()

    {
     
    string[intthing;
    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 by Pazleysox; 07-27-2017 at 08:04 PM.

  4. #4
    Senior Member
    Join Date
    Oct 2014
    Posts
    129

    Default

    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");

  5. #5
    Senior Member
    Join Date
    Apr 2009
    Posts
    1,722

    Default

    _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.

  6. #6
    Senior Member
    Join Date
    Oct 2014
    Posts
    129

    Default

    _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.
    Originally Posted by xKiv View Post
    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.

  7. #7
    Senior Member
    Join Date
    Sep 2006
    Posts
    329

    Default

    _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.
    Originally Posted by xKiv View Post
    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.
    Originally Posted by cheesecookie View Post
    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 by Ethelred; 07-30-2017 at 07:20 AM. Reason: Add quote

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •