Page 137 of 187 FirstFirst ... 37 87 127 135 136 137 138 139 147 ... LastLast
Results 1,361 to 1,370 of 1868

Thread: SmartStasis -- a complex script for a simple CCS

  1. #1361
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,741

    Default

    Ignore it... it's a standard mafia issue that they've been working on fixing/changing for several years now.

  2. #1362
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    Well... that's actually not entirely true. SS creates and generates a Macro that does nothing (executing WHAM from the Relay browser shows 1 round of "you twiddle your thumbs"). The generated macro contains batround only and nothing else which is... odd because I can see nothing in the code that I would expect to do that.

    The generated macro can be seen in the example, if we extract just SS we get:
    Code:
    WHAM: Running SmartStasis
    Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
    Building custom actions...
    Custom actions built! (0 actions)
    Constructed macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; if pastround 49; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; endsub; ; call batround; 
    Round 1: Arbos executes a macro!
    KoLmafia thinks it is round 2 but KoL thinks it is round 1
    Parsed round number: 1
    Building options...
    Options built! (13 actions)
    Stasis action chosen: skill 11011 (profit: 40.92)
    hot wing (30.0 @ +25.0): 32μ * 37.5% = 12.0
    Imp Ale (30.0 @ +25.0): 25μ * 37.5% = 9.375
    leather mask (5.0 @ +25.0): 65μ * 6.25% = 4.0625
    Value of stat gain: 148.75μ
    Attack action chosen: skill 11000
    Top of the stasis loop.
    Queued: skill 11011
    Building options...
    Options built! (12 actions)
    Constructed macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; if pastround 49; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; endsub; sub finito; skill 11011; call batround; endsub; call finito; repeat hasskill 11011 && (!hpbelow 134.0 && !mpbelow 32.0 && !pastround 25)
    Round 2: Arbos executes a macro!
    Round 2: Arbos casts INTIMIDATING BELLOW!
    KoLmafia thinks it is round 3 but KoL thinks it is round 2
    Round 3: g imp drops 16 attack power.
    Round 3: g imp drops 16 defense.
    Happened: skill 11011
    Parsed round number: 2
    Building options...
    Options built! (12 actions)
    Stasis action chosen: skill 2 (profit: -127.79)
    hot wing (30.0 @ +25.0): 32μ * 37.5% = 12.0
    Imp Ale (30.0 @ +25.0): 25μ * 37.5% = 9.375
    leather mask (5.0 @ +25.0): 65μ * 6.25% = 4.0625
    Value of stat gain: 148.75μ
    Attack action chosen: skill 11000
    This monster is not your huckleberry.
    Stasis loop complete.
    WHAM: SmartStasis complete.
    As can be seen at the top SS generates a macro and executes that, after which Mafia gets confused and SS reparses the round number as still being 1.
    Last edited by Winterbay; 04-01-2012 at 06:25 PM.
    My scripts:
    Best sushi for Profit
    Winterbay's Helpful Automatic Monsterbasher (WHAM)

    Scripts maintained by me:
    Autobasement
    Smashlib

    A small programmer joke:
    Wife: Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6.
    The man came back with 6 bottles of milk.
    Wife: Why did you buy 6 bottles of milk.
    Man: Because they had eggs...

    The 6 Stages of Debugging: 1 )That can't happen. 2) That shouldn't happen. 3) Hmmm, weird. 4) Why does that happen? 5) Oh, I see. 6 )How did that ever work?

    All programs can be optimized, and all programs have bugs; therefore all programs can be optimized to one line that doesnít work. /Bob Fitch, Blizzard

  3. #1363
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,505

    Default

    Yeah, just fixed that. When I rearranged all the code, macro() ended up missing a check for an empty queue before submitting the macro. Since depending on the character that might mean a waasted server hit per fight, I'm posting that tiny but big update to the BB thread in just a few minutes!
    Sig by JakAtk
    My scripts: Prefref Plus | One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  4. #1364
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,510

    Default

    Maybe we should remove the "KoLmafia thinks..." message, since it has no use.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  5. #1365
    Senior Member mredge73's Avatar
    Join Date
    Dec 2008
    Location
    Houston TX
    Posts
    519

    Default

    There is still a bug on Cyrus.
    I haven't isolated it yet but for some reason the property "usedagainstcyrus" keeps getting overwritten with an empty string. I think this is what is messing it up.
    Or for whatever reason it keeps slinging the same pair.

  6. #1366
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,505

    Default

    Okay, as I mentioned in the BB thread, I didn't fix the empty macro submission like I thought with that last BB update. I did, however, fix it now in SS, but I'd like to add support for black boxes before posting a release. Tomorrow I expect to be able to add that, so a fixed version will be up then with black box support, and a fixed version of BB will also be up (there were some kinks in auto-funkslinging) and unless any serious bugs are reported that will be the last in this rash of (possibly annoying) updates for a while.

    mredge: Hmmm. Okay, Cyrus will go on the list of things to investigate.
    Sig by JakAtk
    My scripts: Prefref Plus | One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  7. #1367
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    May I, now that the boss-proxy field exists, suggest that the Stomping Boots-check in SS gets turned into:
    Code:
      // release the boots!
       if (my_familiar() == $familiar[stomping boots] && my_location() != $location[none] && get_property("bootsCharged") == "true" && 
           count(get_monsters(my_location())) > 1 && m.boss == false)) {
    (since $phylum[none] no longer is unique for bosses and a lot of them now has a phylum)
    My scripts:
    Best sushi for Profit
    Winterbay's Helpful Automatic Monsterbasher (WHAM)

    Scripts maintained by me:
    Autobasement
    Smashlib

    A small programmer joke:
    Wife: Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6.
    The man came back with 6 bottles of milk.
    Wife: Why did you buy 6 bottles of milk.
    Man: Because they had eggs...

    The 6 Stages of Debugging: 1 )That can't happen. 2) That shouldn't happen. 3) Hmmm, weird. 4) Why does that happen? 5) Oh, I see. 6 )How did that ever work?

    All programs can be optimized, and all programs have bugs; therefore all programs can be optimized to one line that doesnít work. /Bob Fitch, Blizzard

  8. #1368
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    I've got a problem with SS in BorisCore. Okay, technically this may be a problem with stasis_action()...

    SS loves to use Intimidating Bellow on weak monsters that I can (and will) kill in a single hit. There's no profit in casting a 3 mp skill when I can kill the monsters for 0 mp without it.

    This happens because if the monster is capable of hitting me, the massive delevel will reduce the monster to not being able to hit me and to_profit() multiplies that difference in damage by meatperhp. The only sane way to account for that is for stasis_action() to only count it as profit if kill_rounds(attack_action()) is greater than 1.

    Here's a sample at verbosity 8:

    Code:
    Encounter: white chocolate golem
    Round 0: bale wins initiative!
    Running ZLib version: r35 (current)
    Running Character Info Toolbox version: 0.6.5.0.1
    Running ZLib version: r35 (current)
    1 HP costs 11.333μ. ( 382 / 382 )
    1 MP costs 17μ. ( 61 / 93 )
    Running BatBrain version: 1.20 (current)
    Running SmartStasis version: 3.14 (current)
    Running Destroy All Monsters version: 0.3.5.1 (current)
    white chocolate chips (50.0 @ +83.90416): 24μ * 91.95208% = 22.068499
    Value of stat gain: 297.5μ
    white chocolate chips (50.0 @ +83.90416): 24μ * 91.95208% = 22.068499
    Value of stat gain: 297.5μ
    ATT: 112 (94% ◊ 24.26, death in 17)
    DEF: 100 (95.45% ◊ 477.01, win in 2)
    HP: 96, Value: 319.57 μ
    Parsed round number: 1
    Stasis action chosen: skill 11011 (profit: 200.67)
    Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
    Stasis action chosen: skill 11011 (profit: 200.67)
    white chocolate chips (50.0 @ +83.90416): 24μ * 91.95208% = 22.068499
    Value of stat gain: 297.5μ
    Attack action chosen: skill 11000
    Queued: skill 11011
    Constructed macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub finito; skill 11011; call batround; endsub; call finito; repeat hasskill 11011 && (!hpbelow 382.0 && !mpbelow 61.0 && !pastround 25)
    With my current strength of 211 and huge damage bonuses, using mighty axing will crush that puny monster with impunity so it certainly wasn't worth 200.67 to spend those 3 mp. I admit I can afford the mp cost, but it is a wasted server hit.
    Last edited by Bale; 04-05-2012 at 07:28 AM.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  9. #1369
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Ugh. This is a problem I've been having. In one of these fights it used my flyers. In the other fight it did not try to flyer. Why? It does not seem to be because of a lack of MP.


    Code:
    > zlib verbosity = 8
    
    Previous value of verbosity: 3
    Changed to 8.
    Validating adventure sequence...
    Condition added: tomb ratchet (3)
    
    Running ZLib version: r35 (current)
    
    Request 1 of 2 (Pyramid: The Upper Chamber) in progress...
    
    [718] The Upper Chamber
    Encounter: tomb rat
    Strategy: C:\Documents and Settings\David.QUICKSILVER\My Documents\My Dropbox\KolMafia\ccs\default.ccs [default]
    Round 0: bale wins initiative!
    Running ZLib version: r35 (current)
    1 HP costs 5.333μ. ( 277 / 416 )
    1 MP costs 8μ. ( 16 / 105 )
    Running BatBrain version: 1.20 (current)
    Running SmartStasis version: 3.14 (current)
    Running Destroy All Monsters version: 0.3.5.1 (current)
    tomb ratchet (20.0 @ +116.749374): 2,000μ * 43.349873% = 866.99744
    leathery rat skin (30.0 @ +116.749374): 150μ * 65.02481% = 97.53722
    unidentified jerky (12.0 @ +116.749374): 90μ * 26.009924% = 23.40893
    Value of stat gain: 626.88μ
    tomb ratchet (20.0 @ +116.749374): 2,000μ * 43.349873% = 866.99744
    leathery rat skin (30.0 @ +116.749374): 150μ * 65.02481% = 97.53722
    unidentified jerky (12.0 @ +116.749374): 90μ * 26.009924% = 23.40893
    Value of stat gain: 626.88μ
    ATT: 236 (94% ◊ 105.11, death in 3)
    DEF: 216 (95.45% ◊ 132.6, win in 3)
    HP: 250, Value: 1,727.32 μ
    Parsed round number: 1
    Stasis action chosen: skill 11011 (profit: 228.36)
    Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
    Stun action chosen: skill 11003
    Stun action chosen: skill 11003
    Custom action: use 2405 (stun first with skill 11003)
    Stun action chosen: skill 11003
    Queued: skill 11003
    Queued: use 2405
    Stasis action chosen: use 2678 (profit: 6)
    tomb ratchet (20.0 @ +116.749374): 2,000μ * 43.349873% = 866.99744
    leathery rat skin (30.0 @ +116.749374): 150μ * 65.02481% = 97.53722
    unidentified jerky (12.0 @ +116.749374): 90μ * 26.009924% = 23.40893
    Value of stat gain: 626.88μ
    Attack action chosen: skill 11000
    Attack action chosen: Mighty Axing
    Queued: skill 11011
    Destroy with: Intimidating Bellow
    Attack action chosen: Mighty Axing
    Queued: skill 11000
    Destroy with: Mighty Axing
    skill 11003
    use 2405
    skill 11011
    skill 11000
    Constructed macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; skill 11003; call batround; use 2405; call batround; skill 11011; call batround; skill 11000; call batround; 
    Round 1: bale executes a macro!
    Round 1: bale casts BROADSIDE!
    Round 2: bale uses the rock band flyers!
    Round 3: bale casts INTIMIDATING BELLOW!
    Round 4: tomb rat drops 71 attack power.
    Round 4: tomb rat drops 71 defense.
    Round 4: bale casts MIGHTY AXING!
    Round 5: tomb rat takes 431 damage.
    Round 5: bale wins the fight!
    You gain 8 Muscularity Points
    You gain 102 Meat
    You acquire an item: tomb ratchet
    You acquire an item: unidentified jerky
    You gain 39 Strongness
    You gain 13 Mysteriousness
    You gain 13 Roguishness
    Happened: skill 11003
    Happened: use 2405
    Happened: skill 11011
    Happened: skill 11000
    Parsed round number: 5
    Look! You found 1 tomb ratchet (2,000μ)!
    Look! You found 1 unidentified jerky (90μ)!
    Happened: crit
    Happened: skill 11003
    Happened: use 2405
    Happened: skill 11011
    Happened: skill 11000
    Parsed round number: 5
    Look! You found 1 tomb ratchet (2,000μ)!
    Look! You found 1 unidentified jerky (90μ)!
    Happened: crit
    
    Running ZLib version: r35 (current)
    Restoring MP! Currently at 287 of 416 HP, 11 of 105 MP, current meat: 21065 ... Target MP = 21.
    Purchasing black cherry soda (1 @ 80)...
    You acquire an item: black cherry soda
    You spent 80 Meat
    Purchases complete.
    Using 1 black cherry soda...
    You gain 9 Muscularity Points
    Finished using 1 black cherry soda.
    Purchasing black cherry soda (1 @ 80)...
    You acquire an item: black cherry soda
    You spent 80 Meat
    Purchases complete.
    Using 1 black cherry soda...
    You gain 9 Muscularity Points
    Finished using 1 black cherry soda.
    
    Request 2 of 2 (Pyramid: The Upper Chamber) in progress...
    
    [719] The Upper Chamber
    Encounter: tomb rat
    Strategy: C:\Documents and Settings\David.QUICKSILVER\My Documents\My Dropbox\KolMafia\ccs\default.ccs [default]
    Round 0: bale wins initiative!
    Running ZLib version: r35 (current)
    1 HP costs 5.333μ. ( 287 / 416 )
    1 MP costs 8μ. ( 29 / 105 )
    Running BatBrain version: 1.20 (current)
    Running SmartStasis version: 3.14 (current)
    Running Destroy All Monsters version: 0.3.5.1 (current)
    tomb ratchet (20.0 @ +116.749374): 2,000μ * 43.349873% = 866.99744
    leathery rat skin (30.0 @ +116.749374): 150μ * 65.02481% = 97.53722
    unidentified jerky (12.0 @ +116.749374): 90μ * 26.009924% = 23.40893
    Value of stat gain: 626.88μ
    tomb ratchet (20.0 @ +116.749374): 2,000μ * 43.349873% = 866.99744
    leathery rat skin (30.0 @ +116.749374): 150μ * 65.02481% = 97.53722
    unidentified jerky (12.0 @ +116.749374): 90μ * 26.009924% = 23.40893
    Value of stat gain: 626.88μ
    ATT: 236 (94% ◊ 105.11, death in 3)
    DEF: 216 (95.45% ◊ 109.94, win in 3)
    HP: 250, Value: 1,727.32 μ
    Parsed round number: 1
    Stasis action chosen: use 2678 (profit: -386.09)
    Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
    Stasis action chosen: use 2678 (profit: -386.09)
    No valid attacks.
    Attack action chosen: Cleave
    Queued: skill 11001
    Destroy with: Cleave
    skill 11001
    Constructed macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; skill 11001; call batround; 
    Round 1: bale executes a macro!
    Round 1: bale casts CLEAVE!
    Round 2: tomb rat takes 600 damage.
    Round 2: bale wins the fight!
    You gain 7 Muscularity Points
    You gain 115 Meat
    You acquire an item: leathery rat skin
    You gain 40 Strongness
    You gain 11 Wizardliness
    You gain 13 Sarcasm
    Happened: skill 11001
    Parsed round number: 2
    Look! You found 1 leathery rat skin (150μ)!
    Happened: crit
    Happened: skill 11001
    Parsed round number: 2
    Look! You found 1 leathery rat skin (150μ)!
    Happened: crit
    
    Conditions not satisfied after 2 adventures.
    
    > flyer
    
    Completed 7534 out of 10,000 = 75.34%.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  10. #1370

    Default

    I'm having issues with SmartStasis aborting because it keeps trying to use the Rain-doh indigo cup multiple times in a round. Any idea what that's about?

Similar Threads

  1. Replies: 3
    Last Post: 09-15-2015, 04:34 PM
  2. Replies: 11
    Last Post: 01-25-2015, 12:27 PM
  3. Run a Complex Script for 'X' Turns - OCW, etc.
    By Raven434 in forum Community Support
    Replies: 5
    Last Post: 01-07-2010, 10:06 PM
  4. Help with Simple Script
    By skateboard34 in forum Community Support
    Replies: 6
    Last Post: 12-25-2008, 01:40 AM
  5. Simple (but trying to make it complex) breakfast script
    By Duffkiligan in forum Scripting Discussion
    Replies: 7
    Last Post: 02-08-2008, 08:09 PM

Posting Permissions

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