WorldHopper

Group
world
Methods
9
Fields
None

Getting one

world:hopper()

Methods

MethodReturnsDescription
status(){ target: number?, stage: WorldHopStage, openAttempts: number, error: string? }Where a hop this plugin started has got to.
hopTo(number)booleanHop to a named world.
hopToAny()booleanHop to a random compatible world.
hopToSameRegion()booleanHop to a random world in the current world's region and location.
hopToSafe(boolean)booleanHop to a random compatible world, excluding PvP, high-risk and bounty.
hopToActivity(string)booleanHop to a random compatible world whose activity label contains the text, ignoring case.
candidates(){ WorldInfo }Every world this account could hop to: the worlds hopToAny picks from.
hopPrevious(boolean)booleanQuick-hop one step down the directory.
hopNext(boolean)booleanQuick-hop one step up the directory.

Returned by

MethodReturnsDescription
WorldDomain.hopperWorldHopperWorld hopping.

Method details

status

status: (WorldHopper) -> { target: number?, stage: WorldHopStage, openAttempts: number, error: string? }

Where a hop this plugin started has got to.

hopTo

hopTo: (WorldHopper, number) -> boolean

Hop to a named world.

Hops to world through the world switcher, opening it first; status() follows the hop.

world
World number.
Returns
false for world 0, a world not in the directory, or the world already on.
Example
local function hop(target: number): (RunStatus, string?)
    local hopper = world:hopper()
    local status = hopper:status()
    if status.target ~= target then
        hopper:hopTo(target)
        return "running", "hopping"
    elseif status.stage == "complete" then
        return "done", nil
    elseif status.stage == "failed" then
        return "blocked", status.error
    end
    return "running", status.stage
end

hopToAny

hopToAny: (WorldHopper) -> boolean

Hop to a random compatible world.

A random online world with the current world's profile: members, seasonal, hardcore, deadman, beta, legacy-only, fresh start, EoC-only, quest speedrunning, PvP Arena, tournament and no-save each on both or on neither. PvP, high-risk, bounty, skill total and Last Man Standing worlds may be picked. The skill total is met and the world has at most 1,950 players.

hopToSameRegion

hopToSameRegion: (WorldHopper) -> boolean

Hop to a random world in the current world's region and location.

A random world of the current world's region AND its WORLD_LOCATIONS location (US East and US West are one region), through the filter hopToAny describes. The hop goes through the world switcher.

hopToSafe

hopToSafe: (WorldHopper, boolean) -> boolean

Hop to a random compatible world, excluding PvP, high-risk and bounty.

As hopToAny(), also without PvP, high-risk and bounty worlds, optionally in the current region.

restrictRegion
Also stay in the current country.

hopToActivity

hopToActivity: (WorldHopper, string) -> boolean

Hop to a random compatible world whose activity label contains the text, ignoring case.

text
What to look for in the directory's activity label.

hopPrevious

hopPrevious: (WorldHopper, boolean) -> boolean

Quick-hop one step down the directory.

outOfDanger
Skip dangerous worlds.
Returns
false when not logged in.

hopNext

hopNext: (WorldHopper, boolean) -> boolean

Quick-hop one step up the directory.

outOfDanger
Skip dangerous worlds.
Returns
false when not logged in.