HiLleywyn/Extras

Dungeon waypoint should be variable (z-axis)

Closed this issue · 5 comments

The z-axis for dungeons is variable. So loading a static waypoint file is not the right solution when dealing with waypoints for dungeon as they don't always work.

Dungeons are located on different levels (same map) and your character is transported to the first available map, which makes the z-axis variable.

Proposal:
When dealing with waypoints for dungeon, only allow to actually load these waypoints when the player is in the dungeon. This way the waypoints can be loaded using the player z-index as base for the waypoints.

levelsdungeon

This is a great idea. I already have an idea how this could work. I'll test some things out!

Started work on this in latest commit.

adb322f

Since the configs are loaded when the CaveBot is first turned on, we will need to edit the config loading function in Cave's Main to take into account the position of the player, or possibly load configs based on position, changing when the player moves locations.

This commit: a344905 includes a partially working auto-dungeon system. Still some work to be done, but auto-loading of waypoint based on floor level is complete, using onPlayerPositionChange() in the main cavebot file.

The newest commit in v2.2.0: 37d6928 fixes some issues on waypoint loading and separates dungeon waypoint loading and normal waypoint loading. This also fixes the slow script in Cave/Main.lua where onPlayerPositionChange() and the config is loaded on every new position. Instead, they are loaded seperately, and normal waypoints are loaded when the macro is turned on/off or the player logged into the game. Lastly, CaveBot Recorder works again.


On another note, this introduces the Libraries class (which will be populated as time goes on). More information to come soon.