Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 39

Thread: MONSTERID in fights.

  1. #11
    Developer
    Join Date
    Apr 2006
    Posts
    962

    Default

    Someone got a debug log on discord. I'm speculating but it seems likely the the monster was parsed correctly but then overridden with the darkness because the "You twiddle your thumbs." result doesn't have MONSTERID comment.
    Code:
    [131] God Lobster
    Encounter: the God Lobster
    Round 0: busta_rhymes     loses initiative!
    Round 1: You lose 40 hit points
    nextAdventure =>     Noob Cave
    
    
    [131] Noob Cave
    Encounter: the God Lobster
    MONSTERID     not found
    Round 0: busta_rhymes loses initiative!
    [INFO]     - auto_combatHandler: 0
    Round 1: busta_rhymes casts SING ALONG!
    Round     2: the darkness (blind) takes 1 damage.
    Code:
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
            KoLmafia v20.4 r20167, Windows 10, Java 1.8.0_251
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     Please note: do not post this log in the KoLmafia thread of KoL's
     Gameplay-Discussion forum. If you would like the KoLmafia dev team
     to look at it, please write a bug report at kolmafia.us. Include
     specific information about what you were doing when you made this
     and include this log as an attachment.
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     Timestamp: Thu Jun 11 15:25:58 PDT 2020
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    
    
    
    MONSTERID not found
    MONSTERID not found
    <html><head>
    <script language=Javascript>
    <!--
    if (parent.frames.length == 0) location.href="game.php";
    //-->
    </script>
    <script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script>
    <script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/window.20111231.js"></script>
    <script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/jquery-1.3.1.min.js"></script>
    <script language="javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/core.js"></script><script language="javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/ocrs.20200128.js"></script><link rel="stylesheet" href="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/ocrs.css" /><script src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/fight.js"></script>
    <script>
    var onturn = 1;
    
    
    </script>    <link rel="stylesheet" type="text/css" href="https://s3.amazonaws.com/images.kingdomofloathing.com/styles.20151006.css">
    <style type='text/css'>
    .faded {
        zoom: 1;
        filter: alpha(opacity=35);
        opacity: 0.35;
        -khtml-opacity: 0.35; 
        -moz-opacity: 0.35;
    }
    </style>
    
    
    </head>
    
    
    <body>
    <center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Combat!</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table><tr><td><div id=monsterpic style='position: relative;'>    <img  id='monpic'  crossorigin="anonymous"  src="/iii/adventureimages/godlob.gif?a=1591914358" width=400 height=300><img  crossorigin="anonymous"  src="https://s3.amazonaws.com/images.kingdomofloathing.com/otherimages/powerpixels/eyes9.png" style="position: absolute; top: 100px; left: 170px" id='peyes' /></div></td><td valign=center></td><td width=30></td><td><table><tr><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/nicesword.gif width=30 height=30 alt="Enemy's Attack Power" title="Enemy's Attack Power"></td><td width=50 valign=center align=left><b><font size=+2>445</font></b></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/skull.gif alt="This monster is a Horror" title="This monster is a Horror"></td></tr><tr><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/whiteshield.gif width=30 height=30 alt="Enemy's Defense" title="Enemy's Defense"></td><td width=50 valign=center align=left><b><font size=+2>127</font></b></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/circle.gif width=30 height=30 alt="This monster has no particular elemental alignment." title="This monster has no particular elemental alignment."></td></tr><tr><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/hp.gif width=30 height=30 alt="Enemy's Hit Points" title="Enemy's Hit Points"></td><td width=50 valign=center align=left><b><font size=+2>95</font></b></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/watch.gif alt="Initiative +1000%" title="Initiative +1000%"></td></tr></table></td></tr></table><br><script type="text/javascript">var monsterstats = {"hp":"95","def":"127","off":"445"};</script>You're fighting <span id='monname'>the God Lobster</span><p><script>var ocrs = ["powerPixel"];</script>You twiddle your thumbs.<table><tr><Td></td></tr></table><p><center><table><a name="end"></a><tr><td><center><Table cellpadding=10 cellspacing=0><Tr><td></td><td valign=top></td><td valign=top><form name=mariosk7334 action=fight.php?method=post><input type=hidden name=action value=skill><input type=hidden name=whichskill value=7334><input type=submit class=button onclick="return killforms(this);" value="Jump Attack"></form><form name=mariosk7336 action=fight.php?method=post><input type=hidden name=action value=skill><input type=hidden name=whichskill value=7336><input type=submit class=button onclick="return killforms(this);" value="Multi-Bounce (2PP)"></form></td></tr></table></center></td></tr><form name=useitem action=fight.php method=post><input type=hidden name=action value="useitem"><tr><td align=left><select name=whichitem><option value=0>(select an item)</option><option picurl=abs1 value=8708>abstraction: action (1)</option><option picurl=abs3 selected value=8710>abstraction: sensation (1)</option><option picurl=cast value=474>cast (1)</option><option picurl=bic value=7220>cigarette lighter (1)</option><option picurl=crayonshavings value=5703>crayon shavings (4)</option><option picurl=grenade value=5750>CSA obedience grenade (1)</option><option picurl=disease value=452>disease (1)</option><option picurl=divstring value=3119>divine can of silly string (2)</option><option picurl=divpopper value=3121>divine champagne popper (1)</option><option picurl=divnoise value=3118>divine noisemaker (1)</option><option picurl=syringe2 value=6026>Duskwalker syringe (1)</option><option picurl=electronicskit value=9952>electronics kit (3)</option><option picurl=kgbcigar value=9497>exploding cigar (6)</option><option picurl=gascan value=9947>gas can (1)</option><option picurl=deadbootlet value=9968>jam band bootleg (2)</option><option picurl=mario_mushroom1 value=10455>mushroom (5)</option><option picurl=web value=27>spider web (1)</option><option picurl=tinydress value=9963>very small red dress (2)</option><option picurl=potion5 value=469>wussiness potion (2)</option></select> <input class=button type=submit onclick="return killforms(this);" value="Use Item"></td></tr></form><form name=skill action=fight.php method=post><input type=hidden name=action value="skill"><tr><td align=center><select name=whichskill><option value='none'>(select a skill)</option><option value="15" picurl="commacha" >CLEESH (10 Mojo Points)</option><option value="7336" picurl="mario_multibounce" selected>Multi-Bounce (2 PP)</option><option value="7334" picurl="mario_jump" >Jump Attack (0 Mojo Points)</option><option value="7327" picurl="shrinkenemy" >CHEAT CODE: Shrink Enemy (5 of today's remaining 20%)</option><option value="7326" picurl="replaceenemy" >CHEAT CODE: Replace Enemy (10 of today's remaining 20%)</option><option value="7311" picurl="may4sword" >Use the Force, Busta_Rhymes! (5 uses left)</option><option value="7310" picurl="bat" >Become a Bat (10 time(s) remaining today))</option><option value="7309" picurl="puff" >Become a Cloud of Mist (10 time(s) remaining today))</option><option value="7308" picurl="wolfmask" >Become a Wolf (10 time(s) remaining today))</option><option value="7303" picurl="lattecup4" >Gulp Latte (0 Mojo Points)</option><option value="7301" picurl="lattecup3" >Throw Latte on Opponent (0 Mojo Points)</option><option value="7297" picurl="songboombox" >Sing Along (0 Mojo Points)</option></select> <input class=button type=submit onclick="return killforms(this);" value="Use Skill"></td></tr></form><form name=runaway action=fight.php method=post><input type=hidden name=action value="runaway"><tr><td align=center><input class=button onclick="return killforms(this);" type=submit value="Run Away"></td></tr></form></table></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center></body></html>
    Last edited by Rinn; 06-11-2020 at 11:23 PM.

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

    Default

    How did they do that?

    They started a combat.
    - It was round 0 and KoL included the MONSTERID comment
    - They lost initiative, so took damage in round 1
    (They tried to adventure in the Noob Cave?)
    - Kol redirected back to the fight, but it was not round 0 and KoL did not include the MONSTERID - and we got the thumb twiddling.
    - we did log the encounter, but thought it was round 0 again - even though the monster had already gone in round 0
    - The player did an action was recorded for round 1.

    Perhaps KoL could/should include the monsterId every round.
    (What happens if I CLEESH? do we get a new MONSTERID?)

    Perhaps we could/should redirecting into a fight-in-progress and carry on without it being a new encounter.
    (What happens if I log out while in a fight and log in again? it redirects to fight.php. Does it give me a new MONSTERID?)
    In other words, anything which results in thumb twiddling is not a new encounter at round 0. IIt is at whatever round KoL thinks it is.

    I'll experiment with those things, but I think my suggestion is for KoL to give a MONSTERID every time it redirects to fight.php and gives a response page for a fight.

    And maybe if there is no MONSTERID, we should go through the same stuff - parse out the random modifiers, etc. - and try looking up the monster by name.

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

    Default

    I put on dice gear and Helps-You-Sleep.

    Code:
    [9848] The Goatlet
    Encounter: bouncing, askew, pixellated, hot, cloud-based drunk goat
    That was what KoL told me I had. no MONSTERID. Image of "the darkness".

    Code:
    > ash last_monster()
    
    Returned: the darkness (blind)
    No random modifiers.

    I clearly need to parse random modifiers, etc. even before checking for no MONSTERID.

  4. #14
    Developer
    Join Date
    Apr 2006
    Posts
    962

    Default

    They were running autoscend, I'm not sure specifically what the script is doing but I wouldn't be surprised if it's doing something weird. Regardless I agree, getting the monsterid in every round is probably the way to go.

  5. #15
    Developer
    Join Date
    Apr 2006
    Posts
    962

    Default

    Just tested logging in while in a fight, the page doesn't have MONSTERID so yeah same issue being unable to determine the monster.

    I also tested CLEESH, it works correctly to update the monster, as does macrometorite.

  6. #16
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,311

    Default

    Well, I would encourage KoL to include MONSTERID every single round.
    I will also consider having KoLmafia use (a variant) of the old algorithm, when there is no MONSTERID, to try to figure out the monster from the monster name. I do NOT want to put in the kludges to deal with DMT monsters, monster synonyms in LLT zones, etc.
    I will also consider recognize that "you twiddle your thumbs" is continuing an existing fight and reusing the previous encounter, pulling the round number from KoL, etc.

  7. #17

    Default

    Another thing this raises is that we should possibly do something to bring better support for "indirect" combat in ash. At the moment people tend to get to a position wherein they "know" they will be in a combat, and then trigger combat stuff by adventuring in Noob Cave, even though that isn't the real adventure. I'm not really sure why people don't use run_combat() or something, perhaps a script author can tell me why.

  8. #18
    Senior Member Crowther's Avatar
    Join Date
    Nov 2006
    Posts
    1,560

    Default

    I'm not really sure why people don't use run_combat() or something, perhaps a script author can tell me why.
    Originally Posted by gausie View Post
    Because run_combat() didn't always exist. I'm still in the habit of telling mafia to adventure somewhere when I should say run_combat(). I use a place which I can't get to (and mafia doesn't know that), because I don't want to accidentally waste a turn in the noob cave.

  9. #19
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,798

    Default

    At the moment people tend to get to a position wherein they "know" they will be in a combat, and then trigger combat stuff by adventuring in Noob Cave, even though that isn't the real adventure.
    Originally Posted by gausie View Post
    Interesting. This is the first I've heard of that. I've used run_combat() for ages for that purpose. I even have an alias fight => ashq run_combat(); which has served me quite well over the years.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Woss | Om****est (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  10. #20
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,311

    Default

    At the moment people tend to get to a position wherein they "know" they will be in a combat, and then trigger combat stuff by adventuring in Noob Cave, even though that isn't the real adventure. I'm not really sure why people don't use run_combat() or something, perhaps a script author can tell me why.
    Originally Posted by gausie View Post
    I would consider that to be a bug in the script.

    One rationale might be tht they don't know if they are at a combat or a choice and therefore don't know whether to use run_combat() or run_choice(). Using "adventure" will force a redirect to either fight.php or choice.php and KoLmafia will automate it. How do "people" start an adventure such that they "know" they are in combat? If via visit_url, they have the page text. They also have handling_choice().

    The example above was fighting the god lobster and then going to the Noob cave to do the fight. I can't understand why it was coded that way. My script to do god lobster fights uses visit_url, run_combat, and run_choice.

    Code:
        while ( fights > 0 && my_adventures() > 0 ) {
    	// Choose which item to equip
    	int scepters = available_amount( GOD_LOBSTER_SCEPTER );
    	int rings = available_amount( GOD_LOBSTER_RING );
    	int rods = available_amount( GOD_LOBSTER_ROD );
    	int robes = available_amount( GOD_LOBSTER_ROBE );
    	int crowns = available_amount( GOD_LOBSTER_CROWN );
    	item familiar_item =
    	    ( crowns > 0 ) ? GOD_LOBSTER_CROWN :
    	    ( robes > 0 ) ? GOD_LOBSTER_ROBE :
    	    ( rods > 0 ) ? GOD_LOBSTER_ROD :
    	    ( rings > 0 ) ? GOD_LOBSTER_RING :
    	    ( scepters > 0 ) ? GOD_LOBSTER_SCEPTER :
    	    NO_ITEM;
        
    	// If unspecified, use whatever the familiar is already wearing
    	if ( familiar_item != NO_ITEM ) {
    	    equip( familiar_item );
    	}
    
    	between_battle_checks();
    	string page = visit_url( "main.php?fightgodlobster=1" );
    	if ( !page.contains_text( "fight.php" ) ) {
    	    // Unexpected
    	    break;
    	}
    
    	combat_filter_setup( NO_LOCATION );
    	page = run_combat( "default_filter" );
    	fights--;
    
    	if ( !page.contains_text( "choice.php" ) ) {
    	    // Unexpected. Perhaps you lost the fight?
    	    continue;
    	}
    
    	page = visit_url( "choice.php" );
    
    	// Options 1, 2, or 3 - unless you are wearing the crown, in
    	// which case the "regalia" option is not available and the
    	// others are 1 and 2. We'll go for "experience"
    	// 
    	// "I'd like part of your regalia."
    	// "I'd like a blessing."
    	// "I'd like some experience."
    
    	int option = ( familiar_item == GOD_LOBSTER_CROWN ) ? 2 : 1;
    	run_choice( option );
        }
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

Posting Permissions

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