1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  5. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  6. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

baassee H&L SP v1.0 [MUI].w3x
Variables
Spellpack
README
Last Survival
HOW TO IMPORT LS
LS Cast
LS Loop
Earth Shockwave
HOW TO IMPORT ES
ES Cast
ES Loop
Ohmi Slash System
Apply This to your spell
HOW TO IMPORT OS
OS Test Spell
OS Set Values
OS System
Map Stuff
Ini
Moving Units
Unit Move 1 1
Unit Move 1 2
Unit Move 1 3
Unit Move 2 1
Unit Move 2 2
Unit Move 2 3
Unit Move 3 1
Unit Move 3 2
Unit Move 3 3
Spawn and SP
Spawn
Sp Crushing
Commands
commands
Check Total
Check current
turn off spawn
turn on spawn
escape shit
level up
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.

		
Name Type Is Array Initial Value
ES_Angle real Yes
ES_AoE real Yes
ES_Caster unit Yes
ES_CasterPoint location Yes
ES_Chance real Yes
ES_Checker real Yes
ES_Counter real Yes
ES_Damage real Yes
ES_DamageCounter real Yes
ES_DebugGroup group Yes
ES_EndCounter real Yes
ES_Index integer Yes
ES_OffestCounter integer Yes
ES_TargetPoint location Yes
ES_TempGroup group Yes
ES_TempPoint location Yes
FacingPoints location Yes
LS_Caster unit Yes
LS_Counter real Yes
LS_EndCounter real Yes
LS_Index integer Yes
LS_Point location Yes
MapCounter integer No
MapLocation location No
MapUnitsCurrent integer No
MovePoints location Yes
OS_Animation string Yes
OS_AoE real Yes
OS_AtkType attacktype Yes
OS_AttachPoint string Yes
OS_BlinkEffect string Yes
OS_Caster unit Yes
OS_DamageType damagetype Yes
OS_Dmg real Yes
OS_DmgBoolean boolean Yes
OS_Index integer Yes
OS_RandomAngle real Yes
OS_RandomBoolean boolean Yes
OS_RandomGroup group Yes
OS_RealCheck real Yes
OS_RealCounter real Yes
OS_Slash integer Yes
OS_SlashingSpeed real Yes
OS_SlashingTime real Yes
OS_SP effect Yes
OS_SPPoint location No
OS_Target unit Yes
OS_TargetPoint location Yes
OS_TempPoint location No
OSS_Animation string No
OSS_AoE real No
OSS_AtkType attacktype No
OSS_AttachPoint string No
OSS_BlinkSP string No
OSS_Caster unit No
OSS_DamageType damagetype No
OSS_Dmg real No
OSS_DmgBoolean boolean No
OSS_RandomBoolean boolean No
OSS_Slash integer No
OSS_SP string No
OSS_Speed real No
OSS_Target unit No
OSS_TargetPoint location No
Regions rect Yes
SpawnPoints location Yes
Here we go, my hope&learn spellpack for you new spellmakers out there. Made this for you so you can learn how to make this and that. Documented ALOT so don't worry about that and also I've but current learning curve levels for each spell so start with the easiest one or the level you think you are at! Remember if you dont get anything, go back one level.

Have fun reading and if you wanna use this, credit me even if you change it to something different but you based on one of mine.

regards

a spellmaker that wanna help THW mods with newbies that can't make spells correct.

~baassee
This is the second spell and here we will use indexing to make it MUI. The only thing why we need this is that we are going to hide our hero and then move it to another place after a few seconds that why we will index this spell, will try to explain as proper as I can.

Current learning curve: easy

PS:

2 VERY SHORT TRIGGERS, just showing the basics of Indexing.
First you check of the boxes of create unknown variables. Then copy the ability, check the triggers first ability being cast cause it usally get corrupted then you double click the turn on LS Loop and pushes ok and you're good to go. Credit me :)

IF YOU WANNA CHANGE THE SPECIAL EFFECT CHANGE IT IN THE LOOP TRIGGER
HOW TO IMPORT LS
  Events
  Conditions
  Actions
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
I am willing to try how to explain the MUI of Indexing. First of all you need a integer variable with array, size dont matter. Then you do like I did in most of these triggers, first we check with an if/then/else. Look at the conditon, it's the index[1] always. That just checks if the trigger should be online, stay online or turning itself off. The second index[2] is where you store all units, by that all other variables also need to be arrayed. Look at these variables down her, not many but all arrayed. In the next trigger there will be a for each and every index[3] this is what we will use. Also we use it because integer A may bug it ass off. We go from 1 to Index[2], why? Cause that's the max number of how many spells that are currently active and we dont need anymore. But still when one cancel off and many spells are active it wont be for ow many spells that are currently so then we have the Index[1] that checks how many spells that are currently online. Read the trigger comments below and in the next trigger to understand more.

Or you read Kingz great tutorial of MUI indexing.
LS Cast
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Last Survival
  Actions
    -------- -------------------------------------- --------
    -------- As I said above, here we check with an if/then/else --------
    -------- -------------------------------------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        LS_Index[1] Equal to 0
      Then - Actions
        Trigger - Turn on LS_Loop <gen>
      Else - Actions
    -------- -------------------------------------- --------
    -------- Now we set our indexes +1 --------
    -------- So the current spells active will be increased. --------
    -------- Index [1] --------
    -------- -------------------------------------- --------
    Set VariableSet LS_Index[1] = (LS_Index[1] + 1)
    -------- -------------------------------------- --------
    -------- Index [2] --------
    -------- -------------------------------------- --------
    Set VariableSet LS_Index[2] = (LS_Index[2] + 1)
    -------- -------------------------------------- --------
    -------- Here store our caster, the unit that is going to be moved. Indexed as I said above. --------
    -------- -------------------------------------- --------
    Set VariableSet LS_Caster[LS_Index[2]] = (Triggering unit)
    -------- -------------------------------------- --------
    -------- Here we store the point that we are currently moving to --------
    -------- -------------------------------------- --------
    Set VariableSet LS_Point[LS_Index[2]] = (Target point of ability being cast)
    -------- -------------------------------------- --------
    -------- A Basic counter, set it to 0, dont change it. --------
    -------- -------------------------------------- --------
    Set VariableSet LS_Counter[LS_Index[2]] = 0.00
    -------- -------------------------------------- --------
    -------- Here we have how many seconds the caster should be hidden --------
    -------- For me I've chosen this formula so it will be multi-leveled so I can upload this spell :) --------
    -------- -------------------------------------- --------
    Set VariableSet LS_EndCounter[LS_Index[2]] = (2.50 - (0.50 x (Real((Level of (Ability being cast) for (Triggering unit))))))
    -------- -------------------------------------- --------
    -------- Here we hide the unit --------
    -------- -------------------------------------- --------
    Unit - Hide (Triggering unit)
    -------- -------------------------------------- --------
    -------- Pause the unit for removing the bug that comes up when using move instantly action --------
    -------- -------------------------------------- --------
    Unit - Pause (Triggering unit)
    -------- -------------------------------------- --------
    -------- To remove negative buffs and dots, we make it invurnable to be sure that the spell dont bug. --------
    -------- -------------------------------------- --------
    Unit - Make (Triggering unit) Invulnerable
    -------- -------------------------------------- --------
    -------- to make it look a little better we create a special effect on our caster --------
    -------- so we set one LS point again but not with an indexed, we make an index above the noraml --------
    -------- -------------------------------------- --------
    Set VariableSet LS_Point[LS_Index[8]] = (Position of (Triggering unit))
    -------- -------------------------------------- --------
    -------- and then we create the special effect righty after --------
    -------- and destroy it after --------
    -------- -------------------------------------- --------
    Special Effect - Create a special effect at LS_Point[LS_Index[8]] using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
    Special Effect - Destroy (Last created special effect)
    -------- -------------------------------------- --------
    -------- and some leak removing --------
    -------- -------------------------------------- --------
    Custom script: call RemoveLocation(udg_LS_Point[udg_LS_Index[8]])
    -------- -------------------------------------- --------
    -------- Move on to the LS Loop trigger please :) --------
    -------- -------------------------------------- --------
Here we have a loop, I've set the periodic timer to 0.10 cause I didnt want it so precise but change it to a lower value and remember to change the value in the counter + value in the actions. Here we also used for each inter index[3] 1 to index [2]
LS Loop
  Events
    Time - Every 0.10 seconds of game time
  Conditions
  Actions
    -------- -------------------------------------- --------
    For each (Integer LS_Index[3]) from 1 to LS_Index[2], do (Actions)
      Loop - Actions
        -------- -------------------------------------- --------
        -------- An if/then/else --------
        -------- to check the counters --------
        -------- -------------------------------------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            LS_Counter[LS_Index[3]] Less than LS_EndCounter[LS_Index[3]]
          Then - Actions
            -------- -------------------------------------- --------
            -------- if it isnt above the end value, we + value the counter --------
            -------- -------------------------------------- --------
            Set VariableSet LS_Counter[LS_Index[3]] = (LS_Counter[LS_Index[3]] + 0.10)
            -------- -------------------------------------- --------
          Else - Actions
            -------- -------------------------------------- --------
        -------- -------------------------------------- --------
        -------- Here we have an if/then/else that checks --------
        -------- if the counter got above the end value --------
        -------- -------------------------------------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            LS_Counter[LS_Index[3]] Greater than or equal to LS_EndCounter[LS_Index[3]]
          Then - Actions
            -------- -------------------------------------- --------
            -------- if it reached --------
            -------- we move our hero to our point --------
            -------- -------------------------------------- --------
            Unit - Move LS_Caster[LS_Index[3]] instantly to LS_Point[LS_Index[3]]
            -------- -------------------------------------- --------
            -------- a simple special effect CHANGEABLE --------
            -------- and destroying it of course thought I do not like to set this easy shit into a variable --------
            -------- so you can just change it here --------
            -------- -------------------------------------- --------
            Special Effect - Create a special effect at LS_Point[LS_Index[3]] using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
            Special Effect - Destroy (Last created special effect)
            -------- -------------------------------------- --------
            -------- Leak removing --------
            -------- -------------------------------------- --------
            Custom script: call RemoveLocation(udg_LS_Point[udg_LS_Index[3]])
            -------- -------------------------------------- --------
            -------- and here we set our caster back, making him vurnable, unhidden and unpaused --------
            -------- -------------------------------------- --------
            Unit - Unhide LS_Caster[LS_Index[3]]
            Unit - Make LS_Caster[LS_Index[3]] Vulnerable
            Unit - Unpause LS_Caster[LS_Index[3]]
            -------- -------------------------------------- --------
            -------- Also I wanna select the hero so you can move it fast away and dont have to select it again --------
            -------- -------------------------------------- --------
            Selection - Select LS_Caster[LS_Index[3]] for (Owner of LS_Caster[LS_Index[3]])
            -------- -------------------------------------- --------
            -------- Here we - value the index [1] --------
            -------- cause one of our spells just have ended --------
            -------- as I explained before --------
            -------- and after we set it -1 we check if it reached 0 --------
            -------- if it has, we turn off our trigger --------
            -------- no point with a trigger that is running but does nothing --------
            -------- -------------------------------------- --------
            Set VariableSet LS_Index[1] = (LS_Index[1] - 1)
            -------- -------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                LS_Index[1] Equal to 0
              Then - Actions
                -------- -------------------------------------- --------
                -------- also if index [1] is 0 we need to nullify the index [2] --------
                -------- -------------------------------------- --------
                Set VariableSet LS_Index[2] = 0
                -------- -------------------------------------- --------
                -------- turning off trigger --------
                -------- -------------------------------------- --------
                Trigger - Turn off (This trigger)
                -------- -------------------------------------- --------
              Else - Actions
                -------- -------------------------------------- --------
          Else - Actions
            -------- -------------------------------------- --------
This spell idea was only modified by me. Idea taken from Island defense, my favourite unit and my favourite spell with it. The earth shockwave with demonologist.

But I think this spell was a good one from the basics of MUI to a little harder of it using a dummy and a dummy spell and also raises terrain some debug groups and such.

