- Joined
- May 31, 2009
- Messages
- 109
Request +rep
i need someone who can translate thiss JASS to GUI
i need someone who can translate thiss JASS to GUI
JASS:
//TESH.scrollpos=27
//TESH.alwaysfold=0
function Trig_Slow_Chain_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00A'
endfunction
function Trig_Slow_Chain_cond takes nothing returns boolean
return (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false) and ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false ) and (not(GetUnitAbilityLevel(GetFilterUnit(),'Bslo') > 0)) and IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) and (GetWidgetLife(GetFilterUnit())>0.405)
endfunction
function Trig_Slow_Chain_levels takes location fl, integer level, unit dummy, unit last returns nothing
local group Chain_Targets_other
local unit target
local real Chain_Distance = 700. // Distance beetwen slowled units
local integer i = 0
local lightning bolt = null
loop
call TriggerSleepAction( .53 )
set Chain_Targets_other = GetUnitsInRangeOfLocMatching(Chain_Distance, fl, Condition(function Trig_Slow_Chain_cond))
set target=FirstOfGroup(Chain_Targets_other)
call DestroyGroup(Chain_Targets_other)
call DestroyLightning( bolt )
exitwhen (i > level) or (target==null)
set bolt = AddLightningEx( "SPLK", true, GetUnitX(last), GetUnitY(last), GetUnitFlyHeight(last), GetUnitX(target), GetUnitY(target), GetUnitFlyHeight(target))
call IssueTargetOrder( dummy, "slow", target )
call TriggerSleepAction( .01 )
call IssueTargetOrder( dummy, "slow", target )
set last = target
set i = i + 1
endloop
set Chain_Targets_other = null
set target = null
set last = null
set bolt = null
endfunction
function Trig_Slow_Chain_Actions takes nothing returns nothing
local unit Chain_Caster = GetSpellAbilityUnit()
local unit Chain_Target = GetSpellTargetUnit()
local location fl = GetUnitLoc(Chain_Target)
local unit Chain_Dummy
set Chain_Dummy = CreateUnit( GetOwningPlayer(Chain_Caster), 'e002', GetUnitX(Chain_Target), GetUnitY(Chain_Target), 0. )
call UnitApplyTimedLife( Chain_Dummy, 'BTLF', 10. )
call IssueTargetOrder( Chain_Dummy, "slow", Chain_Target )
call TriggerSleepAction( .75 )
call Trig_Slow_Chain_levels(fl,GetUnitAbilityLevel(Chain_Caster, 'A00A'),Chain_Dummy, Chain_Target)
set Chain_Caster = null
set Chain_Target = null
set Chain_Dummy = null
call RemoveLocation(fl)
set fl = null
endfunction
//===========================================================================
function InitTrig_Slow_Chain takes nothing returns nothing
set gg_trg_Slow_Chain = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slow_Chain, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Slow_Chain, Condition( function Trig_Slow_Chain_Conditions ) )
call TriggerAddAction( gg_trg_Slow_Chain, function Trig_Slow_Chain_Actions )
endfunction