I made this scripts.. and the scripts create the teleport but.. don't send the message and don't remove the teleport =(
here is...
The following errors...
Help me please
here is...
Code:
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "ushurielStorage")
local creaturename = getCreatureName(cid)
local to_pos = {x=588, y=1086, z=7, stackpos=1}
local in_pos = {x=859, y=837, z=6, stackpos=1}
local TIME_TO_REMOVE = 180 -- in seconds
if creaturename == 'Ushuriel' then
local text_pos = getCreaturePosition(creaturename)
teleport = doCreateTeleport(1387, to_pos, in_pos)
doSendMagicEffect(in_pos, CONST_ME_TELEPORT)
doCreatureSayWithDistance(text_pos, "You now have 3 minutes to exit this room through
the teleporter. It will bring you to the next room only during his time", TALKTYPE_ORANGE_1)
addEvent(doRemoveItem, TIME_TO_REMOVE * 100, teleport)
end
end
The following errors...
Code:
[26/11/2008 09:50:11] Lua Script Error: [CreatureScript Interface]
[26/11/2008 09:50:11] data/creaturescripts/scripts/ushuriel_teleport.lua:onDeath
[26/11/2008 09:50:11] luaGetCreaturePosition(). Creature not found
[26/11/2008 09:50:11] Lua Script Error: [CreatureScript Interface]
[26/11/2008 09:50:11] data/creaturescripts/scripts/ushuriel_teleport.lua:onDeath
[26/11/2008 09:50:11] luaGetCreaturePosition(). Creature not found
[26/11/2008 09:50:11] Lua Script Error: [CreatureScript Interface]
[26/11/2008 09:50:11] data/creaturescripts/scripts/ushuriel_teleport.lua:onDeath
[26/11/2008 09:50:11] data/global.lua:604: attempt to index a number value
[26/11/2008 09:50:11] stack traceback:
[26/11/2008 09:50:11] data/global.lua:604: in function 'doCreatureSayWithDistance'
[26/11/2008 09:50:11] data/creaturescripts/scripts/ushuriel_teleport.lua:21: in function <data/creaturescripts/scripts/ushuriel_teleport.lua:5>
Help me please