OTcreator
Well-Known Member
- Joined
- Feb 14, 2022
- Messages
- 482
- Solutions
- 1
- Reaction score
- 53
Hello!
All working good, but teleport not have destenation toPos.
I stand on teleport and nothing.
Whats wrong?
All working good, but teleport not have destenation toPos.
I stand on teleport and nothing.
Whats wrong?
LUA:
function onKill(creature, target)
local player = creature:isPlayer()
if not player then
return true
end
local pythius = target:isMonster()
if not pythius then
return true
end
local function removal(position)
local teleport = Tile(position):getItemById(1387)
if teleport then
teleport:remove()
position:sendMagicEffect(CONST_ME_POFF)
end
return true
end
local tpPos = Position(544,467,13)
local toPos = Position(439,481,13)
local timeToRemove = 30
if target:getName():lower() == "pythius the rotten" then
local position = tpPos
local teleport = Game.createItem(1387, 1, tpPos)
if teleport:isTeleport() then
teleport:setDestination(toPos)
end
creature:say("You have defeated Pythius The Rotten!\nEnter into teleport. It will disappear in thirty seconds.", TALKTYPE_MONSTER_SAY, false, 0 ,tpPos)
addEvent(removal, timeToRemove * 1000, position)
end
return true
end