Spellpack 4 Elemental Spells

T

Tubba

Guest
GUI or JASS: GUI.
Lagless: Light and Dark might lag if several units cast it at once.
Leakless: Should be.
MUI: Yes, all of them (Light and Dark up to one thousand targets, but your computer will crash before you reach that, most likely)
Import Difficulty: Easy
Editing difficulty: Medium (Requires basic-moderate triggering knowledge, especially for leveling since it requires some copying and pasting)

Sorry about the really bad screenshots, I lack an F13 button, and taking screenshots with a mac is very tricky. I'd appreciate and credit anyone who would take some better


Frost Storm


The Sage channels frost energy around him to freeze approaching units. Duration and number of frost bolts sent increase as the ability is leveled up.
Screenie:
FrostStorm.png


Code:
Code:
Frost Storm
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Frost Storm
    Actions

        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.49 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for Player 1 (Red) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)


Fire Blast

The Sage summons fiery energy, creating great explosions at locations around him. They deal damage to all units within their explosion.

Screenie:
FireBlast.png

Code:
Code:
Fire Blast
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Fireblast 
    Actions
        Set Temp_Point = (Position of (Triggering unit))
        Set tempFirePoint = (Temp_Point offset by (Real((Random integer number between 100 and 1600))) towards (Real((Random integer number between 1 and 360))) degrees)
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing tempFirePoint
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Dummy Flamestrike to (Last created unit)
        Unit - Set level of Dummy Flamestrike for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
        Unit - Order (Last created unit) to Undead Dreadlord - Inferno tempFirePoint
        Custom script:   call RemoveLocation (udg_tempFirePoint)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Wait 1.00 seconds
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Set tempFirePoint = (Temp_Point offset by (Real((Random integer number between 100 and 1600))) towards (Real((Random integer number between 1 and 360))) degrees)
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing tempFirePoint
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Dummy Flamestrike to (Last created unit)
        Unit - Set level of Dummy Flamestrike for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
        Unit - Order (Last created unit) to Undead Dreadlord - Inferno tempFirePoint
        Custom script:   call RemoveLocation (udg_tempFirePoint)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Wait 1.00 seconds
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Set tempFirePoint = (Temp_Point offset by (Real((Random integer number between 100 and 1600))) towards (Real((Random integer number between 1 and 360))) degrees)
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing tempFirePoint
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Dummy Flamestrike to (Last created unit)
        Unit - Set level of Dummy Flamestrike for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
        Unit - Order (Last created unit) to Undead Dreadlord - Inferno tempFirePoint
        Custom script:   call RemoveLocation (udg_tempFirePoint)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        If ((Level of (Ability being cast) for (Triggering unit)) Equal to 1) then do (Skip remaining actions) else do (Wait 1.00 seconds)
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Set tempFirePoint = (Temp_Point offset by (Real((Random integer number between 100 and 1600))) towards (Real((Random integer number between 1 and 360))) degrees)
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing tempFirePoint
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Dummy Flamestrike to (Last created unit)
        Unit - Set level of Dummy Flamestrike for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
        Unit - Order (Last created unit) to Undead Dreadlord - Inferno tempFirePoint
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Custom script:   call RemoveLocation (udg_tempFirePoint)
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        If ((Level of (Ability being cast) for (Triggering unit)) Equal to 2) then do (Skip remaining actions) else do (Wait 1.00 seconds)
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Set tempFirePoint = (Temp_Point offset by (Real((Random integer number between 100 and 1600))) towards (Real((Random integer number between 1 and 360))) degrees)
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing tempFirePoint
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Dummy Flamestrike to (Last created unit)
        Unit - Set level of Dummy Flamestrike for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
        Unit - Order (Last created unit) to Undead Dreadlord - Inferno tempFirePoint
        Custom script:   call RemoveLocation (udg_tempFirePoint)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Wait 1.00 seconds
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Set tempFirePoint = (Temp_Point offset by (Real((Random integer number between 100 and 1600))) towards (Real((Random integer number between 1 and 360))) degrees)
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing tempFirePoint
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Dummy Flamestrike to (Last created unit)
        Unit - Set level of Dummy Flamestrike for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
        Unit - Order (Last created unit) to Undead Dreadlord - Inferno tempFirePoint
        Custom script:   call RemoveLocation (udg_tempFirePoint)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Wait 0.90 seconds
        If ((Current order of (Triggering unit)) Equal to (Order(voodoo))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Set Temp_Point = (Position of (Triggering unit))
        Set tempFirePoint = (Temp_Point offset by (Real((Random integer number between 100 and 1600))) towards (Real((Random integer number between 1 and 360))) degrees)
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing tempFirePoint
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Dummy Flamestrike to (Last created unit)
        Unit - Set level of Dummy Flamestrike for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
        Unit - Order (Last created unit) to Undead Dreadlord - Inferno tempFirePoint
        Custom script:   call RemoveLocation (udg_tempFirePoint)
        Custom script:   call RemoveLocation (udg_Temp_Point)


Discharge


The Sage releases static energy towards nearby enemies, de-buffing them, slowing them and dealing damage.

Screenie:
Discharge.png

Code:

Code:
Discharge
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Discharge
    Actions
        Set Temp_Point = (Position of (Triggering unit))
        Set tempGroupDischarge = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit Group - Pick every unit in tempGroupDischarge and do (Actions)
            Loop - Actions
                Set PickedPos = (Position of (Picked unit))
                Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at PickedPos facing Default building facing degrees
                Unit - Add Dummy Purge to (Last created unit)
                Unit - Set level of Dummy Purge for (Last created unit) to (Level of Discharge for (Triggering unit))
                Unit - Order (Last created unit) to Orc Shaman - Purge (Picked unit)
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Cause (Triggering unit) to damage (Picked unit), dealing (60.00 x (Real((Level of Discharge for (Triggering unit))))) damage of attack type Spells and damage type Lightning
                Custom script:   call RemoveLocation (udg_PickedPos)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Custom script:   call DestroyGroup (udg_tempGroupDischarge)


And, my personal favourite.

Light and Darkness


The Sage manipulates Light and Darkness into a powerful spell. By channeling them at an enemy, he can create massive amounts of energy, dealing large damage. However, streams of darkness and light leak from the spell, dealing damage or healing units nearby. Any unit, even the Sage himself, can take damage or be healed from these streams.

Screenie:
LightandDark.png

Code:

Code:
Light And Dark
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Light and Darkness
    Actions
        If (IntegerArray Equal to 1000) then do (Set IntegerArray = 0) else do (Set IntegerArray = (IntegerArray + 1))
        Set tempCaster[IntegerArray] = (Triggering unit)
        Set tempTarget[IntegerArray] = (Target unit of ability being cast)
        Set tempUnitPoint = (Position of (Target unit of ability being cast))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at tempUnitPoint facing Default building facing degrees
        Unit - Set the custom value of (Last created unit) to IntegerArray
        Unit Group - Add (Last created unit) to DummyGroup
        Custom script:   call RemoveLocation (udg_tempUnitPoint )

Code:
LightAndDarkStream
    Events
        Time - Every 0.50 seconds of game time
    Conditions
        (Number of units in DummyGroup) Greater than 0
    Actions
        Unit Group - Pick every unit in DummyGroup and do (Actions)
            Loop - Actions
                Set TrueArrayInteger = (Custom value of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((tempTarget[TrueArrayInteger] is dead) Equal to True) or ((Integer(timeLeft[TrueArrayInteger])) Greater than or equal to 20)
                    Then - Actions
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                        Set PointLnD[TrueArrayInteger] = (Position of tempTarget[TrueArrayInteger])
                        Unit - Move (Picked unit) instantly to PointLnD[TrueArrayInteger]
                        Set GroupHealorDie[TrueArrayInteger] = (Units within 600.00 of PointLnD[TrueArrayInteger] matching (((Matching unit) Not equal to tempTarget[TrueArrayInteger]) and ((Matching unit) Not equal to (Picked unit))))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Random integer number between 1 and 3) Equal to 1
                            Then - Actions
                                Set tempTargetDarkLight[TrueArrayInteger] = (Random unit from GroupHealorDie[TrueArrayInteger])
                                Set tempTargetLnDPoint[TrueArrayInteger] = (Position of tempTargetDarkLight[TrueArrayInteger])
                                Unit - Create 1 Dummy Unit for (Owner of tempCaster[TrueArrayInteger]) at tempTargetLnDPoint[TrueArrayInteger] facing tempTargetLnDPoint[TrueArrayInteger]
                                Unit - Add Dummy Light (Neutral Hostile) to (Last created unit)
                                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning tempTargetDarkLight[TrueArrayInteger]
                                Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                            Else - Actions
                                Set tempTargetDarkLight[TrueArrayInteger] = (Random unit from GroupHealorDie[TrueArrayInteger])
                              
                                Set tempTargetLnDPoint[TrueArrayInteger] = (Position of tempTargetDarkLight[TrueArrayInteger])
                                Unit - Create 1 Dummy Unit for (Owner of tempCaster[TrueArrayInteger]) at tempTargetLnDPoint[TrueArrayInteger] facing tempTargetLnDPoint[TrueArrayInteger]
                                Unit - Add Dummy Darkness (Neutral Hostile) to (Last created unit)
                                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning tempTargetDarkLight[TrueArrayInteger]
                                Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                        Set timeLeft[TrueArrayInteger] = (timeLeft[TrueArrayInteger] + 0.50)
                        Custom script:   call RemoveLocation (udg_PointLnD [udg_TrueArrayInteger] )
                        Custom script:   call RemoveLocation (udg_tempTargetLnDPoint [udg_TrueArrayInteger] )
                        Custom script:   call DestroyGroup (udg_GroupHealorDie [udg_TrueArrayInteger])

README/HOWTO:

Code:
   1. Go to the Object Editor, and copy + paste the following:

For Frost Storm: The Frost Storm Ability, the ability Dummy Frostbolt, the buff Frozen (Used by Dummy Frostbolt).
For Fire Blast: The Fire Blast ability, the ability Dummy Flamestrike.
For Discharge: The Discharge Ability, the ability Dummy Purge.
For Light and Dark: The abilities Light and Dark, Dummy Darkness and Dummy Light.

   2. Copy the triggers <<paste your spell trigger names here>>, 
      then paste them into your map.
For Frost Storm: The trigger with the same name.
For Fire Blast: The trigger with the same name.
For Discharge: The trigger with the same name.
For Light and Dark: The trigger Light and Dark as well as LightAndDarkStream.

   3. Note that Frost Storm and Fire Blast are both based on Channel, but use different Order ID:s (channel and voodoo, respectively). If you change the order ID:s
      due to for example using one of them in other spells (on the same hero), you MUST change the order stringed checked in the triggers. Otherwise, they will not work
      properly.

Notes on leveling: Frost Storm and Fire Blast require some basic trigger knowledge to level higher properly. Simply copy the last segment (Starting with
the second to last If/Then/Else which checks whether the hero is still channeling), paste it, and modify the Wait as you want to. For Frost Bolt, you also might want
to check the earlier Waits to make them exactly as you want them to. For Fire Blast, make sure you make additional levels for the Dummy Flamestrike for each level you add.

For Discharge, just change the dummy Purge and add any modifiers to the damage unit action as you want to.

For leveling Light and Dark, just modify the dummy Darkness/Light to add more levels, then add an action similar to the one in Fire Blast which levels the dummy skill accordingly to the
level of the ability being cast (To be specific, put the following action after Add ability: Set Level of Dummy Darkness/Light for (Last Created Unit) to (Level of Light and Dark
ness for tempCaster[TrueArrayInteger])

Make sure to have "Generate unknown variables" checked in Preferences.

~Thanks to Flare for showing me how to use arrays to make a spell MUI.

Like I said, the screenies aren't very good, so make sure to try out for yourself! I used the Grassy template map. Any questions or comments? Feel free to post.

~Credit isn't neccesary but appreciated (Just don't state you made them yourself ;))~
 

