Ir para conteúdo

Death System(onde o ceifeiro vem pega sua alma)[OMS]


RigBy

Posts Recomendados

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.

y5DsLlZ.png

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
Creaturescript.xml tag

<event type="death" name="DeathSystem" event="script" value="DeathSystem.lua"/>
Login.lua antes do ultimo return true

registerCreatureEvent(cid, "DeathSystem")
Agora vamos criar o ceifeiro
em monster crie um
ceifeiro.xml

<?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>
em monsters.xml adicione essa tag antes do ultimo </monsters>

<monster name="Ceifeiro" file="ceifeiro.xml"/>
Espero que gostem.
Editado por RigBy
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
×
×
  • Criar Novo...