Name | Type | is_array | initial_value |
armaduraatacador | unit | No | |
armadurabobi | unit | No | |
atackedextraeralma | unit | No | |
Ataqueputrefacto | unit | No | |
casterchronosphere | unit | No | |
casterespiraldemuerte | unit | No | |
casterextraeralma | unit | No | |
Chronospherearea | rect | No | |
creep1human | group | No | |
creep1nightelf | group | No | |
creep1orc | group | No | |
creep1undead | group | No | |
creep2human | group | No | |
creep2nightelf | group | No | |
creep2orc | group | No | |
creep2undead | group | No | |
creep3human | group | No | |
creep3nightelf | group | No | |
creep3orc | group | No | |
creep3undead | group | No | |
hades1 | unit | No | |
hades2 | unit | No | |
hades3 | unit | No | |
hades4 | unit | No | |
Heroe | unit | No | |
heroeai | group | No | |
invertir | unit | No | |
llalala | integer | No | |
MH_Angle | real | No | |
MH_Angle2 | real | No | |
MH_Level | integer | No | |
MH_Link | unit | Yes | |
MH_Link2 | unit | Yes | |
MH_Links | integer | No | |
MH_Links2 | integer | No | |
MH_Unit | unit | Yes | |
Position_Spells | location | Yes | |
Regionataqueputrefacto | rect | No | |
Senor_Ogro | unit | No | UnitNull |
Temp_Group | group | No | |
terrorado | unit | No | |
terrorista | unit | No | |
ultinvertir | unit | No |
function Trig_Chronosphere_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A01H'
endfunction
function Chronosphere_Group takes nothing returns boolean
return ( GetFilterUnit() != GetTriggerUnit() )
endfunction
function Trig_Chronosphere_Actions takes nothing returns nothing
local integer i=GetUnitAbilityLevel(GetTriggerUnit(),'A01H')
local unit u
local unit v
local real r=(i*1)
local timer t=CreateTimer()
local location l=GetSpellTargetLoc()
local group g
set u = CreateUnit(GetOwningPlayer(GetTriggerUnit()),'u002',GetLocationX(l),GetLocationY(l),bj_UNIT_FACING)
call TriggerSleepAction (0.3)
call UnitApplyTimedLife(u,'BTLF',r)
call SetUnitTimeScalePercent(u,0.00)
set g = GetUnitsInRangeOfLocMatching(425.00, l, Condition(function Chronosphere_Group))
call StartTimerBJ(t,false,r)
loop
exitwhen TimerGetRemaining(t)<=0.0
loop
set v = FirstOfGroup(g)
exitwhen v == null
call GroupRemoveUnit(g,v)
call PauseUnit(v,true)
call SetUnitTimeScalePercent(v,0.00)
endloop
if (TimerGetRemaining(t)<0.8) then
call TriggerSleepAction(0.1)
else
call TriggerSleepAction(0.3)
endif
call DestroyGroup(g)
set g = GetUnitsInRangeOfLocMatching(425.00, l, Condition(function Chronosphere_Group))
endloop
loop
set v = FirstOfGroup(g)
exitwhen v == null
call GroupRemoveUnit(g,v)
call PauseUnit(v,false)
call SetUnitTimeScalePercent(v,100.00)
endloop
call DestroyTimer(t)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Chronosphere takes nothing returns nothing
set gg_trg_Chronosphere = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chronosphere, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Chronosphere, Condition( function Trig_Chronosphere_Conditions ) )
call TriggerAddAction( gg_trg_Chronosphere, function Trig_Chronosphere_Actions )
endfunction