world

The world directory, world hopping, and PvP threats.

Methods
10
Fields
None

Getting one

world

Methods

MethodReturnsDescription
hopper()WorldHopperWorld hopping.
pvp()WorldPvpWilderness threat reads.
current()WorldInfo?The current world's directory entry.
find(number)WorldInfo?One world's directory entry.
search()WorldQueryA query over the directory.
isPvp()booleanWhether the current world is PvP: a PvP or a Deadman world.
location(number)WorldLocationInfo?A world's datacenter, which also tells US East from US West.
hasType(WorldTypeName, number?)booleanWhether a world is of a kind. Raises for a name outside WorldTypeName.
ping(number)WorldPing?The last measured latency to a world.
requestPing(number, boolean?)booleanMeasure a world's latency, on a later tick.

Method details

find

find: (WorldDomain, number) -> WorldInfo?

One world's directory entry.

world
World number.
Returns
nil when it is not in the directory.

isPvp

isPvp: (WorldDomain) -> boolean

Whether the current world is PvP: a PvP or a Deadman world.

location

location: (WorldDomain, number) -> WorldLocationInfo?

A world's datacenter, which also tells US East from US West.

world
World number.
Returns
nil when it is not in the directory.

hasType

hasType: (WorldDomain, WorldTypeName, number?) -> boolean

Whether a world is of a kind. Raises for a name outside WorldTypeName.

local members = world:hasType("members", 301)
local hereIsLeagues = world:hasType("seasonal")
kind
The kind of world.
world
World number; omit for the current world.
Returns
false when it is not in the directory.

ping

ping: (WorldDomain, number) -> WorldPing?

The last measured latency to a world.

world
World number.
Returns
nil when it has not been measured.

requestPing

requestPing: (WorldDomain, number, boolean?) -> boolean

Measure a world's latency, on a later tick.

world
World number.
force
Measure again even when it has been measured.