mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
* refactor: replace -1 with nil * refactor: replace nil checks with not in conditions * resolve conversation * revert this * Update login.lua
20 lines
540 B
Lua
20 lines
540 B
Lua
local questDoor = MoveEvent()
|
|
questDoor:type("stepin")
|
|
|
|
function questDoor.onStepIn(creature, item, position, fromPosition)
|
|
if not creature:isPlayer() then
|
|
return false
|
|
end
|
|
|
|
if not creature:getStorageValue(item.actionid) and not creature:getGroup():getAccess() then
|
|
creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.")
|
|
creature:teleportTo(fromPosition, true)
|
|
return false
|
|
end
|
|
return true
|
|
end
|
|
|
|
for _, i in ipairs(openQuestDoors) do
|
|
questDoor:id(i)
|
|
end
|
|
questDoor:register()
|