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

region037.w3x
Variables
Mode Select
StartModeSelect
ModeClassic
ModeSurvival
ModeTournament
ModeFast
ModeMedium
ModeSlow
ModeAllPick
ModeDraft
ModeAllRandom
ModeConfirm
GameStart
Data
SetMisc
SetRegions
SetRaces
SetCreeps
SetCreepLevels
GenerateCreeps
SetPlayerColours
SetUnitUpgradeOrders
SetupPlayers
SetHelpQuests
MultiboardClassic
MultiboardSurvival
MultiboardTournament
Build
GetRace
GetSoldierBuild
GetSoldierUpgrade
GetUpgrades
CheckValue
Unlock250Value
SelectBlacksmith
DeselectBlacksmithClick
DeselectBlacksmithEsc
HeroGlowColourChange
Game - Main
SetReady
GameRoundMain
GameRoundEnd
GameEndTieBreaker
GameEndTieBreakerEnd
GameEnd
gSpawnVsCreeps
GameRoundSuccess
GameRoundFailure
GameBattleCheckAdd
GameBattleCheckLoop
Game - Duels
GameRoundDuel
DuelSpawnWest
DuelSpawnEast
GameDuelEnds
Game - Tournament
ScheduleRoundRobin
GameRoundTournament
System
SellUnit
CreepBounty
PlayerBounty
SnapToGrid
PlayerLeaves
Zoom
TipsPeriodic
Commands
PreventInBattleUpgrades
Soldier Abilities
TowerShieldGet
TowerShield
DispelCast
BerserkGet
CorruptGet
DisarmGet
ConfusionGet
BerserkBuffGet
WitchDoctorWard
WitchDoctorWardAddToGroup
Creep Abilities
Flee
Fear
FurbolgSlam
GnollPurge
Apprentice
TuskarEnsnare
Boss Abilities
Kobold - 5
TaskmasterShockwave
TaskmasterSlam
SlamStart
SlamLoop
Troll - 10
DarkTrollWindWalk
WindWalkGogogo
DarkTrollAxes
Behemoth - 15
WaveStart
BehemothWave
BehemothStomp
Brood - 20
BroodMoreVenom
BroodLeap
BroodLeapStart
BroodLeapLoop
BroodSpawn
BroodEggHatch
Castle - 25
OdinUproot
Spellbringer
sbLightningBolt
sbGold
sbForecast
sbRift
sbPossess
Unit AI
ReturnToBattle
NE DruidFaerieFire
RangedUnitAttackAir
DwarfSharpshooterAssassinate
DwarfRunecasterDispel
WizardBlizzard
BlastMageBlast
Behaviours
spawningAddBehaviours
bSetFlee
bFlank
bAcquisitionRange
bSetFocusFire
bResetBehaviours
---------------------------
bFlee
bFlankFix
bFlankFixDuels
bFlankFixDuelAttacked
bFocusFire
test
test endround
debug msgs
test bot armies
test time
test vic points
test level
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
allUnits group No
army group Yes
bFlankLeft group No
bFlankRight group No
bFlee25 group No
bFlee50 group No
bFocusFire group No
bFocusFireLeader group No
blacksmith unit Yes
boardPos integer Yes
boardPosId integer No
boss unit Yes
bountyTable integer Yes
buffBuff buffcode Yes
buffId integer No
builder unit Yes
C integer No
cameraAutoSnapPG force No
camHeight real Yes
checkBuffs boolean No
creepLevelId integer No
creepMeleeIdEnd integer Yes
creepMeleeIdStart integer Yes
creepRangedIdEnd integer Yes
creepRangedIdStart integer Yes
creepRegion rect Yes
creepUnitId integer No
creepUnitType unitcode Yes
debugPg force No
draftGroup group Yes
duelEast rect Yes
duellingRegion rect Yes
duelMain rect Yes
duelPartner player Yes
duelTicker integer No
duelWest rect Yes
dummyplayer player Yes
emptygroup group No
floats texttag Yes
forecastLevel integer Yes
forecastVisibility fogmodifier Yes
front boolean No
healingWardTargetGroup group No
hero unit Yes
heroAvatar unit Yes
heroStatus boolean Yes
hexConvChar string Yes
hexConvId integer No
hexConvValue integer Yes
highestlevelcleared integer No
hintId integer No
hintText string Yes
i integer No
i2 integer No
indexId integer No
ip integer No
ip2 integer No
kbDt integer Yes
kbDx real Yes
kbDy real Yes
kbDz real Yes
l location Yes
leapGroup group No
level10fixergroup group No
levelArmy group Yes
levelGenString string Yes
levelId integer No
levelRegion rect Yes
meleeUnitsCount integer No
modeDuelFrequency integer No
modeLives integer No
modeManaRegeneration real No
modePointsForDuel integer No
modePointsForLevels integer No
modeStartingGold integer No
modeVictoryPoints integer No
modeVision fogmodifier Yes
MSMain integer No
MSPick integer No
MSSpeed integer No
notReadyPlayers force No
oddPlayerOut player No
pg250value force No
pgPlusUpgFood force No
pgPlusUpgGold force No
pgTips force No
playerArmy group Yes
playerBattleChecker integer Yes
playerCreeps group Yes
playerDuelArena integer Yes
playerInDuel boolean Yes
playerLevel integer Yes
playerLevelAttempts integer Yes
playerLives integer Yes
playerName string Yes
playerPoints integer Yes
players force No
playerValue integer Yes
playerValueResearch integer Yes
r real No
raceBuilder unitcode Yes
raceIcon string Yes
raceId integer No
rangedUnitsCount integer No
round integer No
roundRobinPlayer player Yes
roundRobinPlayerId integer No
roundRobinRounds string Yes
roundRobintemp force No
roundTimer timer No
rrDuelLooper integer No
rrRoundId integer No
scorePlayer player No
slamKnockbackGroup group No
sortedPlayer player Yes
spawnRegion rect Yes
stillTrue boolean No
tempPlayer player No
tempPlayer2 player No
tempPlayers force No
tempPoint location No
tempScore integer No
tempSpawnRegion rect No
tempUnitGroup group No
ti integer No
totalRounds integer No 30
tsFacing real No
tsSource real No
u unit No
ug group No
upgFood integer Yes
upgGoldInc integer Yes
upgradeOrderId integer No
upgradeOrderList ordercode Yes
visionRegion rect Yes
winningPlayer player No
winningPlayers force No
x real No
y real No
StartModeSelect
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Camera - Pan camera for (Picked player) to (Center of modeSelect <gen>) over 0 seconds
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across modeSelect <gen>
        Set VariableSet modeVision[(Player number of (Picked player))] = (Last created visibility modifier)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of players in players) Equal to 1
      Then - Actions
        Floating Text - Create floating text that reads Classic mode unavailable in single player. at ((Position of Circle of Power 0380 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (50.00%, 50.00%, 50.00%), and 0% transparency
        Set VariableSet floats[3] = (Last created floating text)
        Unit - Change color of Circle of Power 0379 <gen> to Red
        Set VariableSet MSMain = 2
        Animation - Change Circle of Power 0380 <gen>'s vertex coloring to (50.00%, 50.00%, 50.00%) with 0% transparency
        Trigger - Turn off ModeClassic <gen>
      Else - Actions
        Floating Text - Create floating text that reads |cffffcc00Classic|r - Fight against creeps for gold, and duel players for victory points. at ((Position of Circle of Power 0380 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
        Set VariableSet floats[3] = (Last created floating text)
        Unit - Change color of Circle of Power 0380 <gen> to Red
        Set VariableSet MSMain = 1
    Floating Text - Create floating text that reads |cffffcc00Survival|r - Survive the longest against waves of creeps, with duels for bonus income. at ((Position of Circle of Power 0379 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
    Set VariableSet floats[4] = (Last created floating text)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of players in players) Less than 3
      Then - Actions
        Floating Text - Create floating text that reads Tournament unavailable with <3 players. at ((Position of Circle of Power 0381 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (50.00%, 50.00%, 50.00%), and 0% transparency
        Set VariableSet floats[5] = (Last created floating text)
        Animation - Change Circle of Power 0381 <gen>'s vertex coloring to (50.00%, 50.00%, 50.00%) with 0% transparency
        Trigger - Turn off ModeTournament <gen>
      Else - Actions
        Floating Text - Create floating text that reads |cffffcc00Tournament|r - Start with more gold, and fight against every other player in a round-robin format. at ((Position of Circle of Power 0381 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
        Set VariableSet floats[5] = (Last created floating text)
    Floating Text - Create floating text that reads |cffffcc00Short|r - Victory condition is 5 wins. at ((Position of Circle of Power 0128 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
    Set VariableSet floats[6] = (Last created floating text)
    Floating Text - Create floating text that reads |cffffcc00Medium|r - Victory condition is 8 wins. at ((Position of Circle of Power 0127 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
    Set VariableSet floats[7] = (Last created floating text)
    Floating Text - Create floating text that reads |cffffcc00Long|r - Victory condition is 12 wins. at ((Position of Circle of Power 0376 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
    Set VariableSet floats[8] = (Last created floating text)
    Floating Text - Create floating text that reads |cffffcc00All Pick|r - You may pick any race. at ((Position of Circle of Power 0382 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
    Set VariableSet floats[9] = (Last created floating text)
    Floating Text - Create floating text that reads |cffffcc00Draft|r - You have a selection of races to choose from. at ((Position of Circle of Power 0383 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
    Set VariableSet floats[10] = (Last created floating text)
    Floating Text - Create floating text that reads |cffffcc00All Random|r - You get a random race. at ((Position of Circle of Power 0384 <gen>) offset by (-256.00, 128.00)) with Z offset 0, using font size 10.00, color (100%, 100%, 100%), and 0% transparency
    Set VariableSet floats[11] = (Last created floating text)
    Unit - Change color of Circle of Power 0127 <gen> to Red
    Set VariableSet MSSpeed = 2
    Unit - Change color of Circle of Power 0382 <gen> to Red
    Set VariableSet MSPick = 1
    Selection - Select Pack Horse 0385 <gen> for Player 1 (Red)
ModeClassic
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0380 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSMain = 1
    Unit - Change color of Circle of Power 0380 <gen> to Red
    Unit - Change color of Circle of Power 0379 <gen> to Maroon
    Unit - Change color of Circle of Power 0381 <gen> to Maroon
    Floating Text - Change text of floats[6] to |cffffcc00Short|r - Victory condition is 5 wins. using font size 10
    Floating Text - Change text of floats[7] to |cffffcc00Medium|r - Victory condition is 8 wins. using font size 10
    Floating Text - Change text of floats[8] to |cffffcc00Long|r - Victory condition is 12 wins. using font size 10
ModeSurvival
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0379 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSMain = 2
    Unit - Change color of Circle of Power 0380 <gen> to Maroon
    Unit - Change color of Circle of Power 0379 <gen> to Red
    Unit - Change color of Circle of Power 0381 <gen> to Maroon
    Floating Text - Change text of floats[6] to |cffffcc00Short|r - You have 5 lives. using font size 10
    Floating Text - Change text of floats[7] to |cffffcc00Medium|r - You have 10 lives. using font size 10
    Floating Text - Change text of floats[8] to |cffffcc00Long|r - You have 15 lives. using font size 10
ModeTournament
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0381 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSMain = 3
    Unit - Change color of Circle of Power 0380 <gen> to Maroon
    Unit - Change color of Circle of Power 0379 <gen> to Maroon
    Unit - Change color of Circle of Power 0381 <gen> to Red
    Floating Text - Change text of floats[6] to |cffffcc00Short|r - One round of matches. using font size 10
    Floating Text - Change text of floats[7] to |cffffcc00Medium|r - Two rounds of matches. using font size 10
    Floating Text - Change text of floats[8] to |cffffcc00Long|r - Three rounds of matches. using font size 10
ModeFast
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0128 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSSpeed = 1
    Unit - Change color of Circle of Power 0128 <gen> to Red
    Unit - Change color of Circle of Power 0127 <gen> to Maroon
    Unit - Change color of Circle of Power 0376 <gen> to Maroon
ModeMedium
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0127 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSSpeed = 2
    Unit - Change color of Circle of Power 0128 <gen> to Maroon
    Unit - Change color of Circle of Power 0127 <gen> to Red
    Unit - Change color of Circle of Power 0376 <gen> to Maroon
ModeSlow
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0376 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSSpeed = 3
    Unit - Change color of Circle of Power 0128 <gen> to Maroon
    Unit - Change color of Circle of Power 0127 <gen> to Maroon
    Unit - Change color of Circle of Power 0376 <gen> to Red
ModeAllPick
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0382 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSPick = 1
    Unit - Change color of Circle of Power 0382 <gen> to Red
    Unit - Change color of Circle of Power 0383 <gen> to Maroon
    Unit - Change color of Circle of Power 0384 <gen> to Maroon
ModeDraft
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0383 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSPick = 2
    Unit - Change color of Circle of Power 0382 <gen> to Maroon
    Unit - Change color of Circle of Power 0383 <gen> to Red
    Unit - Change color of Circle of Power 0384 <gen> to Maroon
ModeAllRandom
  Events
    Unit - A unit comes within 100.00 of Circle of Power 0384 <gen>
  Conditions
    (Unit-type of (Triggering unit)) Equal to Pack Horse
  Actions
    Set VariableSet MSPick = 3
    Unit - Change color of Circle of Power 0382 <gen> to Maroon
    Unit - Change color of Circle of Power 0383 <gen> to Maroon
    Unit - Change color of Circle of Power 0384 <gen> to Red
ModeConfirm
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Confirm
  Actions
    For each (Integer A) from 3 to 11, do (Actions)
      Loop - Actions
        Floating Text - Destroy floats[(Integer A)]
    Unit Group - Pick every unit in (Units of type Pack Horse) and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MSMain Equal to 1
      Then - Actions
        Sound - Play StartGame <gen>
        Trigger - Turn off PlayerBounty <gen>
        Set VariableSet modeStartingGold = 120
        Set VariableSet modeManaRegeneration = 1.00
        Set VariableSet modeDuelFrequency = 2
        Set VariableSet modePointsForDuel = 1
        Set VariableSet modePointsForLevels = 0
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 1
          Then - Actions
            Set VariableSet modeVictoryPoints = 5
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 2
          Then - Actions
            Set VariableSet modeVictoryPoints = 8
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 3
          Then - Actions
            Set VariableSet modeVictoryPoints = 12
          Else - Actions
        Trigger - Run MultiboardClassic <gen> (ignoring conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MSMain Equal to 2
      Then - Actions
        Sound - Play StartGame <gen>
        Set VariableSet modeStartingGold = 150
        Set VariableSet modeManaRegeneration = 1.50
        Set VariableSet modeDuelFrequency = 4
        Set VariableSet modePointsForDuel = 0
        Set VariableSet modePointsForLevels = 0
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 1
          Then - Actions
            Set VariableSet modeLives = 5
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 2
          Then - Actions
            Set VariableSet modeLives = 10
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 3
          Then - Actions
            Set VariableSet modeLives = 15
          Else - Actions
        Player Group - Pick every player in players and do (Actions)
          Loop - Actions
            Set VariableSet playerLives[(Player number of (Picked player))] = modeLives
        Trigger - Run MultiboardSurvival <gen> (ignoring conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MSMain Equal to 3
      Then - Actions
        Sound - Play StartTournament <gen>
        Trigger - Run ScheduleRoundRobin <gen> (ignoring conditions)
        Set VariableSet modeStartingGold = 300
        Set VariableSet modeManaRegeneration = 2.00
        Set VariableSet modeDuelFrequency = 0
        Set VariableSet modePointsForDuel = 1
        Set VariableSet modePointsForLevels = 0
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 1
          Then - Actions
            Set VariableSet modeVictoryPoints = 5
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 2
          Then - Actions
            Set VariableSet modeVictoryPoints = 8
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSSpeed Equal to 3
          Then - Actions
            Set VariableSet modeVictoryPoints = 12
          Else - Actions
        Trigger - Run MultiboardTournament <gen> (ignoring conditions)
      Else - Actions
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Visibility - Disable modeVision[(Player number of (Picked player))]
    Trigger - Run GameStart <gen> (ignoring conditions)
GameStart
  Events
  Conditions
  Actions
    Game - Set the time of day to 12
    Game - Turn the day/night cycle Off
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MSPick Equal to 2
      Then - Actions
        -------- draft --------
        Player Group - Pick every player in players and do (Actions)
          Loop - Actions
            Set VariableSet l[0] = ((Picked player) start location)
            Set VariableSet ip = (Player number of (Picked player))
            Player - Make Random Builder Unavailable for training/construction by (Picked player)
            For each (Integer A) from 1 to raceId, do (Actions)
              Loop - Actions
                Player - Make raceBuilder[(Integer A)] Unavailable for training/construction by (Picked player)
                Unit - Create 1.raceBuilder[(Integer A)] for (Picked player) at l[0] facing Default building facing degrees
                Unit Group - Add (Last created unit) to draftGroup[ip]
            Unit Group - Pick every unit in (Random (raceId - 3) units from draftGroup[ip]) and do (Actions)
              Loop - Actions
                Unit Group - Remove (Picked unit) from draftGroup[ip].
                Unit - Remove (Picked unit) from the game
            Unit Group - Pick every unit in draftGroup[ip] and do (Actions)
              Loop - Actions
                Player - Make (Unit-type of (Picked unit)) Available for training/construction by (Picked player)
                Unit Group - Remove (Picked unit) from draftGroup[ip].
                Unit - Remove (Picked unit) from the game
            Custom script: call RemoveLocation(udg_l[0])
      Else - Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSPick Equal to 1
          Then - Actions
            -------- all pick --------
            Unit - Create 1.Race Picker for (Picked player) at ((Picked player) start location) facing 270.00 degrees
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSPick Equal to 2
          Then - Actions
            -------- draft --------
            Unit - Create 1.Race Picker for (Picked player) at ((Picked player) start location) facing 270.00 degrees
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSPick Equal to 3
          Then - Actions
            -------- all random --------
            Unit - Create 1.raceBuilder[(Random integer number between 1 and raceId)] for (Picked player) at ((Picked player) start location) facing 270.00 degrees
            Selection - Select (Last created unit) for (Owner of (Last created unit))
            Set VariableSet builder[(Player number of (Owner of (Last created unit)))] = (Last created unit)
            For each (Integer A) from 1 to raceId, do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Unit-type of (Last created unit)) Equal to raceBuilder[(Integer A)]
                  Then - Actions
                    Multiboard - Set the icon for (Last created multiboard) item in column 1, row boardPos[(Player number of (Owner of (Last created unit)))] to raceIcon[(Integer A)]
                  Else - Actions
          Else - Actions
        Camera - Pan camera for (Picked player) to (Position of (Last created unit)) over 0 seconds
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across visionRegion[(Player number of (Picked player))]
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across visionMain <gen>
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across visionDuels <gen>
        Selection - Select (Last created unit) for (Picked player)
        Set VariableSet playerLevel[(Player number of (Picked player))] = 1
        Player - Make (Picked player) treat Neutral Victim as an Enemy
        Player - Make Neutral Victim treat (Picked player) as an Enemy
        Player - Make dummyplayer[(Player number of (Picked player))] treat Neutral Victim as an Enemy
        Player - Make Neutral Victim treat dummyplayer[(Player number of (Picked player))] as an Enemy
        Set VariableSet upgFood[(Player number of (Picked player))] = 10
        Player - Set (Picked player).Food cap to 10
        Player - Set (Picked player).Current gold to modeStartingGold
        Set VariableSet upgGoldInc[(Player number of (Picked player))] = 30
        Unit - Create 1.Upgrades for (Picked player) at ((Picked player) start location) facing Default building facing degrees
        Set VariableSet blacksmith[(Player number of (Picked player))] = (Last created unit)
        Player Group - Add (Picked player) to notReadyPlayers
        Player - Set the current research level of Rosp (techcode) to 1 for (Picked player)
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 90.00 seconds
    Countdown Timer - Create a timer window for (Last started timer) with title Next round
SetMisc
  Events
    Map initialization
  Conditions
  Actions
    Unit - Change ownership of Peasant 0328 <gen> to Neutral Victim and Change color
    Set VariableSet oddPlayerOut = Neutral Passive
    Set VariableSet bountyTable[1] = 1
    Set VariableSet bountyTable[2] = 2
    Set VariableSet bountyTable[3] = 3
    Set VariableSet bountyTable[4] = 5
    Set VariableSet bountyTable[5] = 7
    Set VariableSet bountyTable[6] = 9
    Set VariableSet bountyTable[7] = 12
    Set VariableSet bountyTable[8] = 16
    Set VariableSet bountyTable[9] = 20
    Set VariableSet bountyTable[16] = 12
    Set VariableSet bountyTable[17] = 40
    Set VariableSet bountyTable[18] = 150
    Set VariableSet bountyTable[19] = 200
    Set VariableSet bountyTable[20] = 350
    -------- ------------- --------
    Set VariableSet hexConvId = (hexConvId + 1)
    Set VariableSet hexConvChar[hexConvId] = a
    Set VariableSet hexConvValue[hexConvId] = 10
    Set VariableSet hexConvId = (hexConvId + 1)
    Set VariableSet hexConvChar[hexConvId] = b
    Set VariableSet hexConvValue[hexConvId] = 11
    Set VariableSet hexConvId = (hexConvId + 1)
    Set VariableSet hexConvChar[hexConvId] = c
    Set VariableSet hexConvValue[hexConvId] = 12
    Set VariableSet hexConvId = (hexConvId + 1)
    Set VariableSet hexConvChar[hexConvId] = d
    Set VariableSet hexConvValue[hexConvId] = 13
    Set VariableSet hexConvId = (hexConvId + 1)
    Set VariableSet hexConvChar[hexConvId] = e
    Set VariableSet hexConvValue[hexConvId] = 14
    Set VariableSet hexConvId = (hexConvId + 1)
    Set VariableSet hexConvChar[hexConvId] = f
    Set VariableSet hexConvValue[hexConvId] = 15
    Set VariableSet hexConvId = (hexConvId + 1)
    Set VariableSet hexConvChar[hexConvId] = g
    Set VariableSet hexConvValue[hexConvId] = 16
    Set VariableSet hexConvId = (hexConvId + 1)
    Set VariableSet hexConvChar[hexConvId] = h
    Set VariableSet hexConvValue[hexConvId] = 17
    -------- ------------- --------
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Bloodlust
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Curse
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Cyclone
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Faerie Fire
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Frenzy Skeleton Mage
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Frost Armor
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Heal
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Hex
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Howl of Terror
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Sleep
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Slow
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Slow Poison (Info)
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Slow Poison (Non-stacking)
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Slow Poison (Stacking)
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Slowed
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Slam
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Silence
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Poison (Non-stacking)
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Poison (Info)
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Poison (Stacking)
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Polymorph
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Purge
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Thunder Clap
    Set VariableSet buffId = (buffId + 1)
    Set VariableSet buffBuff[buffId] = Disarm
    Trigger - Run SetRegions <gen> (ignoring conditions)
    Trigger - Run SetCreeps <gen> (ignoring conditions)
    Trigger - Run SetCreepLevels <gen> (ignoring conditions)
    Trigger - Run GenerateCreeps <gen> (ignoring conditions)
SetRegions
  Events
  Conditions
  Actions
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level01 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level02 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level03 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level04 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level05 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level06 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level07 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level08 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level09 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level10 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level11 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level12 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level13 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level14 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level15 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level16 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level17 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level18 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level19 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level20 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level21 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level22 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level23 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level24 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level25 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level26 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level27 <gen>
    -------- --- --------
    Set VariableSet levelId = (levelId + 1)
    Set VariableSet levelRegion[levelId] = level28 <gen>
    -------- --- --------
    Set VariableSet i = 1
    Set VariableSet visionRegion[i] = vision01 <gen>
    Set VariableSet spawnRegion[i] = spawn01 <gen>
    Set VariableSet creepRegion[i] = creeps01 <gen>
    Set VariableSet i = (i + 1)
    Set VariableSet visionRegion[i] = vision02 <gen>
    Set VariableSet spawnRegion[i] = spawn02 <gen>
    Set VariableSet creepRegion[i] = creeps02 <gen>
    Set VariableSet i = (i + 1)
    Set VariableSet visionRegion[i] = vision03 <gen>
    Set VariableSet spawnRegion[i] = spawn03 <gen>
    Set VariableSet creepRegion[i] = creeps03 <gen>
    Set VariableSet i = (i + 1)
    Set VariableSet visionRegion[i] = vision04 <gen>
    Set VariableSet spawnRegion[i] = spawn04 <gen>
    Set VariableSet creepRegion[i] = creeps04 <gen>
    Set VariableSet i = (i + 1)
    Set VariableSet visionRegion[i] = v05 <gen>
    Set VariableSet spawnRegion[i] = s05 <gen>
    Set VariableSet creepRegion[i] = c05 <gen>
    Set VariableSet i = (i + 1)
    Set VariableSet visionRegion[i] = v06 <gen>
    Set VariableSet spawnRegion[i] = s06 <gen>
    Set VariableSet creepRegion[i] = c06 <gen>
    -------- --- --------
    Set VariableSet i = 1
    Set VariableSet duelMain[i] = duel1 <gen>
    Set VariableSet duelEast[i] = d1east <gen>
    Set VariableSet duelWest[i] = d1west <gen>
    Set VariableSet i = (i + 1)
    Set VariableSet duelMain[i] = duel2 <gen>
    Set VariableSet duelEast[i] = d2east <gen>
    Set VariableSet duelWest[i] = d2west <gen>
    Set VariableSet i = (i + 1)
    Set VariableSet duelMain[i] = duel3 <gen>
    Set VariableSet duelEast[i] = d3east <gen>
    Set VariableSet duelWest[i] = d3west <gen>
SetRaces
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet raceId = (raceId + 1)
    Set VariableSet raceBuilder[raceId] = Human Builder
    Set VariableSet raceIcon[raceId] = ReplaceableTextures\CommandButtons\BTNFootman.blp
    Set VariableSet raceId = (raceId + 1)
    Set VariableSet raceBuilder[raceId] = Night Elf Builder
    Set VariableSet raceIcon[raceId] = ReplaceableTextures\CommandButtons\BTNArcher.blp
    Set VariableSet raceId = (raceId + 1)
    Set VariableSet raceBuilder[raceId] = Skeleton Builder
    Set VariableSet raceIcon[raceId] = ReplaceableTextures\CommandButtons\BTNSkeletonWarrior.blp
    Set VariableSet raceId = (raceId + 1)
    Set VariableSet raceBuilder[raceId] = Orc Builder
    Set VariableSet raceIcon[raceId] = ReplaceableTextures\CommandButtons\BTNPeon.blp
    Set VariableSet raceId = (raceId + 1)
    Set VariableSet raceBuilder[raceId] = Dwarf Builder
    Set VariableSet raceIcon[raceId] = ReplaceableTextures\CommandButtons\BTNMortarTeam.blp
    Set VariableSet raceId = (raceId + 1)
    Set VariableSet raceBuilder[raceId] = Nerubian Builder
    Set VariableSet raceIcon[raceId] = ReplaceableTextures\CommandButtons\BTNHeroCryptLord.blp
    Set VariableSet raceId = (raceId + 1)
    Set VariableSet raceBuilder[raceId] = Troll Builder
    Set VariableSet raceIcon[raceId] = ReplaceableTextures\CommandButtons\BTNHeadhunter.blp
SetCreeps
  Events
  Conditions
  Actions
    -------- --- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 1 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Bandit
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Gnoll
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Murloc Tiderunner
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- level 1 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Poacher
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Apprentice
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Mur'gul Blood-Gill
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- --- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 2 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Rogue
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Black Spider
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Black Spider
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Felguard
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Felguard
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- level 2 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Brigand
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Fallen Priest
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Forest Troll
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Forest Troll
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- --- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 3 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Enforcer
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Shorecrawler
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Shorecrawler
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Centaur Drudge
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Centaur Drudge
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Battle Golem
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Battle Golem
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- level 3 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Gnoll Warden
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Gnoll Warden
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Assassin
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Centaur Archer
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Centaur Archer
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Red Dragon Whelp
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- --- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 4 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Furbolg
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Giant Wolf
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Giant Wolf
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Ogre Warrior
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Ogre Warrior
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Gnoll Overseer
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- level 4 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Forest Troll Shadow Priest
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Kobold Geomancer
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Ghost
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Ghost
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- --- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 5 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Corrupted Treant
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Corrupted Treant
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Mud Golem
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Sasquatch
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Sasquatch
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- level 5 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Rogue Wizard
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Rogue Wizard
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Deceiver
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Deceiver
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Harpy Rogue
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- --- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 6 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Tuskarr Fighter
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Giant Spider
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Polar Bear
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- level 6 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Tuskarr Spearman
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Tuskarr Spearman
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Tuskarr Spearman
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Furbolg Shaman
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Furbolg Shaman
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Red Drake
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- --- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 7 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Bloodfiend
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Bloodfiend
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Bloodfiend
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Rock Golem
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Rock Golem
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Gargoyle
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- level 7 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Ice Troll Berserker
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Berserk Elemental
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Hydra
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- ----- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 8 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Limbripper
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Wildkin
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- ----- --------
    -------- level 8 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Eredar Sorcerer
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Centaur Impaler
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- ----- --------
    Set VariableSet creepLevelId = (creepLevelId + 1)
    -------- level 9 melee --------
    Set VariableSet creepMeleeIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Furbolg Champion
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = War Golem
    Set VariableSet creepMeleeIdEnd[creepLevelId] = creepUnitId
    -------- ----- --------
    -------- level 9 ranged --------
    Set VariableSet creepRangedIdStart[creepLevelId] = (creepUnitId + 1)
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Heretic
    Set VariableSet creepUnitId = (creepUnitId + 1)
    Set VariableSet creepUnitType[creepUnitId] = Quillboar
    Set VariableSet creepRangedIdEnd[creepLevelId] = creepUnitId
    -------- ----- --------
SetCreepLevels
  Events
  Conditions
  Actions
    Set VariableSet levelGenString[1] = 4
    Set VariableSet levelGenString[2] = 6
    Set VariableSet levelGenString[3] = 61
    Set VariableSet levelGenString[4] = 73
    -------- level 5 - boss --------
    Set VariableSet levelGenString[6] = 851
    Set VariableSet levelGenString[7] = f32
    Set VariableSet levelGenString[8] = 2551
    Set VariableSet levelGenString[9] = 0562
    -------- level 10 - boss --------
    Set VariableSet levelGenString[11] = 0863
    Set VariableSet levelGenString[12] = 01951
    Set VariableSet levelGenString[13] = 00882
    Set VariableSet levelGenString[14] = 00695
    -------- level 15 - boss --------
    Set VariableSet levelGenString[16] = 002693
    Set VariableSet levelGenString[17] = 000994
    Set VariableSet levelGenString[18] = 0008952
    Set VariableSet levelGenString[19] = 0007983
    -------- level 20 - boss --------
    Set VariableSet levelGenString[21] = 0000998
    Set VariableSet levelGenString[22] = 003087a2
    Set VariableSet levelGenString[23] = 0001e585
    Set VariableSet levelGenString[24] = 00008e58
    -------- level 25 - boss --------
    Set VariableSet levelGenString[26] = 000189873
    Set VariableSet levelGenString[27] = 000568a65
    Set VariableSet levelGenString[28] = 000098987
    Set VariableSet levelGenString[29] = 00007f879
    -------- level 30 - boss --------
GenerateCreeps
  Events
  Conditions
  Actions
    For each (Integer A) from 1 to levelId, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            levelGenString[(Integer A)] Not equal to
          Then - Actions
            For each (Integer B) from 1 to (Length of levelGenString[(Integer A)]), do (Actions)
              Loop - Actions
                Set VariableSet i = (Integer((Substring(levelGenString[(Integer A)], (Integer B), (Integer B)))))
                For each (Integer C) from 1 to hexConvId, do (Actions)
                  Loop - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Substring(levelGenString[(Integer A)], (Integer B), (Integer B))) Equal to hexConvChar[C]
                      Then - Actions
                        Set VariableSet i = hexConvValue[C]
                      Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    i Not equal to 0
                  Then - Actions
                    Set VariableSet rangedUnitsCount = (Integer(((Real(i)) x (Random real number between 0.25 and 0.45))))
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        i Greater than or equal to 2
                      Then - Actions
                        Set VariableSet rangedUnitsCount = (rangedUnitsCount + 1)
                      Else - Actions
                    Set VariableSet meleeUnitsCount = (i - rangedUnitsCount)
                    For each (Integer C) from 1 to meleeUnitsCount, do (Actions)
                      Loop - Actions
                        Set VariableSet l[0] = (Random point in (Region centered at ((Center of levelRegion[(Integer A)]) offset by (0.00, -150.00)) with size (600.00, 300.00)))
                        Unit - Create 1.creepUnitType[(Random integer number between creepMeleeIdStart[(Integer B)] and creepMeleeIdEnd[(Integer B)])] for Neutral Hostile at l[0] facing Default building facing degrees
                        Custom script: call RemoveLocation(udg_l[0])
                    For each (Integer C) from 1 to rangedUnitsCount, do (Actions)
                      Loop - Actions
                        Set VariableSet l[0] = (Random point in (Region centered at ((Center of levelRegion[(Integer A)]) offset by (0.00, 150.00)) with size (600.00, 150.00)))
                        Unit - Create 1.creepUnitType[(Random integer number between creepRangedIdStart[(Integer B)] and creepRangedIdEnd[(Integer B)])] for Neutral Hostile at l[0] facing Default building facing degrees
                        Custom script: call RemoveLocation(udg_l[0])
                  Else - Actions
          Else - Actions
        Set VariableSet levelArmy[(Integer A)] = (Units in levelRegion[(Integer A)])
function Trig_Set_player_colours_Actions takes nothing returns nothing
call SetPlayerName( Player(0), ( "|cffff0202" + ( GetPlayerName(Player(0)) + "|r" ) ) )
call SetPlayerName( Player(1), ( "|cff0041ff" + ( GetPlayerName(Player(1)) + "|r" ) ) )
call SetPlayerName( Player(2), ( "|cff1be5b8" + ( GetPlayerName(Player(2)) + "|r" ) ) )
call SetPlayerName( Player(3), ( "|cff530080" + ( GetPlayerName(Player(3)) + "|r" ) ) )
call SetPlayerName( Player(4), ( "|cffffff00" + ( GetPlayerName(Player(4)) + "|r" ) ) )
call SetPlayerName( Player(5), ( "|cfffe890d" + ( GetPlayerName(Player(5)) + "|r" ) ) )
call SetPlayerName( Player(6), ( "|cff1fbf00" + ( GetPlayerName(Player(6)) + "|r" ) ) )
call SetPlayerName( Player(7), ( "|cffe45aaa" + ( GetPlayerName(Player(7)) + "|r" ) ) )
call SetPlayerName( Player(8), ( "|cff949596" + ( GetPlayerName(Player(8)) + "|r" ) ) )
call SetPlayerName( Player(9), ( "|cff7dbef1" + ( GetPlayerName(Player(9)) + "|r" ) ) )
call SetPlayerName( Player(10), ( "|cff0f6145" + ( GetPlayerName(Player(10)) + "|r" ) ) )
call SetPlayerName( Player(11), ( "|cff4d2903" + ( GetPlayerName(Player(11)) + "|r" ) ) )

endfunction

//===========================================================================
function InitTrig_Set_player_colours takes nothing returns nothing
set gg_trg_Set_player_colours = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_player_colours, function Trig_Set_player_colours_Actions )
endfunction

function Trig_Set_Player_Colours_Actions takes nothing returns nothing
    set udg_playerName[1] = ( "|cffff0202" + ( GetPlayerName(Player(0)) + "|r" ) )
    set udg_playerName[2] = ( "|cff0041ff" + ( GetPlayerName(Player(1)) + "|r" ) )
    set udg_playerName[3] = ( "|cff1be5b8" + ( GetPlayerName(Player(2)) + "|r" ) )
    set udg_playerName[4] = ( "|cff530080" + ( GetPlayerName(Player(3)) + "|r" ) )
    set udg_playerName[5] = ( "|cffffff00" + ( GetPlayerName(Player(4)) + "|r" ) )
    set udg_playerName[6] = ( "|cfffe890d" + ( GetPlayerName(Player(5)) + "|r" ) )
    set udg_playerName[7] = ( "|cffff0202" + ( GetPlayerName(Player(0)) + "|r" ) )
    set udg_playerName[8] = ( "|cff0041ff" + ( GetPlayerName(Player(1)) + "|r" ) )
    set udg_playerName[9] = ( "|cff1be5b8" + ( GetPlayerName(Player(2)) + "|r" ) )
    set udg_playerName[10] = ( "|cff530080" + ( GetPlayerName(Player(3)) + "|r" ) )
    set udg_playerName[11] = ( "|cffffff00" + ( GetPlayerName(Player(4)) + "|r" ) )
    set udg_playerName[12] = ( "|cfffe890d" + ( GetPlayerName(Player(5)) + "|r" ) )

endfunction

//===========================================================================
function InitTrig_SetPlayerColours takes nothing returns nothing
    set gg_trg_SetPlayerColours = CreateTrigger(  )
    call TriggerAddAction( gg_trg_SetPlayerColours, function Trig_Set_Player_Colours_Actions )
endfunction

 
SetUnitUpgradeOrders
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Captain (Human)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Defender (Dwarf)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Mountain King (Dwarf)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Officer (Human)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Sharpshooter (Dwarf)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Bishop (Human)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Wizard (Human)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Marksman (Human)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Veteran (Orc)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Hunter (Orc)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Dire Fiend (Nerubian)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Bulwark (Skeleton)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Champion (Skeleton)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Frenzy Mage (Skeleton)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Spiked Scarab (Nerubian)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Marksman (Skeleton)))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Elite Ranger))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Ranger))
    Set VariableSet upgradeOrderId = (upgradeOrderId + 1)
    Set VariableSet upgradeOrderList[upgradeOrderId] = (Order(Warrior))
SetupPlayers
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet winningPlayer = Neutral Passive
    Set VariableSet boardPosId = 1
    For each (Integer A) from 1 to 6, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Player((Integer A))) slot status) Equal to Is playing
          Then - Actions
            Set VariableSet boardPosId = (boardPosId + 1)
            Set VariableSet boardPos[(Integer A)] = boardPosId
            Set VariableSet sortedPlayer[boardPosId] = (Player((Integer A)))
            Set VariableSet playerLevelAttempts[(Integer A)] = 1
            Set VariableSet forecastLevel[(Integer A)] = 1
            Player - Make (Player((Integer A))) treat (Player(((Integer A) + 6))) as an Ally with shared vision
            Player - Make (Player(((Integer A) + 6))) treat (Player((Integer A))) as an Ally with shared vision
            Player - Change color of (Player(((Integer A) + 6))) to (Color of (Player((Integer A)))), Changing color of existing units
            Player - Set name of (Player(((Integer A) + 6))) to (Name of (Player((Integer A))))
            Set VariableSet dummyplayer[(Integer A)] = (Player(((Integer A) + 6)))
            Player Group - Add (Player((Integer A))) to players
            Player Group - Add (Player((Integer A))) to pg250value
            Player Group - Add (Player((Integer A))) to pgTips
            Player Group - Add (Player((Integer A))) to cameraAutoSnapPG
            Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across (Region centered at ((Player((Integer A))) start location) with size (2800.00, 2800.00))
            Visibility - Create an initially Enabled visibility modifier for dummyplayer[(Integer A)] emitting Visibility across visionMain <gen>
            Visibility - Create an initially Enabled visibility modifier for dummyplayer[(Integer A)] emitting Visibility across visionDuels <gen>
            Set VariableSet camHeight[(Player number of (Picked player))] = 1650.00
          Else - Actions
            Unit Group - Pick every unit in (Units owned by (Player((Integer A))).) and do (Actions)
              Loop - Actions
                Unit - Remove (Picked unit) from the game
    For each (Integer A) from 1 to 6, do (Actions)
      Loop - Actions
        Player Group - Pick every player in players and do (Actions)
          Loop - Actions
            Player - Make (Picked player) treat (Player((Integer A))) as an Enemy
not used yet:
azure dragon spawn by Sellenisko
crystal fencer by Suselishe
Pegasus Rider by Em!
SetHelpQuests
  Events
    Map initialization
  Conditions
  Actions
    Quest - Create a Optional quest titled Commands with the description Player commands:|cffffcc00-tipsoff|r removes hint messages. (|cffffcc00-tipson|r turns them back on)|cffffcc00-cameraoff|r disables the automatic camera. (|cffffcc00-cameraon|r enables it)Debug commands (host):|cffffcc00-bots|r creates armies for players 2 to 6|cffffcc00-endround|r kills all units in play, using icon path ReplaceableTextures\CommandButtons\BTNScrollOfRegenerationGreen.blp
    Quest - Create a Optional quest titled Credits with the description Map by rulerofiron99Models:Dwarven Warrior by FranksterDwarf Archmage by SelleniskoHuman Crossbowman by KitabatakeOrc Spearman by FranksterFortress by ArchianbedlamSkeleton Brute by -GrendelElven Warrior by GreyArchonNerubian Guard by CallahanTroll Warrior by Lord_TTroll Slayer by levigeorge1617Effects:Meta Marks by DaelinBuffs by JetFangInfernoCaster effects by JetFangInfernoIcons:Dwarven Warrior by FranksterElven Warrior by GreyArchonReady tick by inhuman89Grid, Flank, Flee icons by Captain_RufarTroll Warrior by Lord_TTesters:RageMother, Unholy_Angel, Kowkemon, Triumvirustler, Silvernail, karatechopkoala, using icon path ReplaceableTextures\CommandButtons\BTNBansheeMaster.blp
    Quest - Create a Required quest titled Spellbringers with the description Just above your building area you will find a |cffffcc00spellbringer|r; a building that can cast spells.The spellbringer gains 1 mana at the end of each round, and it accumulates until at capacity.Any of its offensive spells (eg. Lightning Bolt, Rift) can be cast on any battlefield; targetting any player., using icon path ReplaceableTextures\CommandButtons\BTNBlizzard.blp
    Quest - Create a Required quest titled Income with the description Besides bounty from killing creeps, your main and more reliable income is gained from your gold mine, which gives you gold whenever you finish a round.Your gold mine can be upgraded., using icon path ReplaceableTextures\CommandButtons\BTNGoldMine.blp
    Quest - Create a Required quest titled Duelling with the description Every 3rd round (by default) is duel round!Assuming an even number of players, everyone gets to duel another player. The matching is according to each player's current points, so the two strongest players will always fight each other.If there is an odd number of players, the player with the lowest number of points sits out the duel round, and instead fights creeps as if in a normal round. The next duel round, that player gets first priority., using icon path ReplaceableTextures\CommandButtons\BTNBerserk.blp
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - You need tanks; usually more than archers.
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - Make your formation wide enough so that your enemy's tanks won't spill around to your archers.
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - You can adjust your formation by moving your units around on the grass.
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - Generally, cheaper units have better value that expensive units; but expensive units use less food. Find the right balance.
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - Take note of armour and damage types! Some matchups can cause a damage bonus or loss of up to 50%.
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - Your Spellbringer can cast offensive spells to affect any battle - including those between your opponents. Influence others' battles to work in your favour.
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - At the start of each game, all of the creep waves are randomised. A build order that worked last time you played might not work again. Use your Spellbringer's Forecast ability to see what you're up against.
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - Don't forget to upgrade your gold income.
    Set VariableSet hintId = (hintId + 1)
    Set VariableSet hintText[hintId] = |cff00ff00HINT|r - You can upgrade individual units.
MultiboardClassic
  Events
  Conditions
  Actions
    Multiboard - Create a multiboard with 5 columns and boardPosId rows, titled Region - Classic.
    Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 13.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 3.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 3, row 0 to 3.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 4, row 0 to 4.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 5, row 0 to 6.00% of the total screen width
    Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
    Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
    Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Pts.
    Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to lvl
    Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Army
    Multiboard - Set the text for (Last created multiboard) item in column 5, row 1 to Value
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Multiboard - Set the text for (Last created multiboard) item in column 1, row boardPos[(Player number of (Picked player))] to playerName[(Player number of (Picked player))]
        Multiboard - Set the display style for (Last created multiboard) item in column 1, row boardPos[(Player number of (Picked player))] to Show text and Show icons
        Multiboard - Set the text for (Last created multiboard) item in column 2, row boardPos[(Player number of (Picked player))] to ((0 + /) + (String(modeVictoryPoints)))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row boardPos[(Player number of (Picked player))] to 1
        Multiboard - Set the text for (Last created multiboard) item in column 4, row boardPos[(Player number of (Picked player))] to 0/10
        Multiboard - Set the text for (Last created multiboard) item in column 5, row boardPos[(Player number of (Picked player))] to 0/0
        Multiboard - Set the color for (Last created multiboard) item in column 5, row boardPos[(Player number of (Picked player))] to (100%, 80%, 20%) with 0% transparency
    Multiboard - Hide (Last created multiboard)
    Multiboard - Show (Last created multiboard)
    Multiboard - Minimize (Last created multiboard)
    Multiboard - Maximize (Last created multiboard)
MultiboardSurvival
  Events
  Conditions
  Actions
    Multiboard - Create a multiboard with 5 columns and boardPosId rows, titled Region - Survival.
    Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 13.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 5.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 3, row 0 to 3.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 4, row 0 to 4.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 5, row 0 to 6.00% of the total screen width
    Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
    Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
    Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Lives
    Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to lvl
    Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Army
    Multiboard - Set the text for (Last created multiboard) item in column 5, row 1 to Value
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Multiboard - Set the text for (Last created multiboard) item in column 1, row boardPos[(Player number of (Picked player))] to playerName[(Player number of (Picked player))]
        Multiboard - Set the display style for (Last created multiboard) item in column 1, row boardPos[(Player number of (Picked player))] to Show text and Show icons
        Multiboard - Set the text for (Last created multiboard) item in column 2, row boardPos[(Player number of (Picked player))] to (String(modeLives))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row boardPos[(Player number of (Picked player))] to 1
        Multiboard - Set the text for (Last created multiboard) item in column 4, row boardPos[(Player number of (Picked player))] to 0/10
        Multiboard - Set the text for (Last created multiboard) item in column 5, row boardPos[(Player number of (Picked player))] to 0/0
        Multiboard - Set the color for (Last created multiboard) item in column 5, row boardPos[(Player number of (Picked player))] to (100%, 80%, 20%) with 0% transparency
    Multiboard - Hide (Last created multiboard)
    Multiboard - Show (Last created multiboard)
    Multiboard - Minimize (Last created multiboard)
    Multiboard - Maximize (Last created multiboard)
MultiboardTournament
  Events
  Conditions
  Actions
    Multiboard - Create a multiboard with 5 columns and boardPosId rows, titled Region - Tournament.
    Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 13.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 3.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 3, row 0 to 0.01% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 4, row 0 to 4.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 5, row 0 to 6.00% of the total screen width
    Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
    Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
    Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Pts.
    Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Army
    Multiboard - Set the text for (Last created multiboard) item in column 5, row 1 to Value
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Multiboard - Set the text for (Last created multiboard) item in column 1, row boardPos[(Player number of (Picked player))] to playerName[(Player number of (Picked player))]
        Multiboard - Set the display style for (Last created multiboard) item in column 1, row boardPos[(Player number of (Picked player))] to Show text and Show icons
        Multiboard - Set the text for (Last created multiboard) item in column 2, row boardPos[(Player number of (Picked player))] to 0
        Multiboard - Set the text for (Last created multiboard) item in column 4, row boardPos[(Player number of (Picked player))] to 0/10
        Multiboard - Set the text for (Last created multiboard) item in column 5, row boardPos[(Player number of (Picked player))] to 0/0
        Multiboard - Set the color for (Last created multiboard) item in column 5, row boardPos[(Player number of (Picked player))] to (100%, 80%, 20%) with 0% transparency
    Multiboard - Hide (Last created multiboard)
    Multiboard - Show (Last created multiboard)
    Multiboard - Minimize (Last created multiboard)
    Multiboard - Maximize (Last created multiboard)
GetRace
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    ((Triggering unit) is A peon-type unit) Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Triggering unit)) Equal to Random Builder
      Then - Actions
        Unit - Replace (Triggering unit) with a raceBuilder[(Random integer number between 1 and raceId)] using The new unit's default life and mana
        Selection - Select (Last replaced unit) for (Owner of (Last replaced unit))
        Set VariableSet builder[(Player number of (Owner of (Last replaced unit)))] = (Last replaced unit)
        For each (Integer A) from 1 to raceId, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Unit-type of (Last replaced unit)) Equal to raceBuilder[(Integer A)]
              Then - Actions
                Multiboard - Set the icon for (Last created multiboard) item in column 1, row boardPos[(Player number of (Owner of (Last replaced unit)))] to raceIcon[(Integer A)]
              Else - Actions
        Animation - Change (Last replaced unit) flying height to 200.00 at 0.00
      Else - Actions
        Set VariableSet builder[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
        For each (Integer A) from 1 to raceId, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Unit-type of (Triggering unit)) Equal to raceBuilder[(Integer A)]
              Then - Actions
                Multiboard - Set the icon for (Last created multiboard) item in column 1, row boardPos[(Player number of (Owner of (Triggering unit)))] to raceIcon[(Integer A)]
              Else - Actions
        Animation - Change (Triggering unit) flying height to 200.00 at 0.00
GetSoldierBuild
  Events
    Unit - A unit Finishes construction
  Conditions
    ((Triggering unit) is A structure) Equal to False
  Actions
    Set VariableSet ip = (Player number of (Owner of (Triggering unit)))
    Unit - Make (Triggering unit) Invulnerable
    Unit Group - Add (Triggering unit) to army[ip]
    Set VariableSet playerValue[ip] = 0
    Unit Group - Pick every unit in army[ip] and do (Actions)
      Loop - Actions
        Set VariableSet playerValue[ip] = (playerValue[ip] + (Point-value of (Picked unit)))
    Trigger - Run Unlock250Value <gen> (ignoring conditions)
    Multiboard - Set the text for (Last created multiboard) item in column 4, row boardPos[ip] to (((String(((Player(ip)) Food used))) + /) + (String(((Player(ip)) Food cap))))
    Multiboard - Set the text for (Last created multiboard) item in column 5, row boardPos[ip] to (((String(playerValue[ip])) + /) + (String(playerValueResearch[ip])))
    Unit - Add Behaviours to (Triggering unit)
    Unit - Add Sell (confirm) to (Triggering unit)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Triggering unit)) Equal to Locust (Nerubian)
      Then - Actions
        Animation - Change (Triggering unit)'s size to (300.00%, 300.00%, 300.00%) of its original size
        Animation - Change (Triggering unit)'s animation speed to 15.00% of its original speed
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Triggering unit)) Equal to Priest (Human)
      Then - Actions
        Unit - Remove Heal from (Triggering unit)
        Unit - Add Heal to (Triggering unit)
      Else - Actions
GetSoldierUpgrade
  Events
    Unit - A unit Finishes an upgrade
  Conditions
    ((Triggering unit) is A structure) Equal to False
    ((Triggering unit) is A peon-type unit) Equal to False
  Actions
    Unit - Make (Triggering unit) Invulnerable
    Special Effect - Create a special effect attached to the origin (attachpoint) of (Triggering unit) using war3mapImported\GeneralHeroGlow.mdx
    Unit - Change color of (Triggering unit) to Maroon
    Unit - Change color of (Triggering unit) to (Color of (Owner of (Triggering unit)))
    Set VariableSet ip = (Player number of (Owner of (Triggering unit)))
    Set VariableSet playerValue[ip] = 0
    Unit Group - Pick every unit in army[ip] and do (Actions)
      Loop - Actions
        Set VariableSet playerValue[ip] = (playerValue[ip] + (Point-value of (Picked unit)))
    Trigger - Run Unlock250Value <gen> (ignoring conditions)
    Multiboard - Set the text for (Last created multiboard) item in column 4, row boardPos[ip] to (((String(((Player(ip)) Food used))) + /) + (String(((Player(ip)) Food cap))))
    Multiboard - Set the text for (Last created multiboard) item in column 5, row boardPos[ip] to (((String(playerValue[ip])) + /) + (String(playerValueResearch[ip])))
    Unit - Add Behaviours to (Triggering unit)
    Unit - Add Sell (confirm) to (Triggering unit)
level bonus income cost return level bonus total food cost cost per food
1 5 35 30 6 1 10 20 30 3
2 6 42 45 7 2 11 32 45 4
3 7 51 60 8 3 12 46 60 5
4 8 62 75 9 4 13 62 75 5
5 9 75 90 10 5 14 80 90 6
6 10 90 105 10 6 15 100 105 7
7 11 107 120 10 7 16 122 120 7
8 12 126 135 11 8 17 146 135 7
9 13 147 150 11 9 18 172 150 8
10 14 170 165 11 10 19 200 165 8
11 15 195 180 12 11 20 230 180 9
12 16 222 195 12 12 21 262 195 9
13 17 251 210 12 13 22 296 210 9
14 18 282 225 12
15 19 315 240 12
16 20 350 255 12
17 21 387 270 12
18 22 426 285 12
19 23 467 300 13
20 24 510 315 13
GetUpgrades
  Events
    Unit - A unit Finishes research
  Conditions
  Actions
    Set VariableSet ip = (Player number of (Owner of (Triggering unit)))
    Player - Set the current research level of (Researched tech-type) to (Current research level of (Researched tech-type) for (Owner of (Triggering unit))) for dummyplayer[ip]
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        And - All (Conditions) are true
          Conditions
            (Researched tech-type) Not equal to R000 (techcode)
            (Researched tech-type) Not equal to R001 (techcode)
      Then - Actions
        Set VariableSet playerValueResearch[ip] = (playerValueResearch[ip] + (20 + ((Current research level of (Researched tech-type) for (Owner of (Triggering unit))) x 10)))
        Multiboard - Set the text for (Last created multiboard) item in column 5, row boardPos[ip] to (((String(playerValue[ip])) + /) + (String(playerValueResearch[ip])))
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Researched tech-type) Equal to R000 (techcode)
      Then - Actions
        Set VariableSet upgFood[(Player number of (Owner of (Triggering unit)))] = (upgFood[(Player number of (Owner of (Triggering unit)))] + (9 + (Current research level of R000 (techcode) for (Owner of (Triggering unit)))))
        Player - Set (Owner of (Triggering unit)).Food cap to upgFood[(Player number of (Owner of (Triggering unit)))]
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Researched tech-type) Equal to R001 (techcode)
      Then - Actions
        Set VariableSet upgGoldInc[(Player number of (Owner of (Triggering unit)))] = (upgGoldInc[(Player number of (Owner of (Triggering unit)))] + (4 + (Current research level of R001 (techcode) for (Owner of (Triggering unit)))))
      Else - Actions
CheckValue
  Events
    Time - Every 4.00 seconds of game time
  Conditions
  Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Set VariableSet ip = (Player number of (Picked player))
        Set VariableSet playerValue[ip] = 0
        Unit Group - Pick every unit in army[ip] and do (Actions)
          Loop - Actions
            Set VariableSet playerValue[ip] = (playerValue[ip] + (Point-value of (Picked unit)))
        Multiboard - Set the text for (Last created multiboard) item in column 4, row boardPos[ip] to (((String(((Player(ip)) Food used))) + /) + (String(((Player(ip)) Food cap))))
        Multiboard - Set the text for (Last created multiboard) item in column 5, row boardPos[ip] to (((String(playerValue[ip])) + /) + (String(playerValueResearch[ip])))
Unlock250Value
  Events
  Conditions
  Actions
    Player Group - Pick every player in pg250value and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            playerValue[(Player number of (Picked player))] Greater than or equal to 250
          Then - Actions
            Unit - Create 1.250 value for (Picked player) at ((Picked player) start location) facing Default building facing degrees
            Player Group - Remove (Picked player) from pg250value.
          Else - Actions
SelectBlacksmith
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Upgrades
  Actions
    Selection - Select blacksmith[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
DeselectBlacksmithClick
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Back
  Actions
    Selection - Select builder[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
DeselectBlacksmithEsc
  Events
    Player - Player 1 (Red) skips a cinematic sequence
    Player - Player 2 (Blue) skips a cinematic sequence
    Player - Player 3 (Teal) skips a cinematic sequence
    Player - Player 4 (Purple) skips a cinematic sequence
    Player - Player 5 (Yellow) skips a cinematic sequence
    Player - Player 6 (Orange) skips a cinematic sequence
  Conditions
    (blacksmith[(Player number of (Triggering player))] is selected by (Triggering player).) Equal to True
  Actions
    Selection - Select builder[(Player number of (Triggering player))] for (Triggering player)
HeroGlowColourChange
  Events
    Unit - A unit enters (Playable map area)
  Conditions
    ((Triggering unit) is A peon-type unit) Equal to False
  Actions
    Special Effect - Create a special effect attached to the origin (attachpoint) of (Triggering unit) using war3mapImported\GeneralHeroGlow.mdx
    Unit - Change color of (Triggering unit) to Maroon
    Unit - Change color of (Triggering unit) to (Color of (Owner of (Triggering unit)))
SetReady
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Ready
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Owner of (Triggering unit)) is in notReadyPlayers.) Equal to True
      Then - Actions
        Player Group - Remove (Owner of (Triggering unit)) from notReadyPlayers.
        Game - Display to (All players) for 5.00 seconds the text: (playerName[(Player number of (Owner of (Triggering unit)))] + is |cff00ff00ready|r.)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Number of players in notReadyPlayers) Equal to 0
          Then - Actions
            Countdown Timer - Start roundTimer as a One-shot timer that will expire in 1.00 seconds
          Else - Actions
      Else - Actions
