- Joined
- May 21, 2015
- Messages
- 70
again I created a new simple JASS spell and voila ! I cannot test it again, It will just open warcraft then nothing just plainly open warcraft, anyway here's the spell >>>
JASS:
function Trig_Slash_Condition takes nothing returns boolean
return GetSpellAbilityId = 'A000'
function Trig_Slash_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit
local unit target = GetSpellTargetUnit
call UnitDamageTarget( caster, target, 100.0, true, false, ATTACK_TYPE_PIERCE, DAMAGE_TYPE_COLD, null )
set caster = null
set target = null
endfunction
//===========================================================================
function InitTrig_Slash takes nothing returns nothing
set gg_trg_Slash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Slash, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition( gg_trg_Slash, conditon(function Trig_Slash_Condition))
call TriggerAddAction( gg_trg_Slash, function Trig_Slash_Actions )
endfunction