Violet

Rusher

On this page

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.

FieldTypeDescription
rushingbooleanSame as is_rushing()
actionstringWhat the rusher is doing right now (see below)
destinationnumber or nilMap the current rush is heading to
channelnumber or nilChannel being switched to by core.change_channel()
next_mapnumber or nilNext map on the route while the rusher follows it
npc_idnumber or nilNPC the route continues through when action is talking_to_npc or npc_required
elapsednumberSeconds since the current rush started; 0 when idle
stop_reasonstring or nilHow the last finished rush ended: arrived, cancelled, replaced or, in Classic, no_route
last_destinationnumber or nilMap that finished rush was heading to
last_channelnumber or nilChannel that finished channel change was heading to
actionMeaning
idleNot rushing
hyper_rockAsking for a Hyper Teleport Rock teleport
movingMoving to the next portal on the route
entering_portalEntering the next portal
region_moveCrossing to another region through the world map
changing_channelSwitching channel
pausedHeld 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
waitingWaiting for the next step, for example right after a map change
maple_guideThe 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_npcThe 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_routeThere 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
interruptedThe in-game navigation stopped before the destination, for example because navigation was started or closed by hand; rush again to continue
npc_requiredThe 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

lua
-- Rush to a target map
if not core.rusher.is_rushing() then
    core.rusher.rush(100000000)  -- Henesys
    core.log("Started rushing to Henesys")
end
lua
-- 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