GameRoundMain
  Events
    Time - roundTimer expires
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Player Group - Pick every player in notReadyPlayers and do (Actions)
      Loop - Actions
        Player Group - Remove (Picked player) from notReadyPlayers.
    Set VariableSet indexId = 0
    Set VariableSet round = (round + 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MSMain Equal to 3
      Then - Actions
        Trigger - Run GameRoundTournament <gen> (ignoring conditions)
        Sound - Play StartDuel <gen>
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            duelTicker Equal to modeDuelFrequency
          Then - Actions
            Trigger - Run GameRoundDuel <gen> (ignoring conditions)
            Sound - Play StartDuel <gen>
          Else - Actions
            Sound - Play NewRound <gen>
            Set VariableSet duelTicker = (duelTicker + 1)
            Game - Display to (All players) for 20.00 seconds the text: (- - - |cffffcc00Round + ((String(round)) + |r - - -))
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                MSMain Equal to 1
              Then - Actions
                Multiboard - Change the title of (Last created multiboard) to ((Region - Classic - [|cffffffffRound + (String(round))) + |r])
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                MSMain Equal to 2
              Then - Actions
                Multiboard - Change the title of (Last created multiboard) to ((Region - Survival - [|cffffffffRound + (String(round))) + |r])
              Else - Actions
            Player Group - Pick every player in players and do (Actions)
              Loop - Actions
                Set VariableSet forecastLevel[ip] = (playerLevel[ip] + 1)
                Set VariableSet playerBattleChecker[(Player number of (Picked player))] = 20
                Set VariableSet ip = (Player number of (Picked player))
                Game - Display to (Player group((Picked player))) for 20.00 seconds the text: ([Level + ((String(playerLevel[ip])) + ((, attempt + (String(playerLevelAttempts[ip]))) + ])))
                Trigger - Run gSpawnVsCreeps <gen> (ignoring conditions)
    Wait until ((allUnits is empty) Equal to True), checking every 1 seconds
    Wait 1.00 seconds
    Trigger - Turn on (This trigger)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MSMain Equal to 3
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            round Equal to rrRoundId
          Then - Actions
            Set VariableSet i = 0
            Player Group - Pick every player in players and do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    playerPoints[(Player number of (Picked player))] Greater than i
                  Then - Actions
                    Set VariableSet i = playerPoints[(Player number of (Picked player))]
                  Else - Actions
            Player Group - Pick every player in players and do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    playerPoints[(Player number of (Picked player))] Equal to i
                  Then - Actions
                    Player Group - Add (Picked player) to winningPlayers
                  Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Number of players in winningPlayers) Equal to 1
              Then - Actions
                Set VariableSet winningPlayer = (Random player from winningPlayers)
                Trigger - Run GameEnd <gen> (ignoring conditions)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Number of players in winningPlayers) Equal to 2
              Then - Actions
                Trigger - Run GameEndTieBreaker <gen> (ignoring conditions)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Number of players in winningPlayers) Greater than or equal to 3
              Then - Actions
                Set VariableSet modeVictoryPoints = (modeVictoryPoints + 1)
                Game - Display to (All players) the text: The players tied for first place will have another round,
                Player Group - Pick every player in players and do (Actions)
                  Loop - Actions
                    Player Group - Remove (Picked player) from players.
                Player Group - Pick every player in winningPlayers and do (Actions)
                  Loop - Actions
                    Player Group - Remove (Picked player) from winningPlayers.
                    Player Group - Add (Picked player) to players
                Trigger - Run ScheduleRoundRobin <gen> (ignoring conditions)
                Trigger - Run GameRoundEnd <gen> (ignoring conditions)
              Else - Actions
          Else - Actions
            Player Group - Pick every player in (All players) and do (Actions)
              Loop - Actions
                Set VariableSet ip = (Player number of (Picked player))
                Set VariableSet i = (40 + (round x 10))
                Player - Add i to (Player(ip)).Current gold
                Game - Display to (Player group((Player(ip)))) for 10.00 seconds the text: (You receive |cffffcc00 + ((String(i)) + gold|r.))
            Trigger - Run GameRoundEnd <gen> (ignoring conditions)
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            duelTicker Equal to modeDuelFrequency
            (Number of players in players) Not equal to 1
          Then - Actions
            Game - Display to (All players) for 30 seconds the text: Duel round next - prepare yourself!
          Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
          Loop - Actions
            Set VariableSet ip = (Player number of (Picked player))
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                playerPoints[ip] Greater than or equal to modeVictoryPoints
              Then - Actions
                Player Group - Add (Picked player) to winningPlayers
              Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Number of players in winningPlayers) Not equal to 0
            MSMain Equal to 1
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Number of players in winningPlayers) Equal to 1
              Then - Actions
                Set VariableSet winningPlayer = (Random player from winningPlayers)
                Trigger - Run GameEnd <gen> (ignoring conditions)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Number of players in winningPlayers) Equal to 2
              Then - Actions
                Trigger - Run GameEndTieBreaker <gen> (ignoring conditions)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Number of players in winningPlayers) Greater than or equal to 3
              Then - Actions
                Set VariableSet modeVictoryPoints = (modeVictoryPoints + 1)
                Game - Display to (All players) the text: (Victory condition automatically changed to + ((String(modeVictoryPoints)) + points.))
                Trigger - Run GameRoundEnd <gen> (ignoring conditions)
                Player Group - Pick every player in winningPlayers and do (Actions)
                  Loop - Actions
                    Player Group - Remove (Picked player) from winningPlayers.
              Else - Actions
          Else - Actions
            Trigger - Run GameRoundEnd <gen> (ignoring conditions)
