Results 1 to 3 of 3

Thread: Question about custom combat script / banishing

  1. #1
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    491

    Default Question about custom combat script / banishing

    Ran into this today while working with my free fights script:
    Code:
    [17077] The Hidden Bowling Alley
    Encounter: pygmy janitor
    Round 0: pazsox wins initiative!
    KoLmafia thinks it is round 2 but KoL thinks it is round 1
    Round 1: pazsox casts REFLEX HAMMER!
    pygmy janitor banished by Reflex Hammer.
    This combat did not cost a turn
    We have no way to banish this beast! Complain to PazSox. [Free Fights script]
    You're on your own, partner.
    I have a free fights consult.ash script to handle my banishes for the bowling alley. Here's a piece of the appropriate code:
    Code:
    if (contains_text(OPPONENT, "pygmy janitor"))
    	{if (have_skill($skill[reflex hammer]) && get_property("_reflexHammerUsed") == 0)
    		use_skill(1, $skill[reflex hammer]);
    	if (have_skill($skill[snokebomb]) && get_property("_snokebombUsed") == 0)
    		use_skill(1, $skill[snokebomb]);
    	abort("We have no way to banish this beast!  Complain to PazSox.  [Free Fights script]");}
    Among a bunch of other banishing items that aren't important to add to this post.

    I haven't used this script in a few months, and simply commented out the abort line, and moved the } to the appropriate location.

    Is it just a matter of moving the } to the line above, and leaving the abort where it is? I was able to get through the fights with the proper pygmys being banished.

  2. #2
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    Your script as coded says to do this:

    if it's a pygmy janitor:
    if you have reflex hammer, then use it.
    then if you have snokebomb, then use it.
    then abort

    Perhaps you should consider using "else" clauses.

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

    Default

    Your script as coded says to do this:

    if it's a pygmy janitor:
    if you have reflex hammer, then use it.
    then if you have snokebomb, then use it.
    then abort

    Perhaps you should consider using "else" clauses.
    Originally Posted by Veracity View Post
    AH HA! I'll try this tomorrow. Thank you
    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.

Posting Permissions

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