loathers / garbage-collector

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

[BUG] "Free Fight/Mushroom garden" encounters a JavaScript evaluator exception #2091

Closed ianknowles closed 2 months ago

ianknowles commented 2 months ago

garbo exits when trying to execute this task. Task also needs to check for growth but garbo exits regardless with tall grass seeds still planted.

Preference previousUpdateVersion changed from KoLmafia r28032 to KoLmafia r28038
Preference lastRelayUpdate changed from KoLmafia r28032 to KoLmafia r28038
Preference previousUpdateRevision changed from 28032 to 28038
Clearing data overrides: upgrade from KoLmafia r28032 to KoLmafia r28038
Sending login request...
Preference _concoctionDatabaseRefreshes changed from to 1
Using data override: data/mallprices.txt
Preference pingLatest changed from api:10:108:132:1158:19620:115.80 to api:10:114:129:1205:19620:120.50
Ping test: average delay is 120.50 msecs.
Initializing session for discordance...
Loading character status...
Refreshing session data...
Synchronizing moon data...
Retrieving character data...
Updating inventory...
Examining Meat in closet...
Updating closet...
Retrieving quest data...
Retrieving familiar data...
Familiar data retrieved.
Retrieving campground data...
Visiting Chez Snootée...
Menu retrieved.
You are currently a member of Bonus Adventures from Hell
Visiting Hot Dog Stand in clan VIP lounge
Visiting Speakeasy in clan VIP lounge
Visiting Floundry in clan VIP lounge
Seeing what's still unrestricted today...
Done checking allowed items.
Session data refreshed.
Preference floristFriarChecked changed from true to false
Preference floristFriarChecked changed from false to true
Preference trackedMonsters changed from garbage tourist:Transcendent Olfaction:521:garbage tourist:Gallapagosian Mating Call:521 to
5 days until Oyster Egg Day, Mysticism bonus today (not tomorrow).
Preference _concoctionDatabaseRefreshes changed from 2870 to 2871
09/11/24 02:20:12 AM - New message received from sellbot (#1053259).

> garbo workshed cmc

Searching for "crayon shavings"...
Search complete.
Searching for "BRICKO brick"...
Search complete.
Searching for "bottle of whiskey"...
Search complete.
Searching for "Effermint™ tablets"...
Search complete.
Searching for "sturdy cane"...
Search complete.
Searching for "lynyrd skin"...
Search complete.
Searching for "red-hot sausage fork"...
Search complete.
Searching for "bag of sausage links"...
Search complete.
Searching for "security flashlight"...
Search complete.
Searching for "unused walkie-talkie"...
Search complete.
Searching for "Way More Tears™ pepper spray"...
Search complete.
Searching for "carton of rotten eggs"...
Search complete.
Searching for "slingshot"...
Search complete.
Searching for "spray paint"...
Search complete.
Searching for "Sacramento wine"...
Search complete.
Searching for "jumping horseradish"...
Search complete.
Searching for "armored prawn"...
Search complete.
Searching for "Greek fire"...
Search complete.
Using adventure value 7000.
Local Version: 7ea8aeaeda78be6085ce1d0e92ddd40a2ce0fca5 (built from main@5ecaed68721485b0e4f6817f061d49fb9f892912)
Garbo is up to date!
Scanning store inventories...
Page (2 of 269)...

...

Page (269 of 269)...
Search complete.
Updating mallprices.txt with 7973 prices.
Updating display case...
Collecting garbage!

Autoattack is disabled.
logPreferenceChangeFilter => _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference logPreferenceChangeFilter changed from _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings to _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference customCombatScript changed from grimoire_macro to garbo
CCS set to garbo
hpAutoRecoveryTarget => 0
Preference hpAutoRecoveryTarget changed from 1.0 to 0
mpAutoRecoveryTarget => 0
Preference mpAutoRecoveryTarget changed from 0.65 to 0
allowNonMoodBurning => true
Preference allowNonMoodBurning changed from false to true
choiceAdventure1108 => 3
Preference choiceAdventure1108 changed from 1 to 3
Stash access is disabled. Ignoring request to borrow "repaid diaper, Buddy Bjorn, Crown of Thrones, Pantsgiving, mafia pointer finger ring, Mayflower bouquet, haiku katana, Operation Patriot Shield" from clan stash.
Preference _concoctionDatabaseRefreshes changed from 2871 to 2872
Countdown: 11 seconds...
Countdown: 10 seconds...
Countdown: 5 seconds...
Countdown: 4 seconds...
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Updating inventory...
Preference _concoctionDatabaseRefreshes changed from 2872 to 2873
I'm tired of waiting for sellbot to send me some chocolate
Skipping fancy chocolate sculpture; too expensive (54995 > 40000).
Searching for "possessed sugar cube"...
Search complete.
Preference nextAdventure changed from Noob Cave to Barf Mountain
Searching for "possessed sugar cube"...
Search complete.
Searching for "possessed sugar cube"...
Search complete.
Searching for "possessed sugar cube"...
Search complete.
Searching for "possessed sugar cube"...
Search complete.
Searching for "possessed sugar cube"...
Search complete.
Searching for "possessed sugar cube"...
Search complete.
Searching for "possessed sugar cube"...
Search complete.
Searching for "possessed sugar cube"...
Search complete.
logPreferenceChangeFilter => _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference logPreferenceChangeFilter changed from _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings to _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
allowNonMoodBurning => false
Preference allowNonMoodBurning changed from true to false
Preference customCombatScript changed from garbo to grimoire_macro
CCS set to grimoire_macro

Executing Daily Familiars/Moveable feast
CCS set to grimoire_macro
Autoattack is disabled.
Stash access is disabled. Ignoring request to borrow "moveable feast" from clan stash.

Executing Daily/Refresh Latte
Autoattack is disabled.

Executing Daily/Verify Horsery
Autoattack is disabled.

Executing Daily/Check Barf Mountain Quest
Autoattack is disabled.

Visiting the Employee Assignment Kiosk
logPreferenceChangeFilter => _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference logPreferenceChangeFilter changed from _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings to _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
hpAutoRecoveryTarget => 0
Preference hpAutoRecoveryTarget changed from 0.0 to 0
mpAutoRecoveryTarget => 0
Preference mpAutoRecoveryTarget changed from 0.0 to 0
allowNonMoodBurning => true
Preference allowNonMoodBurning changed from false to true
Preference customCombatScript changed from grimoire_macro to garbo
CCS set to garbo
Autoattack is disabled.
Refreshing stash contents...
Stash list retrieved.
Refreshing stash contents...
Stash list retrieved.
logPreferenceChangeFilter => _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference logPreferenceChangeFilter changed from _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings to _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
allowNonMoodBurning => false
Preference allowNonMoodBurning changed from true to false
Preference customCombatScript changed from garbo to grimoire_macro
CCS set to grimoire_macro

Executing Free Fight/Mushroom garden
logPreferenceChangeFilter => _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference logPreferenceChangeFilter changed from _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings to _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
hpAutoRecoveryTarget => 0
Preference hpAutoRecoveryTarget changed from 0.0 to 0
mpAutoRecoveryTarget => 0
Preference mpAutoRecoveryTarget changed from 0.0 to 0
allowNonMoodBurning => true
Preference allowNonMoodBurning changed from false to true
Preference customCombatScript changed from grimoire_macro to garbo
CCS set to garbo
Autoattack is disabled.
No spading data has been collected yet. Please try again later.
logPreferenceChangeFilter => _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference logPreferenceChangeFilter changed from _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,garboTargetCount,garboTargetDate,garboTargetSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings to _beachCombing,_beachLayout,_beachMinutes,_lastCombatStarted,combo_lastTileCombed,garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference customCombatScript changed from garbo to grimoire_macro
CCS set to grimoire_macro
hpAutoRecoveryTarget => 1
Preference hpAutoRecoveryTarget changed from 0.0 to 1
mpAutoRecoveryTarget => 0.65
Preference mpAutoRecoveryTarget changed from 0.0 to 0.65
allowNonMoodBurning => false
Preference allowNonMoodBurning changed from true to false
valueOfInventory => 2
Preference valueOfInventory changed from 2.0 to 2
choiceAdventure1108 => 1
Preference choiceAdventure1108 changed from 3 to 1

...

JavaScript evaluator exception: Null / undefined values in JS objects cannot be converted to ASH.
at file:/G:/mafia/scripts/garbage-collector/garbo.js:31670 (freeFightOutfit)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:39098
at file:/G:/mafia/scripts/garbage-collector/garbo.js:1026 (undelay)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:26388 (createOutfit)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:26280 (execute)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:45396
at file:/G:/mafia/scripts/garbage-collector/garbo.js:45478 (execute)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:26223 (run)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:45521 (runQuests)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:45530 (runGarboQuests)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:41137 (freeFights)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:45961
at file:/G:/mafia/scripts/garbage-collector/garbo.js:37313 (withClan)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:37307 (withVIPClan)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:45942
at file:/G:/mafia/scripts/garbage-collector/garbo.js:37292 (withStash)
at file:/G:/mafia/scripts/garbage-collector/garbo.js:45941 (main)
ianknowles commented 2 months ago

Related to #2080. @Rinn

ianknowles commented 2 months ago

I don't have Robort, so familiar in the outfit is undefined.

Rinn commented 2 months ago

@horrible-little-slime what did I do wrong with the outfit

    outfit: () =>
      freeFightOutfit(
        {
          familiar: have($familiar`Robortender`)
            ? $familiar`Robortender`
            : undefined,
          bonuses: new Map<Item, number>([
            [
              $item`tearaway pants`,
              get("valueOfAdventure") * TearawayPants.plantsAdventureChance(),
            ],
          ]),
        },
        { canChooseMacro: false, allowAttackFamiliars: false },
      ),

should it just not contain the familiar property at all?

ianknowles commented 2 months ago

undefined is a JS constant. Needs to be either a value that grimoire treats as any familiar (not sure what to pass there), or the if test around the whole json object instead of the value.