Rusher
Provides automated map navigation with pathfinding and portal handling.
Functions
core.rusher.rush(map_id: number)
Available on GMS and CW
Starts automatic navigation to the specified map. The rusher automatically finds the optimal path and handles portal traversal.
core.rusher.stop()
Available on GMS and CW
Stops the current rushing process immediately.
core.rusher.is_rushing() -> boolean
Available on GMS and CW
Returns true if currently rushing to a map.
core.rusher.get_status() -> table
Available on GMS and CW
Returns where the rusher is going, what it is doing right now and how the last rush ended.
| Field | Type | Description |
|---|---|---|
rushing | boolean | Same as is_rushing() |
action | string | What the rusher is doing right now (see below) |
destination | number or nil | Map the current rush is heading to |
channel | number or nil | Channel being switched to by core.change_channel() |
next_map | number or nil | Next map on the route while the rusher follows it |
npc_id | number or nil | NPC the route continues through when action is talking_to_npc or npc_required |
elapsed | number | Seconds since the current rush started; 0 when idle |
stop_reason | string or nil | How the last finished rush ended: arrived, cancelled, replaced or, in Classic, no_route |
last_destination | number or nil | Map that finished rush was heading to |
last_channel | number or nil | Channel that finished channel change was heading to |
action | Meaning |
|---|---|
idle | Not rushing |
hyper_rock | Asking for a Hyper Teleport Rock teleport |
moving | Moving to the next portal on the route |
entering_portal | Entering the next portal |
region_move | Crossing to another region through the world map |
changing_channel | Switching channel |
paused | Held while the character is dead or the Rotation Builder is running (counting down, recording or playing). Rush By Level trips, and in-game navigation that Ingame Rusher follows, also hold while Violet handles evasion, a rune or the lie detector |
waiting | Waiting for the next step, for example right after a map change |
maple_guide | The game has no route from the current map, so the rusher took a Maple Guide move toward the destination and is waiting to land; next_map is where the move lands |
talking_to_npc | The route continues through the NPC in npc_id: the rusher stands by it, talks, and picks the choice that names the next map or its land (a ship to Lith Harbor is "Victoria Island"), paying the fare if the route has one |
no_route | There is no route from the current map to the destination, and no Maple Guide move led on. GMS only: in Classic the rush ends instead, with stop_reason no_route |
interrupted | The in-game navigation stopped before the destination, for example because navigation was started or closed by hand; rush again to continue |
npc_required | The route continues through the NPC in npc_id, and talking to it did not lead on: none of its choices named the next map or its land, or three talks did not move the character |
When the game has no route from the current map, the rusher makes one Maple Guide move per rush: to the destination itself when the guide offers it, otherwise to the guide map closest to it in the same region. The move goes through the Maple Guide's own checks (level, required quests, its cooldown), and the rusher asks for the route again from where it lands. Dimensional Mirror destinations are not used.
In GMS the rusher does not give up on its own. With no_route, interrupted or npc_required it stays active until you call stop() or rush() again, and it posts a warning to the console. In Classic a rush that finds no route posts the warning and ends with stop_reason no_route, so nothing it paused stays paused; call rush() to try again. stop_reason is cancelled after stop() and replaced when a rush to another destination took over. It is also arrived when you rush to the map you are already on while no other rush is active. It keeps describing the last finished rush while the next one runs. When Ingame Rusher follows in-game navigation you started yourself, only rushing, action, destination, next_map and npc_id are filled in.
Example
-- Rush to a target map
if not core.rusher.is_rushing() then
core.rusher.rush(100000000) -- Henesys
core.log("Started rushing to Henesys")
end-- Log each change in what the rusher is doing, and react when it is stuck
local last_action
function on_tick(stage)
local status = core.rusher.get_status()
if status.action ~= last_action then
last_action = status.action
core.log(string.format("[rusher] %s -> %s", status.action, tostring(status.destination or status.last_destination)))
end
if status.action == "interrupted" then
core.rusher.rush(status.destination)
elseif status.action == "no_route" or status.action == "npc_required" then
core.rusher.stop()
end
end