Skip to content

GetDoorKey

The tagged item that is a door’s key (SetDoorKey) - every world’s, or the one for a virtual world.

GetDoorKey(door [, world])
Parameter Type
door string the door’s level name
world number the virtual world whose players’ key to read: its own, else every world’s; none (the default) = every world’s (optional)

string - the item’s id, "" when the door has none

if FindPlayerItem(pid, GetDoorKey(MILL_DOOR)) then SendClientMessage(pid, COLOR_WHITE, "You have the key to the mill house.") end
local key = GetDoorKey(FLAT_DOOR, GetPlayerVirtualWorld(pid))

SetDoorKey · the Doors and containers group of the index