Page 87 of 187 FirstFirst ... 37 77 85 86 87 88 89 97 137 ... LastLast
Results 861 to 870 of 1867

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

  1. #861
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    In mafia's CLI type: update clear

    Then shut down mafia and restart it. Let us know if that solves the problem.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


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

    Default

    Update on my bug above... think the issue is that gremlins are forced into a continual stasis in SmartStasis until they get detected as non-molybdenum, but BatBrain aborts picking a stasis item if you have equal to or less than 36 hp. Either BatBrain needs an exception for gremlins and an expectation that it'll likely kill you a bit more often, or SmartStasis needs an exception for myhp <= 36 in the string stasis function...

  3. #863

    Default

    Let us know if that solves the problem.
    Originally Posted by Bale View Post
    It seems to have for today, thanks. I'll let you know tomorrow if it crops again then.

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

    Default

    I was looking through BatBrain's logic some more and I found some errors with normalize_dmgtype()! Lines 394-398 are in the wrong place. Flavor of magic will not adjust the flavor of sauce spells, not even cayenne or peppermint. Those lines need to be bumped up to the "past" section.

    Note those skills will still give a +10 damage bonus to sauce spells, just not any flavor.

    Also, You forgot Ol' Scratch's ash can which turns sauceror spells hot, but only when you're a sauceror.

    normalize_dmgtype() should look like this:

    Code:
    string normalize_dmgtype(string dmgt) {
       switch (dmgt) {
          case "pasta": if (have_effect($effect[spirit of cayenne]) > 0) return "hot";
             if (have_effect($effect[spirit of peppermint]) > 0) return "cold";
             if (have_effect($effect[spirit of garlic]) > 0 || have_equipped($item[cookbook of the damned])) return "stench";
             if (have_effect($effect[spirit of wormwood]) > 0 || have_equipped($item[necrotelicomnicon])) return "spooky";
             if (have_effect($effect[spirit of bacon grease]) > 0 ||
                have_equipped($item[chester aquarius medallion]) || have_equipped($item[sinful desires])) return "sleaze";
          case "sauce": if (have_equipped($item[ol' scratch's manacles]) || have_equipped($item[capsaicin conjuration]) ||
                (have_equipped($item[Ol' Scratch's ash can]) && my_class() == $class[sauceror]) || 
                have_equipped($item[snapdragon pistil])) return "hot";
             if (have_equipped($item[glacial grimoire]) || have_equipped($item[double-ice box])) return "cold";
             if (dmgt == "sauce") {
                if (have_skill($skill[immaculate seasoning]) && dmg_dealt(to_spread(1+spell_elem_bonus("hot"),"hot")) != dmg_dealt(to_spread(1+spell_elem_bonus("cold"),"cold")))
                   return (dmg_dealt(to_spread(1+spell_elem_bonus("hot"),"hot")) > dmg_dealt(to_spread(1+spell_elem_bonus("cold"),"cold"))) ? "hot" : "cold";
                return "hot,cold";
             }
             string res = "cold,hot,sleaze,spooky,stench,physical";
             if (res.contains_text(monster_element())) res.replace_string(monster_element()+",","");
             return res;
       }
       return dmgt;
    }
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


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

    Default

    Not trying to be space saving I just moved the spirit checks up above the sauce check

    That said, when Mafia lacks data on something it can lead to interesting effects. In my case I ran into Dr. Awkward who has no known monster defense-value (it is 1 according to Mafia, it is ??? according to the wiki). I thus made the following change to my batbrain. It can most likely be done in a better way but at least this way works

    Code:
    if (my_monster == $monster[none] || monster_attack(my_monster) == monster_level_adjustment() || (to_float(monster_defense(my_monster)) / monster_attack(my_monster) < 0.5))
    {
    	attadj = to_int(vars["unknown_ml"]); defadj = attadj;  hpadj = attadj;
    }
    Which made my consult script go from thinking I'd bash his head in with my oversized pizza cutter and 90 muscle in 2 rounds to thinking I had no chance of hitting him and instead casting fearful fettucini on him thus killing him instead of having him kill me

    Edit: Changed the if-statement a bit since it actually caught most things...
    Last edited by Winterbay; 04-21-2011 at 10:23 AM.
    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

  6. #866

    Default

    fianor : We can make things work sanely for you without using UR. Put the following in your login script. You do use a login script, right? Well you do now. Save this to a file in your /script directory with the extension .ash and set it as your login script in preferences for breakfast.

    Code:
    set_property("_meatperhp", to_string(max(mall_price($item[scroll of drastic healing])/ (my_maxhp()* .75), 0.001)));
    That should work just fine for negating Saucy Salve by setting meatperhp, without compromising SS's idea of what it means for you to get hurt. While Universal Recovery would make SS work more accurately, it seems like a bad idea to use the script just to set a variable that can be set this easily.

    The reason BB&SS do not use that simple calculation is because it is an approximation based on things I deduce about your character. If you've got Cannelloni Cocoon for example, that would change the calculation, but this is still close enough for your purpose.
    Originally Posted by Bale View Post
    setting _meatperhp to 0 worked, was in a hurry so I haven't tried your addition to my login script yet bale, but will be trying it with tomorrow's farming.

  7. #867
    Senior Member
    Join Date
    Apr 2009
    Posts
    129

    Default

    I've been bumping into a problem today where if my health dips low, SmartStasis gets stuck.

    Code:
    [2397] Battlefield (Frat Uniform)
    Encounter: War Hippy Infantryman
    Strategy: /Users/student/Library/Application Support/KoLmafia/ccs/default.ccs [default]
    Round 0: oh shazbot loses initiative!
    You lose 29 hit points
    bullet-proof corduroys (10.0 @ +5.0): 580.0 meat * 10.5% = 60.9
    hippy protest button (10.0 @ +5.0): 574.0 meat * 10.5% = 60.27
    lead pipe (11.0 @ +5.0): 575.0 meat * 11.55% = 66.4125
    reinforced beaded headband (11.0 @ +5.0): 575.0 meat * 11.55% = 66.4125
    round purple sunglasses (10.0 @ +5.0): 970.0 meat * 10.5% = 101.85
    wicker shield (6.0 @ +5.0): 555.0 meat * 6.3% = 34.965
    water pipe bomb (5.0 @ +5.0): 150.0 meat * 5.25% = 7.875
    bullet-proof corduroys (10.0 @ +5.0): 580.0 meat * 10.5% = 60.9
    hippy protest button (10.0 @ +5.0): 574.0 meat * 10.5% = 60.27
    lead pipe (11.0 @ +5.0): 575.0 meat * 11.55% = 66.4125
    reinforced beaded headband (11.0 @ +5.0): 575.0 meat * 11.55% = 66.4125
    round purple sunglasses (10.0 @ +5.0): 970.0 meat * 10.5% = 101.85
    wicker shield (6.0 @ +5.0): 555.0 meat * 6.3% = 34.965
    water pipe bomb (5.0 @ +5.0): 150.0 meat * 5.25% = 7.875
    Monster value: 838.69
    Profit per round: ActionProfitDamageOtherbase; Stocking Mimic (18.6μ)16.2μ4.62 (-4.02 MPD)Att: -1.5 (-0.59 DPR) Def: -1.5 HP: 5.16 MP: 5.16
    1 MP costs 8.0 meat.
    Round 1: oh shazbot executes a macro!
    Round 1: oh shazbot uses the facsimile dictionary!
    You lose 22 hit points
    1 MP costs 8.0 meat.
    Round 2: oh shazbot executes a macro!
    Round 2: oh shazbot uses the facsimile dictionary!
    You lose 23 hit points
    1 MP costs 8.0 meat.
    Round 3: oh shazbot executes a macro!
    Round 3: oh shazbot uses the facsimile dictionary!
    You lose 15 hit points
    1 MP costs 8.0 meat.
    Round 4: oh shazbot executes a macro!
    Round 4: oh shazbot uses the facsimile dictionary!
    You lose 19 hit points
    1 MP costs 8.0 meat.
    Round 5: oh shazbot executes a macro!
    Round 5: oh shazbot uses the facsimile dictionary!
    You lose 17 hit points
    1 MP costs 8.0 meat.
    Round 6: oh shazbot executes a macro!
    Round 6: oh shazbot uses the facsimile dictionary!
    You lose 17 hit points
    1 MP costs 8.0 meat.
    Round 7: oh shazbot executes a macro!
    Round 7: oh shazbot uses the facsimile dictionary!
    You gain 49 hit points
    You gain 49 Muscularity Points
    You lose 18 hit points
    1 MP costs 8.0 meat.
    Round 8: oh shazbot executes a macro!
    Round 8: oh shazbot uses the facsimile dictionary!
    You lose 18 hit points
    1 MP costs 8.0 meat.
    Round 9: oh shazbot executes a macro!
    Round 9: oh shazbot uses the facsimile dictionary!
    You lose 18 hit points
    1 MP costs 8.0 meat.
    Round 10: oh shazbot executes a macro!
    Round 10: oh shazbot uses the facsimile dictionary!
    You gain 48 hit points
    You gain 48 Muscularity Points
    You lose 20 hit points
    1 MP costs 8.0 meat.
    Round 11: oh shazbot executes a macro!
    Round 11: oh shazbot uses the facsimile dictionary!
    You lose 18 hit points
    1 MP costs 8.0 meat.
    Round 12: oh shazbot executes a macro!
    Round 12: oh shazbot uses the facsimile dictionary!
    You gain 49 hit points
    You gain 49 Muscularity Points
    You lose 18 hit points
    1 MP costs 8.0 meat.
    Round 13: oh shazbot executes a macro!
    Round 13: oh shazbot uses the facsimile dictionary!
    You lose 17 hit points
    1 MP costs 8.0 meat.
    Round 14: oh shazbot executes a macro!
    Round 14: oh shazbot uses the facsimile dictionary!
    You lose 16 hit points
    1 MP costs 8.0 meat.
    Round 15: oh shazbot executes a macro!
    Round 15: oh shazbot uses the facsimile dictionary!
    You lose 17 hit points
    1 MP costs 8.0 meat.
    Round 16: oh shazbot executes a macro!
    Round 16: oh shazbot uses the facsimile dictionary!
    You lose 17 hit points
    1 MP costs 8.0 meat.
    Round 17: oh shazbot executes a macro!
    Round 17: oh shazbot uses the facsimile dictionary!
    You lose 17 hit points
    1 MP costs 8.0 meat.
    Round 18: oh shazbot executes a macro!
    KoLmafia thinks it is round 19 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 19: oh shazbot executes a macro!
    KoLmafia thinks it is round 20 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 20: oh shazbot executes a macro!
    KoLmafia thinks it is round 21 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 21: oh shazbot executes a macro!
    KoLmafia thinks it is round 22 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 22: oh shazbot executes a macro!
    KoLmafia thinks it is round 23 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 23: oh shazbot executes a macro!
    KoLmafia thinks it is round 24 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 24: oh shazbot executes a macro!
    KoLmafia thinks it is round 25 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 25: oh shazbot executes a macro!
    KoLmafia thinks it is round 26 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 26: oh shazbot executes a macro!
    KoLmafia thinks it is round 27 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 27: oh shazbot executes a macro!
    KoLmafia thinks it is round 28 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 28: oh shazbot executes a macro!
    KoLmafia thinks it is round 29 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 29: oh shazbot executes a macro!
    KoLmafia thinks it is round 30 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 30: oh shazbot executes a macro!
    KoLmafia thinks it is round 31 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 31: oh shazbot executes a macro!
    KoLmafia thinks it is round 32 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 32: oh shazbot executes a macro!
    KoLmafia thinks it is round 33 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 33: oh shazbot executes a macro!
    KoLmafia thinks it is round 34 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 34: oh shazbot executes a macro!
    KoLmafia thinks it is round 35 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 35: oh shazbot executes a macro!
    KoLmafia thinks it is round 36 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 36: oh shazbot executes a macro!
    KoLmafia thinks it is round 37 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 37: oh shazbot executes a macro!
    KoLmafia thinks it is round 38 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 38: oh shazbot executes a macro!
    KoLmafia thinks it is round 39 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 39: oh shazbot executes a macro!
    KoLmafia thinks it is round 40 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 40: oh shazbot executes a macro!
    KoLmafia thinks it is round 41 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 41: oh shazbot executes a macro!
    KoLmafia thinks it is round 42 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 42: oh shazbot executes a macro!
    KoLmafia thinks it is round 43 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 43: oh shazbot executes a macro!
    KoLmafia thinks it is round 44 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 44: oh shazbot executes a macro!
    KoLmafia thinks it is round 45 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    Round 45: oh shazbot executes a macro!
    KoLmafia thinks it is round 46 but KoL thinks it is round 18
    1 MP costs 8.0 meat.
    KoLmafia declares world peace.
    You're on your own, partner.
    Click here to continue in the relay browser.
    My CCS consults SmartStasis and then consults spamattack. But it seems odd for smartstasis to get stuck like that instead of just aborting or taking some other plan of action.

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

    Default

    When you click to view the fight in the Relay Browser, is there any KoL Macro error?

    Would running the same combat with a higher verbosity give more info?
    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

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

    Default

    slyz, I posted the error that appears above in post 859...

  10. #870
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Troublesome bug! You shouldn't mark slimelings as empty when initiative is won!

    [395] F'c'le
    Encounter: chatty pirate
    Strategy: C:\Documents and Settings\Quicksilver\My Documents\My Dropbox\KolMafia\ccs\default.ccs [default]
    Round 0: bale wins initiative!
    Your slimeling needs sating.
    Your slimeling needs sating.

    Round 1: bale executes a macro!
    Round 1: bale attacks!
    Round 2: chatty pirate takes 50 damage.
    Round 2: Princess Vina leaps on your opponent, sliming him for 19 damage. It's inspiring!
    Round 2: chatty pirate takes 19 damage.
    You gain 19 Muscularity Points
    You lose 5 hit points
    Round 2: bale attacks!
    Round 3: chatty pirate takes 51 damage.
    Round 3: Princess Vina sniffs around, looking for something to absorb.
    Round 3: bale wins the fight!
    You gain 110 Meat
    After Battle: Princess Vina hops around, dancing a jig accompanied by wet squelching noises.
    You gain 22 Beefiness
    You gain 8 Magicalness
    You gain 7 Cheek
    needless to say it quickly set my slimeling fullness to 0.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


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
  •