adric21
Well-Known Member
- Joined
- Apr 26, 2016
- Messages
- 275
- Solutions
- 1
- Reaction score
- 71
GO TO DATA/CREATURESCRIPTS/SCRIPTS
AND CREATE A FILE "DeathSystem.LUA"
ADD THIS CODE :
AND ADD IN CREATURESCRIPTS.XML
THIS TAG;
AND CREATE A FILE "DeathSystem.LUA"
ADD THIS CODE :
Lua:
function onDeath(cid, corpse, killer)
local pos = getCreaturePosition(cid)
local monster = 'a morte'
local timer = 3 -- tIME
function removeMonster()
for _, pid in ipairs(getCreatureSummons(killer[1])) do
doRemoveCreature(pid)
end
return true
end
if isPlayer(cid) and isPlayer(killer[1]) then
doConvinceCreature(killer[1], doCreateMonster(monster, pos))
doSendAnimatedText(getThingPos(cid), "DEATH", 19) -- O "death" WORDS ON THE BODY
doSendMagicEffect(getThingPos(cid), 65)
addEvent(removeMonster, timer*1000)
end
return true
end
AND ADD IN CREATURESCRIPTS.XML
THIS TAG;
XML:
<event type="death" name="DeathSystem" event="script" value="DeathSystem.lua"/>
Last edited by a moderator: