WorldPvp

Group
world
Methods
2
Fields
None

Getting one

world:pvp()

Methods

MethodReturnsDescription
state(){ kind: "safe" | "active" | "unknown", combatRange: { min: number, max: number }?, reason: PvpUnknownReason? }Whether the local player is somewhere they can be attacked, and how.
threats(){ kind: "safe" | "active" | "unknown", reason: PvpUnknownReason?, combatRange: { min: number, max: number }?, unreadableCandidates: number?, players: { Player }? }Who can attack the local player right now.

Returned by

MethodReturnsDescription
WorldDomain.pvpWorldPvpWilderness threat reads.

Method details

state

state: (WorldPvp) -> { kind: "safe" | "active" | "unknown", combatRange: { min: number, max: number }?, reason: PvpUnknownReason? }

Whether the local player is somewhere they can be attacked, and how.

threats

threats: (WorldPvp) -> { kind: "safe" | "active" | "unknown", reason: PvpUnknownReason?, combatRange: { min: number, max: number }?, unreadableCandidates: number?, players: { Player }? }

Who can attack the local player right now.

unreadableCandidates counts nearby players whose combat level could not be read — treat a non-zero count as "the threat list is incomplete" rather than as "no threat".