Gev
Well-Known Member
- Reaction score
- 25
Whell
I whont that the frost whas as bash when im attackong thear is 10% to cost frost attack
I whont that the frost whas as bash when im attackong thear is 10% to cost frost attack
//TESH.scrollpos=16
//TESH.alwaysfold=0
scope TimeRupture initializer Init
private function Condition1 takes nothing returns boolean
return GetSpellAbilityId() == 'A001'
endfunction
private function Condition3 takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_TempGroup )
set udg_Caster = GetTriggerUnit()
endfunction
private function Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local group g = CreateGroup()
local real waittime = 2. + 2. * GetUnitAbilityLevel (u, 'A001')
call TriggerSleepAction(0.10)
set g = GetUnitsInRangeOfLocAll(500.00, l)
call ForGroup( g, function Condition3)
call GroupRemoveUnitSimple( u, udg_TempGroup )
call DestroyGroup(g)
call TriggerSleepAction(waittime)
call DestroyGroup (udg_TempGroup)
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( trig, Condition( function Condition1 ) )
call TriggerAddAction( trig, function Actions )
endfunction
endscope
Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to (==) Fires of the Legion
Actions
Set Real = (Real((Random integer number between 0 and (Level of Fires of the Legion for (Triggering unit)))))
Set Real = (Real x (180.00 / (Real((Level of Fires of the Legion for (Triggering unit))))))
Do Multiple ActionsFor each (Integer B) from 0 to 1, do (Actions)
Loop - Actions
Set loc = (Position of (Triggering unit))
Set loc2 = (loc offset by 300.00 towards Real degrees)
Do Multiple ActionsFor each (Integer A) from 1 to 100, do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FOL_Caster[(Integer A)] Equal to (==) No unit
Then - Actions
Set FOL_Caster[(Integer A)] = (Triggering unit)
Set FOL_Level[(Integer A)] = (Level of Fires of the Legion for (Triggering unit))
Set FOL_X[(Integer A)] = (X of loc2)
Set FOL_Deg[(Integer A)] = Real
Set FOL_Y[(Integer A)] = (Y of loc2)
Set FOL_Times[(Integer A)] = 0
Set FOL_Original[(Integer A)] = True
Custom script: exitwhen true
Else - Actions
Custom script: call RemoveLocation(udg_loc)
Custom script: call RemoveLocation(udg_loc2)
Set Real = (Real + 180.00)
Periodic
Events
Time - Every 1.50 seconds of game time
Conditions
Actions
Do Multiple ActionsFor each (Integer A) from 1 to 100, do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FOL_Caster[(Integer A)] Not equal to (!=) No unit
Then - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FOL_Times[(Integer A)] Less than or equal to (<=) 4
Then - Actions
Custom script: set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(udg_FOL_Caster[bj_forLoopAIndex]),'u000',udg_FOL_X[bj_forLoopAIndex],udg_FOL_Y[bj_forLoopAIndex],0)
Unit - Add Dummy Flame strike to (Last created unit)
Unit - Set level of Dummy Flame strike for (Last created unit) to FOL_Level[(Integer A)]
Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (Point(FOL_X[(Integer A)], FOL_Y[(Integer A)]))
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Multiple ConditionsOr - Any (Conditions) are true
Conditions
FOL_Original[(Integer A)] Equal to (==) True
Then - Actions
Set UnitGroup = (Units within 250.00 of (Point(FOL_X[(Integer A)], FOL_Y[(Integer A)])) matching ((((Matching unit) belongs to an enemy of (Owner of FOL_Caster[(Integer A)])) Equal to (==) True) and (((Matching unit) is in AlreadyHit) Equal to (==) False)))
Unit Group - Pick every unit in UnitGroup and do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to (==) False
Then - Actions
Unit Group - Remove (Picked unit) from UnitGroup
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
False Equal to (==) True
Then - Actions
Unit Group - Add (Picked unit) to AlreadyHit
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in UnitGroup) Greater than (>) 0
Then - Actions
Set Real = (Real((Random integer number between 0 and (Level of Fires of the Legion for FOL_Caster[(Integer A)]))))
Set Real = (Real x (180.00 / (Real((Level of Fires of the Legion for FOL_Caster[(Integer A)])))))
Set loc = (Position of FOL_Caster[(Integer A)])
Set loc2 = (loc offset by 300.00 towards Real degrees)
Do Multiple ActionsFor each (Integer B) from 1 to 100, do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FOL_Caster[(Integer B)] Equal to (==) No unit
Then - Actions
Set FOL_Caster[(Integer B)] = FOL_Caster[(Integer A)]
Set FOL_Level[(Integer B)] = FOL_Level[(Integer A)]
Set FOL_X[(Integer B)] = (X of loc2)
Set FOL_Deg[(Integer B)] = Real
Set FOL_Y[(Integer B)] = (Y of loc2)
Set FOL_Times[(Integer B)] = 0
Set FOL_Original[(Integer B)] = False
Custom script: exitwhen true
Else - Actions
Custom script: call RemoveLocation(udg_loc)
Custom script: call RemoveLocation(udg_loc2)
Set Real = (Real + 180.00)
Set loc = (Position of FOL_Caster[(Integer A)])
Set loc2 = (loc offset by 300.00 towards Real degrees)
Do Multiple ActionsFor each (Integer B) from 1 to 100, do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FOL_Caster[(Integer B)] Equal to (==) No unit
Then - Actions
Set FOL_Caster[(Integer B)] = FOL_Caster[(Integer A)]
Set FOL_Level[(Integer B)] = FOL_Level[(Integer A)]
Set FOL_X[(Integer B)] = (X of loc2)
Set FOL_Deg[(Integer B)] = Real
Set FOL_Y[(Integer B)] = (Y of loc2)
Set FOL_Times[(Integer B)] = 0
Set FOL_Original[(Integer B)] = False
Custom script: exitwhen true
Else - Actions
Custom script: call RemoveLocation(udg_loc)
Custom script: call RemoveLocation(udg_loc2)
Else - Actions
Unit Group - Remove all units from UnitGroup
Custom script: call DestroyGroup(udg_UnitGroup)
Else - Actions
Set Real = (Real((Random integer number between -1 and 1)))
Set Real = (Real x 45.00)
Set FOL_X[(Integer A)] = (FOL_X[(Integer A)] + (500.00 x (Cos((FOL_Deg[(Integer A)] + Real)))))
Set FOL_Y[(Integer A)] = (FOL_Y[(Integer A)] + (500.00 x (Sin((FOL_Deg[(Integer A)] + Real)))))
Set FOL_Times[(Integer A)] = (FOL_Times[(Integer A)] + 1)
Else - Actions
Set FOL_Caster[(Integer A)] = No unit
Else - Actions