feat: wide afkitemtime - multiply skill AFK consumable effect - #99
feat: wide afkitemtime - multiply skill AFK consumable effect#99Catalyst96 wants to merge 4 commits into
Conversation
Adds CLAUDE.md with architecture overview and development commands for contributors using Claude Code. Enforces LF line endings via .gitattributes. Excludes .claude/ from version control so local Claude settings are never accidentally committed.
Object.entries() was called before checking whether the eval result was actually an object, causing strings and numbers to be iterated character-by-character. Guard against null/undefined/primitives first.
Adds configurable 'wide afkitemtime' command (value in hours) that multiplies the effect of Blinding Lantern (Quest90) and Half Finished Research Paper (Quest115). These items give a hardcoded 2h of instant AFK progress per use; the cheat stacks the game handler N times to reach the configured target. The first handler call is synchronous for immediate feedback; extra calls are deferred in batches of 10 via setTimeout to avoid blocking the main thread. All candidate ActorEvents_38 handlers are covered (InvItem4-6custom, InventoryItem, InventoryItem2/3). Item tooltip (desc_line1) is also proxied to reflect the configured hour value.
Direct eval (eval(x)) runs in local scope, preventing Rollup from optimizing surrounding code and triggering a build warning. Indirect eval ((0, eval)(x)) runs in global scope instead - which is correct here since both commands evaluate game globals (gga, etc.) and user-supplied expressions against the window scope. Affects chng (dangerous.js) and egga/eggan (utility.js).
|
Thanks for putting this together. I have a few things concerns tho.
If it helps you, I can have a look and see if I can find a easier method to increase the time. |
Summary
wide afkitemtime(configurable, value in hours) that multiplies the instant AFK progress of hold-to-use skill consumables: Blinding Lantern, Half Finished Research Paper (2h/use) and Aethermoon, Charred Bone, Arcane Rock (1h/use)egga/egganCLI commands outputting primitive values character-by-charactereval()with indirect(0, eval)()inchngandegga/egganto evaluate in global scope and eliminate the Rollup EVAL build warningCLAUDE.mdfor contributors using Claude Code,.gitattributesenforcing LF line endings, and excludes.claude/from version controlHow afkitemtime works
The game hardcodes the per-use duration for these items (e.g. 2h). The cheat intercepts the item-use event handlers in
ActorEvents_38and re-invokes the base function N times with the inventory slot restored between calls, until the configured target hours are reached. The first call is synchronous for immediate feedback; extra calls are deferred in batches of 10 viasetTimeoutto avoid blocking the main thread.Test plan
wide afkitemtime, set value e.g.10in Configegga gga.CurrentMapreturns the value, not individual charactersnpm run build:cheatsproduces no warnings