Hello, can someone fix my script? The script is working but I want to after killing God Essence Snake, Snake Thing appeared in the place of death Snake God Essence. Here is my script:
PHP:
local config = {
message = "Now fight with my second form!",
bosses = {
["Snake God Essence"] = { x = 1034, y = 973, z = 8 },
}
}
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "wrathy")
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doSummonCreature("snake thing", { x = 1034, y = 973, z = 8 })
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
doSendMagicEffect(position,65)
end
end
return TRUE
end