Iae gente blz?
Bom tava aki sem faze nada resolvi fazer uma magia que atira bolo
intaum vamos ao q enteressa...
Va na pasta Data/Spells/Scripts/attack Copie um arquivo Lua E Renomei Para bolo.lua Cole Isso la Dentro:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_CAKEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 51)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.4, 0, -0.5, 0)
local distanceCombat = createCombatObject()
setCombatParam(distanceCombat, COMBAT_PARAM_TYPE, 1)
setCombatParam(distanceCombat, COMBAT_PARAM_EFFECT, 51)
setCombatParam(distanceCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_CAKE)
setCombatFormula(distanceCombat, COMBAT_FORMULA_LEVELMAGIC, -0.4, 0, -0.5, 0)
function onCastSpell(cid, var)
if(variantToNumber(var) ~= 0) then
return doCombat(cid, distanceCombat, var)
end
return doCombat(cid, combat, var)
end
Depois Feche e Salve. Va na pasta data/spells/spells.xml e cole isso:
<instant name="Ice Strike" words="exori bolo" lvl="15" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="1" script="attack/bolo.lua">
<vocation name="Sorcerer"/>
<vocation name="Master Sorcerer"/>
<vocation name="Druid"/>
<vocation name="Elder Druid"/>
</instant>
Se gostou comenta ae... :smile_positivo:
Foto da magia