Appearance
sdk.status
Live self-status cache: conditions, server target, tactics, last vitals. Filled from inbound PlayerState (162), UpdateTarget (163), SetTactics (167), PlayerDataCurrent (160). Official protobuf assign: PlayerState has_bits bit0=state u64@24, bit1=icons u32@32.
lua
local M = require("sdk.status")Constants
Lua 5.4 has no enums — these are integer (or string) fields on the module.
| Name | Value | Summary |
|---|---|---|
POISON | 1 | Same bits as OTClient / official player-state icons (uint64 since 14.05). |
BURN | 2 | — |
ENERGY | 4 | — |
DRUNK | 8 | — |
MANA_SHIELD | 16 | — |
PARALYZE | 32 | — |
HASTE | 64 | — |
SWORDS | 128 | — |
DROWNING | 256 | — |
FREEZING | 512 | — |
DAZZLED | 1024 | — |
CURSED | 2048 | — |
PARTY_BUFF | 4096 | — |
PZ_BLOCK | 8192 | — |
PZ | 16384 | — |
BLEEDING | 32768 | — |
HUNGRY | 65536 | — |
LESSER_HEX | 65536 | — |
INTENSE_HEX | 131072 | — |
GREATER_HEX | 262144 | — |
ROOTED | 524288 | — |
FEARED | 1048576 | — |
NEW_MANA_SHIELD | 67108864 | — |
FIGHT_OFFENSIVE | 1 | — |
FIGHT_BALANCED | 2 | — |
FIGHT_DEFENSIVE | 3 | — |
CHASE_STAND | 0 | — |
CHASE_FOLLOW | 1 | — |
PVP_DOVE | 0 | — |
PVP_WHITE | 1 | — |
PVP_YELLOW | 2 | — |
PVP_RED | 3 | — |
bits
function · bits()
Latest PlayerState condition bitmask.
icons
function · icons()
Latest icon bitmask.
has
function · has(bit)
True when a condition bit is set; nil when unknown.
target_id
function · target_id()
Current official target id.
tactics
function · tactics()
Latest tactics snapshot.
note_state
function · note_state(state, icons)
Update cached state/icons from an event.
note_target
function · note_target(id)
Update cached target id.
note_vitals
function · note_vitals(vitals)
Update cached HP/mana vitals.
vitals
function · vitals()
Cached vital snapshot.
note_tactics
function · note_tactics(tactics)
Update cached tactics.
reset
function · reset()
Clear all status caches.
direction
function · direction()
Cached look direction.
enrich
function · enrich(data)
Copy cached status onto a creature snapshot.