loathers / garbage-collector

Script for farming meat (and garbage) in 2003 web RPG Kingdom of Loathing
25 stars 57 forks source link

[BUG] Garbo accidentally banishes crate, cannot unbanish, hangs #1827

Closed cpenny86 closed 5 months ago

cpenny86 commented 7 months ago

Before Reporting Garbo is up to date (mafia set to update all git projects on login). Using mafia r27859, which is yesterday's I think. The error has been consistent for me through a number of daily build updates. (I just never remember to report it; sorry!)

Describe the bug When setting up embezzler fights at Noob Cave, garbo banishes a crate but then fails to unbanish it and aborts. Here is the stop message with red text:

Visit to Mountain: Noob Cave in progress...

[681] Noob Cave Preference lastEncounter changed from Adjust your Parka to crate Encounter: crate Preference _lastCombatStarted changed from 20240317214326 to 20240317214518 Round 0: sadoatcakes wins initiative! Preference cosmicBowlingBallReturnCombats changed from 3 to 2 Round 1: sadoatcakes executes a macro! Round 1: sadoatcakes casts OFFER LATTE TO OPPONENT! Round 2: Jillian Jiggs finds some meat. It's not clear where from. Maybe don't ask? You gain 279 Meat. Preference relayCounters changed from to 710:Latte Monster loc=*:snout.gif crate tracked by Offer Latte to Opponent. Preference trackedMonsters changed from pygmy shaman:Transcendent Olfaction:572:tomb rat:Gallapagosian Mating Call:625 to pygmy shaman:Transcendent Olfaction:572:tomb rat:Gallapagosian Mating Call:625:crate:Offer Latte to Opponent:680 Preference _latteMonster changed from Bob Racecar to crate Preference _latteCopyUsed changed from false to true Round 2: sadoatcakes uses the divine champagne popper! You lose 279 Meat. You acquire an item: inflammable leaf (2) crate banished by divine champagne popper. Preference banishedMonsters changed from fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680 to fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:crate:divine champagne popper:680 Preference latteUnlocks changed from pumpkin,cajun,noodles,carrot,chili,cinnamon,venom,vitamins,greek,hellion,wing,ink,paint,rawhide,squash,teeth,vanilla to pumpkin,cajun,noodles,carrot,chili,cinnamon,venom,vitamins,greek,hellion,wing,ink,paint,rawhide,squash,teeth,vanilla,sandalwood Unlocked sandalwood for Latte. Preference lastCopyableMonster changed from kid who is too old to be Trick-or-Treating to crate This combat did not cost a turn Preference _lastCombatWon changed from true to false