GameRoundEnd
  Events
  Conditions
  Actions
    Set VariableSet ug = (Units in (Playable map area) matching (((Matching unit) is an illusion) Equal to True))
    Unit Group - Pick every unit in ug and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
    Custom script: call DestroyGroup(udg_ug)
    Set VariableSet ug = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Egg))
    Unit Group - Pick every unit in ug and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
    Custom script: call DestroyGroup(udg_ug)
    Set VariableSet ug = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Spitting Spider))
    Unit Group - Pick every unit in ug and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
    Custom script: call DestroyGroup(udg_ug)
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Set VariableSet playerInDuel[(Player number of (Picked player))] = False
        Unit - Set mana of builder[(Player number of (Picked player))] to ((Mana of builder[(Player number of (Picked player))]) + modeManaRegeneration)
        Set VariableSet l[2] = ((Picked player) start location)
        Camera - Pan camera for (Picked player) to l[2] over 0.00 seconds
        Custom script: call RemoveLocation(udg_l[2])
    Game - Display to (All players) for 30 seconds the text: Round end.
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MSMain Equal to 3
      Then - Actions
        Countdown Timer - Start roundTimer as a One-shot timer that will expire in 60.00 seconds
      Else - Actions
        Countdown Timer - Start roundTimer as a One-shot timer that will expire in 30.00 seconds
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Player Group - Add (Picked player) to notReadyPlayers
GameEndTieBreaker
  Events
  Conditions
  Actions
    Game - Display to (All players) the text: Two-way tie detected. Final battle commences!
    Wait 3.00 seconds
    Set VariableSet i = 1
    Player Group - Pick every player in winningPlayers and do (Actions)
      Loop - Actions
        Set VariableSet playerBattleChecker[(Player number of (Picked player))] = 20
    Set VariableSet tempPlayer = (Random player from winningPlayers)
    Player Group - Remove tempPlayer from winningPlayers.
    Set VariableSet tempPlayer2 = (Random player from winningPlayers)
    Player Group - Remove tempPlayer2 from winningPlayers.
    Game - Display to (All players) for 10.00 seconds the text: |cffffcc00FINAL BATTLE|r
    Game - Display to (All players) for 10.00 seconds the text: (playerName[(Player number of tempPlayer)] + ( vs + playerName[(Player number of tempPlayer2)]))
    Wait 3.00 seconds
    Set VariableSet ip = (Player number of tempPlayer)
    Trigger - Run DuelSpawnWest <gen> (ignoring conditions)
    Set VariableSet ip = (Player number of tempPlayer2)
    Trigger - Run DuelSpawnEast <gen> (ignoring conditions)
    Trigger - Turn off GameDuelEnds <gen>
    Trigger - Turn on GameEndTieBreakerEnd <gen>
GameEndTieBreakerEnd
  Events
    Unit - A unit Dies
  Conditions
    (Owner of (Triggering unit)) Not equal to Neutral Victim
    (Owner of (Killing unit)) Not equal to Neutral Victim
    ((Triggering unit) is an illusion) Equal to False
  Actions
    For each (Integer A) from 1 to 6, 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
                (Owner of (Triggering unit)) Equal to dummyplayer[(Integer A)]
                (Owner of (Triggering unit)) Equal to (Player((Integer A)))
          Then - Actions
            Set VariableSet ip = (Integer A)
            Unit Group - Remove (Triggering unit) from playerArmy[ip].
            Unit Group - Remove (Triggering unit) from allUnits.
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (playerArmy[ip] is empty) Equal to True
              Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((playerName[(Player number of (Owner of (Killing unit)))] + has beaten ) + (playerName[(Player number of (Owner of (Triggering unit)))] + !))
                For each (Integer B) from 1 to 6, 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
                            (Owner of (Killing unit)) Equal to dummyplayer[(Integer B)]
                            (Owner of (Killing unit)) Equal to (Player((Integer B)))
                      Then - Actions
                        Set VariableSet ip2 = (Integer B)
                        Set VariableSet winningPlayer = (Player((Integer B)))
                        Unit Group - Pick every unit in playerArmy[ip2] and do (Actions)
                          Loop - Actions
                            Unit Group - Remove (Picked unit) from playerArmy[ip2].
                            Unit Group - Remove (Picked unit) from allUnits.
                            Unit - Remove (Picked unit) from the game
                        Trigger - Run GameEnd <gen> (ignoring conditions)
                      Else - Actions
              Else - Actions
          Else - Actions
GameEnd
  Events
  Conditions
  Actions
    Trigger - Turn off PlayerLeaves <gen>
    Cinematic - Clear the screen of text messages for (All players).
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Player Group - Remove (Picked player) from pgTips.
    Wait 2 seconds
    Sound - Play Victory <gen>
    Game - Display to (All players) for 120.00 seconds the text: (playerName[(Player number of winningPlayer)] + has won the game.)
    Game - Display to (All players) for 120.00 seconds the text: Behold the ultimate army!
    Set VariableSet ip = (Player number of winningPlayer)
    Set VariableSet playerBattleChecker[ip] = 300
    Unit Group - Pick every unit in army[ip] and do (Actions)
      Loop - Actions
        Set VariableSet l[0] = (Position of (Picked unit))
        Set VariableSet l[1] = ((Owner of (Picked unit)) start location)
        Set VariableSet x = ((X of l[0]) - (X of l[1]))
        Set VariableSet y = ((Y of l[0]) - (Y of l[1]))
        Set VariableSet l[2] = (Center of podium <gen>)
        Set VariableSet l[3] = (l[2] offset by (x, y))
        Unit - Create 1.(Unit-type of (Picked unit)) for dummyplayer[ip] at l[3] facing 90.00 degrees
        Unit - Add a 100.00 second Generic expiration timer to (Last created unit)
        Unit Group - Add (Last created unit) to playerArmy[ip]
        Unit Group - Add (Last created unit) to allUnits
        Custom script: call RemoveLocation(udg_l[0])
        Custom script: call RemoveLocation(udg_l[1])
        Custom script: call RemoveLocation(udg_l[2])
        Custom script: call RemoveLocation(udg_l[3])
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across podium <gen>
        Camera - .Apply. gg_cam_winCam1 for (Picked player) over 0 seconds
        Camera - .Apply. gg_cam_winCam2 for (Picked player) over 30.00 seconds
    Trigger - Turn off GameRoundDuel <gen>
    Trigger - Turn off GameRoundEnd <gen>
    Trigger - Turn off GameRoundFailure <gen>
    Trigger - Turn off GameRoundMain <gen>
    Trigger - Turn off GameRoundSuccess <gen>
    Wait 30.00 seconds
    Game - Victory winningPlayer (Show dialogs, Show scores)
    Player Group - Pick every player in (All players matching ((Matching player) Not equal to winningPlayer).) and do (Actions)
      Loop - Actions
        Game - Defeat (Picked player) with the message: Defeat!
