Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: How to determine extra rollover adventures from equiment?

  1. #1
    Junior Member
    Join Date
    Oct 2018
    Posts
    5

    Default How to determine extra rollover adventures from equiment?

    I'm writing a script to equip items with the highest available extra rollover adventures, and I am having difficulty finding out programatically how many extra adventures a particular item will give. I note that the website documents a proxy record for the item class that contains an "adventures" property, but for the several items I've looked at (General Sage's Lonely Diamond Club Jacket, Dead Guy's Watch), item.adventures is the null string.

    What's the approved way of determining this?

    If it matters, I'm on Windows 7, Java 1.8, and KoLmafia 17.12 at the latest build.

  2. #2
    Developer
    Join Date
    Apr 2010
    Posts
    4,810

    Default

    What is the reason you don’t just maximise adventures using maximiser cli?

  3. #3

    Default

    You would use numeric_modifier( item, "Adventures" ) to get that value. But you probably don't want to do that, since the maximizer (either the GUI or various commands) will do all the work for you.

    The adventures proxy field is for food/booze/spleen that gives adventures.

  4. #4
    Junior Member
    Join Date
    Oct 2018
    Posts
    5

    Default

    I'm teaching myself scripting, and I thought it'd be useful to have a script that runs when I log off that will equip me for rollover, pulling from Hangk's as necessary since I generally run softcore.

  5. #5
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    366

    Default

    Here's how I do it on the scripts that I've written:


    int init = numeric_modifier( "adventures" );
    print("Adventures " + init);

    That will print out how many adventures you will receive from gear + skills + campground stuff.

    You can bring it one further (I like to do this):
    PHP Code:
            int count;
            
    int total;
        
    int init numeric_modifier"adventures" );
        if(
    get_property("_borrowedTimeUsed") == "true")
            {
            
    count count 20;
            }
        
    total 40 count init my_adventures();
    print (
    "You will receive " total " adventures after rollover"); 
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

  6. #6
    Junior Member
    Join Date
    Oct 2018
    Posts
    5

    Default

    Thank you, you've been most helpful!

  7. #7
    Senior Member
    Join Date
    Jun 2016
    Posts
    231

    Default

    All that does is tell you how many adventures your current setup will give you, which is nice for verification, but not all that helpful for making the script in the first place.
    But as lost mentioned, you don't have to write a full script for this, since the modifier maximizer can do this just fine for you, all you have to do is put: 'maximize adv' as a cli command.

    Or if you want something a bit more complex, my logout script uses: 'cli_execute("maximize adv, "+ pvpValue+" pvp fights, switch tot, switch disembodied hand");'
    This way I get to specify how much I value pvp fights compared to adventures, and it will include the trick-or-treating tot and disembodied hand on top of whatever familiar I'm currently using, and switch to them when appropriate.

  8. #8

    Default

    SBThief's plan is reasonable, since the maximizer isn't necessarily the best for seeing good options to pull.

  9. #9
    Senior Member
    Join Date
    Jun 2016
    Posts
    231

    Default

    Ah, good point.

  10. #10
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    366

    Default

    This script that I wrote will probably do what he's looking to do then. It will show what gear a player has, and tell how many bonus turns it will give. It does not pull, or equip the gear however.

Posting Permissions

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