Refactored components of the ScriptAPI to more efficiently utilize pathfinding

Implemented a global limit on pathfinding distance (server.max_pathfind_dist)
Pathfinding limit is enforced at the packet level as well as elsewhere (ContentAPI, etc)
This commit is contained in:
Ceikry
2023-04-24 14:16:59 +00:00
committed by Ryan
parent 5aded2b349
commit 4b20cdd001
15 changed files with 369 additions and 326 deletions
@@ -97,9 +97,9 @@ class LobsterCatcher : Script() {
state = State.FISHING
} else {
if (bot.location.x < 2837) {
Pathfinder.find(bot, Location.create(2837, 3435, 0)).walk(bot)
scriptAPI.walkTo(Location.create(2837, 3435, 0))
} else {
Pathfinder.find(bot, Location.create(2854, 3427, 0)).walk(bot)
scriptAPI.walkTo(Location.create(2854, 3427, 0))
}
}
}
@@ -194,4 +194,4 @@ class LobsterCatcher : Script() {
}
return newInstance()
}
}
}