Heres a spell I made (Not tested because my TFS serv dont work)
Here it is!
heres the code for the spells.xml
Can someone test it and tell me if it works? Its supposed to shoot energy from 2sqm away max. like Whirlwind or Etheral Spear but only 2 sqm coz of how powerful it is.
Here it is!
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength)
local attack = 50
local skill = getPlayerSkill(cid, CONST_SKILL_MAGIC)
local maxWeaponDamage = (skill * attack) / 20 + attack
local damage = -((math.random(0, maxWeaponDamage) * attackStrength) / 100) * 1.8 --
return damage, damage --
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
heres the code for the spells.xml
PHP:
<instant name="Chidori" words="chidori" lvl="50" mana="200" prem="1" range="2" needtarget="1" exhaustion="1000" blockwalls="1" needlearn="1" script="custom/chidori.lua">
<vocation name="Sorcerer"/>
<vocation name="Master Sorcerer"/>
</instant>
Can someone test it and tell me if it works? Its supposed to shoot energy from 2sqm away max. like Whirlwind or Etheral Spear but only 2 sqm coz of how powerful it is.