Current learning curve: Medium
Check of the unknown variables. Copy the general dummy unit, then copy the spell and the ES dummy spell. Then you copy the trigger ES cast and ES loop. Remember to check of the corrupted lines as ability being cast. The turn on trigger line and also when you create the dummy line remember to check the points right theere. Also check the add ability line. Credit me. Have fun :)
HOW TO IMPORT ES
  Events
  Conditions
  Actions
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
ES Cast
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Earth Shockwave
  Actions
    -------- -------------------------------------- --------
    -------- The indexing check --------
    -------- -------------------------------------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ES_Index[1] Equal to 0
      Then - Actions
        Trigger - Turn on ES_Loop <gen>
      Else - Actions
    -------- -------------------------------------- --------
    -------- Here we +1 our indexes --------
    -------- -------------------------------------- --------
    -------- Index [1] --------
    -------- -------------------------------------- --------
    Set VariableSet ES_Index[1] = (ES_Index[1] + 1)
    -------- -------------------------------------- --------
    -------- -------------------------------------- --------
    -------- Index [2] --------
    -------- -------------------------------------- --------
    Set VariableSet ES_Index[2] = (ES_Index[2] + 1)
    -------- -------------------------------------- --------
    -------- The AoE of our spell --------
    -------- set it as you want to thought I recommend a value between 150 - 300 --------
    -------- -------------------------------------- --------
    Set VariableSet ES_AoE[ES_Index[2]] = 200.00
    -------- -------------------------------------- --------
    -------- Then end counter, how long the spell will last for each 0.10 = 100 range --------
    -------- -------------------------------------- --------
    Set VariableSet ES_EndCounter[ES_Index[2]] = 0.50
    -------- -------------------------------------- --------
    -------- Our damage interval, every 0.10 sec the damage will come --------
    -------- -------------------------------------- --------
    Set VariableSet ES_DamageCounter[ES_Index[2]] = 0.10
    -------- -------------------------------------- --------
    -------- Our caster and damage dealer --------
    -------- basic it will do the damage --------
    -------- -------------------------------------- --------
    Set VariableSet ES_Caster[ES_Index[2]] = (Triggering unit)
    -------- -------------------------------------- --------
    -------- a caster point used for our wave --------
    -------- -------------------------------------- --------
    Set VariableSet ES_CasterPoint[ES_Index[2]] = (Position of (Triggering unit))
    -------- -------------------------------------- --------
    -------- the chance of the targets being stunned by this spell --------
    -------- maximum 100 above it will be 100% --------
    -------- I've used this formula but you can chance it for your needs --------
    -------- -------------------------------------- --------
    Set VariableSet ES_Chance[ES_Index[2]] = (2.00 + (3.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
    -------- -------------------------------------- --------
    -------- the damage --------
    -------- our damage dealer will do --------
    -------- got a formula but change it as you want to --------
    -------- -------------------------------------- --------
    Set VariableSet ES_Damage[ES_Index[2]] = (125.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))
    -------- -------------------------------------- --------
    -------- a target point only used for the angle after --------
    -------- -------------------------------------- --------
    Set VariableSet ES_TargetPoint[ES_Index[2]] = (Target point of ability being cast)
    -------- -------------------------------------- --------
    -------- here we set the angle to our target point --------
    Set VariableSet ES_Angle[ES_Index[2]] = (Angle from ES_CasterPoint[ES_Index[2]] to ES_TargetPoint[ES_Index[2]])
    -------- -------------------------------------- --------
    -------- and now as we dont have any use of our target point anymore --------
    -------- we remove our target point --------
    -------- -------------------------------------- --------
    Custom script: call RemoveLocation(udg_ES_TargetPoint[udg_ES_Index[2]])
    -------- -------------------------------------- --------
    -------- move on to the loop --------
    -------- -------------------------------------- --------
Here we have the loop, I'm going to explain as good as I can
ES Loop
  Events
    Time - Every 0.02 seconds of game time
  Conditions
  Actions
    -------- -------------------------------------- --------
    -------- The MUI each --------
    -------- -------------------------------------- --------
    For each (Integer ES_Index[3]) from 1 to ES_Index[2], do (Actions)
      Loop - Actions
        -------- -------------------------------------- --------
        -------- We set an offset counter that will rise so we can use it in another formula --------
        -------- -------------------------------------- --------
        Set VariableSet ES_OffestCounter[ES_Index[3]] = (ES_OffestCounter[ES_Index[3]] + 1)
        -------- -------------------------------------- --------
        -------- if/then/else checking our damage counter --------
        -------- if it's less we just do the special effect --------
        -------- -------------------------------------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ES_Counter[ES_Index[3]] Less than ES_DamageCounter[ES_Index[3]]
          Then - Actions
            -------- -------------------------------------- --------
            -------- we rise the counter so it can reach the damage counter later --------
            -------- -------------------------------------- --------
            Set VariableSet ES_Counter[ES_Index[3]] = (ES_Counter[ES_Index[3]] + 0.02)
            -------- -------------------------------------- --------
            -------- also we have our checker that checks if the spell should end --------
            -------- -------------------------------------- --------
            Set VariableSet ES_Checker[ES_Index[3]] = (ES_Checker[ES_Index[3]] + 0.02)
            -------- -------------------------------------- --------
            -------- we set a temp point with 10 range offset * the integer --------
            -------- thats a small formula of mine --------
            -------- I use it for every wave spell thought many other uses it also --------
            -------- I dont take credit for it --------
            -------- -------------------------------------- --------
            Set VariableSet ES_TempPoint[ES_Index[3]] = (ES_CasterPoint[ES_Index[3]] offset by (10.00 x (Real(ES_OffestCounter[ES_Index[3]]))) towards ES_Angle[ES_Index[3]] degrees.)
            -------- -------------------------------------- --------
            -------- here we create our special effect --------
            -------- it's jsut a normal terrain crater deform but to the other way so it will be a bump --------
            -------- -------------------------------------- --------
            Environment - Create a 0.45 second Temporary crater deformation at ES_TempPoint[ES_Index[3]] with radius ES_AoE[ES_Index[3]] and depth -100.00
            -------- -------------------------------------- --------
            -------- and then we remove our point --------
            -------- -------------------------------------- --------
            Custom script: call RemoveLocation(udg_ES_TempPoint[udg_ES_Index[3]])
            -------- -------------------------------------- --------
          Else - Actions
            -------- -------------------------------------- --------
        -------- -------------------------------------- --------
        -------- if the counter reached our damage --------
        -------- we do the damage below --------
        -------- -------------------------------------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ES_Counter[ES_Index[3]] Greater than or equal to ES_DamageCounter[ES_Index[3]]
          Then - Actions
            -------- -------------------------------------- --------
            -------- we null our counter so we can reuse it --------
            -------- -------------------------------------- --------
            Set VariableSet ES_Counter[ES_Index[3]] = 0.00
            -------- -------------------------------------- --------
            -------- and we + our checker also --------
            -------- -------------------------------------- --------
            Set VariableSet ES_Checker[ES_Index[3]] = (ES_Checker[ES_Index[3]] + 0.02)
            -------- -------------------------------------- --------
            -------- we set our temporary point again --------
            -------- -------------------------------------- --------
            Set VariableSet ES_TempPoint[ES_Index[3]] = (ES_CasterPoint[ES_Index[3]] offset by (10.00 x (Real(ES_OffestCounter[ES_Index[3]]))) towards ES_Angle[ES_Index[3]] degrees.)
            -------- -------------------------------------- --------
            -------- the terrain deform of course --------
            -------- -------------------------------------- --------
            Environment - Create a 0.45 second Temporary crater deformation at ES_TempPoint[ES_Index[3]] with radius ES_AoE[ES_Index[3]] and depth -100.00
            -------- -------------------------------------- --------
            -------- and here we do a temporary group --------
            -------- here you can change the matching conditions but these are pretty standard --------
            -------- -------------------------------------- --------
            Set VariableSet ES_TempGroup[ES_Index[3]] = (Units within ES_AoE[ES_Index[3]] of ES_TempPoint[ES_Index[3]] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of ES_Caster[ES_Index[3]]).) Equal to True)))).)
            -------- -------------------------------------- --------
            -------- leak removing --------
            -------- -------------------------------------- --------
            Custom script: call RemoveLocation(udg_ES_TempPoint[udg_ES_Index[3]])
            -------- -------------------------------------- --------
            -------- here pick all our units in our temporary group --------
            -------- and we check with an if/then/else --------
            -------- to see if they are in our debug group --------
            -------- if they are we do nothing cause we dont want to damage them twice --------
            -------- -------------------------------------- --------
            Unit Group - Pick every unit in ES_TempGroup[ES_Index[3]] and do (Actions)
              Loop - Actions
                -------- -------------------------------------- --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ((Picked unit) is in ES_DebugGroup[ES_Index[3]].) Equal to False
                  Then - Actions
                    -------- -------------------------------------- --------
                    -------- but when we damage them --------
                    -------- we add them to the debug group so it cant be hit more then twice --------
                    -------- -------------------------------------- --------
                    Unit Group - Add (Picked unit) to ES_DebugGroup[ES_Index[3]]
                    -------- -------------------------------------- --------
                    -------- and here we do our damage with our damage formula --------
                    -------- change the damage type and attack type if you want something else --------
                    -------- -------------------------------------- --------
                    Unit - Cause ES_Caster[ES_Index[3]] to damage (Picked unit), dealing ES_Damage[ES_Index[3]] damage of attack type Spells and damage type Demolition
                    -------- -------------------------------------- --------
                    -------- here we check about our chance --------
                    -------- so if it is true, then we do our stun part --------
                    -------- else we do nothing --------
                    -------- -------------------------------------- --------
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Random real number between 0.00 and 100.00) Less than or equal to ES_Chance[ES_Index[3]]
                      Then - Actions
                        -------- -------------------------------------- --------
                        -------- set the temp point once again --------
                        -------- now at the positon of our picked units --------
                        -------- -------------------------------------- --------
                        Set VariableSet ES_TempPoint[ES_Index[3]] = (Position of (Picked unit))
                        -------- -------------------------------------- --------
                        -------- create a dummy --------
                        -------- that is going to cast the spell --------
                        -------- REMEMBER TO FIX THIS LINE --------
                        -------- cause it usally gets broken --------
                        -------- -------------------------------------- --------
                        Unit - Create 1.General Dummy for (Owner of ES_Caster[ES_Index[3]]) at ES_TempPoint[ES_Index[3]] facing Default building facing degrees
                        -------- -------------------------------------- --------
                        -------- add a timer so the unit will be removed --------
                        -------- -------------------------------------- --------
                        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                        -------- -------------------------------------- --------
                        -------- add the dummy spell aka the stun dummy --------
                        -------- -------------------------------------- --------
                        Unit - Add ES Dummy to (Last created unit)
                        -------- -------------------------------------- --------
                        -------- and then at last we order it to cast the spell --------
                        -------- -------------------------------------- --------
                        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt.(Picked unit)
                        -------- -------------------------------------- --------
                        -------- and leak removing once again --------
                        -------- -------------------------------------- --------
                        Custom script: call RemoveLocation(udg_ES_TempPoint[udg_ES_Index[3]])
                        -------- -------------------------------------- --------
                      Else - Actions
                        -------- -------------------------------------- --------
                  Else - Actions
                    -------- -------------------------------------- --------
            -------- -------------------------------------- --------
            -------- then we destroy our temporary group so we can use it again --------
            -------- also leak removing --------
            -------- -------------------------------------- --------
            Custom script: call DestroyGroup(udg_ES_TempGroup[udg_ES_Index[3]])
            -------- -------------------------------------- --------
          Else - Actions
            -------- -------------------------------------- --------
        -------- -------------------------------------- --------
        -------- here we will use our checker --------
        -------- that checks if it reached the end counter so we can turn off the spell --------
        -------- -------------------------------------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ES_Checker[ES_Index[3]] Greater than or equal to ES_EndCounter[ES_Index[3]]
          Then - Actions
            -------- -------------------------------------- --------
            -------- if it reached --------
            -------- we -1 the index [1] --------
            -------- -------------------------------------- --------
            Set VariableSet ES_Index[1] = (ES_Index[1] - 1)
            -------- -------------------------------------- --------
            -------- removes our caster point and destroys our debuggroup --------
            -------- -------------------------------------- --------
            Custom script: call RemoveLocation(udg_ES_CasterPoint[udg_ES_Index[3]])
            Custom script: call DestroyGroup(udg_ES_DebugGroup[udg_ES_Index[3]])
            -------- -------------------------------------- --------
            -------- also we check if the index [1] reached 0 --------
            -------- if it has, we turn of the trigger --------
            -------- -------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ES_Index[1] Equal to 0
              Then - Actions
                -------- -------------------------------------- --------
                -------- also if it is 0 we null index [2] --------
                -------- -------------------------------------- --------
                Set VariableSet ES_Index[2] = 0
                -------- -------------------------------------- --------
                -------- and turning off the trigger --------
                -------- -------------------------------------- --------
                Trigger - Turn off (This trigger)
                -------- -------------------------------------- --------
              Else - Actions
                -------- -------------------------------------- --------
          Else - Actions
            -------- -------------------------------------- --------
