Skip to content

Restructure#380

Draft
theBGuy wants to merge 736 commits intomainlinefrom
restructure
Draft

Restructure#380
theBGuy wants to merge 736 commits intomainlinefrom
restructure

Conversation

@theBGuy
Copy link
Copy Markdown
Contributor

@theBGuy theBGuy commented Jun 19, 2023

  • Pretty much a complete re-write

theBGuy and others added 18 commits January 22, 2025 15:39
- `AdvancedCustomAttack` allows for more fine grain control over attacks than just checking classid/name
- Introduced a shared `ctx` object to the `Runnable` class.
- The `ctx` object allows for better state management and data sharing between different parts of the script.
- Updated existing methods to utilize the shared `ctx` object for consistent state handling.
- Enhanced the `matchItem` function to support processing callback functions within the list parameter.
- Callbacks in the list can now be used to perform custom checks on items, providing greater flexibility and customization.
- This allows users to define more complex and dynamic item matching logic.
- Missed destructuring setup
…r in game

- Fix endless chanting poppy summon
- Fix 5 second wait during wp giving
- The coordinates aren't static so need to base the nodes to clear off the wp
* add ubers command to enter uber tristram

* move following into checkExit
- Reworked the voting system to track yes, no, and undecided to ensure everyone gets the chance to vote. The voting period now lasts for 2 minutes and will poll the undecided voters every 30 seconds to cast their vote
- Fixed the givewp <area> command to exclude halls
* Gemhandling update
let pickit decide, if we want an upgrade
check for gem upgrade before picking a gemshrine (autoshriner and scanshrine)
no collecting of chipped gems vith gem shrines

* set to strictly equal

* add prepareForGemShrine to type
fix linting warnings

* Cleanup nested class declaration + Fix unnecessary attempt at portaling on start + `dontStashGids` Set

- Moved the `GemUnit` class out from the body of `isUpgradePossible`
- Faster check using `some` instead of `filter` for checking clean invo
- Add `Town.dontStashGids` which is a Set of gids we are not allowed to stash populated during gamplay
- Only attempt taking portal if we moved, this was causing us to take any portal that was ours even if we hadn't gone anywhere

* Add `Pickit.systemKeep` so we only keep one gem for GemHunter and don't sell it

* Update GemHunter.js

- Clean up GemHunter, use custom `findGemShrines` rather than relying on `Misc.getShrinesInArea` method. `findGemShrines` handles preparing for the next shrine if we've found one and ending early if we have no more gems to use

* Update types

---------

Co-authored-by: theBGuy <60308670+theBGuy@users.noreply.github.com>
- Add a global env object that lazy loads data from `d2bs/kolbot/.env.json` if it exists. We can store any secrets here and then use them by accessing `env.<whatever>`
theBGuy and others added 30 commits February 3, 2026 23:06
- handle rare instance when we lost reference to item, causing undefined error
- `sdk.items.TokenofAbsolution` -> `sdk.items.quest.TokenofAbsolution`
- Add Config.Baal.Silent to allow suppressing public Baal announcements and messages; guard announce/say calls in Baal, Common/Baal and BaalAssistant.
- Update the TypeScript definition for the new config flag.
- Also include several non-behavioral cleanups and small fixes: improve JSDoc/return typing in Cubing.checkRecipe, convert an inline callback to a function in Misc and remove the deprecated townCheck, fix waypoint filtering and moveTo retry behavior in Pather, tighten Pickit checks (null-safety, helper for matching items) and formatting, remove LocalChat.init from MapHelper startup, and drop an unused eslint header in AutoMule.
- Also change town movement to running back and forth from akara to stash
- Replace nearestNeighbourSearch usage in Attack.clearLevelWalk with Graph.adaptiveSearch and introduce adaptive graph search utilities.
- Added Graph.analyzeGraph to infer map characteristics (avg degree, dead-end ratio, components, mapType) and tune weights, Graph.adaptiveSearch to pick the best strategy, and Graph.clusterAwareSearch to prioritize connected components and clear smaller branches first. The cluster-aware implementation includes component detection, entry-point selection, branch-size heuristics, and scoring by size/distance to reduce backtracking and avoid leaving isolated sections unexplored. Includes logging of analysis results and preserves fallback to nearestNeighbourSearch for linear maps.
- Town.js: call Pickit.pickItems() after clearing inventory in town flow; when Config.SortSettings.SortInventory is enabled call Storage.Inventory.SortItems() to organize items; and before stashing ensure inventory is identified and cleared (identify + clearInventory) to avoid putting unidentified/bad items into the stash.
- Simplify and clean up NTIP.CheckItem control flow (use early continues and reduce nested branches) and fix a bug where NTIP.CheckQuantityOwned was called with a null stat argument in one branch.
- Add NTIP.DebugCheckItem (with JSDoc) to return detailed match results for debugging, mirror MaxQuantity and identification handling, and include try/catch logic that reports errors and removes bad pickit entries when appropriate.
- Add missing gem item IDs to sdk.js and the TypeScript SDK definitions
-  In Town.js: introduce choresActive flag, set it around chores execution, and improve UI handling for stash (only cancel UI flags when stash UI isn't already open).
- Reformat ignoredItemTypes for readability and add a comprehensive gemIdToName mapping plus a GemUnit wrapper that exposes name/fname, quality/ilvl, and delegates getStat/getStatEx to Unit.
- Also change LocaleStringID/LocaleStringName to const for immutability.
- Introduce NTIPAliasCodes mapping and many missing item ID constants across the SDK and TypeScript declarations.
- Export a ClassIdToLocaleString map from LocaleStringID.js (and fix the "hrb" locale id), and update Town.js to use that map for gem names instead of a large inline lookup.
- Also update NTIP.d.ts with NTIPAliasCodes and minor signature/formatting tweaks. These changes centralize item/class->locale mappings, remove duplicated gem name data, and expand item/potion/skull identifiers for better typings and lookups.
- Forgot to add the new RaiseArmy script
- Wrap each seal invocation in a try/catch to avoid unhandled exceptions stopping the seal order. ScriptError is rethrown to preserve control-flow exceptions; generic Errors with "Failed to kill" are warned (console.warn) when running under the DiabloHelper script but rethrown for other scripts. This prevents non-fatal kill failures from crashing DiabloHelper while preserving error behavior for other contexts.
- Don't throw the script event if we are actively doing chores
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.1 to 3.4.2.
- [Commits](WebReflection/flatted@v3.3.1...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Don't log entire object, just the action we are starting and if the action is `doDrop` the items we are preparing to drop
- Sometimes items were getting stuck on cursor due to scriptevents bubbling up, handle it here
…r delay

- We sometimes don't want to allow background work while polling for something since game might not be in a ready state.
- HallsoftheDeadLvl3 -> MaggotLairLvl3 for taxi staff
- Replace incorrect uses of this.wpAreas (and related references) with Pather.wpAreas to ensure the module consistently accesses the shared waypoint arrays. These changes fix failures when methods or callbacks lose the correct this context (e.g., useWaypoint validation, waypoint checks in random selection and target checks, plotCourse logic, and town waypoint handling), preventing incorrect "this.wpAreas is undefined"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants