mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-17 07:43:27 +02:00
finish quest part of inq
This commit is contained in:
38
data/movements/scripts/inquisition/entrance.lua
Normal file
38
data/movements/scripts/inquisition/entrance.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
local throneStorages = {
|
||||
17679,
|
||||
17680,
|
||||
17681,
|
||||
17682,
|
||||
17683,
|
||||
17684,
|
||||
17685
|
||||
}
|
||||
|
||||
local function hasTouchedOneThrone(player)
|
||||
for i = 1, #throneStorages do
|
||||
if player:getStorageValue(throneStorages[i]) == 1 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function onStepIn(creature, item, position, fromPosition)
|
||||
local player = creature:getPlayer()
|
||||
if not player then
|
||||
return true
|
||||
end
|
||||
|
||||
if not hasTouchedOneThrone(player) or player:getLevel() < 100 or player:getStorageValue(12160) < 20 then
|
||||
player:teleportTo(fromPosition)
|
||||
position:sendMagicEffect(CONST_ME_TELEPORT)
|
||||
fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
|
||||
return true
|
||||
end
|
||||
|
||||
local destination = Position(33168, 31683, 15)
|
||||
player:teleportTo(destination)
|
||||
position:sendMagicEffect(CONST_ME_TELEPORT)
|
||||
destination:sendMagicEffect(CONST_ME_TELEPORT)
|
||||
return true
|
||||
end
|
Reference in New Issue
Block a user