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:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user