gSpawnVsCreeps
  Events
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Player(ip)) is in cameraAutoSnapPG.) Equal to True
      Then - Actions
        Set VariableSet l[2] = (Center of visionRegion[ip])
        Camera - Pan camera for (Player(ip)) to l[2] over 0.00 seconds
        Custom script: call RemoveLocation(udg_l[2])
      Else - Actions
    Unit Group - Pick every unit in army[ip] and do (Actions)
      Loop - Actions
        Set VariableSet l[0] = (Position of (Picked unit))
        Set VariableSet l[1] = ((Owner of (Picked unit)) start location)
        Set VariableSet x = ((X of l[0]) - (X of l[1]))
        Set VariableSet y = ((Y of l[0]) - (Y of l[1]))
        Set VariableSet l[2] = (Center of spawnRegion[ip])
        Set VariableSet l[3] = (l[2] offset by (x, y))
        Unit - Create 1.(Unit-type of (Picked unit)) for dummyplayer[ip] at l[3] facing 90.00 degrees
        Set VariableSet u = (Picked unit)
        Trigger - Run spawningAddBehaviours <gen> (ignoring conditions)
        Unit Group - Add (Last created unit) to playerArmy[ip]
        Unit Group - Add (Last created unit) to allUnits
        Set VariableSet l[4] = (l[3] offset by (0, 3000.00))
        Unit - Order (Last created unit) to Attack-Move To.l[4]
        Custom script: call RemoveLocation(udg_l[4])
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Last created unit) is in bFlankLeft.) Equal to True
          Then - Actions
            Set VariableSet l[4] = (l[3] offset by (-1000.00, 2000.00))
            Unit - Order (Last created unit) to Move To.l[4]
            Custom script: call RemoveLocation(udg_l[4])
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Last created unit) is in bFlankRight.) Equal to True
          Then - Actions
            Set VariableSet l[4] = (l[3] offset by (1000.00, 2000.00))
            Unit - Order (Last created unit) to Move To.l[4]
            Custom script: call RemoveLocation(udg_l[4])
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of u) Equal to Locust (Nerubian)
          Then - Actions
            For each (Integer A) from 1 to 7, do (Actions)
              Loop - Actions
                Unit - Create 1.(Unit-type of (Picked unit)) for dummyplayer[ip] at l[3] facing 90.00 degrees
                Trigger - Run spawningAddBehaviours <gen> (ignoring conditions)
                Unit Group - Add (Last created unit) to playerArmy[ip]
                Unit Group - Add (Last created unit) to allUnits
                Set VariableSet l[4] = (l[3] offset by (0, 3000.00))
                Unit - Order (Last created unit) to Attack-Move To.l[4]
                Custom script: call RemoveLocation(udg_l[4])
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ((Last created unit) is in bFlankLeft.) Equal to True
                  Then - Actions
                    Set VariableSet l[4] = (l[3] offset by (-1000.00, 2000.00))
                    Unit - Order (Last created unit) to Move To.l[4]
                    Custom script: call RemoveLocation(udg_l[4])
                  Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ((Last created unit) is in bFlankRight.) Equal to True
                  Then - Actions
                    Set VariableSet l[4] = (l[3] offset by (1000.00, 2000.00))
                    Unit - Order (Last created unit) to Move To.l[4]
                    Custom script: call RemoveLocation(udg_l[4])
                  Else - Actions
          Else - Actions
        Custom script: call RemoveLocation(udg_l[0])
        Custom script: call RemoveLocation(udg_l[1])
        Custom script: call RemoveLocation(udg_l[2])
        Custom script: call RemoveLocation(udg_l[3])
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (playerArmy[ip] is empty) Equal to False
      Then - Actions
        Unit Group - Pick every unit in levelArmy[playerLevel[ip]] and do (Actions)
          Loop - Actions
            Set VariableSet l[1] = (Position of (Picked unit))
            Set VariableSet l[0] = (Center of levelRegion[playerLevel[ip]])
            Set VariableSet x = ((X of l[1]) - (X of l[0]))
            Set VariableSet y = ((Y of l[1]) - (Y of l[0]))
            Set VariableSet l[2] = (Center of creepRegion[ip])
            Set VariableSet l[3] = (l[2] offset by (x, y))
            Unit - Create 1.(Unit-type of (Picked unit)) for Neutral Victim at l[3] facing (Facing of (Picked unit)) degrees
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Unit-type of (Last created unit)) Equal to Brood Mother
              Then - Actions
                Set VariableSet indexId = (indexId + 1)
                Unit - Set the custom value of (Last created unit) to indexId
                Unit - Add Crow Form to (Last created unit)
                Unit - Remove Crow Form from (Last created unit)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    (Unit-type of (Last created unit)) Equal to Kobold Taskmaster
                    (Unit-type of (Last created unit)) Equal to Dark Troll Warlord
                    (Unit-type of (Last created unit)) Equal to Behemoth
                    (Unit-type of (Last created unit)) Equal to Brood Mother
                    (Unit-type of (Last created unit)) Equal to Castle
              Then - Actions
                Set VariableSet boss[ip] = (Last created unit)
              Else - Actions
            Unit - Set (Last created unit) acquisition range to 3000.00
            Set VariableSet l[4] = (Center of spawnRegion[ip])
            Unit - Order (Last created unit) to Attack-Move To.l[4]
            Custom script: call RemoveLocation(udg_l[4])
            Unit Group - Add (Last created unit) to playerCreeps[ip]
            Unit Group - Add (Last created unit) to allUnits
            Custom script: call RemoveLocation(udg_l[0])
            Custom script: call RemoveLocation(udg_l[1])
            Custom script: call RemoveLocation(udg_l[2])
            Custom script: call RemoveLocation(udg_l[3])
      Else - Actions
GameRoundSuccess
  Events
    Unit - A unit Dies
  Conditions
    (Owner of (Triggering unit)) Equal to Neutral Victim
    ((Triggering unit) is an illusion) Equal to False
  Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Triggering unit) is in playerCreeps[(Player number of (Picked player))].) Equal to True
          Then - Actions
            Set VariableSet ip = (Player number of (Picked player))
            Unit Group - Remove (Triggering unit) from allUnits.
            Unit Group - Remove (Triggering unit) from playerCreeps[ip].
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (playerCreeps[ip] is empty) Equal to True
              Then - Actions
                Set VariableSet playerBattleChecker[ip] = -1
                Game - Display to (Player group((Player(ip)))) for 30 seconds the text: |cffffcc00Round Success|r
                Set VariableSet i = upgGoldInc[ip]
                Player - Add i to (Player(ip)).Current gold
                Game - Display to (Player group((Player(ip)))) for 10.00 seconds the text: (You receive |cffffcc00 + ((String(i)) + gold|r from your gold mine.))
                Set VariableSet playerLevel[ip] = (playerLevel[ip] + 1)
                Set VariableSet playerPoints[ip] = (playerPoints[ip] + modePointsForLevels)
                Set VariableSet playerLevelAttempts[ip] = 1
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    MSMain Not equal to 2
                  Then - Actions
                    Multiboard - Set the text for (Last created multiboard) item in column 2, row boardPos[ip] to (((String(playerPoints[ip])) + /) + (String(modeVictoryPoints)))
                  Else - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 3, row boardPos[ip] to (String(playerLevel[ip]))
                Trigger - Turn off GameRoundFailure <gen>
                Unit Group - Pick every unit in playerArmy[ip] and do (Actions)
                  Loop - Actions
                    Unit Group - Remove (Picked unit) from allUnits.
                    Unit Group - Remove (Picked unit) from playerArmy[ip].
                    Unit - Remove (Picked unit) from the game
                Trigger - Turn on GameRoundFailure <gen>
              Else - Actions
          Else - Actions
    Unit Group - Remove (Triggering unit) from allUnits.
