1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  6. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Footmen 6v6 Euphoric 4.0 Final.w3x
Variables
Initialization
Melee Initialization
Game modes
All Pick
All Random
Hero Selector Lay Out
Random 1
Random Bought
Random 2
Random 3
Random 4
Random 5
Random 6
Random 7
Random 8
Random 9
Random 10
Random 11
Random 12
AI
Give Heroes
Revive Heroes
Items
Ultimate Claws
Fleet Feet
Point Booster
Aegis of the Everlasting
Hero Death
Messages
Income
Income
Spawning
Spawn Units
Hero Purchase
Upgrades
Spawn Upgrades
Tier Upgrade
Tier Upgrade 2
Tier Upgrade 3
Tier Upgrade 4
Orc Upgrade 1
Orc Upgrade 2
Orc Upgrade 3
Orc Upgrade 4
NE Upgrade 1
NE Upgrade 2
NE Upgrade 3
NE Upgrade 4
Undead Upgrade 1
Undead Upgrade 2
Undead Upgrade 3
Undead Upgrade 4
Naga Upgrade 1
Naga Upgrade 2
Naga Upgrade 3
Naga Upgrade 4
Dwarf Upgrade 1
Dwarf Upgrade 2
Dwarf Upgrade 3
Dwarf Upgrade 4
Defeat
Defeat
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.

		
Name Type Is Array Initial Value
Heroes unitcode Yes
ModeSelectTime timer No
ModesPickOn boolean No true
Random integer No 1
Ranks integer Yes 20
SpawnedUnit unitcode Yes hfoo
SpawningUnits unitcode Yes h000
SpawnKills integer Yes
Default melee game initialization for all players
Melee Initialization
  Events
    Map initialization
  Conditions
  Actions
    Melee Game - Limit Heroes to 1 per Hero-type (for all players)
    Melee Game - Enforce victory/defeat conditions (for all players)
    Player Group - Pick every player in (All players) and do (Add 700 to (Picked player).Current gold)
    Player Group - Pick every player in (All players) and do (Add 1 to (Picked player).Current lumber)
    Player Group - Pick every player in (All players) and do (Set (Picked player).Food max to 100)
    Player Group - Pick every player in (All players) and do (Set (Picked player).Food max to 100)
    Set VariableSet Ranks[1] = 8
    Set VariableSet Ranks[2] = 14
    Set VariableSet Ranks[3] = 21
    Set VariableSet Ranks[4] = 29
    Set VariableSet Ranks[5] = 38
    Set VariableSet Ranks[6] = 48
    Set VariableSet Ranks[7] = 63
    Set VariableSet Ranks[8] = 80
    Set VariableSet Ranks[9] = 105
    Set VariableSet Ranks[10] = 130
    Set VariableSet Ranks[11] = 150
    Set VariableSet Ranks[12] = 180
    Set VariableSet Ranks[13] = 220
    Set VariableSet Ranks[14] = 270
    Set VariableSet Ranks[15] = 330
    Set VariableSet Ranks[16] = 400
    Set VariableSet Ranks[17] = 480
    Set VariableSet Ranks[18] = 570
    Set VariableSet Ranks[19] = 670
    Set VariableSet Ranks[20] = 780
    Player Group - Pick every player in (All players) and do (Pan camera for (Picked player) to (Center of Hero_Select <gen>) over 2.00 seconds)
    Player Group - Pick every player in (All players) and do (Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Center <gen>)
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Turn Gives bounty On for Player 12 (Brown))
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Turn Gives bounty On for Player 11 (Dark Green))
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Turn Gives bounty On for Player 10 (Light Blue))
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Turn Gives bounty On for Player 9 (Gray))
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Turn Gives bounty On for Player 8 (Pink))
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Turn Gives bounty On for Player 7 (Green))
    Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Turn Gives bounty On for Player 6 (Orange))
    Player Group - Pick every player in (All allies of Player 7 (Green).) and do (Turn Gives bounty On for Player 1 (Red))
    Player Group - Pick every player in (All allies of Player 7 (Green).) and do (Turn Gives bounty On for Player 2 (Blue))
    Player Group - Pick every player in (All allies of Player 7 (Green).) and do (Turn Gives bounty On for Player 3 (Teal))
    Player Group - Pick every player in (All allies of Player 7 (Green).) and do (Turn Gives bounty On for Player 4 (Purple))
    Player Group - Pick every player in (All allies of Player 7 (Green).) and do (Turn Gives bounty On for Player 5 (Yellow))
    Player Group - Pick every player in (All allies of Player 7 (Green).) and do (Turn Gives bounty On for Player 6 (Orange))
    Quest - Create a Required quest titled Credits with the description Dwarven Axemen by Dwarven WarriorAncient Model by Seung-BumArcane Glaive projectile by InfrisiosComet Projectile by willthealmightySnowball Projectile by shamanyouranusIce Lord model by icecrownoverlordLazers Model by HappyTaurenVarious Icons by: Paladon, using icon path ReplaceableTextures\CommandButtons\BTNArchimonde.blp
    Quest - Create a Required quest titled Tiers with the description Dwarfs: Axemen, Riflemen, Motar Teams, Gryphon RidersHuman: Swordsmen, Archers, Spell Breakers, KnightsOrc: Grunts, Spearmen, Warlocks, TaurenUndead: Ghouls, Banshees, Abombinations, NecromancersNaga: Syrens, Myrmiddons, Royal Guards, HydrasNight Elves: Huntresses, Dyrads, Druids of the Claw, Chimeras, using icon path ReplaceableTextures\CommandButtons\BTNPillage.blp
Game modes
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
  Actions
    Game - Pause the game
    Countdown Timer - Start ModeSelectTime as a One-shot timer that will expire in 12.00 seconds
    Game - Display to (All players) for 12.00 seconds the text: Player 1 has 12 seconds to choose a game mode; -AR -APDefault is All Pick.
    Wait 12.00 seconds
    Game - Unpause the game
    Set VariableSet ModesPickOn = False
All Pick
  Events
    Player - Player 1 (Red) types a chat message containing -ap (stringnoformat) as An exact match
    Player - Player 1 (Red) types a chat message containing -AP (stringnoformat) as An exact match
    Player - Player 1 (Red) types a chat message containing ap (stringnoformat) as An exact match
    Player - Player 1 (Red) types a chat message containing AP (stringnoformat) as An exact match
    Player - Player 1 (Red) types a chat message containing all pick (stringnoformat) as An exact match
  Conditions
    ModesPickOn Equal to True
  Actions
    Set VariableSet ModesPickOn = False
    Game - Unpause the game
    Game - Display to (All players) for 5.00 seconds the text: All Pick Mode Enabled.
All Random
  Events
    Player - Player 1 (Red) types a chat message containing -ar (stringnoformat) as An exact match
    Player - Player 1 (Red) types a chat message containing -AR (stringnoformat) as An exact match
    Player - Player 1 (Red) types a chat message containing ar (stringnoformat) as An exact match
    Player - Player 1 (Red) types a chat message containing AR (stringnoformat) as An exact match
    Player - Player 1 (Red) types a chat message containing all random (stringnoformat) as An exact match
  Conditions
    ModesPickOn Equal to True
  Actions
    Set VariableSet ModesPickOn = False
    Game - Unpause the game
    Game - Display to (All players) for 6.00 seconds the text: All Random mode enabled.
    Trigger - Run Random_1 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_2 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_3 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_4 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_5 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_6 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_7 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_8 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_9 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_10 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_11 <gen> (checking conditions)
    Wait 0.10 seconds
    Trigger - Run Random_12 <gen> (checking conditions)
