Page 194 of 194 FirstFirst ... 94 144 184 192 193 194
Results 1,931 to 1,939 of 1939

Thread: Winterbay's Helpful Automatic Monsterbasher (WHAM)

  1. #1931
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    What is an "autostop adventure"? Why do you think the fight with the Protector Spectre "doesn't start automatically"?

    The DEBUG log he posted showed him entering combat with the Protector Spectre and his consult script - WHAM - being invoked.
    It also showed that WHAM returned without submitting any actions. Twice.

    What does that have to do with the combat "not starting automatically"?

    *puzzled*
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

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

    Default

    An autostop adventure would be the same thing that LeaChim reported before the bug got closed.
    http://kolmafia.us/showthread.php?21...tector-spectre
    Or what I made as a FReq three years ago where I'm supposed to get a debug log, if I can figure out what to report to make the behaviour more clear.
    http://kolmafia.us/showthread.php?14...ssive-Ziggurat

    Basically, anytime you try to automate starting the protector spectre fight, whether through adventure or adv1, it aborts before combat actually begins. Launching "run_combat()" with the optional prior "text fight.php" to refresh mafia's understanding of where the combat state is and clear the pending state, will actually automate, but your first attempt to start the combat will abort.
    Maybe mafia is handing bad information to consult scripts, causing them to abort.
    Maybe mafia is marking this as an failed adventure or going in a pending state, and that breaks consult scripts.

    Maybe something else is happening that affects people using consult scripts. All I know is that manually starting the combat using visit_url, choice, and run_combat() doesn't cause the same abort, so it's not a problem in the consult scripts themselves, since I've used at least four different consult scripts which have all had the same behaviour (WHAM, WHAM Beta, SmartStasis, and SimpleSmack) and they all abort using mafia's native adventure handling and don't abort when you avoid it.

    I'd submit a log in a few days if I knew what was supposed to be submitted to allow for not needing to bypass mafia's adventure handling on this one fight.

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

    Default

    My (still unreleased) script that handles the MacGuffin quest doesn't run into any aborts. In case it helps, here's what it does:

    Ensure that choiceAdventure791 is set to fight the spectre (choice 1).
    Set "1 [2180]ancient amulet" as a condition.
    Auto-adventure at the Ziggurat.

    The last two steps are really just a call to ZLib's obtain().
    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. #1934
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,734

    Default

    As I understand autostop adventures, having a condition will make mafia continue adventuring until that condition is met ignoring the autostop, so that does support that theory. Good to know there's another workaround though.

  5. #1935
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Except that this has nothing to do with autostop adventures as I understand them, since it didn't stop automation after going to that location. It submitted adventure.php, choice.php, and fight.php, exactly as expected.

    There is something odd, though.

    I got my 4 stone triangles.
    I set my Custom Combat to [ default ] -> consult consult.ash
    I selected my Adventure Location as A Massive Zigguart
    I set the Hidden Ziggurat choice adventure to "fight Protector Spirit"
    I did not touch the "conditions" filed since that was completely irrelevant.
    I told it to adventure once.

    Completely as expected, it did this:

    Code:
    Requesting: https://www.kingdomofloathing.com/adventure.php?snarfblat=350
    Retrieved: https://www.kingdomofloathing.com/adventure.php?snarfblat=350
    Field: Location = [choice.php?forceoption=0]
    Requesting: https://www.kingdomofloathing.com/choice.php?forceoption=0
    Retrieved: https://www.kingdomofloathing.com/choice.php?forceoption=0
    
    [790] A Massive Ziggurat
    Encounter: Legend of the Temple in the Hidden City
    Legend of the Temple in the Hidden City
    
    Requesting: https://www.kingdomofloathing.com/choice.php?whichchoice=791&option=1&pwd
    Retrieved: https://www.kingdomofloathing.com/choice.php?whichchoice=791&option=1&pwd
    Field: Location = [fight.php?ireallymeanit=1499823965]
    
    Retrieved: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1499823965
    Encounter: Protector Spectre
    Round 0: Veracity wins initiative!
    Completely as NOT expected, it then did this:

    Code:
    Starting consult script: consult.ash
    Finished consult script: consult.ash
    Starting consult script: consult.ash
    Finished consult script: consult.ash
    You're on your own, partner.
    The first statement in my consult script is a "print" statement.

    Looking at the code in FightRequest.java, I see this:

    Code:
    				File scriptFile = scriptFiles.get( 0 );
    				KoLmafiaASH.logScriptExecution( "Starting consult script: ", scriptFile.getName(), consultInterpreter );
    				consultInterpreter.execute( "main", parameters );
    				KoLmafiaASH.logScriptExecution( "Finished consult script: ", scriptFile.getName(), consultInterpreter );
    I don't have the beginning of a clue as to why my consult script was not actually invoked, near as I can tell.

    Too bad I didn't do this in Eclipse.

    Perhaps it really did "autostop" when it printed "Legend of the Temple in the Hidden City". Perhaps it left the state in a condition such that ASH refused to execute.
    Last edited by Veracity; 07-12-2017 at 01:58 AM.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  6. #1936
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Yeah, OK. Autostop puts KoLmafia into the "pending" condition, which will stop adventuring if you found a noncombat. But if you are automating, it will not stop you from taking a choice or from going into a fight.

    I made FightRequest force you back into "continue" condition before executing a consult script and I got this:

    Code:
    [792] A Massive Ziggurat
    Encounter: Legend of the Temple in the Hidden City
    Took choice 791/1: fight Protector Spectre
    choice.php?whichchoice=791&option=1&pwd
    Encounter: Protector Spectre
    Round 0: Veracity wins initiative!
    > initround = 1
    > monster = Protector Spectre
    > page length = 19267
    Round 1: Veracity attacks!
    Round 2: Protector Spectre takes 66 damage.
    > initround = 2
    > monster = Protector Spectre
    > page length = 18573
    Round 2: Veracity attacks!
    Round 3: You lose 20 hit points
    > initround = 3
    > monster = Protector Spectre
    > page length = 18464
    Round 3: Veracity attacks!
    Round 4: Protector Spectre takes 66 damage.
    Round 4: Veracity wins the fight!
    You acquire an item: psychokinetic energy blob
    You acquire an item: ancient amulet
    You acquire an item: spectre scepter
    After Battle: You gain 37 Muscleboundness
    After Battle: You gain 33 Magicalness
    After Battle: You gain 70 Cheek
    That seems right.

    I do wonder what happens if you are in a real "abort" or "error" state and we decide to execute a consult script.

    In any case, Revision 18143 has the one-line change that enabled that behavior.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

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

    Default

    Awesome, thanks. Being able to do normal automation there should make new people stop posting new confusion every year or so.

  8. #1938
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    215

    Default

    Quick questions: Is there a way I could make WHAM prioritize my most powerful attacks, instead of my weakest? Or should I just avoid buying the lesser class skills in the first place, when possible?

    WHAM is very efficient against lower-level badguys, but tougher ones tend to get the "let's do a 20 round tickle the monster with a feather attack!" approach that often gets me beaten up in areas like Hobopolis or Dreadsylvania. And trying to ferret out all the lesser skills and items that I often have by the time I start adventuring in those areas is migraine-inducing. If there's a way to make WHAM switch priorities, then one could use regular WHAM as intended, and the other version for curb-stomping the things that normal WHAM would allow to curb-stomp us.
    In KOL: VladYvhuce (#1798867)

  9. #1939
    Senior Member
    Join Date
    Feb 2010
    Posts
    871

    Default

    WHAM is designed to kill the monster in the least expensive way possible. That means that it tends to plink rather than blast. You might want to read the first post in this thread and play around with the following variables:

    Code:
    zlib WHAM_killit = true or false
    zlib WHAM_roundcost_aftercore= <wanted number>
    zlib WHAM_roundcost_ronin = <wanted number>
    If you aren't already doing so: take advantage of the WHAM relay script that allows you to control what items WHAM will use in resolving combats.
    Last edited by Magus_Prime; 08-12-2017 at 11:34 AM.

Similar Threads

  1. WHAM, Manual and 43 reasons to be confused.
    By fronobulax in forum Community Support
    Replies: 8
    Last Post: 02-22-2014, 02:48 PM
  2. autobasement, wham and coldform etc...
    By fronobulax in forum Community Support
    Replies: 13
    Last Post: 11-07-2012, 08:04 PM
  3. Bug - Fixed Scritp verification error less than helpful unless creating debug log
    By Winterbay in forum Bug Reports
    Replies: 3
    Last Post: 03-23-2012, 10:42 PM
  4. Replies: 0
    Last Post: 08-06-2011, 11:40 PM
  5. Replies: 0
    Last Post: 01-27-2011, 04:50 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
  •