Discovery
Developing myself
I need:
Teleport will be created on top of the monster..
SOLVED
Teleport will be created on top of the monster..
SOLVED
LUA:
local tpId = 1387
local tps = {
["Ultimate Dragon"] = {toPos = {x=4492, y=4518, z=7}, time = 360},
}
function removeTp(pos)
local t = getTileItemById(pos, tpId)
if t.uid > 0 then
doRemoveItem(t.uid)
doSendMagicEffect(pos, CONST_ME_POFF)
end
end
function onDeath(cid)
local tp = tps[getCreatureName(cid)]
if tp then
doCreateTeleport(tpId, tp.toPos, getThingPos(cid))
doCreatureSay(cid, "Enter now! "..tp.time.." seconds.", TALKTYPE_ORANGE_1)
addEvent(removeTp, tp.time*1000, getThingPos(cid))
end
return TRUE
end
Last edited: