• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Chaosphere v2.4

Chaosphere v2.4

Description: Creates a circle of chaos arond the Hexmaster. Enemies in the sphere will have a chance of receive a random negative buff at irregular intervals. The buffs have varying durations and effects. Lasts 20 seconds.

Effect List:
- Blind - Causes the target to miss on 33% of their attacks. Lasts 20 (10) seconds.
- Confusion - Causes the target to attack a random nearby allied unit.
- Hex - Turns the target into a random critter. Lasts 10 (3) seconds.
- Poison - Deals 5 damage per second. Lasts 16 (8) seconds.
- Shock - Damages target for 50 damage.
- Silence - Prevents target from using spells. Lasts 12 (4) seconds.
- Sleep - Stuns target, is awoken if damaged. Lasts 8 (4) seconds.
- Slow - Slows the target's attack speed by 25% and move speed by 60%. Lasts 16 (8) seconds.
- Voodoo Curse - Reduces the target's armor by 3 and provides vision. Last 20 (10) seconds.
- Warp - Teleports the target to random location inisde the sphere.


Triggers:
[trigger=Init]Chaosphere Init
Events
Map initialization
Conditions
Actions
Hashtable - Create a hashtable
Set chaospherehashtable = (Last created hashtable)
Set chaospherenumbereffects = 10
Set chaospherechance[1] = 15.00
Set chaospherechance[2] = 15.00
Set chaospherechance[3] = 10.00
Set chaospherechance[4] = 10.00
Set chaospherechance[5] = 10.00
Set chaospherechance[6] = 10.00
Set chaospherechance[7] = 10.00
Set chaospherechance[8] = 10.00
Set chaospherechance[9] = 5.00
Set chaospherechance[10] = 5.00
For each (Integer A) from 1 to chaospherenumbereffects, do (Actions)
Loop - Actions
Set chaospherechance[(Integer A)] = (chaospherechance[(Integer A)] + chaospherechance[((Integer A) - 1)])
Set chaospheretotalchance = (chaospheretotalchance + chaospherechance[(Integer A)])
[/trigger]
[trigger=Cast]Chaosphere Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Chaosphere
Actions
Set temppoint = (Position of (Triggering unit))
Unit Group - Add (Triggering unit) to chaospherecastinggroup
Hashtable - Save 1 as 9 of (Key (Casting unit)) in chaospherehashtable
Hashtable - Save Handle Ofchaosphereemptyugroup as 10 of (Key (Triggering unit)) in chaospherehashtable
Hashtable - Save Handle Of(Owner of (Triggering unit)) as 11 of (Key (Triggering unit)) in chaospherehashtable
Hashtable - Save 0.00 as 12 of (Key (Triggering unit)) in chaospherehashtable
Hashtable - Save (X of temppoint) as 13 of (Key (Triggering unit)) in chaospherehashtable
Hashtable - Save (Y of temppoint) as 14 of (Key (Triggering unit)) in chaospherehashtable
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Set temppoint2 = (temppoint offset by 50.00 towards (45.00 x (Real((Integer A)))) degrees)
Unit - Create 1 Chaosorb for (Owner of (Triggering unit)) at temppoint2 facing (45.00 x (Real((Integer A)))) degrees
Unit - Add a 24.00 second Generic expiration timer to (Last created unit)
Hashtable - Save Handle Of(Last created unit) as (Integer A) of (Key (Triggering unit)) in chaospherehashtable
Custom script: call RemoveLocation (udg_temppoint2)
Custom script: call RemoveLocation (udg_temppoint)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in chaospherecastinggroup) Equal to 1
Then - Actions
Trigger - Turn on Chaosphere Function <gen>
Else - Actions
[/trigger]
[trigger=Function]Chaosphere Function
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in chaospherecastinggroup and do (Actions)
Loop - Actions
Set chaospherepickedunit = (Picked unit)
Set tempinteger = (Load 9 of (Key (Picked unit)) from chaospherehashtable)
Set temppoint3 = (Point((Load 13 of (Key (Picked unit)) from chaospherehashtable), (Load 14 of (Key (Picked unit)) from chaospherehashtable)))
Set tempugroup = (Units within 500.00 of temppoint3)
Unit Group - Pick every unit in tempugroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spell Immunity for (Picked unit)) Equal to 0
tempinteger Equal to 2
((Picked unit) is dead) Equal to False
((Owner of (Picked unit)) is an enemy of (Load 11 of (Key chaospherepickedunit) in chaospherehashtable)) Equal to True
((Picked unit) is in (Load 10 of (Key chaospherepickedunit) in chaospherehashtable)) Equal to False
Then - Actions
Unit Group - Add (Picked unit) to (Load 10 of (Key chaospherepickedunit) in chaospherehashtable)
Unit Group - Add (Picked unit) to chaospheretargetgroup
Else - Actions
Unit Group - Pick every unit in (Load 10 of (Key chaospherepickedunit) in chaospherehashtable) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Level of Spell Immunity for (Picked unit)) Not equal to 0
tempinteger Not equal to 2
((Picked unit) is dead) Equal to True
((Picked unit) is in tempugroup) Equal to False
Then - Actions
Unit Group - Remove (Picked unit) from (Load 10 of (Key chaospherepickedunit) in chaospherehashtable)
Unit Group - Remove (Picked unit) from chaospheretargetgroup
Else - Actions
Custom script: call DestroyGroup (udg_tempugroup)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in chaospheretargetgroup) Greater than or equal to 1
Then - Actions
Trigger - Turn on Chaosphere Effect <gen>
Else - Actions
Trigger - Turn off Chaosphere Effect <gen>
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempinteger Equal to 1
Then - Actions
Set tempunit2 = (Load (Integer A) of (Key (Picked unit)) in chaospherehashtable)
Set temppoint = (Position of tempunit2)
Set temppoint2 = (temppoint3 offset by ((Distance between temppoint3 and temppoint) + 11.25) towards ((Angle from temppoint3 to temppoint) + 6.00) degrees)
Unit - Move tempunit2 instantly to temppoint2
Custom script: call RemoveLocation (udg_temppoint)
Custom script: call RemoveLocation (udg_temppoint2)
Else - Actions
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempinteger Equal to 2
Then - Actions
Set tempunit2 = (Load (Integer A) of (Key (Picked unit)) in chaospherehashtable)
Set temppoint = (Position of tempunit2)
Set temppoint2 = (temppoint3 offset by ((Distance between temppoint3 and temppoint) + 0.00) towards ((Angle from temppoint3 to temppoint) + 6.00) degrees)
Unit - Move tempunit2 instantly to temppoint2
Custom script: call RemoveLocation (udg_temppoint)
Custom script: call RemoveLocation (udg_temppoint2)
Else - Actions
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempinteger Equal to 3
Then - Actions
Set tempunit2 = (Load (Integer A) of (Key (Picked unit)) in chaospherehashtable)
Set temppoint = (Position of tempunit2)
Set temppoint2 = (temppoint3 offset by ((Distance between temppoint3 and temppoint) - 11.25) towards ((Angle from temppoint3 to temppoint) + 6.00) degrees)
Unit - Move tempunit2 instantly to temppoint2
Custom script: call RemoveLocation (udg_temppoint)
Custom script: call RemoveLocation (udg_temppoint2)
Else - Actions
Set tempreal = (Load 12 of (Key (Picked unit)) from chaospherehashtable)
Set tempinteger = (Load 9 of (Key chaospherepickedunit) from chaospherehashtable)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than or equal to 2.00
tempinteger Equal to 1
Then - Actions
Hashtable - Save 2 as 9 of (Key (Picked unit)) in chaospherehashtable
Unit - Create 1 Chaosphere for (Owner of (Picked unit)) at temppoint3 facing Default building facing degrees
Unit - Add a 20.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 Chaosphere for (Owner of (Picked unit)) at temppoint3 facing Default building facing degrees
Unit - Add a 20.00 second Generic expiration timer to (Last created unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than or equal to 22.00
tempinteger Equal to 2
Then - Actions
Hashtable - Save 3 as 9 of (Key (Picked unit)) in chaospherehashtable
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than or equal to 24.00
tempinteger Equal to 3
Then - Actions
Hashtable - Save 0 as 9 of (Key (Picked unit)) in chaospherehashtable
Unit Group - Remove (Picked unit) from chaospherecastinggroup
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in chaospherecastinggroup) Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in chaospherehashtable
Custom script: call DestroyGroup (LoadGroupHandleBJ(10, GetHandleIdBJ(GetEnumUnit()), udg_chaospherehashtable))
Custom script: call RemoveLocation (udg_temppoint3)
Skip remaining actions
Else - Actions
Hashtable - Save (tempreal + 0.05) as 12 of (Key (Picked unit)) in chaospherehashtable
Custom script: call RemoveLocation (udg_temppoint3)[/trigger]
[trigger=Effects]Chaosphere Effect
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in chaospherecastinggroup and do (Actions)
Loop - Actions
Set chaospherepickedunit = (Picked unit)
Unit Group - Pick every unit in (Load 10 of (Key (Picked unit)) in chaospherehashtable) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 15) Equal to 1
Then - Actions
Set temppoint = (Position of (Picked unit))
Set temppoint2 = (Point((Load 13 of (Key chaospherepickedunit) from chaospherehashtable), (Load 14 of (Key chaospherepickedunit) from chaospherehashtable)))
Unit - Create 1 Dummy for (Load 11 of (Key chaospherepickedunit) in chaospherehashtable) at temppoint facing 270.00 degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Set tempreal = (Random real number between 0.01 and chaospheretotalchance)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[0]
tempreal Less than or equal to chaospherechance[1]
Then - Actions
Set temppoint3 = (temppoint2 offset by ((Random real number between 7.00 and 20.00) x (Random real number between 7.00 and 20.00)) towards (Random angle) degrees)
Special Effect - Create a special effect at temppoint using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at temppoint3 using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
Special Effect - Destroy (Last created special effect)
Unit - Move (Picked unit) instantly to temppoint3
Custom script: call RemoveLocation (udg_temppoint3)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[1]
tempreal Less than or equal to chaospherechance[2]
Then - Actions
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Items\AIil\AIilTarget.mdl
Special Effect - Destroy (Last created special effect)
Set tempugroup = (Units within 300.00 of temppoint matching (((Matching unit) Not equal to (Picked unit)) and (((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to True)))
Unit - Order (Picked unit) to Attack (Random unit from tempugroup)
Custom script: call DestroyGroup (udg_tempugroup)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[2]
tempreal Less than or equal to chaospherechance[3]
Then - Actions
Unit - Add Voodoo Curse (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Faerie Fire (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[3]
tempreal Less than or equal to chaospherechance[4]
Then - Actions
Unit - Add Blind (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Undead Banshee - Curse (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[4]
tempreal Less than or equal to chaospherechance[5]
Then - Actions
Unit - Add Shadow Strike (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[5]
tempreal Less than or equal to chaospherechance[6]
Then - Actions
Unit - Add Shock (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[6]
tempreal Less than or equal to chaospherechance[7]
Then - Actions
Unit - Add Slow (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[7]
tempreal Less than or equal to chaospherechance[8]
Then - Actions
Unit - Add Silence (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Neutral Pit Lord - Doom (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[8]
tempreal Less than or equal to chaospherechance[9]
Then - Actions
Unit - Add Sleep (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Undead Dreadlord - Sleep (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempreal Greater than chaospherechance[9]
tempreal Less than or equal to chaospherechance[10]
Then - Actions
Unit - Add Hex (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Picked unit)
Else - Actions
Custom script: call RemoveLocation (udg_temppoint)
Custom script: call RemoveLocation (udg_temppoint2)
Else - Actions[/trigger]


Screenshot:
ChaosphereScreenie.jpg


Notes
Pros:
- The spell is MUI
- The idea is original, or atleast, I haven't seen it done before
- Runs smoothly and has some nice visual effects
- Fairly balanced as a classic level 6 ultimate
- Can add your own spells too!

Cons:
- The spell is difficult to transfer maps due to the number of dummy spells and buffs
- The triggering could probably be made more efficient


Credits:
Sphere Model by Darky29 - link


Keywords:
spell ultimate troll voodoo chaos sphere shadow hunter
Contents

Chaosphere v2.4 (Map)

Reviews
18:50, 12th Jul 2010 TriggerHappy: You've updated most of what I've asked. It still would be best if you used arrays though.

TheSpoon

Hosted Project 2PC
Level 21
Joined
Jul 16, 2007
Messages
737
Oh you mean the duration?
Hurm I didn't add a variable for that, but if you wanted to..

At the bottom of 'Chaosphere Function'
There are 3 conditions that say "tempreal is greater than 2.00" (or another number)
The first number is the setup time, (I recommend you leave that as 2.00)
The second number is the duration plus the setup time, (It is currently 22.00, so the duration is 20.00)
The last number is the duration plus the desetup time and the setup time (I recommend you have that as the duration plus 4)

I hope that helps!
 
  • Like
Reactions: Kam
Top