Gwiks
New Member
I'm really needing a script that when a creature dies. Other creature respawns in the same place.
Can somebody do it for me?
Thanks.
Can somebody do it for me?
Thanks.
function onKill(cid, target, lastHit)
if isMonster(target) then
doCreateMonster(getCreatureName(target), getCreaturePosition(target))
end
return true
end
local respawnMonster = "Ghost" --Change monster here
function onKill(cid, target, lastHit)
if isMonster(target) then
doCreateMonster(respawnMonster, getCreaturePosition(target))
end
return true
end
snake god essence.lua:<event type="kill" name="snake god essence" event="script" value="snake god essence.lua"/>
I tried with and without the red thing. And still not working :<local respawnMonster = "Snake Thing" --Change monster here
function onKill(cid, target, lastHit)
local target = "Snake God Essence"
if isMonster(target) then
doCreateMonster(respawnMonster, getCreaturePosition(target))
end
return true
end
<event type="kill" name="SnakeGodEssence" event="script" value="SnakeGodEssence.lua"/>
local respawnMonster = "Snake Thing" --Change monster here
function onKill(cid, target, lastHit) --The target comes from the onKill function itself, no need to set it yourself
if isMonster(target) then
doCreateMonster(respawnMonster, getCreaturePosition(target))
end
return true
end
function onLogin(cid)
...
registerCreatureEvent(cid, "SnakeGodEssence")
...
end