I'm aware as someone has told me before, these triggers appear to be just GUI that was converted to JASS, and is thus really messy. Sorry.
The first problem is ability A024.
Code: Select all
//===========================================================================
// Trigger: Aizen
//===========================================================================
function Trig_Aizen_Func002C takes nothing returns boolean
if(not(GetSpellAbilityId()=='A024'))then
return false
endif
return true
endfunction
function Trig_Aizen_Actions takes nothing returns nothing
if(Trig_Aizen_Func002C())then
call TriggerSleepAction(0.10)
set udg_Aizen=GetSpellAbilityUnit()
set udg_Loc2=GetUnitLoc(udg_Aizen)
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=GetUnitAbilityLevelSwapped('A024',udg_Aizen)
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call UnitAddItemByIdSwapped('I00H',GetSpellAbilityUnit())
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call RemoveLocation(udg_Loc2)
set udg_Loc2=PolarProjectionBJ(GetUnitLoc(GetSpellTargetUnit()),50.00,GetUnitFacing(GetSpellTargetUnit()))
call SetUnitFacingToFaceUnitTimed(udg_Aizen,GetSpellTargetUnit(),0.01)
call SetUnitPositionLocFacingLocBJ(udg_Aizen,udg_Loc2,udg_Loc2)
call AddSpecialEffectLocBJ(udg_Loc2,"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call RemoveLocation(udg_Loc2)
else
endif
function InitTrig_Aizen takes nothing returns nothing
set gg_trg_Aizen=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Aizen,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Aizen,function Trig_Aizen_Actions)
endfunction
Code: Select all
//===========================================================================
// Trigger: Cloud Chrono
//===========================================================================
function Trig_Cloud_Chrono_Func001C takes nothing returns boolean
if(not(GetSpellAbilityId()=='A09R'))then
return false
endif
return true
endfunction
function Trig_Cloud_Chrono_Actions takes nothing returns nothing
if(Trig_Cloud_Chrono_Func001C())then
call TriggerSleepAction(0.20)
set udg_Loc1=GetUnitLoc(GetSpellAbilityUnit())
set udg_CloudLOC=PolarProjectionBJ(GetUnitLoc(GetSpellTargetUnit()),5.00,0)
set udg_CloudClimm=GetSpellAbilityUnit()
call PauseUnitBJ(true,udg_CloudClimm)
call SetUnitPathing(udg_CloudClimm,false)
call RemoveLocation(udg_Loc1)
call SetUnitAnimation(udg_CloudClimm,"attack")
call TriggerSleepAction((DistanceBetweenPoints(GetUnitLoc(udg_CloudClimm),udg_CloudLOC)/1500.00))
call PauseUnitBJ(false,udg_CloudClimm)
call SetUnitPathing(udg_CloudClimm,true)
set udg_CloudClimm=null
call RemoveLocation(udg_CloudLOC)
else
endif
function InitTrig_Cloud_Chrono takes nothing returns nothing
set gg_trg_Cloud_Chrono=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Cloud_Chrono,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Cloud_Chrono,function Trig_Cloud_Chrono_Actions)
endfunction