finish quest part of inq

This commit is contained in:
ErikasKontenis
2022-04-18 18:50:47 +03:00
parent 661759508d
commit 3f4956b3b9
32 changed files with 1155 additions and 78 deletions

View 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