Alright I know this is not the best original spell and but the thing about it is that I've made a system for it, so you can attach it to anyspell you want and adjust it how you want and it will still work thought the base damage thing is out of function, will repair it when I got time for it.

Also the spell isn't very hard, it's very simple but like I said, it's a system. So instead of medium level I've set this one to hard.

Current learning curve level: Hard

Apply This to your spell
  Events
  Conditions
  Actions
    -------- Here we set if the ohmi slash should hit random units or just one single target unit --------
    -------- I've set it to false, meaning it will only hit our current target --------
    Set VariableSet OSS_RandomBoolean = False
    -------- The second below is the AoE --------
    -------- It's useless if the Boolean above is false --------
    -------- If it's true, it will pick any unit after hitting the target in a random range of the set AoE --------
    Set VariableSet OSS_AoE = 0.00
    -------- The caster also equal to damage dealer if you set the damage boolean (read about it below) --------
    Set VariableSet OSS_Caster = (Triggering unit)
    -------- The target unit of course, nothing special --------
    Set VariableSet OSS_Target = (Target unit of ability being cast)
    -------- the damage will be triggered thats because this one is true --------
    -------- also I made a failed attempt to try to make damage from your base damage --------
    -------- thats why this boolean is here --------
    Set VariableSet OSS_DmgBoolean = True
    -------- The damage if boolean above is true, damage dealer is the caster variable --------
    Set VariableSet OSS_Dmg = (100.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))
    -------- the speed between every slash, recommended to not set below 0.09 --------
    Set VariableSet OSS_Speed = 0.10
    -------- the target point of the current target, basic --------
    Set VariableSet OSS_TargetPoint = (Position of (Target unit of ability being cast))
    -------- if the damage boolean is true, now we set the damage attack type, in this case spells --------
    -------- wont be used if you set the damage boolean to false --------
    Set VariableSet OSS_AtkType = Spells
    -------- the current damage type --------
    -------- usally doesnt affect anything if you set it to normal, fire or whatever you want --------
    -------- but some does so be careful! :) --------
    Set VariableSet OSS_DamageType = Sonic
    -------- here we set the special effect --------
    -------- usally get to be a trail after the hero --------
    -------- set it to empty string if you dont want a trail --------
    Set VariableSet OSS_SP = Abilities\Spells\NightElf\FaerieDragonInvis\FaerieDragon_Invis.mdl
    -------- here we set the attachpoint where we attach the special effect --------
    -------- REMEMBER! Weapon only exists on hero units!!! --------
    -------- use hand right or hand left for normal units! --------
    Set VariableSet OSS_AttachPoint = weapon
    -------- The name of the animation the hero will do, I've chosen attack slam cause I've chosen the blademaster --------
    -------- change it as you want too --------
    Set VariableSet OSS_Animation = attack slam
    -------- Here we set the amount of slashes we want --------
    -------- set it to the value you want to thought remember the timer between each slash, so if you set it to 10 --------
    -------- it will last for a second and be yes pretty overpowered with 10 strikes --------
    -------- and 1 sec invurnable --------
    Set VariableSet OSS_Slash = (1 + (2 x (Level of (Ability being cast) for (Triggering unit))))
    -------- -------------------------------------- --------
    -------- here we set the special effect for every time the unit moves it will create a small special effect at the point --------
    -------- -------------------------------------- --------
    Set VariableSet OSS_BlinkSP = Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
    -------- -------------------------------------- --------
    -------- Now we fixed our test spell values, now over the the set values trigger --------
    -------- -------------------------------------- --------
    Trigger - Run OS_Set_Values <gen> (ignoring conditions)
    Custom script: call RemoveLocation(udg_OSS_TargetPoint)
How to import this system: First check of the preferences all variables create bla bla. Then you copy in the OS Set Values trigger and the OS System trigger, fix the broken turn on trigger line. Use Apply this to your spell actions to apply the spell to your needs. Credit me. Have fun! :)
HOW TO IMPORT OS
  Events
  Conditions
  Actions
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
    -------- READ THE TRIGGER COMMENT HEADER ABOVE! --------
OS Test Spell
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Ohmi Slash
  Actions
    -------- Here we set if the ohmi slash should hit random units or just one single target unit --------
    -------- I've set it to false, meaning it will only hit our current target --------
    Set VariableSet OSS_RandomBoolean = False
    -------- The second below is the AoE --------
    -------- It's useless if the Boolean above is false --------
    -------- If it's true, it will pick any unit after hitting the target in a random range of the set AoE --------
    Set VariableSet OSS_AoE = 0.00
    -------- The caster also equal to damage dealer if you set the damage boolean (read about it below) --------
    Set VariableSet OSS_Caster = (Triggering unit)
    -------- The target unit of course, nothing special --------
    Set VariableSet OSS_Target = (Target unit of ability being cast)
    -------- the damage will be triggered thats because this one is true --------
    -------- also I made a failed attempt to try to make damage from your base damage --------
    -------- thats why this boolean is here --------
    Set VariableSet OSS_DmgBoolean = True
    -------- The damage if boolean above is true, damage dealer is the caster variable --------
    Set VariableSet OSS_Dmg = (100.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))
    -------- the speed between every slash, recommended to not set below 0.09 --------
    Set VariableSet OSS_Speed = 0.10
    -------- the target point of the current target, basic --------
    Set VariableSet OSS_TargetPoint = (Position of (Target unit of ability being cast))
    -------- if the damage boolean is true, now we set the damage attack type, in this case spells --------
    -------- wont be used if you set the damage boolean to false --------
    Set VariableSet OSS_AtkType = Spells
    -------- the current damage type --------
    -------- usally doesnt affect anything if you set it to normal, fire or whatever you want --------
    -------- but some does so be careful! :) --------
    Set VariableSet OSS_DamageType = Sonic
    -------- here we set the special effect --------
    -------- usally get to be a trail after the hero --------
    -------- set it to empty string if you dont want a trail --------
    Set VariableSet OSS_SP = Abilities\Spells\NightElf\FaerieDragonInvis\FaerieDragon_Invis.mdl
    -------- here we set the attachpoint where we attach the special effect --------
    -------- REMEMBER! Weapon only exists on hero units!!! --------
    -------- use hand right or hand left for normal units! --------
    Set VariableSet OSS_AttachPoint = weapon
    -------- The name of the animation the hero will do, I've chosen attack slam cause I've chosen the blademaster --------
    -------- change it as you want too --------
    Set VariableSet OSS_Animation = attack slam
    -------- Here we set the amount of slashes we want --------
    -------- set it to the value you want to thought remember the timer between each slash, so if you set it to 10 --------
    -------- it will last for a second and be yes pretty overpowered with 10 strikes --------
    -------- and 1 sec invurnable --------
    Set VariableSet OSS_Slash = (1 + (2 x (Level of (Ability being cast) for (Triggering unit))))
    -------- -------------------------------------- --------
    -------- here we set the special effect for every time the unit moves it will create a small special effect at the point --------
    -------- -------------------------------------- --------
    Set VariableSet OSS_BlinkSP = Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
    -------- -------------------------------------- --------
    -------- Now we fixed our test spell values, now over the the set values trigger --------
    -------- -------------------------------------- --------
    Trigger - Run OS_Set_Values <gen> (ignoring conditions)
    Custom script: call RemoveLocation(udg_OSS_TargetPoint)
In this trigger, we store our current values from our apply this to your spell variables into indexed variables that will be used in the system, basic all the variables are the same except the index ones which are made for MUI that you read in the other spells. But I'll explain anyway in this trigger :)

OS Set Values
  Events
  Conditions
  Actions
    -------- Here we check if our index is 0 --------
    -------- if it is we turn on our "system" trigger --------
    -------- -------------------------------------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        OS_Index[1] Equal to 0
      Then - Actions
        Trigger - Turn on OS_System <gen>
      Else - Actions
    -------- -------------------------------------- --------
    -------- then we +1 the first index so it wont be 0 and for each spell it increases --------
    -------- and decreases when it ends in the system trigger --------
    Set VariableSet OS_Index[1] = (OS_Index[1] + 1)
    -------- here we store how many spells that are active --------
    -------- so we set it to +1 because we want our spell to be counted too --------
    Set VariableSet OS_Index[2] = (OS_Index[2] + 1)
    -------- -------------------------------------- --------
    -------- ---- STORE THE SETTINGS ----- --------
    -------- -------------------------------------- --------
    -------- Here we store our animation --------
    Set VariableSet OS_Animation[OS_Index[2]] = OSS_Animation
    -------- - | | - our aoe --------
    Set VariableSet OS_AoE[OS_Index[2]] = OSS_AoE
    -------- - | | - our attack type --------
    Set VariableSet OS_AtkType[OS_Index[2]] = OSS_AtkType
    -------- - | | - our sp attachpoint --------
    Set VariableSet OS_AttachPoint[OS_Index[2]] = OSS_AttachPoint
    -------- - | | - our caster --------
    Set VariableSet OS_Caster[OS_Index[2]] = OSS_Caster
    -------- - | | - our damage type --------
    Set VariableSet OS_DamageType[OS_Index[2]] = OSS_DamageType
    -------- - | | - our damage --------
    Set VariableSet OS_Dmg[OS_Index[2]] = OSS_Dmg
    -------- - | | - our damage boolean thought not necessary --------
    Set VariableSet OS_DmgBoolean[OS_Index[2]] = OSS_DmgBoolean
    -------- we store a random angle --------
    Set VariableSet OS_RandomAngle[OS_Index[2]] = (Random angle)
    -------- - | | - our random boolean --------
    Set VariableSet OS_RandomBoolean[OS_Index[2]] = OSS_RandomBoolean
    -------- - | | - our store some reals that we're going to check in the system trigger --------
    Set VariableSet OS_RealCheck[OS_Index[2]] = 0.00
    Set VariableSet OS_RealCounter[OS_Index[2]] = 0.00
    -------- - | | - our amount of slashes --------
    Set VariableSet OS_Slash[OS_Index[2]] = OSS_Slash
    -------- - | | - our slashing speed aka the speed between each slash --------
    Set VariableSet OS_SlashingSpeed[OS_Index[2]] = OSS_Speed
    -------- - | | - our maximum slashing time --------
    -------- after this time the spell will be turned off --------
    Set VariableSet OS_SlashingTime[OS_Index[2]] = (OSS_Speed x (Real(OSS_Slash)))
    -------- - | | - our current target --------
    Set VariableSet OS_Target[OS_Index[2]] = OSS_Target
    -------- and the position of the target --------
    Set VariableSet OS_TargetPoint[OS_Index[2]] = OSS_TargetPoint
    -------- here we set a point which makes our caster not get stuck with the target --------
    -------- and it will look like it jumps around the target --------
    Set VariableSet OS_TempPoint = (OS_TargetPoint[OS_Index[2]] offset by 100.00 towards OS_RandomAngle[OS_Index[2]] degrees.)
    -------- - | | - our special effect that weƤll use on our attachpoint --------
    Special Effect - Create a special effect attached to the OS_AttachPoint[OS_Index[2]] of OS_Caster[OS_Index[2]] using OSS_SP
    Set VariableSet OS_SP[OS_Index[2]] = (Last created special effect)
    -------- -------------------------------------- --------
    -------- the blink effect --------
    -------- -------------------------------------- --------
    Set VariableSet OS_BlinkEffect[OS_Index[2]] = OSS_BlinkSP
    -------- -------------------------------------- --------
    -------- ---- END STORE THE SETTINGS ----- --------
    -------- -------------------------------------- --------
    -------- we set a point where we gonna use the blink effect --------
    -------- -------------------------------------- --------
    Set VariableSet OS_SPPoint = (Position of OS_Caster[OS_Index[2]])
    -------- -------------------------------------- --------
    -------- we create our blink effect --------
    -------- and destroy it ofc --------
    -------- -------------------------------------- --------
    Special Effect - Create a special effect at OS_TargetPoint[OS_Index[6]] using OS_BlinkEffect[OS_Index[2]]
    Special Effect - Destroy (Last created special effect)
    -------- -------------------------------------- --------
    -------- leak removing --------
    -------- -------------------------------------- --------
    Custom script: call RemoveLocation(udg_OS_SPPoint)
    -------- -------------------------------------- --------
    -------- We pause our caster --------
    Unit - Pause OS_Caster[OS_Index[2]]
    -------- and make him invurnable ofc --------
    Unit - Make OS_Caster[OS_Index[2]] Invulnerable
    -------- and moving him to our temporary point --------
    Unit - Move OS_Caster[OS_Index[2]] instantly to OS_TempPoint, facing OS_TargetPoint[OS_Index[2]]
    -------- -------------------------------------- --------
    -------- Leak removing --------
    Custom script: call RemoveLocation(udg_OS_TargetPoint[udg_OS_Index[2]])
    Custom script: call RemoveLocation(udg_OS_TempPoint)
    -------- -------------------------------------- --------
    -------- This was just a test but it turned out pretty good :) --------
    Animation - Change OS_Caster[OS_Index[2]]'s animation speed to 150.00% of its original speed
    -------- -------------------------------------- --------
    -------- here we check our boolean --------
    -------- if it's true --------
    -------- we do our triggered damage --------
    -------- or we do our own damage but that's my fail --------
    -------- cause it dont work because we move units or paused it or something --------
    -------- will figure out the bug or fix it very soon :) got an idea --------
    -------- -------------------------------------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        OS_DmgBoolean[OS_Index[2]] Equal to True
      Then - Actions
        -------- -------------------------------------- --------
        -------- we play our cool animation --------
        -------- so the spell will look much better --------
        Animation - Play OS_Caster[OS_Index[2]]'s OS_Animation[OS_Index[2]] animation
        -------- and we do our damage --------
        -------- that we set in our test spell trigger --------
        Unit - Cause OS_Caster[OS_Index[2]] to damage OS_Target[OS_Index[2]], dealing OS_Dmg[OS_Index[2]] damage of attack type OS_AtkType[OS_Index[2]] and damage type OS_DamageType[OS_Index[2]]
        -------- -------------------------------------- --------
      Else - Actions
        -------- -------------------------------------- --------
        -------- FAIL PART --------
        -------- I did the animation --------
        Animation - Play OS_Caster[OS_Index[2]]'s OS_Animation[OS_Index[2]] animation
        -------- tried to make it damage by itself --------
        -------- but it didnt work out as it should be --------
        -------- so I'm mad right now but I keep it --------
        -------- because I will fix it soon got an idea as I said before --------
        Unit - Order OS_Caster[OS_Index[2]] to Attack Once.OS_Target[OS_Index[2]]
        -------- -------------------------------------- --------
    -------- -------------------------------------- --------
    -------- MOVE ON TO THE SYSTEM TRIGGER --------
    -------- -------------------------------------- --------
OS System
  Events
    Time - Every 0.01 seconds of game time
  Conditions
  Actions
    -------- -------------------------------------- --------
    -------- Here we go --------
    -------- here is the entire system --------
    -------- that we use --------
    -------- first we have this for each and every integer index --------
    -------- bla bla --------
    -------- to make it MUI --------
    For each (Integer OS_Index[3]) from 1 to OS_Index[2], do (Actions)
      Loop - Actions
        -------- as I wanted this spell to be as accurate as possible --------
        -------- I made the loop timer every 0.01 second --------
        -------- but now you wonder, how do you know the time then and why? --------
        -------- we have two reals below --------
        -------- that counts for us to make it very precise thought it dont work --------
        -------- with reals that are below 0.01 --------
        -------- -------------------------------------- --------
        -------- first we have a counter --------
        -------- it counts the time between every slash --------
        -------- and get nulled after a slashed performed and then it counts itself again --------
        -------- -------------------------------------- --------
        Set VariableSet OS_RealCounter[OS_Index[3]] = (OS_RealCounter[OS_Index[3]] + 0.01)
        -------- -------------------------------------- --------
        -------- the other real is the check reall --------
        -------- it counts up all the time --------
        -------- and dont get nulled cause you dont need to null these anyway --------
        -------- but this checks when the spell is ending --------
        -------- checking against our slash time variable --------
        -------- from our formula in the set values trigger --------
        -------- -------------------------------------- --------
        Set VariableSet OS_RealCheck[OS_Index[3]] = (OS_RealCheck[OS_Index[3]] + 0.01)
        -------- -------------------------------------- --------
        -------- our first if/then/else --------
        -------- checks if our "counter" --------
        -------- have reached our slashing speed variable aka --------
        -------- the time between our slashes --------
        -------- -------------------------------------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            OS_RealCounter[OS_Index[3]] Greater than or equal to OS_SlashingSpeed[OS_Index[3]]
          Then - Actions
            -------- -------------------------------------- --------
            -------- if it has been reached --------
            -------- we nulled it first --------
            -------- because we maybe have more slashes that we're going to use --------
            -------- -------------------------------------- --------
            Set VariableSet OS_RealCounter[OS_Index[3]] = 0.00
            -------- -------------------------------------- --------
            -------- another if/then/else --------
            -------- but this checks our random boolean --------
            -------- so if it's true --------
            -------- the random thingy starts --------
            -------- -------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                OS_RandomBoolean[OS_Index[3]] Equal to True
              Then - Actions
                -------- -------------------------------------- --------
                -------- first an random angle --------
                -------- -------------------------------------- --------
                Set VariableSet OS_RandomAngle[OS_Index[3]] = (Random angle)
                -------- -------------------------------------- --------
                -------- then we set our random group --------
                -------- here is a con --------
                -------- cause if you want the spell to hit a structure --------
                -------- then this variable fails --------
                -------- made it a little easier for myself --------
                -------- but if anyone have any use of a slash unit target spell that strikes structures --------
                -------- tell me and I will fix it when I got time --------
                -------- -------------------------------------- --------
                Set VariableSet OS_RandomGroup[OS_Index[3]] = (Random 1 units from (Units within OS_AoE[OS_Index[3]] of OS_TargetPoint[OS_Index[3]] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of OS_Caster[OS_Index[3]]).) Equal to True)))).))
                -------- -------------------------------------- --------
                -------- we pick our randomed unit --------
                -------- -------------------------------------- --------
                Unit Group - Pick every unit in OS_RandomGroup[OS_Index[3]] and do (Actions)
                  Loop - Actions
                    -------- -------------------------------------- --------
                    -------- first we set a point that will be the position of our unit --------
                    -------- -------------------------------------- --------
                    Set VariableSet OS_TargetPoint[OS_Index[3]] = (Position of (Picked unit))
                    -------- -------------------------------------- --------
                    -------- then our temporary point jsut as before --------
                    -------- -------------------------------------- --------
                    Set VariableSet OS_TempPoint = (OS_TargetPoint[OS_Index[3]] offset by 100.00 towards OS_RandomAngle[OS_Index[3]] degrees.)
                    -------- -------------------------------------- --------
                    -------- and our target atlast so we can damage it --------
                    -------- -------------------------------------- --------
                    Set VariableSet OS_Target[OS_Index[3]] = (Picked unit)
                    -------- -------------------------------------- --------
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        OS_DmgBoolean[OS_Index[3]] Equal to True
                      Then - Actions
                        -------- -------------------------------------- --------
                        -------- play our animation --------
                        -------- -------------------------------------- --------
                        Animation - Play OS_Caster[OS_Index[3]]'s OS_Animation[OS_Index[3]] animation
                        -------- -------------------------------------- --------
                        -------- and do our damage --------
                        -------- -------------------------------------- --------
                        Unit - Cause OS_Caster[OS_Index[3]] to damage OS_Target[OS_Index[3]], dealing OS_Dmg[OS_Index[3]] damage of attack type OS_AtkType[OS_Index[3]] and damage type OS_DamageType[OS_Index[3]]
                        -------- -------------------------------------- --------
                      Else - Actions
                        -------- -------------------------------------- --------
                        -------- fail part again --------
                        -------- animation --------
                        -------- -------------------------------------- --------
                        Animation - Play OS_Caster[OS_Index[3]]'s OS_Animation[OS_Index[3]] animation
                        -------- -------------------------------------- --------
                        -------- and supposed to do damage --------
                        -------- -------------------------------------- --------
                        Unit - Order OS_Caster[OS_Index[3]] to Attack Once.OS_Target[OS_Index[3]]
                        -------- -------------------------------------- --------
                -------- -------------------------------------- --------
                -------- we set a point where we gonna use the blink effect --------
                -------- -------------------------------------- --------
                Set VariableSet OS_SPPoint = (Position of OS_Caster[OS_Index[3]])
                -------- -------------------------------------- --------
                -------- we create our blink effect --------
                -------- and destroy it ofc --------
                -------- -------------------------------------- --------
                Special Effect - Create a special effect at OS_SPPoint using OS_BlinkEffect[OS_Index[3]]
                Special Effect - Destroy (Last created special effect)
                -------- -------------------------------------- --------
                -------- leak removing --------
                -------- -------------------------------------- --------
                Custom script: call RemoveLocation(udg_OS_SPPoint)
                -------- -------------------------------------- --------
                -------- here we move our unit --------
                -------- -------------------------------------- --------
                Unit - Move OS_Caster[OS_Index[3]] instantly to OS_TempPoint, facing OS_TargetPoint[OS_Index[3]]
                -------- -------------------------------------- --------
                -------- leak removing --------
                -------- -------------------------------------- --------
                Custom script: call RemoveLocation(udg_OS_TargetPoint[udg_OS_Index[3]])
                Custom script: call RemoveLocation(udg_OS_TempPoint)
                Custom script: call DestroyGroup(udg_OS_RandomGroup[udg_OS_Index[3]])
                -------- -------------------------------------- --------
              Else - Actions
                -------- -------------------------------------- --------
                -------- if the random boolean is false --------
                -------- then we do like this --------
                -------- first the random angle --------
                -------- -------------------------------------- --------
                Set VariableSet OS_RandomAngle[OS_Index[3]] = (Random angle)
                -------- -------------------------------------- --------
                -------- then the position of our target, it's still the same :) --------
                -------- but first we check if its still alive --------
                -------- because if it isnt --------
                -------- we turn off the spell --------
                -------- -------------------------------------- --------
                -------- a simple if/then/else will make this work --------
                -------- -------------------------------------- --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (OS_Target[OS_Index[3]] is alive) Equal to True
                  Then - Actions
                    -------- -------------------------------------- --------
                    -------- now if it's alive we continue with the actions --------
                    -------- setting the positon of it --------
                    -------- -------------------------------------- --------
                    Set VariableSet OS_TargetPoint[OS_Index[3]] = (Position of OS_Target[OS_Index[3]])
                    -------- -------------------------------------- --------
                    -------- and a temporary point equal to the random angle --------
                    -------- -------------------------------------- --------
                    Set VariableSet OS_TempPoint = (OS_TargetPoint[OS_Index[3]] offset by 100.00 towards OS_RandomAngle[OS_Index[3]] degrees.)
                    -------- -------------------------------------- --------
                    -------- we set a point where we gonna use the blink effect --------
                    -------- -------------------------------------- --------
                    Set VariableSet OS_TargetPoint[OS_Index[6]] = (Position of OS_Caster[OS_Index[3]])
                    -------- -------------------------------------- --------
                    -------- we create our blink effect --------
                    -------- and destroy it ofc --------
                    -------- -------------------------------------- --------
                    Special Effect - Create a special effect at OS_TargetPoint[OS_Index[6]] using OS_BlinkEffect[OS_Index[3]]
                    Special Effect - Destroy (Last created special effect)
                    -------- -------------------------------------- --------
                    -------- leak removing --------
                    -------- -------------------------------------- --------
                    Custom script: call RemoveLocation(udg_OS_TargetPoint[udg_OS_Index[6]])
                    -------- -------------------------------------- --------
                    -------- moving the caster, not a big deal --------
                    -------- -------------------------------------- --------
                    Unit - Move OS_Caster[OS_Index[3]] instantly to OS_TempPoint, facing OS_TargetPoint[OS_Index[3]]
                    -------- -------------------------------------- --------
                    -------- leak removing --------
                    -------- -------------------------------------- --------
                    Custom script: call RemoveLocation(udg_OS_TargetPoint[udg_OS_Index[3]])
                    Custom script: call RemoveLocation(udg_OS_TempPoint)
                    -------- -------------------------------------- --------
                  Else - Actions
                    -------- -------------------------------------- --------
                    -------- If it's dead we do like this, setting index 1 to -1 --------
                    -------- -------------------------------------- --------
                    Set VariableSet OS_Index[1] = (OS_Index[1] - 1)
                    -------- -------------------------------------- --------
                    -------- destroying our special effect that we attached in the start --------
                    -------- -------------------------------------- --------
                    Special Effect - Destroy OS_SP[OS_Index[3]]
                    -------- -------------------------------------- --------
                    -------- unpausing and vulnerable the hero --------
                    -------- -------------------------------------- --------
                    Unit - Unpause OS_Caster[OS_Index[3]]
                    Unit - Make OS_Caster[OS_Index[3]] Vulnerable
                    -------- -------------------------------------- --------
                    -------- change back our animation speed --------
                    -------- -------------------------------------- --------
                    Animation - Change OS_Caster[OS_Index[3]]'s animation speed to 100.00% of its original speed
                    -------- -------------------------------------- --------
                    -------- and if our index 1 equal to 0 --------
                    -------- we turn our trigger off --------
                    -------- -------------------------------------- --------
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        OS_Index[1] Equal to 0
                      Then - Actions
                        -------- -------------------------------------- --------
                        -------- nulling our index 2 --------
                        -------- -------------------------------------- --------
                        Set VariableSet OS_Index[2] = 0
                        -------- -------------------------------------- --------
                        -------- and turning off our trigger --------
                        -------- -------------------------------------- --------
                        Trigger - Turn off (This trigger)
                        -------- -------------------------------------- --------
                      Else - Actions
                        -------- -------------------------------------- --------
            -------- -------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                OS_DmgBoolean[OS_Index[3]] Equal to True
              Then - Actions
                -------- -------------------------------------- --------
                -------- play our animation --------
                -------- -------------------------------------- --------
                Animation - Play OS_Caster[OS_Index[3]]'s OS_Animation[OS_Index[3]] animation
                -------- -------------------------------------- --------
                -------- and do our damage --------
                -------- -------------------------------------- --------
                Unit - Cause OS_Caster[OS_Index[3]] to damage OS_Target[OS_Index[3]], dealing OS_Dmg[OS_Index[3]] damage of attack type OS_AtkType[OS_Index[3]] and damage type OS_DamageType[OS_Index[3]]
                -------- -------------------------------------- --------
              Else - Actions
                -------- -------------------------------------- --------
                -------- fail part again --------
                -------- animation --------
                -------- -------------------------------------- --------
                Animation - Play OS_Caster[OS_Index[3]]'s OS_Animation[OS_Index[3]] animation
                -------- -------------------------------------- --------
                -------- and supposed to do damage --------
                -------- -------------------------------------- --------
                Unit - Order OS_Caster[OS_Index[3]] to Attack Once.OS_Target[OS_Index[3]]
                -------- -------------------------------------- --------
          Else - Actions
        -------- -------------------------------------- --------
        -------- here we check our maximum slashing time --------
        -------- with our checking real --------
        -------- -------------------------------------- --------
        -------- if its greater then we turn change our index variabel --------
        -------- -------------------------------------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            OS_RealCheck[OS_Index[3]] Greater than or equal to OS_SlashingTime[OS_Index[3]]
          Then - Actions
            -------- -------------------------------------- --------
            -------- setting the index 1 to -1 --------
            -------- -------------------------------------- --------
            Set VariableSet OS_Index[1] = (OS_Index[1] - 1)
            -------- -------------------------------------- --------
            -------- removing our special effect --------
            -------- -------------------------------------- --------
            Special Effect - Destroy OS_SP[OS_Index[3]]
            -------- -------------------------------------- --------
            -------- unpausing and vulnerablize our caster --------
            -------- -------------------------------------- --------
            Unit - Unpause OS_Caster[OS_Index[3]]
            Unit - Make OS_Caster[OS_Index[3]] Vulnerable
            -------- -------------------------------------- --------
            -------- change our animation --------
            -------- -------------------------------------- --------
            Animation - Change OS_Caster[OS_Index[3]]'s animation speed to 100.00% of its original speed
            -------- -------------------------------------- --------
            -------- then we have if/then/else --------
            -------- if our index 1 is 0 we turn off our trigger --------
            -------- -------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                OS_Index[1] Equal to 0
              Then - Actions
                -------- -------------------------------------- --------
                -------- nulling our index 2 --------
                -------- -------------------------------------- --------
                Set VariableSet OS_Index[2] = 0
                -------- -------------------------------------- --------
                -------- turning off our trigger --------
                -------- -------------------------------------- --------
                Trigger - Turn off (This trigger)
                -------- -------------------------------------- --------
              Else - Actions
                -------- -------------------------------------- --------
          Else - Actions
            -------- -------------------------------------- --------
