• 🏆 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!

Rainbow FINAL

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
CGyNe.jpg


The import guide is into the map!!!

Update:
-No more custom models
-More eficiency, thanks to Bribe's Unit Indexer system
-Now easily to configure
-0% Leaks, 0% Lag, 100% Functional, 100% Configurable, 60% Crazy
•New custom models.
•New buff effects.
•Changed the heal from 160/280/420 for 4 seconds to 300/600/900 for 20 seconds.


Keywords:
AURA, NICE, SPELL, COLOR, COLORS, HIVEWORKSHOP, BLIZZLIKE, NICE, MULTICAST, CAST, SOME, ABILITY, TAUREN, DRUID, NICE, LOL, ROFL, FIGHT, BONUS, MUCH, S
Contents

Rainbow - Bribe's test map (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Required changes There are location leaks when you create dummy units Suggested changes To me it seems you could use only one dummy unit type

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

Reviewed by Maker, Rainbow FINAL, 18th Jul 2012

Required changes
  • There are location leaks when you create dummy units
Suggested changes
  • To me it seems you could use only one dummy unit type
 
Level 28
Joined
Oct 28, 2011
Messages
4,759
Here is the trigger

  • Rainbow Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Rainbow_Chance = 10
      • Set Rainbow_ChargeDuration = 3.00
  • R0001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rainbow
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rainbow_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on R0002 <gen>
        • Else - Actions
      • Set Rainbow_Index[0] = (Rainbow_Index[0] + 1)
      • Set Rainbow_Index[1] = (Rainbow_Index[1] + 1)
      • Set Rainbow_Caster[Rainbow_Index[1]] = (Triggering unit)
      • Set Rainbow_ColorPercentage[Rainbow_Index[1]] = 100.00
      • Set Rainbow_SelectedColor[Rainbow_Index[1]] = (Random integer number between 1 and 3)
      • Set Rainbow_Level[Rainbow_Index[1]] = (Level of (Ability being cast) for (Triggering unit))
      • Set Rainbow_Time[Rainbow_Index[1]] = Rainbow_ChargeDuration
      • Set Rainbow_Boolean[Rainbow_Index[1]] = True
  • R0002
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Rainbow_Index[2]) from 1 to Rainbow_Index[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Rainbow_Boolean[Rainbow_Index[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Rainbow_Time[Rainbow_Index[2]] Greater than 0.03
                  • (Rainbow_Caster[Rainbow_Index[2]] is alive) Equal to True
                  • (Rainbow_Caster[Rainbow_Index[2]] is Magic Immune) Equal to False
                • Then - Actions
                  • Set Rainbow_ColorPercentage[Rainbow_Index[2]] = (Rainbow_ColorPercentage[Rainbow_Index[2]] - ((100.00 / Rainbow_ChargeDuration) x 0.03))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Rainbow_SelectedColor[Rainbow_Index[2]] Equal to 1
                    • Then - Actions
                      • Animation - Change Rainbow_Caster[Rainbow_Index[2]]'s vertex coloring to (100.00%, Rainbow_ColorPercentage[Rainbow_Index[2]]%, Rainbow_ColorPercentage[Rainbow_Index[2]]%) with 0.00% transparency
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Rainbow_SelectedColor[Rainbow_Index[2]] Equal to 2
                        • Then - Actions
                          • Animation - Change Rainbow_Caster[Rainbow_Index[2]]'s vertex coloring to (Rainbow_ColorPercentage[Rainbow_Index[2]]%, 100.00%, Rainbow_ColorPercentage[Rainbow_Index[2]]%) with 0.00% transparency
                        • Else - Actions
                          • Animation - Change Rainbow_Caster[Rainbow_Index[2]]'s vertex coloring to (Rainbow_ColorPercentage[Rainbow_Index[2]]%, Rainbow_ColorPercentage[Rainbow_Index[2]]%, 100.00%) with 0.00% transparency
                  • Set Rainbow_Time[Rainbow_Index[2]] = (Rainbow_Time[Rainbow_Index[2]] - 0.03)
                • Else - Actions
                  • Animation - Change Rainbow_Caster[Rainbow_Index[2]]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 100) Less than Rainbow_Chance
                    • Then - Actions
                      • Unit - Create 1 Caster for (Owner of Rainbow_Caster[Rainbow_Index[2]]) at (Position of Rainbow_Caster[Rainbow_Index[2]]) facing Default building facing degrees
                      • Set TempUnit = (Last created unit)
                      • Unit - Add Rainbow [Red] to TempUnit
                      • Unit - Set level of Rainbow [Red] for TempUnit to Rainbow_Level[Rainbow_Index[2]]
                      • Unit - Order TempUnit to Special Rexxar - Battle Roar
                      • Unit - Add a 0.50 second Generic expiration timer to TempUnit
                      • Unit - Create 1 Caster for (Owner of Rainbow_Caster[Rainbow_Index[2]]) at (Position of Rainbow_Caster[Rainbow_Index[2]]) facing Default building facing degrees
                      • Set TempUnit = (Last created unit)
                      • Unit - Add Rainbow [Green] to TempUnit
                      • Unit - Set level of Rainbow [Green] for TempUnit to Rainbow_Level[Rainbow_Index[2]]
                      • Unit - Order TempUnit to Night Elf Druid Of The Claw - Rejuvenation Rainbow_Caster[Rainbow_Index[2]]
                      • Unit - Add a 0.50 second Generic expiration timer to TempUnit
                      • Unit - Create 1 Caster for (Owner of Rainbow_Caster[Rainbow_Index[2]]) at (Position of Rainbow_Caster[Rainbow_Index[2]]) facing Default building facing degrees
                      • Set TempUnit = (Last created unit)
                      • Unit - Add Rainbow [Blue] to TempUnit
                      • Unit - Set level of Rainbow [Blue] for TempUnit to Rainbow_Level[Rainbow_Index[2]]
                      • Unit - Order TempUnit to Orc Shaman - Bloodlust Rainbow_Caster[Rainbow_Index[2]]
                      • Unit - Add a 0.50 second Generic expiration timer to TempUnit
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Rainbow_SelectedColor[Rainbow_Index[2]] Equal to 1
                        • Then - Actions
                          • Unit - Create 1 Caster for (Owner of Rainbow_Caster[Rainbow_Index[2]]) at (Position of Rainbow_Caster[Rainbow_Index[2]]) facing Default building facing degrees
                          • Set TempUnit = (Last created unit)
                          • Unit - Add Rainbow [Red] to TempUnit
                          • Unit - Set level of Rainbow [Red] for TempUnit to Rainbow_Level[Rainbow_Index[2]]
                          • Unit - Order TempUnit to Special Rexxar - Battle Roar
                          • Unit - Add a 0.50 second Generic expiration timer to TempUnit
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Rainbow_SelectedColor[Rainbow_Index[2]] Equal to 2
                            • Then - Actions
                              • Unit - Create 1 Caster for (Owner of Rainbow_Caster[Rainbow_Index[2]]) at (Position of Rainbow_Caster[Rainbow_Index[2]]) facing Default building facing degrees
                              • Set TempUnit = (Last created unit)
                              • Unit - Add Rainbow [Green] to TempUnit
                              • Unit - Set level of Rainbow [Green] for TempUnit to Rainbow_Level[Rainbow_Index[2]]
                              • Unit - Order TempUnit to Night Elf Druid Of The Claw - Rejuvenation Rainbow_Caster[Rainbow_Index[2]]
                              • Unit - Add a 0.50 second Generic expiration timer to TempUnit
                            • Else - Actions
                              • Unit - Create 1 Caster for (Owner of Rainbow_Caster[Rainbow_Index[2]]) at (Position of Rainbow_Caster[Rainbow_Index[2]]) facing Default building facing degrees
                              • Set TempUnit = (Last created unit)
                              • Unit - Add Rainbow [Blue] to TempUnit
                              • Unit - Set level of Rainbow [Blue] for TempUnit to Rainbow_Level[Rainbow_Index[2]]
                              • Unit - Order TempUnit to Orc Shaman - Bloodlust Rainbow_Caster[Rainbow_Index[2]]
                              • Unit - Add a 0.50 second Generic expiration timer to TempUnit
                  • Set TempUnit = No unit
                  • Set Rainbow_Caster[Rainbow_Index[2]] = No unit
                  • Set Rainbow_Boolean[Rainbow_Index[2]] = False
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Rainbow_Boolean[Rainbow_Index[2]] Equal to False
                    • Then - Actions
                      • Set Rainbow_Index[0] = (Rainbow_Index[0] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Rainbow_Index[0] Equal to 0
                        • Then - Actions
                          • Set Rainbow_Index[1] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
 
Level 12
Joined
Nov 20, 2007
Messages
660
1.Rainbow_Index replace it with 2 variables instead of using a single one with array (it's faster).
2.Kick my ass if I'm not right but I think your recycling isn't dynamic wich is bad.
3.There are tons of leaks when you create new units (Location Leaks).
4.
  • Set TempUnit = No unit
    • Set Rainbow_Caster[Rainbow_Index[2]] = No unit
Unnecessary.
 
Top