• 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!

On death transforms into another monster?

kessykins

Intermediate OT User
Joined
Mar 15, 2010
Messages
297
Reaction score
105
Is it possible for a creature to die and on death becomes another monster?

If so.. what would need to be changed in the creature file? ;o
 
Ok a new problem has risen.. I had 4 players ganging up on 1 Enraged Zombie.. it spawned 4 exploding corpses.. >.< What should I change? This is what I currently have:

local monster = "Enraged Zombie"
local summon = "Exploding Corpse"
function onKill(cid, target)
if isPlayer(target) then
return true
end
if isPlayer(cid) and getCreatureName(target) == monster then
local q = getThingPos(target)
doCreatureSay(target, "I'm not finished with you yet! ", TALKTYPE_ORANGE_1)
doSummonCreature(summon, q)
doSendMagicEffect(q,49)

end
return true
end
 
try this and change <event type> in creature.xml to "preparedeath"
Lua:
local monster = "Enraged Zombie"
local summon = "Exploding Corpse"
function onPrepareDeath(cid, deathList)
if isPlayer(cid) then
return true
end
if getCreatureName(cid) == monster then
local t = getThingPos(cid)
doCreatureSay(cid, "I'm not finished with you yet! ", TALKTYPE_ORANGE_1)
doSendMagicEffect(t,49)
addEvent(doCleanTile,0.1,t)
doSummonCreature(summon, t)
end
return true
end
Then go to the "Enraged Zombie.lua" in monster folder and paste this after the close tag of flags
Code:
<script>
	<event name="vvvv"/>
     </script>

in event name write the event name in the line you have in the creature.xml not event type
 
Back
Top