Page 2 of 7 FirstFirst 1 2 3 4 ... LastLast
Results 11 to 20 of 61

Thread: Spam attack and save servers

  1. #11
    Senior Member
    Join Date
    Apr 2009
    Posts
    1,809

    Default

    but since unless you tune your spells they are randomly choosen
    Originally Posted by Winterbay View Post
    At least pasta spells are never randomly the wrong element (unless the only correct element is physical, iirc).
    And sauce spells don't tune with flavour anyway.

  2. #12
    Senior Member
    Join Date
    Apr 2009
    Posts
    129

    Default

    @Winterbay Whenever I run your spamattack as run_combat, I get the following
    Code:
    Expected ), found , (spamattack.ash, line 132)
    Which leads me to wonder if it's actually working (I don't see any combat messages, but that may be an effect of running server side macros).

  3. #13
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,743

    Default

    shazbot, he's moved WAY on from that point. I'd suggest either using Winterbay's version from http://kolmafia.us/showthread.php?64...ll=1#post49275 or if you want to try an alternative, Bale's version from http://kolmafia.us/showthread.php?64...ll=1#post49411 as either of those should be significantly better than the one you're trying to use.

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

    Default

    @Winterbay Whenever I run your spamattack as run_combat, I get the following
    Code:
    Expected ), found , (spamattack.ash, line 132)
    Which leads me to wonder if it's actually working (I don't see any combat messages, but that may be an effect of running server side macros).
    Originally Posted by shazbot View Post
    As Theraze said I've made some improvements to it since then. This is the current version and requires BatBrain to work. I should take a look at the new functions in batbrain as well but won't have time for a week or so, but this one seems to be working just fine at least, I've been running it myself for the last ascencion.
    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

  5. #15
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,743

    Default

    Has there been any work on tweaking this? I've been playing with my own copy today to try to make it consider all of my skills, and it seems to be working, but if there's better out there... I have tweaked my will_attack to both consider how many rounds at left (30-initround) as well as trying to make it consider hitchance, which is why it decided to 3-hit them in the following quote, where it decided to 3-hit a bee. And succeeded in its goal.
    [1794] Haunted Gallery
    Encounter: Queen Bee
    Strategy: ccs\default.ccs [default]
    Round 0: Theraze wins initiative!
    Monster value: 312.5
    You will die in 8 rounds.
    Your attack will kill the monster in 3 rounds.
    Profit per round: Action Profit Damage Other base; Cuddlefish (0µ) 0µ -- 33.75% stun chance
    SpamAttack: Monster HP is 134.0
    SpamAttack: We are going to 3-shot with Lunging Thrust-Smack, Lunging Thrust-Smack and Clobber.
    Round 1: Theraze executes a macro!
    Round 1: Theraze casts LUNGING THRUST-SMACK!
    Round 2: queen bee takes 50 damage.
    Round 2: queen bee takes 2 damage.
    You gain 4 hit points
    Round 2: Grorg gives your opponent a biiiiiig hug, preventing her from attacking you.
    Round 2: Theraze casts LUNGING THRUST-SMACK!
    Round 3: queen bee takes 68 damage.
    Round 3: queen bee takes 3 damage.
    You gain 6 hit points
    Round 3: queen bee takes 2 damage.
    You lose 44 hit points
    Round 3: Theraze casts CLOBBER!
    Round 4: queen bee takes 10 damage.
    Round 4: Theraze wins the fight!
    You gain 17 Strongness
    You gain 5 Wizardliness
    You gain 10 Chutzpah
    I did initially have to comment out sub_hp_restore because it errors out if you don't have any restore options, but think it's fixed up. This is still a work in progress, but... happy to implement any good tweaks to make it more flexible.
    Attached Files

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

    Default

    My current version - attached - (which still doesn't do anything useful for muscle or moxie classes or even take their skills into account) is working very nicely. The latest improvement was to make sure that if it there is a cheaper way of killing the monster then it does that (I mean just becasue I can one shot the monster with a saucegeyser at level 3 doesn't mean that it's a good idea when 5 salsaballs does the trick...).

    It also still isn't using the full predictive abilities of batbrain but it's moving closer to that...

    Edit: Also, yeah the restore sub is wonky and in the attached version it doesn't really do anything even though the code is there. I might take a look at yours to see what it does
    Last edited by Winterbay; 06-12-2011 at 06:56 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

  7. #17
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,743

    Default

    Just a quick note... it still has legacy Bees Hate You code. You can probably save a bunch of meat by removing that. Unless you really love overkilling, in which case it's fine.

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

    Default

    I just ran into a bee that batbrain considered to have a HP of 175. At level 2. Somehow its HP got set to 5 with my ML set to 5 which lead Batbrain to see "monster_hp() == monster_level_adjustment()" and adding 170. Setting ML to 0 after the fight gave a HP of 2 and resetting it to 5 gave a HP of 6 so I have no idea how that happened...
    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

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

    Default

    It's the part in BatBrain where it does this sort of thing:
    Code:
       if (m == $monster[none] || monster_attack(m) == 0 || monster_attack(m) == monster_level_adjustment())
    If attack/defense/hp is ever set to the same as MCD, it decides that it must be because it's unknown, not because it's a scaling mob or whatever else might be causing it. Attack of 0 or attack of MCD, both mean the monster is unknown.

    Problem is that defense should be calculated at ceil(MCD*.9) and hp should be done as ceil(MCD*.75) as the unknowns, since those are the standard modifications... That being said, I believe in the case of truly unknown monsters, the stats stay at 0 despite MCD. As is evidenced here:
    > current_mcd

    Returned: 10

    > monster_attack dirty old

    Returned: 0
    Guess I should report that as a BatBrain bug for next update, eh? Though I should test it in battle as well as outside...

    Yep, swarm of ghuol whelps:
    > current_mcd

    Returned: 10

    > monster_attack

    Returned: 0
    Last edited by Theraze; 06-10-2011 at 03:07 PM.

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

    Default

    Yes, I know the reason. The interesting thing is that despite that the monster should have (according to Mafia when prompted outside of battle) 2 and 6 HP at 0 and 5 MCD respectively it said 5 in battle which is odd.
    But yes, since unkowns are now set to 0 and doesn't scale with ML we can (hopefully) safely assume that everything that isn't spaded will stay at 0 and remove that second check.
    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

Similar Threads

  1. Replies: 0
    Last Post: 01-30-2015, 09:11 PM
  2. Replies: 0
    Last Post: 01-29-2011, 05:20 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
  •