-------------------------------
Nome: Magia de Sacrificio
Versão: 8.1
Tipo do script: Spells
Servidor Testado: Aries 4.0
Autor: Lyndell
-------------------------------
Bom, é uma magia bem forte que decha o player com apenas 100 de hp e 200 de mana, ou seja eh meio um sacrificio... a magia nao irá matar o player porque só ira ser feita se ele tiver uma quantidade de hp e mana.
script:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -3.6, -30, -5.9, 4)
local arr = {
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
health = getPlayerHealth(cid)
mana = getPlayerMana(cid)
if mana >= 1500 and health >= 2000 then
doPlayerAddHealth(cid, -(health-100))
doPlayerAddMana(cid, -(mana-200))
return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid,22,"Você nao tem mana ou health suficiente.")
end
end
Aqueles valores 100 e 200 sao a vida e mana que o player irá ficar ao usar o spell, você tbm pode mudar quanto de hp e mana o player precisa para executar o spell.
Bom... você pega qualquer arquivo, apaga tudu e cola o script dentro dele...
Depois disso salve ele como magiadead.lua
Feito isso abra seu Spells.xml e cole esse tag:
<instant name="death" words="exevo death" soul="5" mana="0" aggressive="1" lvl="200" maglv="5" exhaustion="1" prem="1" enabled="1" script="magiadead.lua"><vocation id="2"/><vocation id="6"/><vocation id="5"/><vocation id="1"/><vocation id="3"/><vocation id="4"/><vocation id="7"/><vocation id="8"/></instant>
Caso queiram mudar algo no script ou no tag pode, eu recomendo deixar assim mesmo.
Gostaram?
if yes then
Comentem (Y)
end