Results 1 to 4 of 4

Thread: Nuclear autumn buff keeper upper

  1. #1
    Junior Member
    Join Date
    Oct 2016
    Posts
    2

    Default Nuclear autumn buff keeper upper

    So I made a thing and it seems to work pretty well, it'll first check if you have internal soda machine installed, if so it'll run through all the buff skills for nuclear autumn, and it does check if you have it first, if not will skip that skill and will abort if you're too poor to do internal soda machine.

    Uh, well, I made this for myself and it appears to work, I figured there might be others out there who'd want it. I can't figure out this SVN thing but I put it on sourceforge as one seems to do so here's this

    https://sourceforge.net/projects/useallnaskills/files

    This is my first time attempting a script on KOL and hey at least it's functional, i reckon it might could maybe help with some tedium-reduction for other people too.

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,263

    Default

    Interesting. Though you'd probably want to check to see if the skill's effect runs out or else you'd just cast the skill every time the script is called until you run out of meat. Fortunately there's an easy way to check that.

    In addition to checking for the effect being active I made a lot of changes to your script in hopes you see something you'd like to learn.

    PHP Code:

    void ICS
    (int cost) {
        if (! 
    have_skill($skill[internal soda machine]) )
            
    abort("You don't have Internal Soda Machine... kinda important for this.");

        if (
    my_meat() >= 60) {
            
    use_skill3$skill[internal soda machine] );
        } else {
            
    abort("You're too poor to proceed");
        }
    }

    void cast(skill sk) {
        if(
    my_mp() < mp_cost(sk) && my_maxmp() >= mp_cost(sk))
            
    ICS(mp_cost(sk));
        print(
    "MP over 30, proceeding...""#0000ff");
        if(
    my_mp() >= mp_cost(sk))
            
    use_skill(1sk);
    }

    foreach 
    sk in $skills[flappy earsmagic sweatsteroid bladderintracranial eyeself-combing hair]
        if(
    have_skill(sk) && !have_effect(to_effect(sk)))
            
    cast(sk); 
    You should also refine ICS to check for my_mp() - mp_cost(sk) and only restore the mp needed, but I've done enough.
    Last edited by Bale; 10-09-2016 at 11:28 PM.

  3. #3
    Junior Member
    Join Date
    Oct 2016
    Posts
    2

    Default

    Interesting! This code goes way deeper than I expected. Thanks for the input, I'll give this a shot and fuss around with it.

  4. #4
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,263

    Default

    Oh heck. I just noticed a dumb bug in that code. have_effect() is not a boolean. I meant to check for have_efffect() > 0

Posting Permissions

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