This script is teleporting the corpse of the minotaur mage instead of the player.
I need it to teleport the player, not the corpse.
Any ideas? Thanks!
I need it to teleport the player, not the corpse.
Lua:
local config = {
message = "You now have 1 minute to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear.",
timeToRemove = 60, -- seconds
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["A Minotaur Mage"] = { { x = 32114, y = 32046, z = 12 }, { x = 32114, y = 32048, z = 12, stackpos = 1 } }
}
}
function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doTeleportThing(cid,{x=32114, y=32046, z=12})
doSendMagicEffect(pos[1], CONST_ME_TELEPORT)
end
end
return TRUE
end
Any ideas? Thanks!