Death System
Introdução:
Vamos pessoal participar da oms, esse sistema faz com que quando um player mate o outro apareça um ceifeiro vindo pega a alma dele.
Vamos la começar a add a script
Em creaturescript/script, crie
DeathSystem.lua
-- Do not remove the credits -- -- [CREATURESCRIPT] Death System -- -- developed by Rigby to help DuuhCarvalho -- -- Especially for the Xtibia.com -- function onDeath(cid, corpse, killer) local pos = getCreaturePosition(cid) local monster = 'ceifeiro' local timer = 3 -- quanto tempo vai demorar pra sumir 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!", 125) doSendMagicEffect(getThingPos(cid), 65) addEvent(removeMonster, timer*1000) end return true end
<event type="death" name="DeathSystem" event="script" value="DeathSystem.lua"/>
registerCreatureEvent(cid, "DeathSystem")
<?xml version="1.0" encoding="UTF-8"?> <monster name="Ceifeiro" nameDescription="a ceifeiro" race="blood" experience="0" speed="0" manacost="220"> <health now="9999999999999" max="9999999999999"/> <look type="300" corpse="5971"/> <targetchange interval="2000" chance="0"/> <strategy attack="100" defense="0"/> <flags> <flag skull="5"/> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="0"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="1"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="8"/> </flags> <defenses armor="1" defense="2"/> <immunities> <immunity physical="0"/> <immunity energy="0"/> <immunity fire="0"/> <immunity poison="0"/> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="0"/> <immunity invisible="0"/> </immunities> <voices interval="2000" chance="100"> <voice sentence="HAHAHAHA"/> </voices> </monster>
<monster name="Ceifeiro" file="ceifeiro.xml"/>