introduce POI until entrance until the DL spawn

This commit is contained in:
ErikasKontenis
2020-04-08 23:26:51 +03:00
parent 6e2fb1d34d
commit 332a88ae50
8 changed files with 120 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
local destinations = {
[17640] = Position(32791, 32327, 10),
[17641] = Position(32791, 32331, 10)
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return false
end
if player:getItemCount(2836) < 1 then
player:teleportTo(fromPosition)
return true
end
player:teleportTo(destinations[item:getMovementId()])
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
return true
end