Hero Selector Lay Out
  Events
    Map initialization
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Create 1 Hero Selector for (Picked player) at (Center of Hero_Select <gen>) facing (Center of (Playable map area)))
    Set VariableSet Heroes[1] = Paladin
    Set VariableSet Heroes[2] = Archmage
    Set VariableSet Heroes[3] = Mountain King
    Set VariableSet Heroes[4] = Blood Mage
    Set VariableSet Heroes[5] = Blademaster
    Set VariableSet Heroes[6] = Far Seer
    Set VariableSet Heroes[7] = Tauren Chieftain
    Set VariableSet Heroes[8] = Shadow Hunter
    Set VariableSet Heroes[9] = Death Knight
    Set VariableSet Heroes[10] = Lich
    Set VariableSet Heroes[11] = Dreadlord
    Set VariableSet Heroes[12] = Crypt Lord
    Set VariableSet Heroes[13] = Keeper of the Grove
    Set VariableSet Heroes[14] = Priestess of the Moon
    Set VariableSet Heroes[15] = Demon Hunter
    Set VariableSet Heroes[16] = Warden
    Set VariableSet Heroes[17] = Alchemist
    Set VariableSet Heroes[18] = Naga Sea Witch
    Set VariableSet Heroes[19] = Tinker
    Set VariableSet Heroes[20] = Beastmaster
    Set VariableSet Heroes[21] = Dark Ranger
    Set VariableSet Heroes[22] = Firelord
    Set VariableSet Heroes[23] = Pandaren Brewmaster
    Set VariableSet Heroes[24] = Pit Lord
    Set VariableSet Heroes[25] = Light Ranger
    Set VariableSet Heroes[26] = Wild Windkin
    Set VariableSet Heroes[27] = Stormcaller
    Set VariableSet Heroes[28] = Bladedancer
    Set VariableSet Heroes[29] = Space Orc
    Set VariableSet Heroes[30] = Thing
    Set VariableSet Heroes[31] = Marine
    Set VariableSet Heroes[32] = Euphori
    Set VariableSet Heroes[33] = Lazers
    Set VariableSet Heroes[34] = Ancient
    Set VariableSet Heroes[35] = Stone Guardian
    Set VariableSet Heroes[36] = Medivh
    Set VariableSet Heroes[37] = Ice Lord
    Floating Text - Create floating text that reads Standard Heroes 1 above Standard Heroes 1 0000 <gen> with Z offset 0, using font size 10, color (100%, 100%, 100%), and 0% transparency
    Floating Text - Create floating text that reads Standard Heroes 2 above Standard Heroes 2 0001 <gen> with Z offset 0, using font size 10, color (100%, 100%, 100%), and 0% transparency
    Floating Text - Create floating text that reads Custom Heroes above Custom Heroes 1 0027 <gen> with Z offset 0, using font size 10, color (100%, 100%, 100%), and 0% transparency
