level_door.lua

main 13 lines · 337 bytes Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1function onStepIn(creature, item, position, fromPosition)
2 if not creature:isPlayer() then
3 return false
4 end
5
6 if creature:getLevel() < item.actionid - actionIds.levelDoor then
7 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Only the worthy may pass.")
8 creature:teleportTo(fromPosition, true)
9 return false
10 end
11 return true
12end
13
Top