Ini
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet Regions[1] = 1Move1 <gen>
    Set VariableSet Regions[2] = 2Move1 <gen>
    Set VariableSet Regions[3] = 3Move1 <gen>
    Set VariableSet Regions[4] = 1Move2 <gen>
    Set VariableSet Regions[5] = 2Move2 <gen>
    Set VariableSet Regions[6] = 3Move2 <gen>
    Set VariableSet Regions[7] = Spawn1 <gen>
    Set VariableSet Regions[8] = Spawn2 <gen>
    Set VariableSet Regions[9] = Spawn3 <gen>
    Set VariableSet FacingPoints[1] = (Center of Regions[1])
    Set VariableSet FacingPoints[2] = (Center of Regions[2])
    Set VariableSet FacingPoints[3] = (Center of Regions[3])
    For each (Integer A) from 1 to 6, do (Actions)
      Loop - Actions
        Set VariableSet MovePoints[(Integer A)] = (Center of Regions[(Integer A)])
    For each (Integer B) from 7 to 9, do (Actions)
      Loop - Actions
        Set VariableSet SpawnPoints[((Integer B) - 6)] = (Center of Regions[(Integer B)])
    Visibility - Disable fog of war
    Visibility - Disable black mask
    Destructible - Open Iron Gate 0197 <gen>
    Destructible - Open Iron Gate 0198 <gen>
    Destructible - Open Iron Gate 0196 <gen>
    Player - Turn Gives bounty On for Player 2 (Blue)
    Game - Display to (All players) the text: Type -commands to see in-game commands!!!