Random 1
  Events
    Player - Player 1 (Red) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 1 (Red) Current gold) Greater than or equal to 700
    (Player 1 (Red) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 1 (Red) at (Player 1 (Red) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 1 (Red).Current gold
Random Bought
  Events
    Unit - A unit Sells a unit
  Conditions
    (Unit-type of (Sold unit)) Equal to Random
  Actions
    Unit - Remove (Sold unit) from the game
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for (Owner of (Sold unit)) at ((Owner of (Sold unit)) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
Random 2
  Events
    Player - Player 2 (Blue) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 2 (Blue) Current gold) Greater than or equal to 700
    (Player 2 (Blue) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 2 (Blue) at (Player 2 (Blue) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 2 (Blue).Current gold
Random 3
  Events
    Player - Player 3 (Teal) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 3 (Teal) Current gold) Greater than or equal to 700
    (Player 3 (Teal) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 3 (Teal) at (Player 3 (Teal) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 3 (Teal).Current gold
Random 4
  Events
    Player - Player 4 (Purple) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 4 (Purple) Current gold) Greater than or equal to 700
    (Player 4 (Purple) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 4 (Purple) at (Player 4 (Purple) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 4 (Purple).Current gold
Random 5
  Events
    Player - Player 5 (Yellow) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 5 (Yellow) Current gold) Greater than or equal to 700
    (Player 5 (Yellow) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 5 (Yellow) at (Player 5 (Yellow) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 5 (Yellow).Current gold
Random 6
  Events
    Player - Player 6 (Orange) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 6 (Orange) Current gold) Greater than or equal to 700
    (Player 6 (Orange) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 6 (Orange) at (Player 6 (Orange) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 6 (Orange).Current gold
Random 7
  Events
    Player - Player 7 (Green) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 7 (Green) Current gold) Greater than or equal to 700
    (Player 7 (Green) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 7 (Green) at (Player 7 (Green) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 7 (Green).Current gold
Random 8
  Events
    Player - Player 8 (Pink) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 8 (Pink) Current gold) Greater than or equal to 700
    (Player 8 (Pink) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 8 (Pink) at (Player 8 (Pink) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 8 (Pink).Current gold
Random 9
  Events
    Player - Player 9 (Gray) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 9 (Gray) Current gold) Greater than or equal to 700
    (Player 9 (Gray) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 9 (Gray) at (Player 9 (Gray) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 9 (Gray).Current gold
Random 10
  Events
    Player - Player 10 (Light Blue) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 10 (Light Blue) Current gold) Greater than or equal to 700
    (Player 10 (Light Blue) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 10 (Light Blue) at (Player 10 (Light Blue) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 10 (Light Blue).Current gold
Random 11
  Events
    Player - Player 11 (Dark Green) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 11 (Dark Green) Current gold) Greater than or equal to 700
    (Player 11 (Dark Green) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 11 (Dark Green) at (Player 11 (Dark Green) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 11 (Dark Green).Current gold
Random 12
  Events
    Player - Player 12 (Brown) types a chat message containing -random (stringnoformat) as An exact match
  Conditions
    (Player 12 (Brown) Current gold) Greater than or equal to 700
    (Player 12 (Brown) slot status) Equal to Is playing
  Actions
    Unit - Create 1 Heroes[(Random integer number between 1 and 37)] for Player 12 (Brown) at (Player 12 (Brown) start location) facing (Center of (Playable map area))
    Hero - Create Potion of Greater Healing and give it to (Last created unit)
    Player - Add -700 to Player 12 (Brown).Current gold
Give Heroes
  Events
    Time - Elapsed game time is 10.00 seconds
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked player) controller) Equal to Computer
            ((Picked player) controller) Not equal to Passive
            ((Picked player) controller) Not equal to Hostile
          Then - Actions
            Unit - Create 1 Heroes[(Random integer number between 1 and 33)] for (Picked player) at ((Picked player) start location) facing (Center of (Playable map area))
            Player - Add -700 to (Picked player).Current gold
          Else - Actions
    Melee Game - Run melee AI scripts (for computer players)
Revive Heroes
  Events
    Unit - A unit Dies
  Conditions
    ((Triggering unit) is A Hero) Equal to True
    ((Owner of (Triggering unit)) controller) Equal to Computer
    ((Owner of (Triggering unit)) slot status) Equal to Is playing
  Actions
    Wait 30.00 seconds
    Hero - Instantly revive (Triggering unit) at ((Owner of (Triggering unit)) start location), Show revival graphics
Ultimate Claws
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Recipe: Ultimate Claws
    ((Triggering unit) has an item of type Recipe: Ultimate Claws) Equal to True
    ((Triggering unit) has an item of type Claws of Attack +20) Equal to True
    ((Triggering unit) has an item of type Claws of Attack +12) Equal to True
    ((Triggering unit) has an item of type Claws of Attack +9) Equal to True
    ((Triggering unit) has an item of type Claws of Attack +6) Equal to True
  Actions
    Item - Remove (Item carried by (Triggering unit) of type Recipe: Ultimate Claws)
    Item - Remove (Item carried by (Triggering unit) of type Claws of Attack +20)
    Item - Remove (Item carried by (Triggering unit) of type Claws of Attack +12)
    Item - Remove (Item carried by (Triggering unit) of type Claws of Attack +9)
    Item - Remove (Item carried by (Triggering unit) of type Claws of Attack +6)
    Hero - Create Ultimate Claws +45 and give it to (Triggering unit)
    Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Fleet Feet
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Recipe: Fleet Feet
    ((Triggering unit) has an item of type Recipe: Fleet Feet) Equal to True
    ((Triggering unit) has an item of type Boots of Speed) Equal to True
    ((Triggering unit) has an item of type Gloves of Haste) Equal to True
  Actions
    Item - Remove (Item carried by (Triggering unit) of type Recipe: Fleet Feet)
    Item - Remove (Item carried by (Triggering unit) of type Boots of Speed)
    Item - Remove (Item carried by (Triggering unit) of type Gloves of Haste)
    Hero - Create Fleet Feet and give it to (Triggering unit)
    Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Point Booster
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Recipe: Point Booster
    ((Triggering unit) has an item of type Recipe: Point Booster) Equal to True
    ((Triggering unit) has an item of type Pendant of Energy) Equal to True
    ((Triggering unit) has an item of type Periapt of Vitality) Equal to True
  Actions
    Item - Remove (Item carried by (Triggering unit) of type Recipe: Point Booster)
    Item - Remove (Item carried by (Triggering unit) of type Pendant of Energy)
    Item - Remove (Item carried by (Triggering unit) of type Periapt of Vitality)
    Hero - Create Point Booster and give it to (Triggering unit)
    Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Aegis of the Everlasting
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Recipe: Aegis of the Everlasting
    ((Triggering unit) has an item of type Ring of Protection +5) Equal to True
    ((Triggering unit) has an item of type Potion of Greater Healing) Equal to True
    ((Triggering unit) has an item of type Potion of Divinity) Equal to True
  Actions
    Item - Remove (Item carried by (Triggering unit) of type Recipe: Aegis of the Everlasting)
    Item - Remove (Item carried by (Triggering unit) of type Ring of Protection +5)
    Item - Remove (Item carried by (Triggering unit) of type Potion of Greater Healing)
    Item - Remove (Item carried by (Triggering unit) of type Potion of Divinity)
    Hero - Create Aegis of the Everlasting and give it to (Triggering unit)
    Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Messages
  Events
    Unit - A unit Dies
  Conditions
    ((Triggering unit) is A Hero) Equal to True
    ((Killing unit) is A Hero) Equal to True
  Actions
    Set VariableSet Random = (Random integer number between 1 and 5)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Random Equal to 1
      Then - Actions
        Quest - Display to (All players) the Quest Update message: (((Name of (Triggering player)) + ('s + (Name of (Triggering unit)))) + ( is |cffffcc00OWNED|r by + (Name of (Owner of (Killing unit)))))
      Else - Actions
        Do nothing
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Random Equal to 2
      Then - Actions
        Quest - Display to (All players) the Quest Update message: (((Name of (Triggering player)) + ('s + (Name of (Triggering unit)))) + ( is killed by + (Name of (Owner of (Killing unit)))))
      Else - Actions
        Do nothing
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Random Equal to 3
      Then - Actions
        Quest - Display to (All players) the Quest Update message: (((Name of (Triggering player)) + ('s + (Name of (Triggering unit)))) + ( gets |cfaafcc00PWNED|r by + ((Name of (Owner of (Killing unit))) + ('s + (Name of (Killing unit))))))
      Else - Actions
        Do nothing
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Random Equal to 4
      Then - Actions
        Quest - Display to (All players) the Quest Update message: (((Name of (Triggering player)) + ('s + (Name of (Triggering unit)))) + ( is |cfdffBc00DESTROYED|r by + ((Name of (Owner of (Killing unit))) + ('s + (Name of (Killing unit))))))
      Else - Actions
        Do nothing
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Random Equal to 5
      Then - Actions
        Quest - Display to (All players) the Quest Update message: (((Name of (Triggering player)) + ('s + (Name of (Triggering unit)))) + ( is |cffffcc00RAVAGED|r by + ((Name of (Owner of (Killing unit))) + ('s + (Name of (Killing unit))))))
      Else - Actions
        Do nothing
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Owner of (Triggering unit)) Equal to (Owner of (Killing unit))
      Then - Actions
        Quest - Display to (All players) the Quest Update message: ((Name of (Owner of (Killing unit))) + KILLS HIS OWN HERO!)
      Else - Actions
        Do nothing
Income
  Events
    Time - Every 6.00 seconds of game time
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Add 10 to (Picked player).Current gold)
Spawn Units
  Events
    Time - Every 6.00 seconds of game time
  Conditions
    (Number of units in (Units in (Playable map area))) Less than 2000
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 1 (Red) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[1] for Player 1 (Red) at (Player 1 (Red) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 2 (Blue) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[2] for Player 2 (Blue) at (Player 2 (Blue) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 3 (Teal) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[3] for Player 3 (Teal) at (Player 3 (Teal) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 4 (Purple) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[4] for Player 4 (Purple) at (Player 4 (Purple) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 5 (Yellow) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[5] for Player 5 (Yellow) at (Player 5 (Yellow) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 6 (Orange) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[6] for Player 6 (Orange) at (Player 6 (Orange) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 7 (Green) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[7] for Player 7 (Green) at (Player 7 (Green) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 8 (Pink) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[8] for Player 8 (Pink) at (Player 8 (Pink) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 9 (Gray) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[9] for Player 9 (Gray) at (Player 9 (Gray) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 10 (Light Blue) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[10] for Player 10 (Light Blue) at (Player 10 (Light Blue) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 11 (Dark Green) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[11] for Player 11 (Dark Green) at (Player 11 (Dark Green) start location) facing (Center of (Playable map area))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 12 (Brown) slot status) Equal to Is playing
      Then - Actions
        Unit - Create 1 SpawnedUnit[12] for Player 12 (Brown) at (Player 12 (Brown) start location) facing (Center of (Playable map area))
      Else - Actions
Hero Purchase
  Events
    Unit - A unit Sells a unit
  Conditions
    ((Sold unit) is A Hero) Equal to True
  Actions
    Unit - Move (Sold unit) instantly to ((Owner of (Sold unit)) start location)
Spawn Upgrades
  Events
    Unit - A unit Dies
  Conditions
    ((Killing unit) is A Hero) Equal to False
    (Owner of (Killing unit)) Not equal to (Owner of (Triggering unit))
  Actions
    Set VariableSet SpawnKills[(Player number of (Owner of (Killing unit)))] = (SpawnKills[(Player number of (Owner of (Killing unit)))] + 1)
    For each (Integer A) from 1 to 20, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            SpawnKills[(Player number of (Owner of (Killing unit)))] Equal to Ranks[(Integer A)]
          Then - Actions
            Player - Set the current research level of R000 (techcode) to (Integer A) for (Owner of (Killing unit))
            Player - Add 1 to (Owner of (Killing unit)).Current lumber
          Else - Actions
Tier Upgrade
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Human Tier 1
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Swordsman
Tier Upgrade 2
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Human Tier 2
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Archer
Tier Upgrade 3
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Human Tier 3
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Spell Breaker
Tier Upgrade 4
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Human Tier 4
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Knight
Orc Upgrade 1
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Orc Tier 1
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Grunt
Orc Upgrade 2
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Orc Tier 2
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Troll Headhunter
Orc Upgrade 3
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Orc Tier 3
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Fel Orc Warlock
Orc Upgrade 4
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Orc Tier 4
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Tauren
NE Upgrade 1
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to NE Tier 1
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Huntress
NE Upgrade 2
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to NE Tier 2
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Dryad
NE Upgrade 3
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to NE Tier 3
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Druid of the Claw (Night Elf Form)
NE Upgrade 4
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to NE Tier 4
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Chimaera
Undead Upgrade 1
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Undead Tier 1
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Ghoul
Undead Upgrade 2
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Undead Tier 2
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Banshee
Undead Upgrade 3
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Undead Tier 3
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Abomination
Undead Upgrade 4
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Undead Tier 4
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Necromancer
Naga Upgrade 1
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Naga Tier 1
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Naga Siren
Naga Upgrade 2
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Naga Tier 2
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Naga Myrmidon
Naga Upgrade 3
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Naga Tier 3
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Naga Royal Guard
Naga Upgrade 4
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Naga Tier 4
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Elder Hydra
Dwarf Upgrade 1
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Dwarf Tier 1
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Axeman
Dwarf Upgrade 2
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Dwarf Tier 2
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Rifleman
Dwarf Upgrade 3
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Dwarf Tier 3
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Mortar Team
Dwarf Upgrade 4
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    (Unit-type of (Triggering unit)) Equal to Dwarf Tier 4
  Actions
    Set VariableSet SpawnedUnit[(Player number of (Triggering player))] = Gryphon Rider
Defeat
  Events
    Unit - A unit Dies
  Conditions
    ((Triggering unit) is A structure) Equal to True
    (Unit-type of (Triggering unit)) Not equal to Guarding Tower
    (Unit-type of (Triggering unit)) Not equal to Greater Guarding Tower
    (Unit-type of (Triggering unit)) Not equal to Lazer Guarding Tower
  Actions
    Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!