- Joined
- Nov 11, 2007
- Messages
- 39
-
Omni Gladiator
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Omni
-
Actions
- Set OmniCaster = (Casting unit)
- Set OmniTarget = (Target unit of ability being cast)
- Set OmniHealth = (Life of OmniCaster)
- Set OmniMana = (Mana of OmniCaster)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 4 (Purple)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster4 of Units in GameCache
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 5 (Yellow)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster5 of Units in GameCache
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 6 (Orange)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster6 of Units in GameCache
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 7 (Green)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster7 of Units in GameCache
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 8 (Pink)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster8 of Units in GameCache
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 9 (Gray)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster9 of Units in GameCache
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 10 (Light Blue)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster10 of Units in GameCache
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 11 (Dark Green)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster11 of Units in GameCache
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 12 (Brown)
-
Then - Actions
- Game Cache - Store OmniCaster as OmniCaster12 of Units in GameCache
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Special Effect - Create a special effect attached to the origin of OmniCaster using Abilities\Spells\Human\Omni\Omni.mdx
- Set OmniEffect = (Last created special effect)
- Custom script: call UnitAddAbilityBJ( 'Aloc', udg_OmniCaster )
- Animation - Change OmniCaster's animation speed to 1000.00% of its original speed
- Unit - Make OmniCaster Invulnerable
- Unit - Set OmniCaster acquisition range to 0.00
- Special Effect - Create a special effect at (Position of OmniCaster) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Special Effect - Create a special effect attached to the origin of OmniCaster using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Unit - Move OmniCaster instantly to (Position of OmniTarget), facing (Position of OmniTarget)
- Animation - Play OmniCaster's attack,slam animation
- Set OmniDamage = (120 + (Random integer number between (20 x ((Level of Omni for OmniCaster) - 3)) and (20 x (Level of Omni for OmniCaster))))
- Unit - Cause OmniCaster to damage OmniTarget, dealing (Real(OmniDamage)) damage of attack type Hero and damage type Normal
- Wait 0.10 seconds
- Floating Text - Create floating text that reads ((String(OmniDamage)) + !) at (Position of OmniCaster) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
-
For each (Integer A) from 1 to 7, do (Actions)
-
Loop - Actions
- Set OmniTarget = No unit
-
Unit Group - Pick every unit in (Units within 512.00 of (Position of OmniCaster) matching ((((Matching unit) belongs to an enemy of (Owner of OmniCaster)) Equal to True) and ((((Matching unit) is A ground unit) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to OmniTargets
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (OmniTargets is empty) Equal to False
-
Then - Actions
- Set OmniTarget = (Random unit from OmniTargets)
- Unit Group - Remove all units from OmniTargets
- Special Effect - Create a special effect at (Position of OmniCaster) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Special Effect - Create a special effect attached to the origin of OmniCaster using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Unit - Move OmniCaster instantly to (Position of OmniTarget), facing (Position of OmniTarget)
- Animation - Play OmniCaster's attack,slam animation
- Set OmniDamage = (120 + (Random integer number between (20 x ((Level of Omni for OmniCaster) - 3)) and (20 x (Level of Omni for OmniCaster))))
- Unit - Cause OmniCaster to damage OmniTarget, dealing (Real(OmniDamage)) damage of attack type Hero and damage type Normal
- Wait 0.10 seconds
- Floating Text - Create floating text that reads ((String(OmniDamage)) + !) at (Position of OmniCaster) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
-
Else - Actions
- Unit Group - Remove all units from OmniTargets
-
If - Conditions
-
Loop - Actions
- Special Effect - Destroy OmniEffect
- Unit - Remove OmniCaster from the game
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 4 (Purple)
-
Then - Actions
- Game Cache - Restore OmniCaster4 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 5 (Yellow)
-
Then - Actions
- Game Cache - Restore OmniCaster5 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 6 (Orange)
-
Then - Actions
- Game Cache - Restore OmniCaster6 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 7 (Green)
-
Then - Actions
- Game Cache - Restore OmniCaster7 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 8 (Pink)
-
Then - Actions
- Game Cache - Restore OmniCaster8 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 9 (Gray)
-
Then - Actions
- Game Cache - Restore OmniCaster9 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 10 (Light Blue)
-
Then - Actions
- Game Cache - Restore OmniCaster10 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 11 (Dark Green)
-
Then - Actions
- Game Cache - Restore OmniCaster11 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of OmniCaster) Equal to Player 12 (Brown)
-
Then - Actions
- Game Cache - Restore OmniCaster12 of Units from GameCache for (Owner of OmniCaster) at (Position of OmniCaster) facing (Position of OmniTarget)
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set OmniCaster = (Last restored unit)
- Unit - Set life of OmniCaster to OmniHealth
- Unit - Set mana of OmniCaster to OmniMana
- Selection - Select OmniCaster for (Owner of OmniCaster)
-
Events
Yes, I know its huge and bloated, and probably leaks quite badly. I tried adding local variables to the top of it using the same names as the globals but nothing happened when I cast the spell
The spell works excelent when only 1 unit casts it. Fell free to use the code if you help me out.