• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Teleport corpse instead of player

Bill3000

New Member
Joined
Jul 26, 2010
Messages
106
Reaction score
1
This script is teleporting the corpse of the minotaur mage instead of the player.
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!
 
Not worked. Console erros:

<luadoTeleportThing> thing no found

Code now:

Lua:
local config = {
	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
			doTeleportThing(killer,{x=32114, y=32046, z=12})
			doSendMagicEffect(pos[1], CONST_ME_TELEPORT)
		end
	end
	return TRUE
end
 
Last edited:
Can you give us the console error please?

- - - Updated - - -

Try to change to onPrepareDeath that would be preparedeath in creaturescripts, killer is supported for preparedeath I dont think it is in ondeath
 
Back
Top