Attachments

  • SageSpells.w3x
    65.3 KB · Views: 725

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Um, why do you copy/paste the actions several times? Just put them in a loop.
That Fire Blast reminds me of my Meteor Shower, but your chosen effects are much better :p
 
T

Tubba

Guest
Well, by the time I made that, I didn't know a very good system to make them properly MUI, so using waits and declaring/destroying variables was my best bet. And I want them to happen once a seconds, so.
 

Flare

Stops copies me!
Reaction score
662
Just looked at the first 2 spells (low battery atm so I'll check the others after.) From what I know, they can't be MUI because I saw waits.

Also, in your Light and Darkness cast trigger, in the If/Then/Else, does settting the integer to 0 work? I never actually tried setting the array values to 0. It's unlikely that it would become a problem though since it's only set to zero after 1000 instances occur

Edit: xfire is great for screenshots. www.xfire.com to download. its main use is ingame chat, but the screenshot feature is definitely worthwhile
 
T

Tubba

Guest
You see, I declare and destroy the variables inbetween each wait. Since all the events inbetween the waits occur at once, it should indeed be MUI.


Also, as I wrote, I have a mac. XFire doesn't work on Macs.
 

Flare

Stops copies me!
Reaction score
662
Can't triggering unit be overwritten be subsequent casts, or does it act like a local variable?

I don't have a Mac, so I couldn't know that XFire doesn't work with it. Does FRAPS with Mac, and if so, can it take screenshots?

Edit: Just tried it out, the frost spell -seems- to be MUI (that caster SFX makes it hard to see when stuff happens :S). Still, using waits like that would probably be a limited way of making spells, and can only be used for AoE spells I think. Still pretty nice, don't really understand your Light and Darkness spell though
 
T

Tubba

Guest
Basically, the target acts just like if it was under a strengthened Shadow Strike. Then dummies cast Death Coil/Holy Light-like spells on surrounding units.


If you check the LnD code I actually use the same system you showed with your example map (You're ever credited in the Readme/Howto). I'll probably use a system like that in the future.


FRAPS always seemed very limited to me, I never really liked it anyway.
 

Flare

Stops copies me!
Reaction score
662
Ah so that's how Light and Darkness works. You should find an alternative to Death Coil/Holy Light though (Undead allies can't be healed by Holy Light, Living allies can't be healed by Death Coil, and similar applies to the damage effect). 2 separate acid bomb spells (one for damage, one with negative damage for heal) would be a nice way IMO

Thanks for the credits too :)
 
T

Tubba

Guest
They're based of Chain Lightning, so no worry.

Acid Bomb might be interesting though.

*Clears throat*

Erh... At very least a disapprovement, please?
 

Tinki3

Special Member
Reaction score
418
Remove those messages that are displayed in-game.
They just get annoying and were for testing purposes anyway :p

You could've used loops... everywhere... almost.
Big triggers like those are hard on the eyes, and a leak or two may sneak of-radar.

Speaking of leaks, I didn't find any, good job there.

Lastly, you might want to sort out each spell's button-position.
They shift and muddle themselves all over the show as-are.

Overall, gj.
 
T

Tubba

Guest
Ah, sorry, forgot about them.

Like I explained, ther reason for the lack of loops is that I wanted them to happen at a definitive interval, and I didn't know of the system I used in the final spell by the time I made them, so loops wouldn't have worked very well. Thanks.

Fix'd button positions and messages.


Might redo the spells someday... Erh, but not now.
 

Tinki3

Special Member
Reaction score
418
Good update.

Though, Frost Storm still displayed text:
Code:
Frost Storm
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Frost Storm
    Actions
        Set MessageNumber = 0
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Set MessageNumber = (MessageNumber + 1)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        [COLOR="Red"][B][U]Game - Display to (All players) the text: (String(MessageNumber))[/U][/B][/COLOR]
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Set MessageNumber = (MessageNumber + 1)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Set MessageNumber = (MessageNumber + 1)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.50 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Set MessageNumber = (MessageNumber + 1)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Wait (2.49 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds
        If ((Current order of (Triggering unit)) Equal to (Order(channel))) then do (Do nothing) else do (Skip remaining actions)
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Dummy Unit for Player 1 (Red) at Temp_Point facing Default building facing degrees
        Unit - Add Dummy Frost Bolt to (Last created unit)
        Set tempGroup = (Units within 600.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from tempGroup)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Custom script:   call DestroyGroup(udg_tempGroup)
Fix that and this spellpack can be approved.
 

Flare

Stops copies me!
Reaction score
662
Code:
Wait (2.49 - ((Real((Level of (Ability being cast) for (Triggering unit)))) / 2.00)) seconds

Why is the constant value in that wait only 2.49, and it's 2.5 in the rest? Also, instead of having about 10 blocks of the same code, couldn't you just do an integer loop with an If/Then/Else and if current order =/= channel, skip remaining actions.
 
T

Tubba

Guest
Well, it seems like it gives a very slight delay which causes the casting to stop before it can check for channel.

Yes, I might be able to do an integer loop, but to achieve the same effect, I would have to use waits within it. And loops don't like waits.




Aargh. How could I have missed that. Fixed.
 
1

131ackout

Guest
Not bad, even thought that im confused about the fire storm

there were just two fire strikes summoned...
 

mightylink

New Member
Reaction score
1
cool spells, just a suggestion though make those screenies jpg, i dont think others are as patiant as me waiting for them to load :p
 

darkreapers

New Member
Reaction score
6
i think ur spells r good except for fire one, the randomness doesnt really make it usefull cause you cant hit anything, but other skills r good :thup:
 

Vylatin

New Member
Reaction score
32
Adding an ability to a unit can cause lagg. Just add the ability to the dummy before and everything will be much easier.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top