Qual servidor ou website você utiliza como base?
TFS 0.4
Qual o motivo deste tópico?
Prezados, boa tarde.
Venho recorrer à vocês mais uma vez para sanar dúvidas de script de spells.
Primeiramente, gostaria de criar uma spell igual ao exori mort mas que consome vida no lugar de mana. Tentei usar o código abaixo mas o servidor crasha, imagino que seja por causa do doCreatureAddHealth(cid, -10) já que a magia é target creio que isso esteja causando algum tipo de conflito.
No outro caso, gostaria de transformar runas em magias instants e target. Como exemplo, segue o script da Fireball e Fire Bomb. (exemplo: o player casta a spell e o efeito é como se ele estivesse usando a runa centrada no target que ele está atacando).
Fireball:
Script Fireball:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -15, 5, 5, 1.8, 3, -20, -40)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Tag xml Fireball:
<conjure name="Fireball" words="adori flam" lvl="27" mana="460" soul="3" prem="1" reagentId="2260" conjureId="2302" conjureCount="5" exhaustion="1000" needlearn="1" event="function" value="conjureRune">
<vocation id="1"/>
<vocation id="5"/>
</conjure>
Fire Bomb:
Script Fire Bomb:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1492)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Tag xml Fire Bomb:
<conjure name="Firebomb" words="adevo mas flam" lvl="27" mana="600" soul="4" reagentId="2260" conjureId="2305" conjureCount="2" exhaustion="1000" needlearn="1" event="function" value="conjureRune">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="5"/>
<vocation id="6"/>
</conjure>
Grato pela atenção.