Preference _concoctionDatabaseRefreshes changed from 1412 to 1413 logPreferenceChange => false Preference logPreferenceChange changed from true to false logPreferenceChangeFilter => CCS set to default (but battle action is currently set to attack with weapon) autoSatisfyWithMall => false autoSatisfyWithNPCs => false autoSatisfyWithCoinmasters => false dontStopForCounters => false hpAutoRecoveryTarget => 0 mpAutoRecoveryTarget => 0 autoTuxedo => false autoPinkyRing => false autoGarish => false valueOfInventory => 1.8 choiceAdventure1106 => 0 choiceAdventure1107 => 0 choiceAdventure1340 => 0 choiceAdventure1341 => 0 choiceAdventure1468 => 4 choiceAdventure1469 => 4 choiceAdventure1473 => 4 choiceAdventure1474 => 4 shadowLabyrinthGoal => browser choiceAdventure505 => 1 You fought 0 Knob Goblin Embezzler at the beginning of the day, and an additional 0 digitized Knob Goblin Embezzler throughout the day. Good work, probably! Including this, you have fought 0 across all ascensions today Extreme Items: 2 fudge spork worth 26995 total 3 Yeast of Boris worth 20061 total 3 Aerheads worth 18816 total -392 inflammable leaf worth -14255 total -1 autumn dollar worth -5310 total -1 chocolate pasta spoon worth -5104 total This run of garbo, across 0 turns you generated 114,327 meat, with -119,355 raw meat and 233,682 from items So far today, across 0 turns you generated 114,327 meat, with -119,355 raw meat and 233,682 from items JavaScript exception: Error: Accidentally banished crate! And failed to unbanish. (file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js#37394) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:37394 (initializeCrates) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:37542 (initializeExtrovermectinZones) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43023 (embezzlerSetup) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43089 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40363 (withStash) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43086 (dailyFights) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48610 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40384 (withClan) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40378 (withVIPClan) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48588 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40363 (withStash) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48587 (main)

To Reproduce

I'm not sure how to reproduce this other than running garbo & seeing if it does this. I have followed the usual pre-garb steps including making sure everything is out of Hagnk's, don't click around while it's running, etc. I have seen this behaviour a few times over the past couple of weeks, but unfortunately I can't remember when exactly it started.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior I expect garbo to banish/unbanish crates in its usual manner in order to fight embezzlers, without the script aborting.

Session Log Red text above.

sadoatcakes_20240317.txt Log contains the end of my most recent run.

Ctrl+F "Using adventure value 4700" to find the start of garbo'ing.

Ctrl+F "You've fought 0" for the error.

Additional context This happens both pre- and post-loop for me, when I'm looping. I'm pretty sure it happens both with/without the "nobarf" flag (I can test that and update once I'm done writing this up). I think it started happening after getting the Everfull Darts but it's not equipping them at this point (or ever?) so I'd be pretty surprised if that were relevant.

cpenny86 commented 7 months ago

Same behaviour without the "nobarf" flag (this was "garbo nodiet 15"):

[681] Noob Cave Preference lastEncounter changed from demonic icebox to crate Encounter: crate Preference _lastCombatStarted changed from 20240317220451 to 20240317220510 Round 0: sadoatcakes wins initiative! Preference cosmicBowlingBallReturnCombats changed from 1 to 0 Round 1: Your opponent seems unnerved by the way Jillian Jiggs is staring at them. Round 1: crate drops 42 attack power. Round 1: crate drops 42 defense. You acquire an item: cosmic bowling ball Preference cosmicBowlingBallReturnCombats changed from 0 to -1 Round 1: sadoatcakes executes a macro! Round 1: sadoatcakes uses the divine champagne popper! You acquire an item: inflammable leaf (2) Preference banishedMonsters changed from fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:crate:divine champagne popper:680:demonic icebox:Throw Latte on Opponent:680 to fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:demonic icebox:Throw Latte on Opponent:680 crate banished by divine champagne popper. Preference banishedMonsters changed from fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:demonic icebox:Throw Latte on Opponent:680 to fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:demonic icebox:Throw Latte on Opponent:680:crate:divine champagne popper:680 Preference lastCopyableMonster changed from demonic icebox to crate This combat did not cost a turn

Preference _concoctionDatabaseRefreshes changed from 1445 to 1446 logPreferenceChange => false Preference logPreferenceChange changed from true to false logPreferenceChangeFilter => CCS set to default (but battle action is currently set to attack with weapon) autoSatisfyWithMall => false autoSatisfyWithNPCs => false autoSatisfyWithCoinmasters => false dontStopForCounters => false hpAutoRecoveryTarget => 0 mpAutoRecoveryTarget => 0 autoTuxedo => false autoPinkyRing => false autoGarish => false valueOfInventory => 1.8 choiceAdventure1106 => 0 choiceAdventure1107 => 0 choiceAdventure1340 => 0 choiceAdventure1341 => 0 choiceAdventure1468 => 4 choiceAdventure1469 => 4 choiceAdventure1473 => 4 choiceAdventure1474 => 4 shadowLabyrinthGoal => browser You fought 0 Knob Goblin Embezzler at the beginning of the day, and an additional 0 digitized Knob Goblin Embezzler throughout the day. Good work, probably! Including this, you have fought 0 across all ascensions today Extreme Items: 3 FunFunds™ worth 16667 total 4 inflammable leaf worth 145 total 1 cosmic bowling ball worth 0 total -1 one-day ticket to Dinseylandfill worth -111110 total -1 bag of park garbage worth -183 total 1 cosmic bowling ball worth 0 total This run of garbo, across 0 turns you generated -106,002 meat, with -11,520 raw meat and -94,482 from items So far today, across 0 turns you generated 8,325 meat, with -130,875 raw meat and 139,200 from items JavaScript exception: Error: Accidentally banished crate! And failed to unbanish. (file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js#37394) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:37394 (initializeCrates) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:37542 (initializeExtrovermectinZones) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43023 (embezzlerSetup) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43089 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40363 (withStash) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43086 (dailyFights) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48610 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40384 (withClan) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40378 (withVIPClan) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48588 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40363 (withStash) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48587 (main)

cpenny86 commented 7 months ago

And same thing with just straight-up "garbo" as the command without any flags:

Visit to Mountain: Noob Cave in progress... Preference lastAdventure changed from Shadow Rift (Forest Village) to Noob Cave

[681] Noob Cave Preference lastEncounter changed from Like a Loded Stone to crate Encounter: crate Preference _lastCombatStarted changed from 20240317220510 to 20240317220854 Round 0: sadoatcakes wins initiative! Round 1: Your opponent seems unnerved by the way Jillian Jiggs is staring at them. Round 1: crate drops 57 attack power. Round 1: crate drops 57 defense. Round 1: sadoatcakes executes a macro! Round 1: sadoatcakes uses the divine champagne popper! You acquire an item: inflammable leaf (2) Preference banishedMonsters changed from fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:demonic icebox:Throw Latte on Opponent:680:crate:divine champagne popper:680 to fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:demonic icebox:Throw Latte on Opponent:680 crate banished by divine champagne popper. Preference banishedMonsters changed from fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:demonic icebox:Throw Latte on Opponent:680 to fluffy bunny:ice house:0:tomb servant:Spring Kick:619:fluffy bunny:snokebomb:680:zombie chef:Feel Hatred:680:paper towelgeist:KGB tranquilizer dart:680:possessed silverware drawer:Reflex Hammer:680:skullery maid:mafia middle finger ring:680:demonic icebox:Throw Latte on Opponent:680:crate:divine champagne popper:680 This combat did not cost a turn

Preference _concoctionDatabaseRefreshes changed from 1517 to 1518 logPreferenceChange => false Preference logPreferenceChange changed from true to false logPreferenceChangeFilter => CCS set to default (but battle action is currently set to attack with weapon) autoSatisfyWithMall => false autoSatisfyWithNPCs => false autoSatisfyWithCoinmasters => false dontStopForCounters => false hpAutoRecoveryTarget => 0 mpAutoRecoveryTarget => 0 autoTuxedo => false autoPinkyRing => false autoGarish => false valueOfInventory => 1.8 choiceAdventure1106 => 0 choiceAdventure1107 => 0 choiceAdventure1340 => 0 choiceAdventure1341 => 0 choiceAdventure1468 => 4 choiceAdventure1469 => 4 choiceAdventure1473 => 4 choiceAdventure1474 => 4 shadowLabyrinthGoal => browser You fought 0 Knob Goblin Embezzler at the beginning of the day, and an additional 0 digitized Knob Goblin Embezzler throughout the day. Good work, probably! Including this, you have fought 0 across all ascensions today Extreme Items: 2 inflammable leaf worth 73 total -6 astral pilsner worth 0 total -1 body spradium worth 0 total -12 Special Seasoning worth -67878 total -6 Yeast of Boris worth -40500 total -6 shadow ice worth -11794 total This run of garbo, across 0 turns you generated -255,643 meat, with -96,529 raw meat and -159,114 from items So far today, across 0 turns you generated -247,318 meat, with -227,404 raw meat and -19,914 from items JavaScript exception: Error: Accidentally banished crate! And failed to unbanish. (file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js#37394) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:37394 (initializeCrates) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:37542 (initializeExtrovermectinZones) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43023 (embezzlerSetup) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43089 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40363 (withStash) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:43086 (dailyFights) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48610 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40384 (withClan) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40378 (withVIPClan) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48588 at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:40363 (withStash) at file:/C:/Users/chris/KoL%20mafia/scripts/garbage-collector/garbo.js:48587 (main)

I've excerpted the last two parts of the session log here: oatslog2.txt

horrible-little-slime commented 7 months ago

First quick question: do you have CLEESH permed? It's not a hard requirement (or else we'd list it), but we do have a hacky little CLEESH in here that should fix it.

The infinite hanging is because of some frustratingly nested while loops. Garbo should then go to the haunted kitchen with a divine champagne popper. Not clear why it isn't.

I'd also like to figure out your crateStrategy--do you have the Fourth of May Cosplay Saber? what about the Miniature Crystal Ball?

cpenny86 commented 7 months ago

First quick question: do you have CLEESH permed?

Yes

I'd also like to figure out your crateStrategy--do you have the Fourth of May Cosplay Saber?

Yes

what about the Miniature Crystal Ball?

Yes. Here is my greenbox, if it helps: https://api.aventuristo.net/av-snapshot?u=sadoatcakes

horrible-little-slime commented 6 months ago

Going to guess that this is caused by having insufficient MP to CLEESH, but will await more data

horrible-little-slime commented 6 months ago

If this hasn't recurred in 3 weeks I'm going to go ahead and say MP issue and close this.

cpenny86 commented 6 months ago

Sounds good to me.

On Wed, Apr 17, 2024, 9:10 p.m. neil @.***> wrote:

If this hasn't recurred in 3 weeks I'm going to go ahead and say MP issue and close this.

— Reply to this email directly, view it on GitHub https://github.com/loathers/garbage-collector/issues/1827#issuecomment-2062808927, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR3TKZXUHTCWOWNYE5PYZTY54MQFAVCNFSM6AAAAABE2RGSJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRSHAYDQOJSG4 . You are receiving this because you authored the thread.Message ID: @.***>