- Joined
- Sep 9, 2007
- Messages
- 6,759
JASS:
function SotL_Actions takes nothing returns nothing
//***Locals***
local unit u = GetTriggerUnit()
local integer i = GetUnitAbilityLevelSwapped(GetSpellAbilityId(),u)
local real r1
local real r2= 10 + 2 * i
local integer loop1end = 10
local integer loop1int = 0
local effect e
//************
loop
exitwhen loop1int > loop1end
set loop1int = loop1int + 1
set r1 = GetUnitStateSwap(UNIT_STATE_LIFE, u)
call TriggerSleepAction( 1 )
call SetUnitLifeBJ( u, ( r1 + r2 ) )
set e = AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Spells\\Human\\Heal\\HealTarget.mdl" )
call DestroyEffectBJ( e )
endloop
endfunction
function Trig_SotL_Actions takes nothing returns nothing
if ( GetSpellAbilityId() == 'A000' )
then
call ExecuteFunc(function SotL_Actions)
else
endif
endfunction
//===========================================================================
function InitTrig_SotL takes nothing returns nothing
local trigger gg_trg_SotL = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SotL, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddAction( gg_trg_SotL, function SotL_Actions )
call TriggerAddAction( gg_trg_SotL, function Trig_SotL_Actions )
endfunction
Why?