• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

RehSinP's MUI Spellpack v2.4

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
If you like these I will add more!
Took me time to make it but I experimented and they work fine :).
Found a bug in Passive Heal. Fixed it :)
Added 2 more spells and fixed the hashtables for Nuke and Forceful Arrow.
Made triggers hidden so they take up less space and they can be shut :)!


Burst of Water
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to [Q] Burst of Water
  • Actions
  • Set BoW_Hero = (Casting unit)
  • Set BoW_Point[0] = (Target point of ability being cast)
  • Set BoW_Damage = 150.00
  • Set BoW_AoE = 300.00
  • Set BoW_Group = (Units within BoW_AoE of BoW_Point[0] matching (((Owner of (Matching unit)) Not equal to (Owner of BoW_Hero)) and ((((Matching unit) is An Ancient) Not equal to True) and ((((Matching unit) belongs to an ally of (Owner of BoW_Hero)) Not equal to True) and (((
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
      • Set BoW_Point[1] = (BoW_Point[0] offset by (BoW_AoE - (BoW_AoE / 10.00)) towards (60.00 x (Real((Integer A)))) degrees)
      • Set BoW_Point[2] = (BoW_Point[0] offset by 100.00 towards (60.00 x (Real((Integer A)))) degrees)
      • -------- Above sets the angles of the spell where the special effects will be placed to make this spell look cool but besure that the angles are set correctly or it could result in horrible results :(! --------
      • -------- Adding special effects to the spell makes it interesting. But don't overload on special effects! --------
      • Special Effect - Create a special effect at BoW_Point[1] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at BoW_Point[2] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Below it's very important that we do the custom scripts. It removes leaks in the spell. --------
      • -------- call RemoveLocation(udg_BoW_Point[1]) removes that point from this trigger. --------
      • -------- call RemoveLocation(udg_BoW_Point[2]) removes that point from this trigger. --------
      • Custom script: call RemoveLocation(udg_BoW_Point[1])
      • Custom script: call RemoveLocation(udg_BoW_Point[2])
    • Else - Actions
  • Unit Group - Pick every unit in BoW_Group and do (Actions)
    • Loop - Actions
      • Loop - Actions
    • Unit - Cause BoW_Hero to damage (Picked unit), dealing BoW_Damage damage of attack type Spells and damage type Sonic
    • -------- Above is how the spell will cause the damage to all units within the unit group BoW_Group. --------
    • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
    • Special Effect - Destroy (Last created special effect)
    • -------- Below we are removing more leaks just to make sure it works properly! --------
    • -------- call DestroyGroup(udg_BoW_Group) destroys that group for this trigger. --------
  • Custom script: call RemoveLocation(udg_BoW_Point[0])
  • Custom script: call DestroyGroup(udg_BoW_Group)[/hidden]
Sparkfire Skin
  • Events
  • Unit - A unit Is attacked
  • Conditions
  • (Random integer number between 1 and 100) Less than or equal to (3 x (Level of Sparkfire
  • Skin for (Attacked unit)))
  • (Level of Sparkfire Skin for (Attacked unit)) Greater than 0
  • Actions
    • Set SFS_Damage = 80.00
    • Set SFS_Hero = (Attacked unit)
    • Set SFS_Point = (Position of (Attacking unit))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
      • Then - Actions
        • Special Effect - Create a special effect at SFS_Point using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
        • Special Effect - Destroy (Last created special effect)
        • Unit - Cause SFS_Hero to damage (Attacking unit), dealing SFS_Damage damage of attack type Spells and damage type Lightning
        • Special Effect - Create a special effect at SFS_Point] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
        • Special Effect - Destroy (Last created special effect)
        • Unit - Cause SFS_Hero to damage (Attacking unit), dealing SFS_Damage damage of attack type Spells and damage type Fire
      • Else - Actions
  • Custom script: call RemoveLocation(udg_SFS_Point)[/hidden]


Passive Heal
  • Events
  • Unit - A unit Is attacked
  • Conditions
    • (Random integer number between 1 and 100) Less than or equal to (3 x (Level of Passive Heal for (Attacked unit)))
    • (Level of Passive Heal for (Attacked unit)) Greater than 0
  • Actions
    • Special Effect - Create a special effect attached to the origin of (attacked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
    • Special Effect - Destroy (Last created special effect)
    • Unit - Set life of (Attacking unit) to ((Life of (Attacked unit)) + 50.00)[/hidden]

Burning Smoke
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to [W] Burning Smoke
  • Actions
    • -------- First set your variables for the spell. --------
    • Set FE_Hero = (Casting unit)
    • Set FE_Point[0] = (Position of FE_Hero)
    • Set FE_Damage = 200.00
    • Set FE_AoE = 300.00
    • Set FE_Equation = 0.00
    • Set FE_Group = (Units within FE_AoE of FE_Point[0] matching (((Owner of (Matching unit)) Not equal to (Owner of FE_Hero)) and ((((Matching unit) is An Ancient) Not equal to True) and ((((Matching unit) belongs to an ally of (Owner of FE_Hero)) Not equal to True) and ((((Mat
    • -------- Now we have set all our required Variabels we will begin with the actions. --------
    • For each (Integer A) from 1 to 3, do (Actions)
      • Loop - Actions
        • -------- Don't ask why I used the integer thing >.<. - I was expirementing. --------
        • Set FE_Equation = (FE_Equation + (FE_AoE / 3.00))
        • For each (Integer B) from 1 to 12, do (Actions)
          • Loop - Actions
            • Set FE_Point[1] = (FE_Point[0] offset by FE_Equation towards (30.00 x (Real((Integer B)))) degrees)
            • Special Effect - Create a special effect at FE_Point[1] using Abilities\Spells\Human\FlameStrike\FlameStrikeTarget.mdl
            • Special Effect - Destroy (Last created special effect)
            • Custom script: call RemoveLocation(udg_FE_Point[1])
    • Unit Group - Pick every unit in FE_Group and do (Actions)
      • Loop - Actions
        • Unit - Cause FE_Hero to damage (Picked unit), dealing FE_Damage damage of attack type Spells and damage type Death
        • Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
        • Special Effect - Destroy (Last created special effect)
    • -------- Now we have finished the spell. Now simply remove the leaks! --------
    • -------- By the way. I changed the name of the spell. That's why the variables look different from the name (I got lazy :D) --------
    • Custom script: call RemoveLocation(udg_FE_Point[0])
    • Custom script: call DestroyGroup(udg_FE_Group)[/hidden]
Nuke
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to [Q] Nuke
  • Actions
    • Set TempPoint[1] = (Target point of ability being cast)
    • Set TempReal[1] = 400.00
    • Set TempReal[2] = ((Real((Level of (Ability being cast) for (Triggering unit)))) x 250.00)
    • Set TempReal[3] = 3.00
    • Unit - Create 1 Nuke Dummy for (Owner of (Triggering unit)) at TempPoint[1] facing (Facing of (Triggering unit)) degrees
    • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
    • Animation - Change (Last created unit)'s animation speed to 0.00% of its original speed
    • Unit Group - Add (Last created unit) to NukeGroup
    • Hashtable - Save TempReal[1] as 17 of (Key (Last created unit)) in SpellHash
    • Hashtable - Save TempReal[2] as 18 of (Key (Last created unit)) in SpellHash
    • Hashtable - Save TempReal[3] as 19 of (Key (Last created unit)) in SpellHash
    • Hashtable - Save Handle Of(Triggering unit) as 20 of (Key (Last created unit)) in SpellHash
    • Trigger - Turn on NukeLoop <gen>
    • Custom script: call RemoveLocation(udg_TempPoint[1])[/hidden]

Nukeloop
  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of units in NukeGroup) Greater than 0
      • Then - Actions
        • Unit Group - Pick every unit in NukeGroup and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Load 19 of (Key (Picked unit)) from SpellHash) Greater than 0.00
              • Then - Actions
                • Hashtable - Save ((Load 19 of (Key (Picked unit)) from SpellHash) - 1.00) as 19 of (Key (Picked unit)) in SpellHash
              • Else - Actions
                • Set TempReal[1] = (Load 18 of (Key (Picked unit)) from SpellHash)
                • Set TempUnit[1] = (Load 20 of (Key (Picked unit)) in SpellHash)
                • Set TempPoint[1] = (Position of (Picked unit))
                • Set TempGroup[1] = (Units within (Load 17 of (Key (Picked unit)) from SpellHash) of TempPoint[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of (Picked unit)))
                • Unit - Create 1 Nuke Dummy 2 for (Owner of (Picked unit)) at TempPoint[1] facing (Facing of (Picked unit)) degrees
                • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                • Animation - Play (Last created unit)'s birth animation
                • Unit - Add a 3.50 second Generic expiration timer to (Last created unit)
                • Unit Group - Pick every unit in TempGroup[1] and do (Actions)
                  • Loop - Actions
                    • Unit - Cause TempUnit[1] to damage (Picked unit), dealing TempReal[1] damage of attack type Chaos and damage type Demolition
                    • Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
                    • Special Effect - Destroy (Last created special effect)
                • Unit Group - Remove (Picked unit) from NukeGroup
                • Unit - Remove (Picked unit) from the game
                • Custom script: call RemoveLocation(udg_TempPoint[1])
                • Custom script: call DestroyGroup(udg_TempGroup[1])
      • Else - Actions
        • Trigger - Turn off (This trigger)[/hidden]


Forceful Arrow
  • Events
    • Unit - A unit Starts the effect of an ability
  • (Ability being cast) Equal to [W] Forcefull Arrow
  • Actions
    • Set TempPoint[1] = (Position of (Triggering unit))
    • Set TempPoint[3] = (Target point of ability being cast)
    • Set TempPoint[2] = (TempPoint[1] offset by 70.00 towards (Angle from TempPoint[1] to TempPoint[3]) degrees)
    • Unit - Create 1 Forcefull Arrow Dummy for (Owner of (Triggering unit)) at TempPoint[2] facing (Angle from TempPoint[1] to TempPoint[3]) degrees
    • Unit - Add a 1.10 second Generic expiration timer to (Last created unit)
    • Unit Group - Add (Last created unit) to ForceArrowGroup
    • Trigger - Turn on FA PRD <gen>
    • -------- Damage Per Knock Back --------
    • Hashtable - Save ((Real((Level of (Ability being cast) for (Triggering unit)))) x 7.00) as 10 of (Key (Last created unit)) in SpellHash
    • -------- Speed --------
    • Hashtable - Save 1000.00 as 11 of (Key (Last created unit)) in SpellHash
    • -------- AoE --------
    • Hashtable - Save 175.00 as 12 of (Key (Last created unit)) in SpellHash
    • -------- Knockback Range --------
    • Hashtable - Save 25.00 as 13 of (Key (Last created unit)) in SpellHash
    • Hashtable - Save Handle Of(Triggering unit) as 14 of (Key (Last created unit)) in SpellHash
    • For each (Integer TempInteger[1]) from 1 to 3, do (Actions)
      • Loop - Actions
        • Custom script: call RemoveLocation(udg_TempPoint[(udg_TempInteger[1])])[/hidden]

Forceful Arrowloop
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of units in ForceArrowGroup) Greater than 0
      • Then - Actions
        • Unit Group - Pick every unit in ForceArrowGroup and do (Actions)
          • Loop - Actions
            • Set TempUnit[1] = (Load 14 of (Key (Picked unit)) in SpellHash)
            • Set TempReal[1] = (Load 10 of (Key (Picked unit)) from SpellHash)
            • Set TempReal[2] = (Load 11 of (Key (Picked unit)) from SpellHash)
            • Set TempReal[2] = (TempReal[2] x 0.03)
            • Set TempReal[3] = (Load 12 of (Key (Picked unit)) from SpellHash)
            • Set TempPoint[1] = (Position of (Picked unit))
            • Set TempPoint[2] = (TempPoint[1] offset by TempReal[2] towards (Facing of (Picked unit)) degrees)
            • Set TempReal[4] = (Load 13 of (Key (Picked unit)) from SpellHash)
            • Unit - Move (Picked unit) instantly to TempPoint[2]
            • Set TempGroup[1] = (Units within TempReal[3] of TempPoint[2] matching ((((Owner of (Picked unit)) is an enemy of (Owner of (Matching unit))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and (((Mat
            • For each (Integer TempInteger[1]) from 1 to 2, do (Actions)
              • Loop - Actions
                • Custom script: call RemoveLocation(udg_TempPoint[(udg_TempInteger[1])])
            • Unit Group - Pick every unit in TempGroup[1] and do (Actions)
              • Loop - Actions
                • Unit - Cause TempUnit[1] to damage (Picked unit), dealing TempReal[1] damage of attack type Pierce and damage type Normal
                • Set TempPoint[1] = (Position of (Picked unit))
                • Set TempPoint[2] = (TempPoint[1] offset by TempReal[4] towards (Facing of TempUnit[1]) degrees)
                • Unit - Move (Picked unit) instantly to TempPoint[2]
                • For each (Integer TempInteger[1]) from 1 to 2, do (Actions)
                  • Loop - Actions
                    • Custom script: call RemoveLocation(udg_TempPoint[(udg_TempInteger[1])])
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is dead) Equal to True
              • Then - Actions
                • Unit Group - Remove (Picked unit) from ForceArrowGroup
              • Else - Actions
      • Else - Actions
        • Trigger - Turn off (This trigger)[/hidden]

Keywords:
MUI Spellpack
Contents

RehSinP's Spell Pack v1 (Map)

Reviews
12th Dec 2015 IcemanBo: For too long time as NeedsFix. Rejected. You have if/then/elses with no condition. The level of ability for unit conditions are redundant in Sparkfire skin and Passive heal. Remove them. Picking units matching Unit is...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For too long time as NeedsFix. Rejected.

Maker, 23rd Sep 2011, RehSinP's MUI Spellpack

You have if/then/elses with no condition.
The level of ability for unit conditions are redundant in Sparkfire skin and Passive heal. Remove them.
Picking units matching Unit is an ally of player not equal to true causes neutrals to be picked and damaged. Is that what you want?
Remember to flush child hashtables.
In FAPRD, don't do group is empty check every 0.03 seconds. Only when a unit is removed from the group.
 
You should post each trigger in [trigger][/trigger] tags :)

A few tips:
- Always use Triggering Unit
- Don't repeat stuff like (Last Created Unit) and (TriggeringUnit), etc..
Instead, you should store them in variables and then use them (only if you're going to repeat (Triggering Unit), (Last Created Unit), etc..)

WC3 code is unbelievably slow.
According to my tests, it's over 1000 times slower than C++
C++ can do 330000000 iterations in a second (very simple ones) (On a good PC)
Jass/GUI can do between 80000 and 100000 iterations in a second :p (Unfortunately, it stops when you're doing too many...)

That's why efficiency is the most important thing and you need to focus on it when you're coding in WC3 :D

(Sorry for the offtopic :p)
 
Ok something is wrong :p
Those triggers you posted don't show "Events" - "Conditions" - "Actions"
D:

Also, don't use (Integer A), instead, use Integer Variable (Less buggy and more efficient)

In your "Sparkfire" trigger, move the last line outside the if/then/else block.
That way, the location is always destroyed :)
 
Top