GameRoundFailure
  Events
    Unit - A unit Dies
  Conditions
    (Owner of (Triggering unit)) Not equal to Neutral Victim
    (visionMain <gen> contains (Triggering unit)) Equal to True
    ((Triggering unit) is an illusion) Equal to False
    ((Triggering unit) is in allUnits.) Equal to True
  Actions
    For each (Integer A) from 1 to 6, 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
                (Owner of (Triggering unit)) Equal to dummyplayer[(Integer A)]
                (Owner of (Triggering unit)) Equal to (Player((Integer A)))
          Then - Actions
            Set VariableSet ip = (Integer A)
            Unit Group - Remove (Triggering unit) from playerArmy[ip].
            Unit Group - Remove (Triggering unit) from allUnits.
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (playerArmy[ip] is empty) Equal to True
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    MSMain Equal to 2
                  Then - Actions
                    Set VariableSet playerLives[ip] = (playerLives[ip] - 1)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        playerLives[ip] Equal to 0
                      Then - Actions
                        Game - Display to (Player group((Player(ip)))) for 30 seconds the text: |cffff0000You have lost your last life.|r
                        Game - Display to players for 30 seconds the text: (playerName[ip] + |cffff0000has been eliminated.|r)
                        Multiboard - Set the text for (Last created multiboard) item in column 2, row boardPos[ip] to (String(playerLives[ip]))
                        Unit Group - Pick every unit in (Units owned by (Player(ip)).) and do (Actions)
                          Loop - Actions
                            Unit - Kill (Picked unit)
                        Player Group - Remove (Player(ip)) from players.
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            (Number of players in players) Equal to 1
                          Then - Actions
                            Set VariableSet winningPlayer = (Random player from players)
                            Game - Display to players for 30 seconds the text: (playerName[(Player number of winningPlayer)] + is the last surviving player.)
                            Trigger - Run GameEnd <gen> (ignoring conditions)
                          Else - Actions
                      Else - Actions
                        Game - Display to (Player group((Player(ip)))) for 30 seconds the text: (|cffff0000You have lost a life.|r ( + ((String(playerLives[ip])) + remaining)))
                        Multiboard - Set the text for (Last created multiboard) item in column 2, row boardPos[ip] to (String(playerLives[ip]))
                  Else - Actions
                    Game - Display to (Player group((Player(ip)))) for 30 seconds the text: |cffff0000Round failed|r
                Set VariableSet playerBattleChecker[ip] = -1
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (playerLevel[ip] mod 5) Equal to 0
                  Then - Actions
                    Set VariableSet i = (Integer(((((100.00 - (Percentage life of boss[ip])) / 100.00) x (Real(bountyTable[(Level of boss[ip])]))) x 0.75)))
                    Player - Add i to (Player(ip)).Current gold
                    Game - Display to (Player group((Player(ip)))) for 10.00 seconds the text: (You receive |cffffcc00 + ((String(i)) + gold|r compensation.))
                  Else - Actions
                Set VariableSet playerLevelAttempts[ip] = (playerLevelAttempts[ip] + 1)
                Set VariableSet i = upgGoldInc[ip]
                Player - Add i to (Player(ip)).Current gold
                Game - Display to (Player group((Player(ip)))) for 10.00 seconds the text: (You receive |cffffcc00 + ((String(i)) + gold|r from your gold mine.))
                Trigger - Turn off GameRoundSuccess <gen>
                Unit Group - Pick every unit in playerCreeps[ip] and do (Actions)
                  Loop - Actions
                    Unit Group - Remove (Picked unit) from allUnits.
                    Unit Group - Remove (Picked unit) from playerCreeps[ip].
                    Unit - Remove (Picked unit) from the game
                Trigger - Turn on GameRoundSuccess <gen>
              Else - Actions
          Else - Actions
    Unit Group - Remove (Triggering unit) from allUnits.
GameBattleCheckAdd
  Events
    Unit - A unit Is attacked
  Conditions
  Actions
    Player Group - Pick every player in players 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
                (Owner of (Attacking unit)) Equal to dummyplayer[(Player number of (Picked player))]
                (Owner of (Attacking unit)) Equal to (Picked player)
          Then - Actions
            Set VariableSet playerBattleChecker[(Player number of (Picked player))] = 10
          Else - Actions
GameBattleCheckLoop
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            playerBattleChecker[(Player number of (Picked player))] Equal to 0
          Then - Actions
            Unit Group - Pick every unit in playerArmy[(Player number of (Picked player))] and do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    playerInDuel[(Player number of (Picked player))] Equal to True
                  Then - Actions
                    Unit - Cause (Random unit from playerArmy[(Player number of duelPartner[(Player number of (Picked player))])]) to damage (Picked unit), dealing 1000000000.00 damage of attack type Chaos and damage type Normal
                  Else - Actions
                    Unit - Cause Peasant 0328 <gen> to damage (Picked unit), dealing 1000000000.00 damage of attack type Chaos and damage type Normal
          Else - Actions
        Set VariableSet playerBattleChecker[(Player number of (Picked player))] = (playerBattleChecker[(Player number of (Picked player))] - 1)
GameRoundDuel
  Events
  Conditions
  Actions
    Set VariableSet duelTicker = 0
    Game - Display to (All players) for 20.00 seconds the text: (- - - |cffffcc00Round + ((String(round)) + |r - - -))
    Game - Display to (All players) for 20.00 seconds the text: - - - - |cffff0000Duel|r - - - -
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        Player Group - Add (Picked player) to tempPlayers
        Set VariableSet playerBattleChecker[(Player number of (Picked player))] = 10
        Game - Display to debugPg the text: (Name of (Picked player))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MSMain Equal to 2
          Then - Actions
            Set VariableSet playerPoints[(Player number of (Picked player))] = (Random integer number between 1 and 10)
          Else - Actions
    Set VariableSet i = 0
    For each (Integer A) from 1 to 3, do (Actions)
      Loop - Actions
        Game - Display to debugPg the text: (loop + (((String((Integer A))) + , i = ) + (String(i))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Number of players in tempPlayers) Not equal to 0
          Then - Actions
            Set VariableSet i = (i + 1)
            -------- --- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                oddPlayerOut Not equal to Neutral Passive
              Then - Actions
                Set VariableSet tempPlayer = oddPlayerOut
                Player Group - Remove tempPlayer from tempPlayers.
                Set VariableSet ip = (Player number of tempPlayer)
                Set VariableSet playerInDuel[ip] = True
                Set VariableSet duellingRegion[ip] = duelMain[i]
                Trigger - Run DuelSpawnWest <gen> (ignoring conditions)
                Set VariableSet tempPlayer2 = (Random player from tempPlayers)
                Set VariableSet duelPartner[(Player number of tempPlayer)] = tempPlayer2
                Set VariableSet duelPartner[(Player number of tempPlayer2)] = tempPlayer
                Set VariableSet playerDuelArena[(Player number of tempPlayer)] = i
                Set VariableSet playerDuelArena[(Player number of tempPlayer2)] = i
                Player Group - Remove tempPlayer2 from tempPlayers.
                Set VariableSet ip = (Player number of tempPlayer2)
                Set VariableSet playerInDuel[ip] = True
                Set VariableSet duellingRegion[ip] = duelMain[i]
                Trigger - Run DuelSpawnEast <gen> (ignoring conditions)
                Set VariableSet oddPlayerOut = Neutral Passive
              Else - Actions
                Set VariableSet tempScore = 0
                Player Group - Pick every player in tempPlayers and do (Actions)
                  Loop - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        playerPoints[(Player number of (Picked player))] Greater than or equal to tempScore
                      Then - Actions
                        Set VariableSet tempScore = playerPoints[(Player number of (Picked player))]
                        Set VariableSet tempPlayer = (Picked player)
                      Else - Actions
                Player Group - Remove tempPlayer from tempPlayers.
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Number of players in tempPlayers) Equal to 0
                  Then - Actions
                    Set VariableSet ip = (Player number of tempPlayer)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Number of players in players) Equal to 1
                      Then - Actions
                        Set VariableSet i2 = upgGoldInc[ip]
                        Player - Add i2 to (Player(ip)).Current gold
                        Game - Display to (Player group((Player(ip)))) for 10.00 seconds the text: (You receive |cffffcc00 + ((String(i2)) + bonus gold|r))
                      Else - Actions
                        Game - Display to (All players) for 20.00 seconds the text: (playerName[(Player number of tempPlayer)] + has no opponent this round.)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Number of players in players) Not equal to 1
                      Then - Actions
                        Set VariableSet oddPlayerOut = tempPlayer
                      Else - Actions
                    Game - Display to (Player group(tempPlayer)) for 20.00 seconds the text: ([Level + ((String(playerLevel[ip])) + ((, attempt + (String(playerLevelAttempts[ip]))) + ])))
                    Set VariableSet playerBattleChecker[ip] = 10
                    Set VariableSet forecastLevel[ip] = (playerLevel[ip] + 1)
                    Trigger - Run gSpawnVsCreeps <gen> (ignoring conditions)
                  Else - Actions
                    Set VariableSet ip = (Player number of tempPlayer)
                    Set VariableSet playerInDuel[ip] = True
                    Set VariableSet duellingRegion[ip] = duelMain[i]
                    Trigger - Run DuelSpawnWest <gen> (ignoring conditions)
                    Set VariableSet oddPlayerOut = Neutral Passive
                    -------- --- --------
                    Set VariableSet tempScore = 0
                    Player Group - Pick every player in tempPlayers and do (Actions)
                      Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            playerPoints[(Player number of (Picked player))] Greater than or equal to tempScore
                          Then - Actions
                            Set VariableSet tempScore = playerPoints[(Player number of (Picked player))]
                            Set VariableSet tempPlayer2 = (Picked player)
                          Else - Actions
                    Set VariableSet duelPartner[(Player number of tempPlayer)] = tempPlayer2
                    Set VariableSet duelPartner[(Player number of tempPlayer2)] = tempPlayer
                    Set VariableSet playerDuelArena[(Player number of tempPlayer)] = i
                    Set VariableSet playerDuelArena[(Player number of tempPlayer2)] = i
                    -------- --- --------
                    Player Group - Remove tempPlayer2 from tempPlayers.
                    Set VariableSet ip = (Player number of tempPlayer2)
                    Set VariableSet playerInDuel[ip] = True
                    Set VariableSet duellingRegion[ip] = duelMain[i]
                    Trigger - Run DuelSpawnEast <gen> (ignoring conditions)
          Else - Actions
DuelSpawnWest
  Events
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Player(ip)) is in cameraAutoSnapPG.) Equal to True
      Then - Actions
        Set VariableSet l[2] = (Center of duelMain[i])
        Camera - Pan camera for (Player(ip)) to l[2] over 0.00 seconds
        Custom script: call RemoveLocation(udg_l[2])
      Else - Actions
    Set VariableSet l[2] = (Center of duelMain[i])
    Camera - Pan camera for (Player(ip)) to l[2] over 0.00 seconds
    Custom script: call RemoveLocation(udg_l[2])
    Unit Group - Pick every unit in army[ip] and do (Actions)
      Loop - Actions
        Set VariableSet l[0] = (Position of (Picked unit))
        Set VariableSet l[1] = ((Owner of (Picked unit)) start location)
        Set VariableSet x = ((X of l[0]) - (X of l[1]))
        Set VariableSet y = ((Y of l[0]) - (Y of l[1]))
        Set VariableSet l[2] = (Center of duelWest[i])
        Set VariableSet l[3] = (l[2] offset by (y, (x x -1.00)))
        Unit - Create 1.(Unit-type of (Picked unit)) for dummyplayer[ip] at l[3] facing 0.00 degrees
        Set VariableSet u = (Picked unit)
        Trigger - Run spawningAddBehaviours <gen> (ignoring conditions)
        Unit Group - Add (Last created unit) to playerArmy[ip]
        Unit Group - Add (Last created unit) to allUnits
        Set VariableSet l[4] = (Center of duelEast[i])
        Unit - Order (Last created unit) to Attack-Move To.l[4]
        Custom script: call RemoveLocation(udg_l[4])
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Last created unit) is in bFlankLeft.) Equal to True
          Then - Actions
            Set VariableSet l[4] = (l[3] offset by (1500.00, 1000.00))
            Unit - Order (Last created unit) to Move To.l[4]
            Custom script: call RemoveLocation(udg_l[4])
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Last created unit) is in bFlankRight.) Equal to True
          Then - Actions
            Set VariableSet l[4] = (l[3] offset by (1500.00, -1000.00))
            Unit - Order (Last created unit) to Move To.l[4]
            Custom script: call RemoveLocation(udg_l[4])
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of u) Equal to Locust (Nerubian)
          Then - Actions
            For each (Integer C) from 1 to 7, do (Actions)
              Loop - Actions
                Unit - Create 1.(Unit-type of (Picked unit)) for dummyplayer[ip] at l[3] facing 90.00 degrees
                Trigger - Run spawningAddBehaviours <gen> (ignoring conditions)
                Unit Group - Add (Last created unit) to playerArmy[ip]
                Unit Group - Add (Last created unit) to allUnits