Unit Move 1 1
  Events
    Unit - A unit enters Spawn1 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Unit - Order (Entering unit) to Move To.MovePoints[1]
Unit Move 1 2
  Events
    Unit - A unit enters 1Move1 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Unit - Order (Entering unit) to Move To.MovePoints[4]
Unit Move 1 3
  Events
    Unit - A unit enters 1Move2 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Set VariableSet MapLocation = (Position of (Entering unit))
    Unit - Remove (Entering unit) from the game
    Special Effect - Create a special effect at MapLocation using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
    Special Effect - Destroy (Last created special effect)
    Animation - Play Eredar Warlock 0001 <gen>'s spell slam (animationname) animation
    Set VariableSet MapUnitsCurrent = (MapUnitsCurrent - 1)
    Custom script: call RemoveLocation(udg_MapLocation)
Unit Move 2 1
  Events
    Unit - A unit enters Spawn2 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Unit - Order (Entering unit) to Move To.MovePoints[2]
Unit Move 2 2
  Events
    Unit - A unit enters 2Move1 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Unit - Order (Entering unit) to Move To.MovePoints[5]
Unit Move 2 3
  Events
    Unit - A unit enters 2Move2 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Set VariableSet MapLocation = (Position of (Entering unit))
    Unit - Remove (Entering unit) from the game
    Special Effect - Create a special effect at MapLocation using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
    Special Effect - Destroy (Last created special effect)
    Animation - Play Eredar Warlock 0002 <gen>'s spell slam (animationname) animation
    Set VariableSet MapUnitsCurrent = (MapUnitsCurrent - 1)
    Custom script: call RemoveLocation(udg_MapLocation)
Unit Move 3 1
  Events
    Unit - A unit enters Spawn3 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Unit - Order (Entering unit) to Move To.MovePoints[3]
Unit Move 3 2
  Events
    Unit - A unit enters 3Move1 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Unit - Order (Entering unit) to Move To.MovePoints[6]
Unit Move 3 3
  Events
    Unit - A unit enters 3Move2 <gen>
  Conditions
    (Owner of (Entering unit)) Equal to Player 2 (Blue)
  Actions
    Set VariableSet MapLocation = (Position of (Entering unit))
    Unit - Remove (Entering unit) from the game
    Special Effect - Create a special effect at MapLocation using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
    Special Effect - Destroy (Last created special effect)
    Animation - Play Eredar Warlock 0003 <gen>'s spell slam (animationname) animation
    Set VariableSet MapUnitsCurrent = (MapUnitsCurrent - 1)
    Custom script: call RemoveLocation(udg_MapLocation)
Spawn
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    For each (Integer A) from 1 to 3, do (Actions)
      Loop - Actions
        Unit - Create 1 Blood Elf Runner! for Player 2 (Blue) at SpawnPoints[(Integer A)] facing FacingPoints[(Integer A)]
        Special Effect - Create a special effect at SpawnPoints[(Integer A)] using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
        Special Effect - Destroy (Last created special effect)
        Set VariableSet MapCounter = (MapCounter + 1)
        Set VariableSet MapUnitsCurrent = (MapUnitsCurrent + 1)
Sp Crushing
  Events
    Time - Every 14.00 seconds of game time
  Conditions
  Actions
    For each (Integer A) from 1 to 3, do (Actions)
      Loop - Actions
        Unit - Create 1.General Dummy for Neutral Hostile at MovePoints[(Integer A)] facing Default building facing degrees
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Map SP Crushing to (Last created unit)
        Unit - Set level of Map SP Crushing for (Last created unit) to (Integer A)
        Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm.MovePoints[((Integer A) + 3)]
commands
  Events
    Player - Player 1 (Red) types a chat message containing -commands (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Display to (All players) for 30 seconds the text: -checktotal - checks total units that have spawned on the map-checkcurrent - checks the current amount of units on the map excluding yourself-turnon spawn - turns on the spawn trigger-turnoff spawn - turns off the spawn trigger
Check Total
  Events
    Player - Player 1 (Red) types a chat message containing -checktotal (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Display to (All players) for 30.00 seconds the text: (Totally Units Spawned Equal To + (String(MapCounter)))
Check current
  Events
    Player - Player 1 (Red) types a chat message containing -checkcurrent (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Display to (All players) for 30.00 seconds the text: (Amount Of Current Units Spawned Alive Equal To + (String(MapUnitsCurrent)))
turn off spawn
  Events
    Player - Player 1 (Red) types a chat message containing -turnoff spawn (stringnoformat) as An exact match
  Conditions
  Actions
    Trigger - Turn off Spawn <gen>
    Trigger - Turn off (This trigger)
    Trigger - Turn on turn_on_spawn <gen>
turn on spawn
  Events
    Player - Player 1 (Red) types a chat message containing -turnon spawn (stringnoformat) as An exact match
  Conditions
  Actions
    Trigger - Turn on Spawn <gen>
    Trigger - Turn on turn_off_spawn <gen>
    Trigger - Turn off (This trigger)
level up
  Events
    Player - Player 1 (Red) skips a cinematic sequence
  Conditions
  Actions
    Hero - Set Funny Man Is Not Funny 0004 <gen> Hero-level to ((Hero level of Funny Man Is Not Funny 0004 <gen>) + 1), Hide level-up graphics