tavax
New Member
- Joined
- Apr 29, 2009
- Messages
- 17
- Reaction score
- 2
Hello,
This is my scripit \/
Player kill a mob and after 15 second he will be teleport.
This is my scripit \/
Code:
function onDeath(cid, corpse, killer)
local Ppos = {x = 33327, y = 31589, z = 14}
local time_to_pass = 15 -- in seconds
local monstName = "Domnion"
if isMonster(cid) then
if string.lower(getCreatureName(cid)) == string.lower(monstName) then
local char = killer[1]
doCreatureSay(cid, "You have 15 seconds to get your loot.", TALKTYPE_ORANGE_1)
addEvent(removeTeleport, (1000*time_to_pass))
end
end
return TRUE
end
function removeTeleport()
doTeleportThing(char, Ppos)
return TRUE
end
Player kill a mob and after 15 second he will be teleport.
Code:
[17:0:59.161] [Error - CreatureScript Interface]
[17:0:59.161] In a timer event called from:
[17:0:59.162] data/creaturescripts/scripts/chest\chestdh.lua:onDeath
[17:0:59.162] Description:
[17:0:59.162] attempt to index a nil value
[17:0:59.163] stack traceback:
[17:0:59.163] [C]: in function 'doTeleportThing'