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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. 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

2P Undead07 v2.2.w3x
Variables
Initialization
PreInit
Melee Initialization
SetupComputerPlayers
StartCampaignAI
SetupComputerAlliances
SetupPlayerAlliances
SetupPlayerResources
SetupArthas
SetupKelThuzad
SetupArchmage01
SetupArchmage02
SetupArchmage03
SetupArchmageExtra
SetupArchmageHermit
SetupArchmageYellow
SetupAntonidas
SetupOpeningKnights
SetupGhoulGroup
SetupGyroForce
SetupQuests
SetupShields
SetupBookOfSummoning
SetupArchmageCount
SetupScoreScreen
Setup Ownership
Leaderboards
Leaderboard Create
Leaderboard Update
ComputerResources
PurpleGold
YellowGold
OrangeGold
PurpleLumber
YellowLumber
OrangeLumber
LevelCaps
ArthasLevelUp
KelThuzadLevelUp
ArchmageLeash
Archmage01Leash
Archmage02Leash
Archmage03Leash
IZZZZZZZZI AI IZZZZZZZZZZI
StartAI
StartAIYellow
StartAIOrange
IZZZZZZI CINEMATICS IZZZZZZI
OpeningCinematic
OpeningSetup
OpeningCancelled
Opening01
Opening02
EndingCinematic
EndingCancelled
Ending01
Ending02
EndingAlly
Arthas Kill Antonidas
IZZZZZZZZZZZZZZZZZZZZZZZI
ExoticBeastiary
ExoticBeastiaryQ
ExoticBeastiary
Cage01
Cage02
Cage03
Cage04
Cage05
Gate
GateDown
GyroForce
GyroShield02
GyroShield02WyrmGroupAdd
GyroShield02WyrmGroupSubtract
GyroShield02WyrmGroupSubtractDies
GyroShield02Done
IZZZZZZZI
GyroShield03
GyroShield03WyrmGroupAdd
GyroShield03WyrmGroupSubtract
GyroShield03WyrmGroupSubtractDies
GyroShield03Done
VaultOfEnchantments
VaultOfEnchantments
Vault01
ArchmageShieldSupporters
Archmage01
Archmage01Dead
Archmage02
Archmage02Dead
Archmage03
Archmage03Dead
AntonidasArea
ContainmentArea
Crates
CratesDeadTown
Shield01
Shield01Enter AnimateDead
Shield01Enter
Shield01Exit
Shield01Down
Shield01Damage
Shield02
Shield02Enter AnimateDead
Shield02Activate
Shield02Enter
Shield02Exit
Shield02Down
Shield02Damage
Shield03
Shield03Enter AnimateDead
Shield03Activate
Shield03Enter
Shield03Exit
Shield03Down
Shield03Damage
IZZZZZZZZZZZZZZZZZZZZZZZI
Defeat
Defeat Lose Buildings
Other Triggers
Item Drop Bonuses
Custom Variables
Timer Trigger
Combine Books
Setup Insane
Systems
Research Init
Research Begins
Research Cancelled
Research Complete
Requirement Init
Requirement Update
Computer Upkeeps
Player Limits
Gametext
Init Gametext
Skip Cinematic
Leaves Game
Endgame Text
Startgame Text
Startgame Text 2
Startgame Text 3
Startgame New
Startgame Load
ResourceDrop Order
ResourceDrop Destroy
ResourceDrop Build
ResourceDrop Starters
ResourceDrop Init
Send Lumber
Send Gold
Exchange Unit
Deselect Unit
Death Select
Select Unit
function SaveLoad_InitialSetup takes nothing returns nothing
    local integer i = 0
    local integer j = 0

    loop
        set udg_SaveLoad_Compress[i + 48] = j
        set udg_SaveLoad_Uncompress[i] = i + 48
        set j = j + 1
        set i = i + 1
        exitwhen i >= 10
    endloop
    set i = 0
    loop
        set udg_SaveLoad_Compress[i + 97] = j
        set udg_SaveLoad_Compress[i + 65] = j + 26
        set udg_SaveLoad_Uncompress[i + 10] = i + 97
        set udg_SaveLoad_Uncompress[i + 26 + 10] = i + 65
        set j = j + 1
        set i = i + 1
        exitwhen i >= 26
    endloop
endfunction

function SaveLoad_Id2CId takes integer n returns integer
    local integer i = n / (256 * 256 * 256)
    local integer r
    set n = n - i * (256 * 256 * 256)
    set r = udg_SaveLoad_Compress[i]
    set i = n / (256 * 256)
    set n = n - i * (256 * 256)
    set r = r * 64 + udg_SaveLoad_Compress[i]
    set i = n / 256
    set r = r * 64 + udg_SaveLoad_Compress[i]
    return r * 64 + udg_SaveLoad_Compress[n - i * 256]
endfunction

function SaveLoad_CId2Id takes integer n returns integer
    local integer i = n / (64 * 64 * 64)
    local integer r
    set n = n - i * (64 * 64 * 64)
    set r = udg_SaveLoad_Uncompress[i]
    set i = n / (64 * 64)
    set n = n - i * (64 * 64)
    set r = r * 256 + udg_SaveLoad_Uncompress[i]
    set i = n / 64
    set r = r * 256 + udg_SaveLoad_Uncompress[i]
    return r * 256 + udg_SaveLoad_Uncompress[n - i * 64]
endfunction

function SaveLoad_Unit2Integer takes unit u returns integer
    local integer i = 0
    local integer n = GetUnitTypeId(u)
    if udg_SaveLoad_Initialized == false then
        set udg_SaveLoad_Initialized = true
        call SaveLoad_InitialSetup()
    endif
    loop
        set i = i + 1
        exitwhen i > udg_SaveLoad_Heroes_LastIndex
        if udg_SaveLoad_Heroes[i] == n then
            return i
        endif
    endloop
    return SaveLoad_Id2CId(n)
endfunction
function SaveLoad_Integer2Unit takes integer i returns integer
    if udg_SaveLoad_Initialized == false then
        set udg_SaveLoad_Initialized = true
        call SaveLoad_InitialSetup()
    endif
    if i <= udg_SaveLoad_Heroes_LastIndex then
        return udg_SaveLoad_Heroes[i]
    endif
    return SaveLoad_CId2Id(i)
endfunction

function SaveLoad_Item2Integer takes item t returns integer
    local integer i = 0
    local integer n = GetItemTypeId(t)
    if udg_SaveLoad_Initialized == false then
        set udg_SaveLoad_Initialized = true
        call SaveLoad_InitialSetup()
    endif
    loop
        set i = i + 1
        exitwhen i > udg_SaveLoad_Items_LastIndex
        if udg_SaveLoad_Items[i] == n then
            return i
        endif
    endloop
    return SaveLoad_Id2CId(n)
endfunction
function SaveLoad_Integer2Item takes integer i returns integer
    if udg_SaveLoad_Initialized == false then
        set udg_SaveLoad_Initialized = true
        call SaveLoad_InitialSetup()
    endif
    if i <= udg_SaveLoad_Items_LastIndex then
        return udg_SaveLoad_Items[i]
    endif
    return SaveLoad_CId2Id(i)
endfunction

function SaveLoad_Ability2Integer takes integer a returns integer
    local integer i = 0
    if udg_SaveLoad_Initialized == false then
        set udg_SaveLoad_Initialized = true
        call SaveLoad_InitialSetup()
    endif
    loop
        set i = i + 1
        exitwhen i > udg_SaveLoad_Abilities_LastIndex
        if udg_SaveLoad_Abilities[i] == a then
            return i
        endif
    endloop
    return SaveLoad_Id2CId(a)
endfunction
function SaveLoad_Integer2Ability takes integer i returns integer
    if udg_SaveLoad_Initialized == false then
        set udg_SaveLoad_Initialized = true
        call SaveLoad_InitialSetup()
    endif
    if i <= udg_SaveLoad_Abilities_LastIndex then
        return udg_SaveLoad_Abilities[i]
    endif
    return SaveLoad_CId2Id(i)
endfunction

function SaveLoad_Color takes string s returns string
    local integer i = StringLength(s)
    local string c
    local string r = ""

    loop
        set i = i - 1
        set c = SubString(s,i,i + 1)
        if c == "0" or c == "1" or c == "2" or c == "3" or c == "4" or c == "5" or c == "6" or c == "7" or c == "8" or c == "9" then
            set r = "|cffff9999" + c + "|r" + r
        elseif c == "-" then
            set r = "|cffdddddd-|r" + r
        elseif c == "a" or c == "b" or c == "c" or c == "d" or c == "e" or c == "f" or c == "g" or c == "h" or c == "i" or c == "j" or c == "k" or c == "l" or c == "m" or c == "n" or c == "o" or c == "p" or c == "q" or c == "r" or c == "s" or c == "t" or c == "u" or c == "v" or c == "w" or c == "x" or c == "y" or c == "z" then
            set r = "|cff99ff99" + c + "|r" + r
        elseif c == "A" or c == "B" or c == "C" or c == "D" or c == "E" or c == "F" or c == "G" or c == "H" or c == "I" or c == "J" or c == "K" or c == "L" or c == "M" or c == "N" or c == "O" or c == "P" or c == "Q" or c == "R" or c == "S" or c == "T" or c == "U" or c == "V" or c == "W" or c == "X" or c == "Y" or c == "Z" then
            set r = "|cff9999ff" + c + "|r" + r
        else
            set r = c + r
        endif
        exitwhen i <= 0
    endloop
    return r
endfunction

function SaveLoad_EncodeChar takes string n returns integer
    local integer i = 0
    local string s1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    local string s2 = "abcdefghijklmnopqrstuvwxyz"
    local string s3 = "0123456789"

    loop
        if SubString(s1,i,i + 1) == n then
            return i
        endif
        if SubString(s2,i,i + 1) == n then
            return i
        endif
        set i = i + 1
        exitwhen i >= 26
    endloop
    set i = 0
    loop
        if SubString(s3,i,i + 1) == n then
            return i
        endif
        set i = i + 1
        exitwhen i >= 10
    endloop
    return 0
endfunction

function SaveLoad_EncodeVerify takes string buffer returns integer
    local integer i = 0
    local integer j = 0
    local string name = GetPlayerName(GetTriggerPlayer())
    if udg_SaveLoad_UsePlayername == true then
        loop
            set j = j + SaveLoad_EncodeChar(SubString(name,i,i + 1))
            set i = i + 1
            exitwhen i >= StringLength(name)
        endloop
    endif
    set i = 0
    loop
        set j = j + SaveLoad_EncodeChar(SubString(buffer,i,i + 1))
        set i = i + 1
        exitwhen i >= StringLength(buffer)
    endloop
    return j
endfunction

function SaveLoad_EncodeValues takes nothing returns string
    local integer i
    local integer j
    local integer k
    local integer l
    local integer m
    local integer CodeLength = StringLength(udg_SaveLoad_Alphabet)
    local integer array a
    local string buffer = ""
    local string c = ""
    local integer skip = 0
    local integer CONST = 1000000
    local string abc = "0123456789"

    set i = 0
    loop
        set i = i + 1
        exitwhen i > udg_SaveCount
        set buffer = buffer + I2S(udg_Save[i]) + "-"
    endloop
    set buffer = buffer + I2S(SaveLoad_EncodeVerify(buffer))
    if udg_Save[1] == 0 then
        set buffer = "-" + buffer
    endif

    set i = 0
    loop
        set a[i] = 0
        set i = i + 1
        exitwhen i >= 100
    endloop

    set m = 0
    set i = 0
    loop
        set j = 0
        loop
            set a[j] = a[j] * 11
            set j = j + 1
            exitwhen j > m
        endloop

        set l = 0
        set c = SubString(buffer,i,i + 1)
        loop
            exitwhen SubString(abc,l,l + 1) == c
            set l = l + 1
            exitwhen l > 9
        endloop
        set a[0] = a[0] + l

        set j = 0
        loop
            set k = a[j] / CONST
            set a[j] = a[j] - k * CONST
            set a[j + 1] = a[j + 1] + k
            set j = j + 1
            exitwhen j > m
        endloop
        if k > 0 then
            set m = m + 1
        endif
        set i = i + 1
        exitwhen i >= StringLength(buffer)
    endloop

    set buffer = ""
    loop
        exitwhen m < 0
        set j = m
        loop
            exitwhen j <= 0
            set k = a[j] / CodeLength
            set a[j - 1] = a[j - 1] + (a[j] - k * CodeLength) * CONST
            set a[j] = k
            set j = j - 1
        endloop
        set k = a[j] / CodeLength
        set i = a[j] - k * CodeLength
        set buffer = buffer + SubString(udg_SaveLoad_Alphabet,i,i + 1)
        set a[j] = k
        if a[m] == 0 then
            set m = m - 1
        endif
    endloop

    set i = StringLength(buffer)
    set skip = 0
    set c = ""
    loop
        set i = i - 1
        set c = c + SubString(buffer,i,i + 1)
        set skip = skip + 1
        if skip == 4 and i > 0 then
            set c = c + "-"
            set skip = 0
        endif
        exitwhen i <= 0
    endloop
    return c
endfunction

function SaveLoad_DecodeValues takes string s returns boolean
    local integer i
    local integer j
    local integer k
    local integer l
    local integer SaveCode = 0
    local integer m
    local integer array a
    local string buffer = ""
    local integer CodeLength = StringLength(udg_SaveLoad_Alphabet)
    local integer skip = -1
    local integer CONST = 1000000
    local string abc = "0123456789-"
    local string c

    set i = 0
    loop
        set a[i] = 0
        set i = i + 1
        exitwhen i >= 100
    endloop

    set m = 0

    set i = 0
    loop
        set j = 0
        loop
            set a[j] = a[j] * CodeLength
            set j = j + 1
            exitwhen j > m
        endloop

        set skip = skip + 1
        if skip == 4 then
            set skip = 0
            set i = i + 1
        endif

        set l = CodeLength
        set c = SubString(s,i,i + 1)
        loop
            set l = l - 1
            exitwhen l < 1
            exitwhen SubString(udg_SaveLoad_Alphabet,l,l + 1) == c
        endloop
        set a[0] = a[0] + l

        set j = 0
        loop
            set k = a[j] / CONST
            set a[j] = a[j] - k * CONST
            set a[j + 1] = a[j + 1] + k
            set j = j + 1
            exitwhen j > m
        endloop
        if k > 0 then
            set m = m + 1
        endif
        set i = i + 1
        exitwhen i >= StringLength(s)
    endloop

    loop
        exitwhen m < 0
        set j = m
        loop
            exitwhen j <= 0
            set k = a[j] / 11
            set a[j - 1] = a[j - 1] + (a[j] - k * 11) * CONST
            set a[j] = k
            set j = j - 1
        endloop
        set k = a[j] / 11
        set i = a[j] - k * 11
        set buffer = SubString(abc,i,i + 1) + buffer
        set a[j] = k
        if a[m] == 0 then
            set m = m - 1
        endif
    endloop

    set i = 0
    set j = 0
    loop
        loop
            exitwhen i >= StringLength(buffer)
            exitwhen i > 0 and SubString(buffer,i,i + 1) == "-" and SubString(buffer,i - 1,i) != "-"
            set i = i + 1
        endloop
        if i < StringLength(buffer) then
            set k = i
        endif
        set SaveCode = SaveCode + 1
        set udg_Save[SaveCode] = S2I(SubString(buffer,j,i))
        set j = i + 1
        set i = i + 1
        exitwhen i >= StringLength(buffer)
    endloop

    set j = SaveLoad_EncodeVerify(SubString(buffer,0,k))
    set udg_SaveCount = SaveCode - 1
    if j == udg_Save[SaveCode] then
        return true
    endif
    return false
endfunction

function SaveLoad_Encode takes nothing returns string
    if udg_SaveLoad_CaseSensitive == false then
        set udg_SaveLoad_Alphabet = StringCase(udg_SaveLoad_Alphabet,true)
    endif
    return SaveLoad_Color(SaveLoad_EncodeValues())
endfunction

function SaveLoad_Decode takes string s returns boolean
    if udg_SaveLoad_CaseSensitive == false then
        set udg_SaveLoad_Alphabet = StringCase(udg_SaveLoad_Alphabet,true)
        set s = StringCase(s,true)
    endif
    if SaveLoad_DecodeValues(s) then
        return true
    endif
    return false
endfunction
Name Type Is Array Initial Value
Antonidas unit No
Archmage01 unit No
Archmage01Visibilitya fogmodifier No
Archmage01Visibilityb fogmodifier No
Archmage02 unit No
Archmage02Visibilitya fogmodifier No
Archmage02Visibilityb fogmodifier No
Archmage03 unit No
Archmage03Visibilitya fogmodifier No
Archmage03Visibilityb fogmodifier No
ArchmageCount integer No
ArchmageHermit unit No
Archmages integer No
ArchmageYellow unit No
Arthas unit No
Blademaster01 unit No
Blademaster02 unit No
BlademasterBlackrock unit No
BonusesFound integer No
BonusesTotal integer No
CampaignScore integer No
Cinematic boolean No true
CinematicGroup group No
Code string No
EndingCancelled boolean No false
EndingRemove group No
EnoughPlayers boolean No
EvilArthas unit No
ExchangeFail1 boolean No
ExchangeFail2 boolean No
ExchangeFail3 boolean No
ExchangeSelection1 group No
ExchangeSelection2 group No
ExchangeSuccess boolean No
Exchanging1 boolean No
Exchanging2 boolean No
Extra integer No
ExtraTotal integer No
FalricsSpells integer Yes
Farseer02 unit No
FinalInventory string Yes
FinalRank string No
FlyingSheep01 unit No
FlyingSheep02 unit No
GAMEOVER boolean No false
GameSelection boolean No true
GargoyleCinematicRunning boolean No
Golem01 unit No
Golem02 unit No
GyroForce group No
Hero1 unit No
Hero2 unit No
INSANEMODE boolean No
KelThuzad unit No
LeaderboardArchmage leaderboard No
MeatWagon sound No
MissionNumber integer No
NewVote1 boolean No
NewVote2 boolean No
OpeningCancelled boolean No false
OpeningGhoulGroup01 group No
OpeningGhoulGroup02 group No
OpeningKnight01 unit No
OpeningKnight02 unit No
OrangeArchmage unit No
Player player No
PurpleArchmage unit No
QuestReqArchmage01 questitem No
QuestReqArchmage02 questitem No
QuestReqArchmage03 questitem No
QuestThreeArchmages quest No
RankInteger integer No
Requirement_Region rect No
RequirementTech boolean Yes
RequirementUnitP1 unit Yes
RequirementUnitP2 unit Yes
RequirementUnitType unitcode Yes
ResearchEnabledT2 boolean Yes
ResearchEnabledT3 boolean Yes
ResearchStringT1 string Yes
ResearchStringT2 string Yes
ResearchStringT3 string Yes
ResearchType techcode Yes
ResourceDropBuildings group No
ResourceDropHashtable hashtable No
Save integer Yes
SaveCount integer No
SaveLoad_Abilities abilcode Yes
SaveLoad_Abilities_LastIndex integer No
SaveLoad_Alphabet string No
SaveLoad_CaseSensitive boolean No
SaveLoad_Compress integer Yes
SaveLoad_Heroes unitcode Yes
SaveLoad_Heroes_LastIndex integer No
SaveLoad_Initialized boolean No
SaveLoad_Items itemcode Yes
SaveLoad_Items_LastIndex integer No
SaveLoad_TotalGrades integer Yes
SaveLoad_TotalTime integer No
SaveLoad_Uncompress integer Yes
SaveLoad_UsePlayername boolean No
ScoreBonuses integer No
ScoreExtra integer No
ScoreLimit integer Yes
ScoreMax integer No
ScoreSubquests integer No
ScoreTime integer No
SelectionGroup1 group No
SelectionGroup2 group No
Shield01Group group No
Shield01Switch boolean No true
Shield02FrostWyrmGroup group No
Shield02Group group No
Shield02Switch boolean No true
Shield03FrostWyrmGroup group No
Shield03Group group No
Shield03Switch boolean No true
SkipVote1 boolean No
SkipVote2 boolean No
SubquestsComplete integer No
SubquestsTotal integer No
SumRank integer No
SylvanasCinematicRunning boolean No
TempBoolean boolean No
TempInteger integer No
TempItem item No
TempItemType itemcode No
TempPGroup force No
TempPGroup2 force No
TempPlayer player No
TempPoint location No
TempUGroup group No
TempUnit unit No
TempUnitType unitcode No
TimeHours integer No
TimeMax real No
TimeMin real No
TimeMins integer No
TimeRange real No
TimeSeconds integer No
TimeSecondsTotal integer No
TimeTakenString string No
UnitGroup group No
Validate boolean No
x real No
y real No
YellowArchmage unit No
PreInit
  Events
    Map initialization
  Conditions
  Actions
    Set Arthas = Death Knight 0223 <gen>
    Set EvilArthas = Death Knight 0223 <gen>
    Set KelThuzad = Lich 0091 <gen>
    Set Hero1 = Arthas
    Set Hero2 = KelThuzad
Melee Initialization
  Events
  Conditions
  Actions
    Game - Set campaign to Undead Campaign
    -------- *********************** --------
    Game - Set the time of day to 6.01
    Environment - Set sky to Dalaran Sky
    Animation - Play the Death animation for all doodads of type YZef (doodadcode) within Shield01 <gen>
    Animation - Play the Death animation for all doodads of type YZef (doodadcode) within Shield02 <gen>
    Animation - Play the Death animation for all doodads of type YZef (doodadcode) within Shield03 <gen>
    -------- *********************** --------
    Trigger - Run Setup_Ownership <gen> (checking conditions)
    Trigger - Run SetupComputerPlayers <gen> (checking conditions)
    Trigger - Run SetupComputerAlliances <gen> (checking conditions)
    Trigger - Run SetupPlayerAlliances <gen> (checking conditions)
    Trigger - Run SetupPlayerResources <gen> (checking conditions)
    Trigger - Run SetupArchmage01 <gen> (checking conditions)
    Trigger - Run SetupArchmage02 <gen> (checking conditions)
    Trigger - Run SetupArchmage03 <gen> (checking conditions)
    Trigger - Run SetupArchmageYellow <gen> (checking conditions)
    Trigger - Run SetupArchmageHermit <gen> (checking conditions)
    Trigger - Run SetupAntonidas <gen> (checking conditions)
    Trigger - Run SetupOpeningKnights <gen> (checking conditions)
    Trigger - Run SetupGhoulGroup <gen> (checking conditions)
    Trigger - Run SetupQuests <gen> (checking conditions)
    Trigger - Run SetupShields <gen> (checking conditions)
    Trigger - Run SetupGyroForce <gen> (checking conditions)
    Trigger - Run SetupArthas <gen> (checking conditions)
    Trigger - Run SetupKelThuzad <gen> (checking conditions)
    Trigger - Run SetupBookOfSummoning <gen> (checking conditions)
    Trigger - Run SetupArchmageCount <gen> (checking conditions)
    Trigger - Run SetupScoreScreen <gen> (checking conditions)
    Trigger - Run SetupArchmageExtra <gen> (checking conditions)
    Trigger - Turn on Archmage01 <gen>
    Trigger - Turn on Archmage02 <gen>
    Trigger - Turn on Archmage03 <gen>
    -------- Start Initial Cinematic --------
    Trigger - Run OpeningSetup <gen> (checking conditions)
    Trigger - Run Opening01 <gen> (checking conditions)
    -------- Set Experience Rate --------
    Set Player = Player 7 (Green)
    Hero - Make Player Heroes gain 25.00% experience from future kills
    Hero - Make Player 4 (Purple) Heroes gain 25.00% experience from future kills
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to False
      Then - Actions
        Unit - Remove Flying Machine 0248 <gen> from the game
        Unit - Remove Flying Machine 0249 <gen> from the game
        Unit - Remove Enraged Elemental 0250 <gen> from the game
        Unit - Remove Enraged Elemental 0252 <gen> from the game
        Unit - Remove Berserk Elemental 0255 <gen> from the game
        Unit - Remove Enraged Elemental 0253 <gen> from the game
        Unit - Remove Enraged Elemental 0254 <gen> from the game
        Unit - Remove Knight 0259 <gen> from the game
        Unit - Remove Knight 0258 <gen> from the game
        Unit - Remove Knight 0257 <gen> from the game
        Unit - Remove Knight 0260 <gen> from the game
        Unit - Remove Knight 0261 <gen> from the game
        Unit - Remove Knight 0265 <gen> from the game
        Unit - Remove Knight 0263 <gen> from the game
        Unit - Remove Knight 0262 <gen> from the game
        Unit - Remove Knight 0264 <gen> from the game
      Else - Actions
SetupComputerPlayers
  Events
  Conditions
  Actions
    -------- Purple --------
    Player - Set Player 9 (Gray) Current gold to 2000
    Player - Set Player 9 (Gray) Current lumber to 2000
    Player - Change color of Player 9 (Gray) to Light Blue, Changing color of existing units
    -------- Yellow --------
    Player - Set Player 5 (Yellow) Current gold to 2000
    Player - Set Player 5 (Yellow) Current lumber to 2000
    Player - Change color of Player 5 (Yellow) to Blue, Changing color of existing units
    -------- Orange --------
    Player - Set Player 6 (Orange) Current gold to 2000
    Player - Set Player 6 (Orange) Current lumber to 2000
    Player - Change color of Player 6 (Orange) to Gray, Changing color of existing units
    -------- *********************** --------
    -------- Blue (Pre-placed non-town player) --------
    Player - Change color of Player 2 (Blue) to Gray, Changing color of existing units
    -------- *********************** --------
    Unit - Change color of Archmage 0172 <gen> to Gray
    -------- *********************** --------
    Unit - Change color of Archmage 0122 <gen> to Light Blue
    -------- *********************** --------
    Unit - Change color of Archmage 0019 <gen> to Blue
Run from 'Opening04' and 'OpeningCancelled'
StartCampaignAI
  Events
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        AI - Start campaign AI script for Player 9 (Gray): war3mapImported\U7 Insane Grey.ai (aiscript)
        AI - Start campaign AI script for Player 5 (Yellow): war3mapImported\U7 Insane Yellow.ai (aiscript)
        AI - Start campaign AI script for Player 6 (Orange): war3mapImported\U7 Insane Orange.ai (aiscript)
        AI - Start campaign AI script for Player 2 (Blue): war3mapImported\U7 Insane Blue.ai (aiscript)
      Else - Actions
        AI - Start campaign AI script for Player 9 (Gray): u07_purple.ai (aiscript)
        AI - Start campaign AI script for Player 5 (Yellow): u07_yellow.ai (aiscript)
        AI - Start campaign AI script for Player 6 (Orange): u07_orange.ai (aiscript)
        AI - Send Player 9 (Gray) the AI Command (0, 0)
All computer players shall be allied with each other
SetupComputerAlliances
  Events
  Conditions
  Actions
    -------- Red --------
    Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally with shared vision
    Player - Make Player 1 (Red) treat Player 9 (Gray) as an Ally with shared vision
    Player - Make Player 1 (Red) treat Player 5 (Yellow) as an Ally with shared vision
    Player - Make Player 1 (Red) treat Player 6 (Orange) as an Ally with shared vision
    -------- Blue --------
    Player - Make Player 2 (Blue) treat Player 1 (Red) as an Ally with shared vision
    Player - Make Player 2 (Blue) treat Player 9 (Gray) as an Ally with shared vision
    Player - Make Player 2 (Blue) treat Player 5 (Yellow) as an Ally with shared vision
    Player - Make Player 2 (Blue) treat Player 6 (Orange) as an Ally with shared vision
    -------- Purple --------
    Player - Make Player 9 (Gray) treat Player 1 (Red) as an Ally with shared vision
    Player - Make Player 9 (Gray) treat Player 2 (Blue) as an Ally with shared vision
    Player - Make Player 9 (Gray) treat Player 5 (Yellow) as an Ally with shared vision
    Player - Make Player 9 (Gray) treat Player 6 (Orange) as an Ally with shared vision
    -------- Yellow --------
    Player - Make Player 5 (Yellow) treat Player 1 (Red) as an Ally with shared vision
    Player - Make Player 5 (Yellow) treat Player 2 (Blue) as an Ally with shared vision
    Player - Make Player 5 (Yellow) treat Player 9 (Gray) as an Ally with shared vision
    Player - Make Player 5 (Yellow) treat Player 6 (Orange) as an Ally with shared vision
    -------- Orange --------
    Player - Make Player 6 (Orange) treat Player 1 (Red) as an Ally with shared vision
    Player - Make Player 6 (Orange) treat Player 2 (Blue) as an Ally with shared vision
    Player - Make Player 6 (Orange) treat Player 9 (Gray) as an Ally with shared vision
    Player - Make Player 6 (Orange) treat Player 5 (Yellow) as an Ally with shared vision
    -------- - --------
SetupPlayerAlliances
  Events
  Conditions
  Actions
    Player - Make Player 4 (Purple) treat Player 9 (Gray) as an Ally with shared vision
    Player - Make Player 9 (Gray) treat Player 4 (Purple) as an Ally with shared vision
    Player - Make Player 7 (Green) treat Player 8 (Pink) as an Ally with shared vision
    Player - Make Player 8 (Pink) treat Player 7 (Green) as an Ally with shared vision
    Player - Make Player 4 (Purple) treat Player 8 (Pink) as an Ally with shared vision
    Player - Make Player 8 (Pink) treat Player 4 (Purple) as an Ally with shared vision
    Player - Change color of Player 8 (Pink) to Brown, Changing color of existing units
    Player - Make Player 4 (Purple) treat Player 7 (Green) as an Ally with shared vision
    Player - Make Player 7 (Green) treat Player 4 (Purple) as an Ally with shared vision
SetupPlayerResources
  Events
  Conditions
  Actions
    Player - Set Player 7 (Green) Current lumber to 225
    Player - Set Player 7 (Green) Current gold to 750
    Player - Set Player 4 (Purple) Current lumber to 225
    Player - Set Player 4 (Purple) Current gold to 750
SetupArthas
  Events
  Conditions
  Actions
    Trigger - Turn on ArthasLevelUp <gen>
SetupKelThuzad
  Events
  Conditions
  Actions
    Trigger - Turn on KelThuzadLevelUp <gen>
SetupArchmage01
  Events
  Conditions
  Actions
    Set Archmage01 = Archmage 0122 <gen>
    Hero - Set Archmage01 Hero-level to 5, Hide level-up graphics
    Hero - Learn skill for Archmage01: Human Archmage - Summon Water Elemental
    Hero - Learn skill for Archmage01: Human Archmage - Summon Water Elemental
    Hero - Learn skill for Archmage01: Human Archmage - Brilliance Aura
    Hero - Learn skill for Archmage01: Human Archmage - Brilliance Aura
    Hero - Learn skill for Archmage01: Human Archmage - Brilliance Aura
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Hero - Set Archmage01 Hero-level to 7, Hide level-up graphics
        Hero - Learn skill for Archmage01: Human Archmage - Blizzard
        Hero - Learn skill for Archmage01: Human Archmage - Blizzard
        Unit - Add Mana Burn (Custom) to Archmage01
      Else - Actions
    Hero - Disable experience gain for Archmage01
SetupArchmage02
  Events
  Conditions
  Actions
    Set Archmage02 = Archmage 0019 <gen>
    Hero - Set Archmage02 Hero-level to 6, Hide level-up graphics
    Hero - Learn skill for Archmage02: Human Archmage - Blizzard
    Hero - Learn skill for Archmage02: Human Archmage - Blizzard
    Hero - Learn skill for Archmage02: Human Archmage - Summon Water Elemental
    Hero - Learn skill for Archmage02: Human Archmage - Summon Water Elemental
    Hero - Learn skill for Archmage02: Human Archmage - Brilliance Aura
    Hero - Learn skill for Archmage02: Human Archmage - Brilliance Aura
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Hero - Set Archmage02 Hero-level to 10, Hide level-up graphics
        Hero - Learn skill for Archmage02: Human Archmage - Summon Water Elemental
        Hero - Learn skill for Archmage02: Human Archmage - Blizzard
        Hero - Learn skill for Archmage02: Human Archmage - Brilliance Aura
        Unit - Add Polymorph (Custom) to Archmage02
      Else - Actions
    Hero - Disable experience gain for Archmage02
SetupArchmage03
  Events
  Conditions
  Actions
    Set Archmage03 = Archmage 0172 <gen>
    Hero - Set Archmage03 Hero-level to 10, Hide level-up graphics
    Hero - Learn skill for Archmage03: Human Archmage - Brilliance Aura
    Hero - Learn skill for Archmage03: Human Archmage - Brilliance Aura
    Hero - Learn skill for Archmage03: Human Archmage - Brilliance Aura
    Hero - Learn skill for Archmage03: Human Archmage - Summon Water Elemental
    Hero - Learn skill for Archmage03: Human Archmage - Summon Water Elemental
    Hero - Learn skill for Archmage03: Human Archmage - Summon Water Elemental
    Hero - Learn skill for Archmage03: Human Archmage - Blizzard
    Hero - Learn skill for Archmage03: Human Archmage - Blizzard
    Hero - Learn skill for Archmage03: Human Archmage - Blizzard
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Hero - Set Archmage03 Hero-level to 14, Hide level-up graphics
        Unit - Add Polymorph (Custom) to Archmage03
        Unit - Add Crushing Wave (Custom) to Archmage03
        Unit - Add Mana Burn (Custom) to Archmage03
        Unit - Add Polywrath to Archmage03
      Else - Actions
    Hero - Disable experience gain for Archmage03
SetupArchmageExtra
  Events
  Conditions
  Actions
    Hero - Learn skill for Archmage 0070 <gen>: Human Archmage - Summon Water Elemental
    Hero - Disable experience gain for Archmage 0070 <gen>
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Hero - Set Archmage 0070 <gen> Hero-level to 5, Hide level-up graphics
        Hero - Learn skill for Archmage 0070 <gen>: Human Archmage - Summon Water Elemental
        Hero - Learn skill for Archmage 0070 <gen>: Human Archmage - Summon Water Elemental
        Hero - Learn skill for Archmage 0070 <gen>: Human Archmage - Brilliance Aura
        Hero - Learn skill for Archmage 0070 <gen>: Human Archmage - Brilliance Aura
        Unit - Add Mana Shield (Custom) to Archmage 0070 <gen>
      Else - Actions
SetupArchmageHermit
  Events
  Conditions
  Actions
    Set ArchmageHermit = Archmage 0014 <gen>
    Hero - Set ArchmageHermit Hero-level to 6, Hide level-up graphics
    Hero - Learn skill for ArchmageHermit: Human Archmage - Summon Water Elemental
    Hero - Learn skill for ArchmageHermit: Human Archmage - Summon Water Elemental
    Hero - Learn skill for ArchmageHermit: Human Archmage - Summon Water Elemental
    Hero - Learn skill for ArchmageHermit: Human Archmage - Brilliance Aura
    Hero - Learn skill for ArchmageHermit: Human Archmage - Brilliance Aura
    Hero - Learn skill for ArchmageHermit: Human Archmage - Mass Teleport
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Hero - Set ArchmageHermit Hero-level to 10, Hide level-up graphics
        Hero - Learn skill for ArchmageHermit: Human Archmage - Brilliance Aura
        Unit - Add Polywrath to ArchmageHermit
      Else - Actions
    Hero - Disable experience gain for ArchmageHermit
SetupArchmageYellow
  Events
  Conditions
  Actions
    Set ArchmageYellow = Archmage 0010 <gen>
    Hero - Set ArchmageYellow Hero-level to 8, Hide level-up graphics
    Hero - Learn skill for ArchmageYellow: Human Archmage - Blizzard
    Hero - Learn skill for ArchmageYellow: Human Archmage - Brilliance Aura
    Hero - Learn skill for ArchmageYellow: Human Archmage - Summon Water Elemental
    Hero - Learn skill for ArchmageYellow: Human Archmage - Blizzard
    Hero - Learn skill for ArchmageYellow: Human Archmage - Blizzard
    Hero - Learn skill for ArchmageYellow: Human Archmage - Brilliance Aura
    Hero - Learn skill for ArchmageYellow: Human Archmage - Brilliance Aura
    Hero - Learn skill for ArchmageYellow: Human Archmage - Summon Water Elemental
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Hero - Set ArchmageYellow Hero-level to 12, Hide level-up graphics
        Hero - Learn skill for ArchmageYellow: Human Archmage - Summon Water Elemental
        Unit - Add Crushing Wave (Custom) to ArchmageYellow
        Unit - Add Mana Shield (Custom) to ArchmageYellow
      Else - Actions
    Hero - Disable experience gain for ArchmageYellow
SetupAntonidas
  Events
  Conditions
  Actions
    Set Antonidas = Archmage 0123 <gen>
    Hero - Set Antonidas Hero-level to 7, Hide level-up graphics
    Unit - Set mana of Antonidas to 100.00%
    Hero - Learn skill for Antonidas: Human Archmage - Mass Teleport
    Hero - Learn skill for Antonidas: Human Archmage - Blizzard
    Hero - Learn skill for Antonidas: Human Archmage - Blizzard
    Hero - Learn skill for Antonidas: Human Archmage - Brilliance Aura
    Hero - Learn skill for Antonidas: Human Archmage - Brilliance Aura
SetupOpeningKnights
  Events
  Conditions
  Actions
    Set OpeningKnight01 = Knight 0058 <gen>
    Set OpeningKnight02 = Knight 0059 <gen>
SetupGhoulGroup
  Events
  Conditions
  Actions
    Set OpeningGhoulGroup01 = (Units in OpeningGhoulAttack01 <gen>)
    Set OpeningGhoulGroup02 = (Units in OpeningGhoulAttack02 <gen>)
SetupGyroForce
  Events
  Conditions
  Actions
    Set GyroForce = (Units in GyroForce <gen>)
SetupQuests
  Events
  Conditions
  Actions
    -------- *********************** --------
    Quest - Create a Required, undiscovered quest titled Three Archmagi with the description Each of the three Archmagi who power the city's defensive shield have hidden somewhere within Dalaran's streets. You must charge into the city and slay each Archmage in order to bring down the crippling shield., using icon path ReplaceableTextures\CommandButtons\BTNHeroArchMage.tga
    Set QuestThreeArchmages = (Last created quest)
    -------- *********************** --------
    Quest - Create a quest requirement for QuestThreeArchmages with the description Slay the first Archmage
    Set QuestReqArchmage01 = (Last created quest requirement)
    -------- *********************** --------
    Quest - Create a quest requirement for QuestThreeArchmages with the description Slay the second Archmage
    Set QuestReqArchmage02 = (Last created quest requirement)
    -------- *********************** --------
    Quest - Create a quest requirement for QuestThreeArchmages with the description Slay Antonidas
    Set QuestReqArchmage03 = (Last created quest requirement)
    -------- *********************** --------
SetupShields
  Events
  Conditions
  Actions
    Animation - Play the Death animation for all doodads of type YZef (doodadcode) within Shield01 <gen>
    Animation - Play the Death animation for all doodads of type YZef (doodadcode) within Shield02 <gen>
    Animation - Play the Death animation for all doodads of type YZef (doodadcode) within Shield03 <gen>
SetupBookOfSummoning
  Events
  Conditions
  Actions
    Unit - Make Book of Summoning Pedestal 0251 <gen> Invulnerable
SetupArchmageCount
  Events
  Conditions
  Actions
    Set ArchmageCount = 3
SetupScoreScreen
  Events
  Conditions
  Actions
    Player - Hide Player 1 (Red) in the post-game score screen
    Player - Hide Player 2 (Blue) in the post-game score screen
    Player - Hide Player 8 (Pink) in the post-game score screen
Setup Ownership
  Events
  Conditions
  Actions
    Unit - Change ownership of Death Knight 0223 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Lich 0091 <gen> to Player 7 (Green) and Change color
    -------- - --------
    Unit - Change ownership of Halls of the Dead 0028 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Haunted Gold Mine 0201 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Altar of Darkness 0177 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Crypt 0220 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Slaughterhouse 0045 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Spirit Tower 0184 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Ziggurat 0180 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Ziggurat 0200 <gen> to Player 4 (Purple) and Change color
    -------- - --------
    Unit - Change ownership of Acolyte 0133 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Acolyte 0191 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Acolyte 0181 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Ghoul 0102 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Ghoul 0030 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Ghoul 0031 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Ghoul 0032 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Crypt Fiend 0022 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Abomination 0041 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Meat Wagon 0079 <gen> to Player 4 (Purple) and Change color
    -------- - --------
    Unit - Change ownership of Halls of the Dead 0215 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Haunted Gold Mine 0212 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Altar of Darkness 0042 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Crypt 0186 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Graveyard 0046 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Spirit Tower 0050 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Ziggurat 0044 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Ziggurat 0217 <gen> to Player 7 (Green) and Change color
    -------- - --------
    Unit - Change ownership of Acolyte 0202 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Acolyte 0169 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Acolyte 0040 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Ghoul 0094 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Ghoul 0037 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Ghoul 0038 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Ghoul 0039 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Crypt Fiend 0047 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Abomination 0138 <gen> to Player 7 (Green) and Change color
    Unit - Change ownership of Meat Wagon 0256 <gen> to Player 7 (Green) and Change color
Leaderboard Create
  Events
  Conditions
  Actions
    Leaderboard - Create a leaderboard for (All players) titled Siege of Dalaran
    Set LeaderboardArchmage = (Last created leaderboard)
    Leaderboard - Add Player 1 (Red) to LeaderboardArchmage with label Archmagi Remain and value 3
    Leaderboard - Change the color of the label for Player 1 (Red) in LeaderboardArchmage to (100%, 100.00%, 100.00%) with 0% transparency
    Leaderboard - Change the color of the value for Player 1 (Red) in LeaderboardArchmage to (100%, 100.00%, 100.00%) with 0% transparency
Leaderboard Update
  Events
  Conditions
  Actions
    Set ArchmageCount = (ArchmageCount - 1)
    Leaderboard - Change the value for Player 1 (Red) in LeaderboardArchmage to ArchmageCount
PurpleGold
  Events
    Player - Player 9 (Gray)'s Current gold becomes Less than or equal to 1000.00
  Conditions
  Actions
    Player - Add 1000 to Player 9 (Gray) Current gold
YellowGold
  Events
    Player - Player 5 (Yellow)'s Current gold becomes Less than or equal to 1000.00
  Conditions
  Actions
    Player - Add 1000 to Player 5 (Yellow) Current gold
OrangeGold
  Events
    Player - Player 6 (Orange)'s Current gold becomes Less than or equal to 1000.00
  Conditions
  Actions
    Player - Add 1000 to Player 6 (Orange) Current gold
PurpleLumber
  Events
    Player - Player 9 (Gray)'s Current lumber becomes Less than or equal to 1000.00
  Conditions
  Actions
    Player - Add 1000 to Player 9 (Gray) Current lumber
YellowLumber
  Events
    Player - Player 5 (Yellow)'s Current lumber becomes Less than or equal to 1000.00
  Conditions
  Actions
    Player - Add 1000 to Player 5 (Yellow) Current lumber
OrangeLumber
  Events
    Player - Player 6 (Orange)'s Current lumber becomes Less than or equal to 1000.00
  Conditions
  Actions
    Player - Add 1000 to Player 6 (Orange) Current lumber
ArthasLevelUp
  Events
    Unit - A unit owned by Player 4 (Purple) Gains a level
  Conditions
    (Leveling Hero) Equal to Arthas
    (Hero level of Arthas) Greater than or equal to 8
  Actions
    Hero - Disable experience gain for Arthas
KelThuzadLevelUp
  Events
    Unit - A unit owned by Player 7 (Green) Gains a level
  Conditions
    (Leveling Hero) Equal to KelThuzad
    (Hero level of KelThuzad) Greater than or equal to 8
  Actions
    Hero - Disable experience gain for KelThuzad
Archmage01Leash
  Events
    Time - Every 0.50 seconds of game time
  Conditions
    (Distance between (Position of Archmage01) and (Center of Archmage01LeashArea <gen>)) Greater than or equal to 300.00
  Actions
    Unit - Order Archmage01 to Move To (Center of Archmage01LeashArea <gen>)
Archmage02Leash
  Events
    Time - Every 0.50 seconds of game time
  Conditions
    (Distance between (Position of Archmage02) and (Center of Archmage02LeashArea <gen>)) Greater than or equal to 300.00
  Actions
    Unit - Order Archmage02 to Move To (Center of Archmage02LeashArea <gen>)
Archmage03Leash
  Events
    Time - Every 0.50 seconds of game time
  Conditions
    (Distance between (Position of Archmage03) and (Center of Archmage03LeashArea <gen>)) Greater than or equal to 300.00
  Actions
    Unit - Order Archmage03 to Move To (Center of Archmage03LeashArea <gen>)
StartAIYellow
  Events
    Unit - Archmage 0122 <gen> Dies
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Unit - Create 1 ??? for Player 5 (Yellow) at (Center of Region_062 <gen>) facing Default building facing degrees
      Else - Actions
        AI - Send Player 5 (Yellow) the AI Command (0, 0)
StartAIOrange
  Events
    Unit - Archmage 0019 <gen> Dies
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Unit - Create 2 ??? for Player 6 (Orange) at (Center of Region_063 <gen>) facing Default building facing degrees
      Else - Actions
        AI - Send Player 6 (Orange) the AI Command (0, 0)
OpeningSetup
  Events
  Conditions
  Actions
    Player - Make Player 2 (Blue) treat Player 7 (Green) as an Neutral
    Player - Make Player 9 (Gray) treat Player 7 (Green) as an Neutral
    Player - Make Player 7 (Green) treat Player 2 (Blue) as an Neutral
    Player - Make Player 7 (Green) treat Player 9 (Gray) as an Neutral
    Player - Make Player 2 (Blue) treat Player 4 (Purple) as an Neutral
    Player - Make Player 9 (Gray) treat Player 4 (Purple) as an Neutral
    Player - Make Player 4 (Purple) treat Player 2 (Blue) as an Neutral
    Player - Make Player 4 (Purple) treat Player 9 (Gray) as an Neutral
OpeningCancelled
  Events
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Set SkipVote1 = False
    Set SkipVote2 = False
    Set OpeningCancelled = True
    Cinematic - Turn cinematic mode Off for (All players)
    Set Cinematic = False
    Selection - Select Arthas for Player 4 (Purple)
    Selection - Select KelThuzad for Player 7 (Green)
    Environment - Set sky to None
    Visibility - Create an initially Enabled visibility modifier for Player 4 (Purple) emitting Visibility from (Center of Archmage01Revealer <gen>) to a radius of 450.00
    Set Archmage01Visibilitya = (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 7 (Green) emitting Visibility from (Center of Archmage01Revealer <gen>) to a radius of 450.00
    Set Archmage01Visibilityb = (Last created visibility modifier)
    Animation - Play the Stand animation for all doodads of type YZef (doodadcode) within Shield01 <gen>
    Player - Make Player 2 (Blue) treat Player 4 (Purple) as an Enemy
    Player - Make Player 9 (Gray) treat Player 4 (Purple) as an Enemy
    Player - Make Player 4 (Purple) treat Player 2 (Blue) as an Enemy
    Player - Make Player 4 (Purple) treat Player 9 (Gray) as an Enemy
    Player - Make Player 2 (Blue) treat Player 7 (Green) as an Enemy
    Player - Make Player 9 (Gray) treat Player 7 (Green) as an Enemy
    Player - Make Player 7 (Green) treat Player 2 (Blue) as an Enemy
    Player - Make Player 7 (Green) treat Player 9 (Gray) as an Enemy
    Unit - Remove Antonidas from the game
    Set Antonidas = Archmage 0172 <gen>
    Unit - Remove OpeningKnight01 from the game
    Unit - Remove OpeningKnight02 from the game
    Unit - Move KelThuzad instantly to (Center of OpeningKelThuzadDest <gen>)
    Unit - Move Arthas instantly to (Center of OpeningArthasDest <gen>)
    Unit - Move Abomination 0041 <gen> instantly to (Center of Abom01 <gen>)
    Unit - Move Abomination 0138 <gen> instantly to (Center of Abom02 <gen>)
    Unit - Move Meat Wagon 0079 <gen> instantly to (Center of MeatWagonDest01 <gen>)
    Unit - Move Meat Wagon 0256 <gen> instantly to (Center of MeatWagonDest02 <gen>)
    Unit - Order Acolyte 0133 <gen> to Harvest Haunted Gold Mine 0201 <gen>
    Unit - Order Acolyte 0191 <gen> to Harvest Haunted Gold Mine 0201 <gen>
    Unit - Order Acolyte 0181 <gen> to Harvest Haunted Gold Mine 0201 <gen>
    Unit - Order Acolyte 0202 <gen> to Harvest Haunted Gold Mine 0212 <gen>
    Unit - Order Acolyte 0169 <gen> to Harvest Haunted Gold Mine 0212 <gen>
    Unit - Order Acolyte 0040 <gen> to Harvest Haunted Gold Mine 0212 <gen>
    Unit - Order Ghoul 0102 <gen> to Harvest Nearby Lumber
    Unit - Order Ghoul 0094 <gen> to Harvest Nearby Lumber
    Camera - Reset camera for Player 4 (Purple) to standard game-view over 0.00 seconds
    Camera - Reset camera for Player 7 (Green) to standard game-view over 0.00 seconds
    Camera - Pan camera for Player 4 (Purple) to (Position of Arthas) over 0 seconds
    Camera - Pan camera for Player 7 (Green) to (Position of KelThuzad) over 0 seconds
    Trigger - Run Leaderboard_Create <gen> (checking conditions)
    Trigger - Run StartCampaignAI <gen> (checking conditions)
    Environment - Reset fog to default values
    Wait 1.00 seconds
    Quest - Display to (All players) the Quest Discovered message: |cffffcc00MAIN QUEST|rThree Archmagi - Slay the first Archmage - Slay the second Archmage - Slay Antonidas
    Quest - Mark QuestThreeArchmages as Discovered
    Wait 15.00 seconds
    Quest - Display to (All players) the Simple Hint message: |cff87ceebNEW UNIT AVAILABLE|rAbomination - You may now build Abominations from the Slaughterhouse.
    Wait 15.00 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - You must charge into the city and slay each Archmage in order to bring down the crippling shield. Your units will slowly take damage while in the shield.
Opening01
  Events
  Conditions
    OpeningCancelled Equal to False
  Actions
    Cinematic - Turn cinematic mode On for (All players)
    Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Camera - Apply gg_cam_Opening01 for Player 4 (Purple) over 0.00 seconds
    Camera - Apply gg_cam_Opening02 for Player 4 (Purple) over 10.00 seconds
    Camera - Apply gg_cam_Opening01 for Player 7 (Green) over 0.00 seconds
    Camera - Apply gg_cam_Opening02 for Player 7 (Green) over 10.00 seconds
    Environment - Set fog to style 0 (fogstyle), z-start 1000, z-end 6000.00, density 0 and color (60.00%, 40.00%, 30.00%)
    -------- *********************** --------
    -------- Music --------
    Sound - Clear the music list
    Wait 0.01 seconds
    Sound - Play Dark Agents
    Sound - Set the music list to Music, starting with song 0
    -------- *********************** --------
    -------- NOW SKIPPABLE --------
    Trigger - Turn on OpeningCancelled <gen>
    Trigger - Turn on Skip_Cinematic <gen>
    -------- *********************** --------
    Unit - Order Abomination 0041 <gen> to Move To (Center of Abom01 <gen>)
    Unit - Order Abomination 0138 <gen> to Move To (Center of Abom02 <gen>)
    Unit - Order Meat Wagon 0079 <gen> to Move To (Center of MeatWagonDest01 <gen>)
    Unit - Order Meat Wagon 0256 <gen> to Move To (Center of MeatWagonDest02 <gen>)
    Wait 6.00 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order Arthas to Move To (Center of OpeningArthasDest <gen>)
    Sound - Attach HorseLoop1 <gen> to Arthas
    Sound - Set volume of HorseLoop1 <gen> to 60.00%
    Sound - Play HorseLoop1 <gen>
    Wait 3.00 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U07Arthas01 <gen> and display Wizards of the Kirin Tor! I am Arthas, first of the Lich King's death knights! I demand that you open your gates and surrender to the might of the Scourge!. Modify duration: Add 0 seconds and Wait
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Wait 1.00 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - Apply gg_cam_Opening03 for Player 7 (Green) over 4.00 seconds
    Camera - Apply gg_cam_Opening03 for Player 4 (Purple) over 4.00 seconds
    Unit - Order Antonidas to Move To (Center of AntonidasTeleportOpening <gen>)
    Sound - Attach HorseLoop3 <gen> to Antonidas
    Sound - Play HorseLoop3 <gen>
    Wait 0.75 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order Knight 0059 <gen> to Move To (Center of Knight01Post <gen>)
    Sound - Attach HorseLoop2 <gen> to Knight 0059 <gen>
    Sound - Play HorseLoop2 <gen>
    Unit - Order Knight 0058 <gen> to Move To (Center of Knight02Post <gen>)
    Sound - Attach HorseLoop1 <gen> to Knight 0058 <gen>
    Sound - Play HorseLoop1 <gen>
    Wait 4.00 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Antonidas named Antonidas: Play U07Antonidas02 <gen> and display Greetings, Prince Arthas. How fares your noble father?. Modify duration: Add 0 seconds and Wait
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U07Arthas03 <gen> and display Lord Antonidas. There's no need to be snide.. Modify duration: Add 0 seconds and Wait
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Antonidas named Antonidas: Play U07Antonidas04 <gen> and display We've prepared for your coming, Arthas. My brethren and I have erected auras that will destroy any undead that pass through them. . Modify duration: Add 0 seconds and Wait
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Animation - Play Antonidas's spell animation
    Sound - Attach RejuvenationTarget1 <gen> to Antonidas
    Sound - Set volume of RejuvenationTarget1 <gen> to 80.00%
    Sound - Play RejuvenationTarget1 <gen>
    Sound - Attach DivineShield <gen> to Antonidas
    Sound - Set volume of DivineShield <gen> to 80.00%
    Sound - Play DivineShield <gen>
    Wait 1.00 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Animation - Play the Stand animation for all doodads of type YZef (doodadcode) within Shield01 <gen>
    Wait 1.25 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - Apply gg_cam_Opening_3a for Player 4 (Purple) over 12.00 seconds
    Camera - Apply gg_cam_Opening_3a for Player 7 (Green) over 12.00 seconds
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U07Arthas05 <gen> and display Your petty magics will not stop me, Antonidas.. Modify duration: Add 0 seconds and Wait
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- *********************** --------
    Trigger - Run Opening02 <gen> (checking conditions)
Opening02
  Events
  Conditions
    OpeningCancelled Equal to False
  Actions
    Cinematic - Send transmission to (All players) from Antonidas named Antonidas: Play U07Antonidas06 <gen> and display Pull your troops back, or we will be forced to unleash our full powers against you! Make your choice, death knight. . Modify duration: Add 0 seconds and Wait
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order Antonidas to Human Archmage - Mass Teleport Sorceress 0188 <gen>
    Sound - Attach MassTeleportTarget <gen> to Antonidas
    Sound - Set volume of MassTeleportTarget <gen> to 80.00%
    Sound - Play MassTeleportTarget <gen>
    Wait 3.00 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order KelThuzad to Move To (Center of OpeningKelThuzadDest <gen>)
    Wait 2.00 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - Apply gg_cam_Opening04 for Player 4 (Purple) over 0 seconds
    Camera - Apply gg_cam_Opening04 for Player 7 (Green) over 0 seconds
    Wait 0.50 seconds
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from KelThuzad named Kel'Thuzad: Play U07KelThuzad07 <gen> and display I sense that three separate wizards are maintaining these auras. If you find and kill them, the auras will disperse. . Modify duration: Add 0 seconds and Wait
    If (OpeningCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- NO LONGER SKIPPABLE --------
    Trigger - Turn off OpeningCancelled <gen>
    Trigger - Turn off Skip_Cinematic <gen>
    Set SkipVote1 = False
    Set SkipVote2 = False
    Unit - Remove Antonidas from the game
    Set Antonidas = Archmage 0172 <gen>
    Unit - Remove OpeningKnight01 from the game
    Unit - Remove OpeningKnight02 from the game
    Visibility - Create an initially Enabled visibility modifier for Player 4 (Purple) emitting Visibility from (Center of Archmage01Revealer <gen>) to a radius of 450.00
    Set Archmage01Visibilitya = (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 7 (Green) emitting Visibility from (Center of Archmage01Revealer <gen>) to a radius of 450.00
    Set Archmage01Visibilityb = (Last created visibility modifier)
    Player - Make Player 2 (Blue) treat Player 4 (Purple) as an Enemy
    Player - Make Player 9 (Gray) treat Player 4 (Purple) as an Enemy
    Player - Make Player 4 (Purple) treat Player 2 (Blue) as an Enemy
    Player - Make Player 4 (Purple) treat Player 9 (Gray) as an Enemy
    Player - Make Player 2 (Blue) treat Player 7 (Green) as an Enemy
    Player - Make Player 9 (Gray) treat Player 7 (Green) as an Enemy
    Player - Make Player 7 (Green) treat Player 2 (Blue) as an Enemy
    Player - Make Player 7 (Green) treat Player 9 (Gray) as an Enemy
    Unit - Order Acolyte 0133 <gen> to Harvest Haunted Gold Mine 0201 <gen>
    Unit - Order Acolyte 0191 <gen> to Harvest Haunted Gold Mine 0201 <gen>
    Unit - Order Acolyte 0181 <gen> to Harvest Haunted Gold Mine 0201 <gen>
    Unit - Order Acolyte 0202 <gen> to Harvest Haunted Gold Mine 0212 <gen>
    Unit - Order Acolyte 0169 <gen> to Harvest Haunted Gold Mine 0212 <gen>
    Unit - Order Acolyte 0040 <gen> to Harvest Haunted Gold Mine 0212 <gen>
    Unit - Order Ghoul 0102 <gen> to Harvest Nearby Lumber
    Unit - Order Ghoul 0094 <gen> to Harvest Nearby Lumber
    -------- *********************** --------
    Environment - Set sky to None
    Cinematic - Fade out over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 0.50 seconds
    Cinematic - Turn cinematic mode Off for (All players)
    Set Cinematic = False
    Set SkipVote1 = False
    Set SkipVote2 = False
    Selection - Select Arthas for Player 4 (Purple)
    Selection - Select KelThuzad for Player 7 (Green)
    Camera - Reset camera for Player 4 (Purple) to standard game-view over 0.00 seconds
    Camera - Reset camera for Player 7 (Green) to standard game-view over 0.00 seconds
    Camera - Pan camera for Player 4 (Purple) to (Position of Arthas) over 0 seconds
    Camera - Pan camera for Player 7 (Green) to (Position of KelThuzad) over 0 seconds
    Cinematic - Fade in over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Cinematic - Ping minimap for (All players) at (Center of Archmage01Revealer <gen>) for 5.00 seconds
    Trigger - Run StartCampaignAI <gen> (checking conditions)
    Trigger - Run Leaderboard_Create <gen> (checking conditions)
    Wait 1.00 seconds
    Quest - Display to (All players) the Quest Discovered message: |cffffcc00MAIN QUEST|rThree Archmagi - Slay the first Archmage - Slay the second Archmage - Slay Antonidas
    Quest - Mark QuestThreeArchmages as Discovered
    Wait 15.00 seconds
    Quest - Display to (All players) the Simple Hint message: |cff87ceebNEW UNIT AVAILABLE|rAbomination - You may now build Abominations from the Slaughterhouse.
    Wait 15.00 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - You must charge into the city and slay each Archmage in order to bring down the crippling shield. Your units will slowly take damage while in the shield.
EndingCancelled
  Events
  Conditions
    EndingCancelled Equal to False
  Actions
    Set EndingCancelled = True
    Unit - Unhide Book of Summoning Pedestal 0251 <gen>
    Animation - Play Book of Summoning Pedestal 0251 <gen>'s stand second animation
    Wait 1.00 seconds
    Cinematic - Fade out over 2.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 2.00 seconds
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        Unit - Hide (Picked unit)
        Unit - Pause (Picked unit)
    Cinematic - Turn cinematic mode Off for (All players)
    Trigger - Run Endgame_Text <gen> (checking conditions)
Ending01
  Events
  Conditions
    (Ending01 <gen> is on) Equal to True
  Actions
    Set Cinematic = True
    Trigger - Turn off (This trigger)
    -------- Music --------
    Sound - Play Dark Agents
    -------- *********************** --------
    Cinematic - Fade out over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Trigger - Turn off Defeat_Lose_Buildings <gen>
    Trigger - Turn off Shield01Enter <gen>
    Trigger - Turn off Shield02Enter <gen>
    Trigger - Turn off Shield03Enter <gen>
    Trigger - Run Shield01Down <gen> (checking conditions)
    Trigger - Run Shield02Down <gen> (checking conditions)
    Trigger - Run Shield03Down <gen> (checking conditions)
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Remove All buffs from (Picked unit))
    Animation - Play the death animation for all doodads of type XOmr (doodadcode) within DoodadDeathArea03 <gen>
    Animation - Play the death animation for all doodads of type XOcs (doodadcode) within DoodadDeathArea03 <gen>
    Sound - Set position of LightningShieldTarget <gen> to (Center of DoodadDeathArea03 <gen>) with Z offset 0
    Sound - Play LightningShieldTarget <gen>
    Sound - Set position of RejuvenationTarget1 <gen> to (Center of DoodadDeathArea03 <gen>) with Z offset 0
    Sound - Play RejuvenationTarget1 <gen>
    Trigger - Turn off Archmage03 <gen>
    -------- Hide shuffle to leave player units in area around Antonidas area --------
    Unit Group - Pick every unit in (Units owned by Player 7 (Green)) and do (Add (Picked unit) to CinematicGroup)
    Unit Group - Pick every unit in (Units owned by Player 4 (Purple)) and do (Add (Picked unit) to CinematicGroup)
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Hide (Picked unit))
    Unit Group - Pick every unit in CinematicGroup and do (Unhide (Picked unit))
    Unit Group - Pick every unit in (Units in EndingPlayerGroupArea <gen>) and do (Hide (Picked unit))
    -------- ******** --------
    If ((Arthas is dead) Equal to True) then do (Instantly revive Arthas at (Center of Arthas_Confronts_Antonidas <gen>), Hide revival graphics) else do (Move Arthas instantly to (Center of Arthas_Confronts_Antonidas <gen>), facing (Center of Archmage03LeashArea <gen>))
    If ((KelThuzad is dead) Equal to True) then do (Instantly revive KelThuzad at (Center of KelThuzad <gen>), Hide revival graphics) else do (Move KelThuzad instantly to (Center of KelThuzad <gen>), facing (Center of Archmage03LeashArea <gen>))
    Unit - Unhide Arthas
    Unit - Unhide KelThuzad
    Unit - Unhide Book of Summoning Pedestal 0251 <gen>
    Unit - Pause all units
    Trigger - Run EndingAlly <gen> (checking conditions)
    Cinematic - Turn cinematic mode On for (All players)
    Wait 0.50 seconds
    Unit - Remove Antonidas from the game
    Unit - Create 1 Archmage for Player 6 (Orange) at (Center of Archmage03LeashArea <gen>) facing (Position of Arthas)
    Set Antonidas = (Last created unit)
    Unit - Pause Antonidas
    Unit - Make Antonidas face Arthas over 0 seconds
    Camera - Apply gg_cam_Ending01 for Player 7 (Green) over 0.00 seconds
    Camera - Apply gg_cam_Ending01 for Player 4 (Purple) over 0.00 seconds
    -------- NOW SKIPPABLE --------
    Trigger - Turn on EndingCancelled <gen>
    Trigger - Turn on Skip_Cinematic <gen>
    Wait 1.00 seconds
    Cinematic - Fade in over 2.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Antonidas named Antonidas: Play U07Antonidas13 <gen> and display It pains me to even look at you, Arthas.. Modify duration: Add 0 seconds and Wait
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Wait 1.00 seconds
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U07Arthas14 <gen> and display I'll be happy to end your torment, old man. I told you that your magics could not stop me. . Modify duration: Add 0 seconds and Wait
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Wait 1.00 seconds
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Unpause Arthas
    Unit - Order Arthas to Move To (Center of Arthas_Kill_Antonidas <gen>)
    Trigger - Turn on Arthas_Kill_Antonidas <gen>
Ending02
  Events
  Conditions
  Actions
    Unit - Make Arthas Invulnerable
    Unit - Make KelThuzad Invulnerable
    Camera - Apply gg_cam_Ending02a for Player 7 (Green) over 0 seconds
    Camera - Apply gg_cam_Ending02a for Player 4 (Purple) over 0 seconds
    Wait 0.25 seconds
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - Apply gg_cam_Ending02 for Player 7 (Green) over 6.00 seconds
    Camera - Apply gg_cam_Ending02 for Player 4 (Purple) over 6.00 seconds
    Hero - Instantly revive Arthas at (Center of ArthasStart <gen>), Hide revival graphics
    Hero - Instantly revive KelThuzad at (Center of KelThuzadStart <gen>), Hide revival graphics
    Unit - Move Arthas instantly to (Center of EndingArthasStart <gen>)
    Unit - Order Arthas to Move To (Center of EndingArthasDest <gen>)
    Sound - Attach HorseLoop1 <gen> to Arthas
    Sound - Play HorseLoop1 <gen>
    Unit - Move KelThuzad instantly to (Center of EndingKelThuzadStart <gen>)
    Unit - Order KelThuzad to Move To (Center of EndingKelThuzadEnd <gen>)
    Animation - Change Arthas's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Animation - Change KelThuzad's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 2.00 seconds
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U07Arthas15 <gen> and display The spellbook is all yours, lich. Let's take it and leave before the wizards amass for their final attack. . Modify duration: Add 0 seconds and Wait
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from KelThuzad named Kel'Thuzad: Play U07KelThuzad16 <gen> and display Indeed. I will begin summoning Lord Archimonde at sunset. . Modify duration: Add 0 seconds and Don't wait
    Wait for U07KelThuzad16 <gen> to be 0.30 seconds from finished playing
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Animation - Play Book of Summoning Pedestal 0251 <gen>'s stand second animation
    Sound - Set position of QuestActivateWhat1 <gen> to (Center of EndingKelThuzadEnd <gen>) with Z offset 0
    Sound - Set volume of QuestActivateWhat1 <gen> to 40.00%
    Sound - Play QuestActivateWhat1 <gen>
    Wait 1.00 seconds
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 2.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Trigger - Turn off Skip_Cinematic <gen>
    Trigger - Turn off EndingCancelled <gen>
    Wait 2.00 seconds
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        Unit - Hide (Picked unit)
        Unit - Pause (Picked unit)
    Cinematic - Turn cinematic mode Off for (All players)
    Trigger - Run Endgame_Text <gen> (checking conditions)
EndingAlly
  Events
  Conditions
  Actions
    Player - Make Player 9 (Gray) treat Player 7 (Green) as an Neutral
    Player - Make Player 5 (Yellow) treat Player 7 (Green) as an Neutral
    Player - Make Player 6 (Orange) treat Player 7 (Green) as an Neutral
    Player - Make Player 7 (Green) treat Player 9 (Gray) as an Neutral
    Player - Make Player 7 (Green) treat Player 5 (Yellow) as an Neutral
    Player - Make Player 7 (Green) treat Player 6 (Orange) as an Neutral
    Player - Make Player 9 (Gray) treat Player 4 (Purple) as an Neutral
    Player - Make Player 5 (Yellow) treat Player 4 (Purple) as an Neutral
    Player - Make Player 6 (Orange) treat Player 4 (Purple) as an Neutral
    Player - Make Player 4 (Purple) treat Player 9 (Gray) as an Neutral
    Player - Make Player 4 (Purple) treat Player 5 (Yellow) as an Neutral
    Player - Make Player 4 (Purple) treat Player 6 (Orange) as an Neutral
Arthas Kill Antonidas
  Events
    Unit - A unit enters Arthas_Kill_Antonidas <gen>
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Unit - Order Arthas to Stop
    Unit - Make Arthas face Antonidas over 0 seconds
    Animation - Play Arthas's attack animation
    Wait 0.25 seconds
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Sound - Play MetalMediumSliceFlesh1 <gen>
    Wait 0.25 seconds
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Animation - Play Antonidas's death animation
    Animation - Reset Arthas's animation
    Sound - Set position of HeroArchMageDeath <gen> to (Center of Archmage03LeashArea <gen>) with Z offset 0
    Sound - Play HeroArchMageDeath <gen>
    Wait 1.00 seconds
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 2 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 2.00 seconds
    Unit - Unpause all units
    If (EndingCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Trigger - Run Ending02 <gen> (checking conditions)
ExoticBeastiaryQ
  Events
    Unit - A unit enters ExoticBeastiary <gen>
  Conditions
    (Entering unit) Equal to KelThuzad
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Add ExoticBeastiary <gen> to the trigger queue (Checking conditions)
ExoticBeastiary
  Events
  Conditions
    GAMEOVER Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Sound - Setup all volume channels for speech
    Cinematic - Send transmission to (All players) from KelThuzad named Kel'Thuzad: Play U07KelThuzad09 <gen> and display The Kirin Tor keeps these creatures caged for study. If they were to be released, they would cause our enemies a great deal of pain!. Modify duration: Add 0 seconds and Wait
    Sound - Reset all volume channels to 100%
    Wait Campaign quest delay seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Destroy the cages to release the creatures.
    Wait Campaign hint delay seconds
    Trigger - Remove (This trigger) from the trigger queue
Cage01
  Events
    Unit - Cage 0165 <gen> Dies
  Conditions
  Actions
    Set BonusesFound = (BonusesFound + 1)
    Trigger - Turn off ExoticBeastiaryQ <gen>
    Wait 0.10 seconds
    Unit - Create 1 Rock Golem for Player 4 (Purple) at (Center of Cage01 <gen>) facing 80.00 degrees
    Set Golem01 = (Last created unit)
Cage02
  Events
    Unit - Cage 0168 <gen> Dies
  Conditions
  Actions
    Set BonusesFound = (BonusesFound + 1)
    Trigger - Turn off ExoticBeastiaryQ <gen>
    Wait 0.10 seconds
    Unit - Create 1 Rock Golem for Player 7 (Green) at (Center of Cage02 <gen>) facing 80.00 degrees
    Set Golem02 = (Last created unit)
Cage03
  Events
    Unit - Cage 0209 <gen> Dies
  Conditions
  Actions
    Set BonusesFound = (BonusesFound + 1)
    Wait 0.10 seconds
    Unit - Create 1 Kobold Geomancer for Player 4 (Purple) at (Center of Cage03 <gen>) facing 150.00 degrees
    Unit - Create 1 Kobold Geomancer for Player 7 (Green) at (Center of Cage03 <gen>) facing 150.00 degrees
Cage04
  Events
    Unit - Cage 0203 <gen> Dies
  Conditions
  Actions
    Set BonusesFound = (BonusesFound + 1)
    Wait 0.10 seconds
    Unit - Create 1 Black Spider for Player 4 (Purple) at (Center of Cage04 <gen>) facing 230.00 degrees
    Unit - Order (Last created unit) to Move To (Random point in Cage04 <gen>)
    Wait 0.10 seconds
    Unit - Create 1 Black Spider for Player 4 (Purple) at (Center of Cage04 <gen>) facing 150.00 degrees
    Unit - Order (Last created unit) to Move To (Random point in Cage04 <gen>)
    Wait 0.10 seconds
    Unit - Create 1 Black Spider for Player 7 (Green) at (Center of Cage04 <gen>) facing 75.00 degrees
    Unit - Order (Last created unit) to Move To (Random point in Cage04 <gen>)
    Wait 0.10 seconds
    Unit - Create 1 Black Spider for Player 7 (Green) at (Center of Cage04 <gen>) facing 300.00 degrees
    Unit - Order (Last created unit) to Move To (Random point in Cage04 <gen>)
Cage05
  Events
    Unit - Cage 0183 <gen> Dies
  Conditions
  Actions
    Set BonusesFound = (BonusesFound + 1)
    Unit - Create 1 Flying Sheep for Player 4 (Purple) at (Center of Cage05 <gen>) facing 230.00 degrees
    Set FlyingSheep01 = (Last created unit)
    Wait 0.10 seconds
    Unit - Create 1 Flying Sheep for Player 7 (Green) at (Center of Cage05 <gen>) facing 300.00 degrees
    Set FlyingSheep02 = (Last created unit)
    Wait 2.00 seconds
    Unit - Replace FlyingSheep01 with a Blue Drake using The new unit's default life and mana
    Wait 0.50 seconds
    Unit - Replace FlyingSheep02 with a Blue Drake using The new unit's default life and mana
GateDown
  Events
    Map initialization
  Conditions
  Actions
    Destructible - Open Gate 0013 <gen>
GyroShield02
  Events
    Unit - A unit enters Shield02 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Frost Wyrm
    Shield02Switch Equal to True
  Actions
    Unit Group - Pick every unit in GyroForce and do (Order (Picked unit) to Attack (Entering unit))
GyroShield02WyrmGroupAdd
  Events
    Unit - A unit enters Shield02 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Frost Wyrm
    Shield02Switch Equal to True
  Actions
    Unit Group - Add (Entering unit) to Shield02FrostWyrmGroup
GyroShield02WyrmGroupSubtract
  Events
    Unit - A unit leaves Shield02 <gen>
  Conditions
    (Unit-type of (Leaving unit)) Equal to Frost Wyrm
    Shield02Switch Equal to True
  Actions
    Unit Group - Remove (Leaving unit) from Shield02FrostWyrmGroup
    Trigger - Run GyroShield02Done <gen> (checking conditions)
GyroShield02WyrmGroupSubtractDies
  Events
    Unit - A unit owned by Player 4 (Purple) Dies
    Unit - A unit owned by Player 7 (Green) Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Frost Wyrm
    Shield02Switch Equal to True
  Actions
    Unit Group - Remove (Dying unit) from Shield02FrostWyrmGroup
    Trigger - Run GyroShield02Done <gen> (checking conditions)
GyroShield02Done
  Events
  Conditions
  Actions
    If ((Number of units in Shield02FrostWyrmGroup) Less than or equal to 0) then do (Order GyroForce to Move To (Center of GyroForce <gen>)) else do (Do nothing)
IZZZZZZZI
  Events
  Conditions
  Actions
GyroShield03
  Events
    Unit - A unit enters Shield03 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Frost Wyrm
    Shield03Switch Equal to True
  Actions
    Unit Group - Pick every unit in GyroForce and do (Order (Picked unit) to Attack (Entering unit))
GyroShield03WyrmGroupAdd
  Events
    Unit - A unit enters Shield03 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Frost Wyrm
    Shield03Switch Equal to True
  Actions
    Unit Group - Add (Entering unit) to Shield03FrostWyrmGroup
GyroShield03WyrmGroupSubtract
  Events
    Unit - A unit leaves Shield03 <gen>
  Conditions
    (Unit-type of (Leaving unit)) Equal to Frost Wyrm
    Shield03Switch Equal to True
  Actions
    Unit Group - Remove (Leaving unit) from Shield03FrostWyrmGroup
    Trigger - Run GyroShield03Done <gen> (checking conditions)
GyroShield03WyrmGroupSubtractDies
  Events
    Unit - A unit owned by Player 4 (Purple) Dies
    Unit - A unit owned by Player 7 (Green) Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Frost Wyrm
    Shield03Switch Equal to True
  Actions
    Unit Group - Remove (Dying unit) from Shield03FrostWyrmGroup
    Trigger - Run GyroShield03Done <gen> (checking conditions)
GyroShield03Done
  Events
  Conditions
  Actions
    If ((Number of units in Shield03FrostWyrmGroup) Less than or equal to 0) then do (Order GyroForce to Move To (Center of GyroForce <gen>)) else do (Do nothing)
VaultOfEnchantments
  Events
    Unit - A unit enters VaultOfEnchantmentsArea <gen>
  Conditions
    (Entering unit) Equal to KelThuzad
    GAMEOVER Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Sound - Setup all volume channels for speech
    If ((KelThuzad is alive) Equal to True) then do (Send transmission to (All players) from KelThuzad named Kel'thuzad: Play U07KelThuzad12 <gen> and display The wizards keep many enchanted items within that vault! Shatter it, and we can turn our enemies' own weapons against them!. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
    Sound - Reset all volume channels to 100%
Vault01
  Events
    Unit - Magic Vault 0157 <gen> Dies
  Conditions
  Actions
    Trigger - Turn off VaultOfEnchantments <gen>
    Wait 0.10 seconds
    Set BonusesFound = (BonusesFound + 1)
    Item - Create Khadgar's Pipe of Insight at (Center of Vault01 <gen>)
    Item - Create Potion of Invulnerability at (Center of Vault01 <gen>)
    Item - Create Pendant of Mana at (Center of Vault01 <gen>)
Archmage01
  Events
    Time - Every 2.70 seconds of game time
  Conditions
  Actions
    If ((Archmage01 is dead) Equal to True) then do (Add Archmage01Dead <gen> to the trigger queue (Checking conditions)) else do (Play Archmage01's spell animation)
Run from 'Archmage01'
Archmage01Dead
  Events
  Conditions
    (Archmage01Dead <gen> is on) Equal to True
    GAMEOVER Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Animation - Play the death animation for all doodads of type XOmr (doodadcode) within DoodadDeathArea01 <gen>
    Animation - Play the death animation for all doodads of type XOcs (doodadcode) within DoodadDeathArea01 <gen>
    Sound - Set position of LightningShieldTarget <gen> to (Center of DoodadDeathArea01 <gen>) with Z offset 0
    Sound - Play LightningShieldTarget <gen>
    Sound - Set position of RejuvenationTarget1 <gen> to (Center of DoodadDeathArea01 <gen>) with Z offset 0
    Sound - Play RejuvenationTarget1 <gen>
    Trigger - Run Leaderboard_Update <gen> (checking conditions)
    Wait 2.00 seconds
    Visibility - Destroy Archmage01Visibilitya
    Visibility - Destroy Archmage01Visibilityb
    Visibility - Create an initially Enabled visibility modifier for Player 4 (Purple) emitting Visibility from (Center of Archmage02Revealer <gen>) to a radius of 512.00
    Set Archmage02Visibilitya = (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 7 (Green) emitting Visibility from (Center of Archmage02Revealer <gen>) to a radius of 512.00
    Set Archmage02Visibilityb = (Last created visibility modifier)
    Sound - Setup all volume channels for speech
    If ((KelThuzad is alive) Equal to True) then do (Send transmission to (All players) from KelThuzad named Kel'thuzad: Play U07KelThuzad08 <gen> and display The archmage has been killed! The first aura is dispersing!. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
    Sound - Reset all volume channels to 100%
    Wait 1.00 seconds
    Quest - Mark QuestReqArchmage01 as Completed
    If (((QuestReqArchmage01 is completed) Equal to True) and ((QuestReqArchmage02 is completed) Equal to True)) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Archmagi - |cff808080Slay the first Archmage (Completed)|r - |cff808080Slay the second Archmage(Completed)|r - Slay Antonidas) else do (Do nothing)
    If (((QuestReqArchmage01 is completed) Equal to True) and ((QuestReqArchmage02 is completed) Equal to False)) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Archmagi - |cff808080Slay the first Archmage (Completed)|r - Slay the second Archmage - Slay Antonidas) else do (Do nothing)
    Wait Campaign quest delay seconds
    Trigger - Remove (This trigger) from the trigger queue
Archmage02
  Events
    Time - Every 2.70 seconds of game time
  Conditions
  Actions
    If ((Archmage02 is dead) Equal to True) then do (Add Archmage02Dead <gen> to the trigger queue (Checking conditions)) else do (Play Archmage02's spell animation)
Run from 'Archmage02'
Archmage02Dead
  Events
  Conditions
    (Archmage02Dead <gen> is on) Equal to True
    GAMEOVER Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Run Leaderboard_Update <gen> (checking conditions)
    Animation - Play the death animation for all doodads of type XOmr (doodadcode) within DoodadDeathArea02 <gen>
    Animation - Play the death animation for all doodads of type XOcs (doodadcode) within DoodadDeathArea02 <gen>
    Sound - Set position of LightningShieldTarget <gen> to (Center of DoodadDeathArea02 <gen>) with Z offset 0
    Sound - Play LightningShieldTarget <gen>
    Sound - Set position of RejuvenationTarget1 <gen> to (Center of DoodadDeathArea02 <gen>) with Z offset 0
    Sound - Play RejuvenationTarget1 <gen>
    Wait 2.00 seconds
    Visibility - Destroy Archmage02Visibilitya
    Visibility - Destroy Archmage02Visibilityb
    Visibility - Create an initially Enabled visibility modifier for Player 4 (Purple) emitting Visibility from (Center of Archmage03Revealer <gen>) to a radius of 512.00
    Set Archmage03Visibilitya = (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 7 (Green) emitting Visibility from (Center of Archmage03Revealer <gen>) to a radius of 512.00
    Set Archmage03Visibilityb = (Last created visibility modifier)
    Sound - Setup all volume channels for speech
    If ((KelThuzad is alive) Equal to True) then do (Send transmission to (All players) from KelThuzad named Kel'thuzad: Play U07KelThuzad11 <gen> and display The second wizard has fallen! Only one cursed aura remains!. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
    Sound - Reset all volume channels to 100%
    Wait 1.00 seconds
    Quest - Mark QuestReqArchmage02 as Completed
    If (((QuestReqArchmage01 is completed) Equal to False) and ((QuestReqArchmage02 is completed) Equal to True)) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Archmagi - Slay the first Archmage - |cff808080Slay the second Archmage(Completed)|r - Slay Antonidas) else do (Do nothing)
    If (((QuestReqArchmage01 is completed) Equal to True) and ((QuestReqArchmage02 is completed) Equal to True)) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Archmagi - |cff808080Slay the first Archmage (Completed)|r - |cff808080Slay the second Archmage (Completed)|r - Slay Antonidas) else do (Do nothing)
    Wait Campaign quest delay seconds
    Trigger - Remove (This trigger) from the trigger queue
Archmage03
  Events
    Time - Every 2.70 seconds of game time
  Conditions
  Actions
    If ((Archmage03 is dead) Equal to True) then do (Do nothing) else do (Play Archmage03's spell animation)
Archmage03Dead
  Events
    Unit - Archmage 0172 <gen> Dies
  Conditions
    GAMEOVER Equal to False
  Actions
    Set GAMEOVER = True
    Trigger - Turn off (This trigger)
    Trigger - Turn off Archmage03 <gen>
    Unit - Replace (Dying unit) with a Archmage using The new unit's default life and mana
    Set Antonidas = (Last replaced unit)
    Unit - Make Antonidas Invulnerable
    Unit - Set life of Antonidas to 1.00%
    Unit - Order Antonidas to Hold Position
    Trigger - Run Leaderboard_Update <gen> (checking conditions)
    Animation - Play the death animation for all doodads of type XOmr (doodadcode) within DoodadDeathArea03 <gen>
    Animation - Play the death animation for all doodads of type XOcs (doodadcode) within DoodadDeathArea03 <gen>
    Visibility - Destroy Archmage03Visibilitya
    Visibility - Destroy Archmage03Visibilityb
    Quest - Mark QuestReqArchmage01 as Completed
    Quest - Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST COMPLETED|rThree Archmagi
    Wait Campaign quest delay seconds
    Leaderboard - Destroy LeaderboardArchmage
    Trigger - Run Ending01 <gen> (checking conditions)
ContainmentArea
  Events
    Unit - A unit leaves AntonidasContainmentArea <gen>
  Conditions
    (Leaving unit) Equal to Antonidas
  Actions
    Unit - Order Antonidas to Move To (Random point in AntonidasContainmentArea <gen>)
CratesDeadTown
  Events
    Destructible - Crates 0767 <gen> dies
  Conditions
  Actions
    Wait 0.10 seconds
    Item - Create Scroll of Mana at (Center of CratesDeadTown <gen>)
    Set BonusesFound = (BonusesFound + 1)
Shield01Enter AnimateDead
  Events
    Unit - A unit owned by Player 4 (Purple) Spawns a summoned unit
    Unit - A unit owned by Player 7 (Green) Spawns a summoned unit
  Conditions
    (Shield01 <gen> contains (Summoned unit)) Equal to True
    ((Summoned unit) is Undead) Equal to True
    (Archmage01 is dead) Equal to False
  Actions
    Unit Group - Add (Summoned unit) to Shield01Group
Shield01Enter
  Events
    Unit - A unit enters Shield01 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Entering unit)) Equal to Player 4 (Purple)
        (Owner of (Entering unit)) Equal to Player 7 (Green)
    (Archmage01 is dead) Equal to False
    (Undead Equal to (Race of (Entering unit))) or (((Entering unit) is Undead) Equal to True)
  Actions
    Unit Group - Add (Entering unit) to Shield01Group
Shield01Exit
  Events
    Unit - A unit leaves Shield01 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Leaving unit)) Equal to Player 4 (Purple)
        (Owner of (Leaving unit)) Equal to Player 7 (Green)
    (Race of (Leaving unit)) Equal to Undead
  Actions
    Unit Group - Remove (Leaving unit) from Shield01Group
    If ((((Leaving unit) is in Shield03Group) Equal to True) or ((((Triggering unit) is in Shield02Group) Equal to True) or (((Leaving unit) is in Shield01Group) Equal to True))) then do (Do nothing) else do (Change (Leaving unit)'s vertex coloring to (100.00%, 100%, 100%) with 0% transparency)
Shield01Down
  Events
    Unit - Archmage 0122 <gen>'s life becomes Less than or equal to 0.00
  Conditions
  Actions
    Unit Group - Pick every unit in Shield01Group and do (Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency)
    Unit Group - Remove all units from Shield01Group
    Set Shield01Switch = False
    Animation - Play the death animation for all doodads of type YZef (doodadcode) within Shield_01_DOODAD_KILL <gen>
    If (Shield02Switch Equal to False) then do (Play the death animation for all doodads of type YZef (doodadcode) within Shield_02_DOODAD_KILL <gen>) else do (Do nothing)
Shield01Damage
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in Shield01Group and do (If ((Life of (Picked unit)) Greater than 0.00) then do (Set life of (Picked unit) to ((Life of (Picked unit)) - 10.00)) else do (Do nothing))
    Unit Group - Pick every unit in Shield01Group and do (Change (Picked unit)'s vertex coloring to (100.00%, 50.00%, 100.00%) with 0% transparency)
Shield02Enter AnimateDead
  Events
    Unit - A unit owned by Player 4 (Purple) Spawns a summoned unit
    Unit - A unit owned by Player 7 (Green) Spawns a summoned unit
  Conditions
    (Shield02 <gen> contains (Summoned unit)) Equal to True
    ((Summoned unit) is Undead) Equal to True
    (Archmage02 is dead) Equal to False
  Actions
    Unit Group - Add (Summoned unit) to Shield02Group
Shield02Activate
  Events
    Unit - A unit enters Shield02Activate <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Entering unit)) Equal to Player 4 (Purple)
        (Owner of (Entering unit)) Equal to Player 7 (Green)
  Actions
    Animation - Play the Stand animation for all doodads of type YZef (doodadcode) within Shield02 <gen>
    Trigger - Turn off (This trigger)
Shield02Enter
  Events
    Unit - A unit enters Shield02 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Entering unit)) Equal to Player 4 (Purple)
        (Owner of (Entering unit)) Equal to Player 7 (Green)
    (Archmage02 is dead) Equal to False
    (Undead Equal to (Race of (Entering unit))) or (((Entering unit) is Undead) Equal to True)
  Actions
    Unit Group - Add (Entering unit) to Shield02Group
Shield02Exit
  Events
    Unit - A unit leaves Shield02 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Leaving unit)) Equal to Player 4 (Purple)
        (Owner of (Leaving unit)) Equal to Player 7 (Green)
    (Race of (Leaving unit)) Equal to Undead
  Actions
    Unit Group - Remove (Leaving unit) from Shield02Group
    If ((((Leaving unit) is in Shield03Group) Equal to True) or ((((Triggering unit) is in Shield02Group) Equal to True) or (((Leaving unit) is in Shield01Group) Equal to True))) then do (Do nothing) else do (Change (Leaving unit)'s vertex coloring to (100.00%, 100%, 100%) with 0% transparency)
Shield02Down
  Events
    Unit - Archmage 0019 <gen>'s life becomes Less than or equal to 0.00
  Conditions
  Actions
    Unit Group - Pick every unit in Shield02Group and do (Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency)
    Unit Group - Remove all units from Shield02Group
    Set Shield02Switch = False
    If (Shield01Switch Equal to False) then do (Play the death animation for all doodads of type YZef (doodadcode) within Shield_02_DOODAD_KILL <gen>) else do (Do nothing)
Shield02Damage
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in Shield02Group and do (If ((Life of (Picked unit)) Greater than 0.00) then do (Set life of (Picked unit) to ((Life of (Picked unit)) - 10.00)) else do (Do nothing))
    Unit Group - Pick every unit in Shield02Group and do (Change (Picked unit)'s vertex coloring to (100.00%, 50.00%, 100.00%) with 0% transparency)
Shield03Enter AnimateDead
  Events
    Unit - A unit owned by Player 4 (Purple) Spawns a summoned unit
    Unit - A unit owned by Player 7 (Green) Spawns a summoned unit
  Conditions
    (Shield03 <gen> contains (Summoned unit)) Equal to True
    ((Summoned unit) is Undead) Equal to True
    (Archmage03 is dead) Equal to False
  Actions
    Unit Group - Add (Summoned unit) to Shield03Group
Shield03Activate
  Events
    Unit - A unit enters Shield03Activate <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Entering unit)) Equal to Player 4 (Purple)
        (Owner of (Entering unit)) Equal to Player 7 (Green)
  Actions
    Animation - Play the Stand animation for all doodads of type YZef (doodadcode) within Shield03 <gen>
    Trigger - Turn off (This trigger)
Shield03Enter
  Events
    Unit - A unit enters Shield03 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Entering unit)) Equal to Player 4 (Purple)
        (Owner of (Entering unit)) Equal to Player 7 (Green)
    (Archmage03 is dead) Equal to False
    (Undead Equal to (Race of (Entering unit))) or (((Entering unit) is Undead) Equal to True)
  Actions
    Unit Group - Add (Entering unit) to Shield03Group
Shield03Exit
  Events
    Unit - A unit leaves Shield03 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Leaving unit)) Equal to Player 4 (Purple)
        (Owner of (Leaving unit)) Equal to Player 7 (Green)
    (Race of (Leaving unit)) Equal to Undead
  Actions
    Unit Group - Remove (Leaving unit) from Shield03Group
    If ((((Leaving unit) is in Shield03Group) Equal to True) or ((((Triggering unit) is in Shield02Group) Equal to True) or (((Leaving unit) is in Shield01Group) Equal to True))) then do (Do nothing) else do (Change (Leaving unit)'s vertex coloring to (100.00%, 100%, 100%) with 0% transparency)
Shield03Down
  Events
    Unit - Archmage 0172 <gen> Dies
  Conditions
  Actions
    Unit Group - Pick every unit in Shield03Group and do (Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency)
    Unit Group - Remove all units from Shield03Group
    Set Shield03Switch = False
    If ((Shield01Switch Equal to False) and (Shield02Switch Equal to False)) then do (Play the death animation for all doodads of type YZef (doodadcode) within Shield_03_DOODAD_KILL <gen>) else do (Do nothing)
Shield03Damage
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in Shield03Group and do (If ((Life of (Picked unit)) Greater than 0.00) then do (Set life of (Picked unit) to ((Life of (Picked unit)) - 10.00)) else do (Do nothing))
    Unit Group - Pick every unit in Shield03Group and do (Change (Picked unit)'s vertex coloring to (100.00%, 50.00%, 100.00%) with 0% transparency)
Defeat Lose Buildings
  Events
    Time - Every 1.00 seconds of game time
  Conditions
    (Count structures controlled by Player 4 (Purple) (Include incomplete structures)) Equal to 0
    (Count structures controlled by Player 7 (Green) (Include incomplete structures)) Equal to 0
    GargoyleCinematicRunning Equal to False
    SylvanasCinematicRunning Equal to False
    GAMEOVER Equal to False
  Actions
    Set GAMEOVER = True
    Cinematic - Fade out over 2 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Quest - Display to (All players) the Quest Failed message: |cffffcc00MISSION FAILED|rAll of your buildings have been destroyed.
    Sound - Play SadMystery <gen>
    Wait 2 seconds
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Pause (Picked unit))
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Hide (Picked unit))
Item Drop Bonuses
  Events
    Unit - A unit Dies
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Dying unit) Equal to Archmage 0014 <gen>
        (Dying unit) Equal to Tent 0015 <gen>
        (Dying unit) Equal to Archmage 0070 <gen>
  Actions
    Set BonusesFound = (BonusesFound + 1)
Custom Variables
  Events
    Map initialization
  Conditions
  Actions
    Game - Set Lock resource trading to On
    Set MissionNumber = 27
    Set SubquestsTotal = 0
    Set BonusesTotal = 10
    Set ExtraTotal = 24
    Set TimeMin = 1200.00
    Set TimeMax = 4800.00
    Set TimeRange = (TimeMax - TimeMin)
    Set ScoreBonuses = 10
    Set ScoreExtra = 4
    Set ScoreSubquests = 0
    Set ScoreTime = 120
    Set ScoreMax = ((SubquestsTotal x ScoreSubquests) + ((BonusesTotal x ScoreBonuses) + ((ExtraTotal x ScoreExtra) + ScoreTime)))
    Set ScoreLimit[4] = (Integer((((Real(ScoreMax)) x 0.90) + 0.50)))
    Set ScoreLimit[3] = (Integer((((Real(ScoreMax)) x 0.75) + 0.50)))
    Set ScoreLimit[2] = (Integer((((Real(ScoreMax)) x 0.55) + 0.50)))
    Set ScoreLimit[1] = (Integer((((Real(ScoreMax)) x 0.30) + 0.50)))
    -------- Items To be Saved --------
    Set SaveLoad_Items[1] = Potion of Healing
    Set SaveLoad_Items[2] = Potion of Greater Mana
    Set SaveLoad_Items[3] = Scroll of Healing
    Set SaveLoad_Items[4] = Potion of Greater Healing
    Set SaveLoad_Items[5] = Ring of Protection +2
    Set SaveLoad_Items[6] = Spider Ring
    Set SaveLoad_Items[7] = Gauntlets of Ogre Strength +3
    Set SaveLoad_Items[8] = Urn of King Terenas
    Set SaveLoad_Items[9] = Pendant of Energy
    Set SaveLoad_Items[10] = Voodoo Doll
    Set SaveLoad_Items[11] = Claws of Attack +6
    Set SaveLoad_Items[12] = Gloves of Haste
    Set SaveLoad_Items[13] = Goblin Night Scope
    Set SaveLoad_Items[14] = Urn of King Terenas
    Set SaveLoad_Items[15] = Scroll of the Beast
    Set SaveLoad_Items[16] = Health Stone
    Set SaveLoad_Items[17] = Book of the Dead
    Set SaveLoad_Items[18] = Scroll of Mana
    Set SaveLoad_Items[19] = Potion of Mana
    Set SaveLoad_Items[20] = Scroll of Protection
    Set SaveLoad_Items[21] = Wand of Negation
    Set SaveLoad_Items[22] = Scroll of Town Portal
    Set SaveLoad_Items[23] = Slippers of Agility +3
    Set SaveLoad_Items[24] = Hood of Cunning
    Set SaveLoad_Items[25] = Ring of Regeneration
    Set SaveLoad_Items[26] = Sobi Mask
    Set SaveLoad_Items[27] = Ring of Protection +3
    Set SaveLoad_Items[28] = Periapt of Vitality
    Set SaveLoad_Items[29] = Mana Stone
    Set SaveLoad_Items[30] = Claws of Attack +9
    Set SaveLoad_Items[31] = Tome of Demonic Power I
    Set SaveLoad_Items[32] = Tome of Demonic Power II
    Set SaveLoad_Items[33] = Tome of Demonic Power III
    Set SaveLoad_Items[34] = Tome of Forbidden Knowledge I
    Set SaveLoad_Items[35] = Tome of Forbidden Knowledge II
    Set SaveLoad_Items[36] = Tome of Forbidden Knowledge III
    Set SaveLoad_Items[37] = Anti-magic Potion
    Set SaveLoad_Items[38] = Mantle of Intelligence +3
    Set SaveLoad_Items[39] = Khadgar's Pipe of Insight
    Set SaveLoad_Items[40] = Potion of Invulnerability
    Set SaveLoad_Items[41] = Boots of Quel'Thalas +6
    Set SaveLoad_Items_LastIndex = 41
    -------- Leave as is. Used to autocreate variables when copy & pasting to a new map --------
    Set SaveLoad_Alphabet = ABCDEFGHIJKLMNPQRSTUVWXYZ123456789abcdefghijklmnopqrstuvwxyz
    Set SaveLoad_CaseSensitive = True
    Set SaveLoad_UsePlayername = False
    -------- Required: false --------
    Set SaveLoad_Initialized = False
    Set Code = AceHart
    Set Save[1] = 0
    Set SaveCount = 1
    Set Validate = False
    Set SaveLoad_Compress[1] = 0
    Set SaveLoad_Uncompress[1] = 0
Timer Trigger
  Events
    Time - Every 1.00 seconds of game time
  Conditions
    Cinematic Equal to False
  Actions
    Set TimeSecondsTotal = (TimeSecondsTotal + 1)
    Set TimeSeconds = (TimeSeconds + 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        TimeSeconds Greater than or equal to 60
      Then - Actions
        Set TimeSeconds = (TimeSeconds - 60)
        Set TimeMins = (TimeMins + 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        TimeMins Greater than or equal to 60
      Then - Actions
        Set TimeMins = (TimeMins - 60)
        Set TimeHours = (TimeMins + 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        TimeSeconds Less than 10
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            TimeMins Less than 10
          Then - Actions
            Set TimeTakenString = ((((String(TimeHours)) + :0) + (String(TimeMins))) + (:0 + (String(TimeSeconds))))
          Else - Actions
            Set TimeTakenString = ((((String(TimeHours)) + :) + (String(TimeMins))) + (:0 + (String(TimeSeconds))))
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            TimeMins Less than 10
          Then - Actions
            Set TimeTakenString = ((((String(TimeHours)) + :0) + (String(TimeMins))) + (: + (String(TimeSeconds))))
          Else - Actions
            Set TimeTakenString = ((((String(TimeHours)) + :) + (String(TimeMins))) + (: + (String(TimeSeconds))))
Combine Books
  Events
    Unit - A unit Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Hero manipulating item) Equal to EvilArthas
        (Hero manipulating item) Equal to KelThuzad
    Or - Any (Conditions) are true
      Conditions
        (Item-type of (Item being manipulated)) Equal to Tome of Demonic Power I
        (Item-type of (Item being manipulated)) Equal to Tome of Demonic Power II
        (Item-type of (Item being manipulated)) Equal to Tome of Forbidden Knowledge I
        (Item-type of (Item being manipulated)) Equal to Tome of Forbidden Knowledge II
  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
            (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
            (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Tome of Demonic Power I
            (Item-type of (Item being manipulated)) Equal to Tome of Demonic Power I
          Then - Actions
            Item - Remove (Item being manipulated)
            Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
            Hero - Create Tome of Demonic Power II and give it to (Hero manipulating item)
            Skip remaining actions
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
            (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Tome of Demonic Power II
            (Item-type of (Item being manipulated)) Equal to Tome of Demonic Power I
          Then - Actions
            Item - Remove (Item being manipulated)
            Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
            Hero - Create Tome of Demonic Power III and give it to (Hero manipulating item)
            Skip remaining actions
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
            (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Tome of Demonic Power I
            (Item-type of (Item being manipulated)) Equal to Tome of Demonic Power II
          Then - Actions
            Item - Remove (Item being manipulated)
            Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
            Hero - Create Tome of Demonic Power III and give it to (Hero manipulating item)
            Skip remaining actions
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
            (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Tome of Forbidden Knowledge I
            (Item-type of (Item being manipulated)) Equal to Tome of Forbidden Knowledge I
          Then - Actions
            Item - Remove (Item being manipulated)
            Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
            Hero - Create Tome of Forbidden Knowledge II and give it to (Hero manipulating item)
            Skip remaining actions
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
            (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Tome of Forbidden Knowledge II
            (Item-type of (Item being manipulated)) Equal to Tome of Forbidden Knowledge I
          Then - Actions
            Item - Remove (Item being manipulated)
            Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
            Hero - Create Tome of Forbidden Knowledge II and give it to (Hero manipulating item)
            Skip remaining actions
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
            (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Tome of Forbidden Knowledge I
            (Item-type of (Item being manipulated)) Equal to Tome of Forbidden Knowledge II
          Then - Actions
            Item - Remove (Item being manipulated)
            Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
            Hero - Create Tome of Forbidden Knowledge III and give it to (Hero manipulating item)
            Skip remaining actions
          Else - Actions
Setup Insane
  Events
  Conditions
  Actions
    Set MissionNumber = 37
    For each (Integer A) from 2 to 12, 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
                (Integer A) Equal to 2
                (Integer A) Equal to 5
                (Integer A) Equal to 6
                (Integer A) Equal to 9
          Then - Actions
            Player - Set the max research level of Rhme (techcode) to 3 for (Player((Integer A)))
            Player - Set the max research level of Rhra (techcode) to 3 for (Player((Integer A)))
            Player - Set the max research level of Rhar (techcode) to 3 for (Player((Integer A)))
            Player - Set the max research level of Rhla (techcode) to 3 for (Player((Integer A)))
            Player - Set the max research level of Rhac (techcode) to 2 for (Player((Integer A)))
            Player - Set the max research level of Rhst (techcode) to 2 for (Player((Integer A)))
            Player - Set the max research level of Rhpt (techcode) to 2 for (Player((Integer A)))
            Player - Set the max research level of Rhhb (techcode) to 1 for (Player((Integer A)))
            Player - Set the max research level of Rhde (techcode) to 1 for (Player((Integer A)))
            Player - Set the max research level of Rhan (techcode) to 1 for (Player((Integer A)))
            Player - Set the max research level of Rhri (techcode) to 1 for (Player((Integer A)))
            Player - Set the current research level of Rhme (techcode) to 3 for (Player((Integer A)))
            Player - Set the current research level of Rhra (techcode) to 3 for (Player((Integer A)))
            Player - Set the current research level of Rhar (techcode) to 3 for (Player((Integer A)))
            Player - Set the current research level of Rhla (techcode) to 3 for (Player((Integer A)))
            Player - Set the current research level of Rhac (techcode) to 2 for (Player((Integer A)))
            Player - Set the current research level of Rhpt (techcode) to 2 for (Player((Integer A)))
            Player - Set the current research level of Rhst (techcode) to 2 for (Player((Integer A)))
            Player - Set the current research level of Rhhb (techcode) to 1 for (Player((Integer A)))
            Player - Set the current research level of Rhan (techcode) to 1 for (Player((Integer A)))
            Player - Set the current research level of Rhri (techcode) to 1 for (Player((Integer A)))
            Player - Set the current research level of Rhde (techcode) to 1 for (Player((Integer A)))
          Else - Actions
Research Init
  Events
    Map initialization
  Conditions
  Actions
    -------- Limits --------
    For each (Integer A) from 1 to 13, do (Actions)
      Loop - Actions
        Set ResearchEnabledT2[(Integer A)] = True
        Set ResearchEnabledT3[(Integer A)] = True
    -------- Graveyard --------
    Set ResearchType[1] = Rume (techcode)
    Set ResearchStringT1[1] = Unholy Strength
    Set ResearchStringT2[1] = Improved Unholy Strength
    Set ResearchStringT3[1] = Advanced Unholy Strength
    Set ResearchType[2] = Ruar (techcode)
    Set ResearchStringT1[2] = Unholy Armor
    Set ResearchStringT2[2] = Improved Unholy Armor
    Set ResearchStringT3[2] = Advanced Unholy Armor
    Set ResearchType[3] = Rura (techcode)
    Set ResearchStringT1[3] = Creature Attack
    Set ResearchStringT2[3] = Improved Creature Attack
    Set ResearchStringT3[3] = Advanced Creature Attack
    Set ResearchType[4] = Rucr (techcode)
    Set ResearchStringT1[4] = Creature Carapace
    Set ResearchStringT2[4] = Improved Creature Carapace
    Set ResearchStringT3[4] = Advanced Creature Carapace
    -------- Crypt --------
    Set ResearchType[5] = Ruac (techcode)
    Set ResearchStringT1[5] = Cannibalize
    Set ResearchType[6] = Ruwb (techcode)
    Set ResearchStringT1[6] = Web
    Set ResearchType[7] = Rugf (techcode)
    Set ResearchStringT1[7] = Ghoul Frenzy
    Set ResearchType[8] = Rusf (techcode)
    Set ResearchStringT1[8] = Stone Form
    -------- Temple of the Damned --------
    Set ResearchType[9] = Rune (techcode)
    Set ResearchStringT1[9] = Necromancer Adept Training
    Set ResearchStringT2[9] = Necromancer Master Training
    Set ResearchType[10] = Ruba (techcode)
    Set ResearchStringT1[10] = Banshee Adept Training
    Set ResearchStringT2[10] = Banshee Master Training
    Set ResearchType[11] = Rusl (techcode)
    Set ResearchStringT1[11] = Skeletal Longevity
    -------- Slaughterhouse --------
    Set ResearchType[12] = Rupc (techcode)
    Set ResearchStringT1[12] = Disease Cloud
    -------- Boneyard --------
    Set ResearchType[13] = Rufb (techcode)
    Set ResearchStringT1[13] = Freezing Breath
Research Begins
  Events
    Unit - A unit Begins research
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        (Owner of (Triggering unit)) Equal to Player 7 (Green)
  Actions
    For each (Integer A) from 1 to 15, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Researched tech-type) Equal to ResearchType[(Integer A)]
          Then - Actions
            Set TempInteger = (Current research level of (Researched tech-type) for (Owner of (Triggering unit)))
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Owner of (Triggering unit)) Equal to Player 4 (Purple)
              Then - Actions
                Player - Set the max research level of (Researched tech-type) to TempInteger for Player 7 (Green)
              Else - Actions
                Player - Set the max research level of (Researched tech-type) to TempInteger for Player 4 (Purple)
          Else - Actions
Research Cancelled
  Events
    Unit - A unit Cancels research
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        (Owner of (Triggering unit)) Equal to Player 7 (Green)
  Actions
    For each (Integer A) from 1 to 15, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Researched tech-type) Equal to ResearchType[(Integer A)]
          Then - Actions
            Set TempInteger = (Current research level of (Researched tech-type) for (Owner of (Triggering unit)))
            Player - Set the max research level of (Researched tech-type) to (TempInteger + 1) for Player 4 (Purple)
            Player - Set the max research level of (Researched tech-type) to (TempInteger + 1) for Player 7 (Green)
          Else - Actions
Research Complete
  Events
    Unit - A unit Finishes research
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        (Owner of (Triggering unit)) Equal to Player 7 (Green)
  Actions
    Set Extra = (Extra + 1)
    Wait 0.50 seconds
    For each (Integer A) from 1 to 15, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Researched tech-type) Equal to ResearchType[(Integer A)]
          Then - Actions
            Set TempInteger = (Current research level of (Researched tech-type) for (Owner of (Triggering unit)))
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Owner of (Triggering unit)) Equal to Player 4 (Purple)
              Then - Actions
                Player - Set the max research level of (Researched tech-type) to TempInteger for Player 7 (Green)
                Player - Set the current research level of (Researched tech-type) to TempInteger for Player 7 (Green)
              Else - Actions
                Player - Set the max research level of (Researched tech-type) to TempInteger for Player 4 (Purple)
                Player - Set the current research level of (Researched tech-type) to TempInteger for Player 4 (Purple)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                TempInteger Equal to 1
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ResearchEnabledT2[(Integer A)] Equal to True
                  Then - Actions
                    Player - Set the max research level of (Researched tech-type) to 2 for Player 4 (Purple)
                    Player - Set the max research level of (Researched tech-type) to 2 for Player 7 (Green)
                  Else - Actions
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                TempInteger Equal to 2
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ResearchEnabledT3[(Integer A)] Equal to True
                  Then - Actions
                    Player - Set the max research level of (Researched tech-type) to 3 for Player 4 (Purple)
                    Player - Set the max research level of (Researched tech-type) to 3 for Player 7 (Green)
                  Else - Actions
              Else - Actions
            Sound - Play Hint <gen>
            Game - Display to (All players) the text:
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                TempInteger Equal to 1
              Then - Actions
                Game - Display to (All players) the text: (|cff9966ccRESEARCH|r - + ((Name of (Owner of (Triggering unit))) + ( has researched + (ResearchStringT1[(Integer A)] + for both players.))))
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                TempInteger Equal to 2
              Then - Actions
                Game - Display to (All players) the text: (|cff9966ccRESEARCH|r - + ((Name of (Owner of (Triggering unit))) + ( has researched + (ResearchStringT2[(Integer A)] + for both players.))))
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                TempInteger Equal to 3
              Then - Actions
                Game - Display to (All players) the text: (|cff9966ccRESEARCH|r - + ((Name of (Owner of (Triggering unit))) + ( has researched + (ResearchStringT3[(Integer A)] + for both players.))))
              Else - Actions
          Else - Actions
Requirement Init
  Events
    Map initialization
  Conditions
  Actions
    Set Requirement_Region = Region_061 <gen>
    Set RequirementUnitType[1] = Necropolis (Requirement)
    Set RequirementUnitType[2] = Halls of the Dead (Requirement)
    Set RequirementUnitType[3] = Black Citadel (Requirement)
    Set RequirementUnitType[4] = Altar of Darkness (Requirement)
    Set RequirementUnitType[5] = Graveyard (Requirement)
    Set RequirementUnitType[6] = Sacrificial Pit (Requirement)
    -------- Necropolis --------
    Set RequirementTech[1] = True
    -------- Halls of the Dead --------
    Set RequirementTech[2] = True
    -------- Black Citadel --------
    Set RequirementTech[3] = False
    -------- Altar of Darkness --------
    Set RequirementTech[4] = True
    -------- Graveyard --------
    Set RequirementTech[5] = True
    -------- Sacrificial Pit --------
    Set RequirementTech[6] = False
    -------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        RequirementTech[1] Equal to True
      Then - Actions
        Unit - Create 1 RequirementUnitType[1] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
        Set RequirementUnitP1[1] = (Last created unit)
        Unit - Create 1 RequirementUnitType[1] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
        Set RequirementUnitP2[1] = (Last created unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            RequirementTech[2] Equal to True
          Then - Actions
            Unit - Create 1 RequirementUnitType[2] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP1[2] = (Last created unit)
            Unit - Create 1 RequirementUnitType[2] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP2[2] = (Last created unit)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                RequirementTech[3] Equal to True
              Then - Actions
                Unit - Create 1 RequirementUnitType[3] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
                Set RequirementUnitP1[3] = (Last created unit)
                Unit - Create 1 RequirementUnitType[3] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
                Set RequirementUnitP2[3] = (Last created unit)
              Else - Actions
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        RequirementTech[4] Equal to True
      Then - Actions
        Unit - Create 1 RequirementUnitType[4] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
        Set RequirementUnitP1[4] = (Last created unit)
        Unit - Create 1 RequirementUnitType[4] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
        Set RequirementUnitP2[4] = (Last created unit)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        RequirementTech[5] Equal to True
      Then - Actions
        Unit - Create 1 RequirementUnitType[5] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
        Set RequirementUnitP1[5] = (Last created unit)
        Unit - Create 1 RequirementUnitType[5] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
        Set RequirementUnitP2[5] = (Last created unit)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        RequirementTech[6] Equal to True
      Then - Actions
        Unit - Create 1 RequirementUnitType[6] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
        Set RequirementUnitP1[6] = (Last created unit)
        Unit - Create 1 RequirementUnitType[6] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
        Set RequirementUnitP2[6] = (Last created unit)
      Else - Actions
Requirement Update
  Events
    Unit - A unit Finishes construction
    Unit - A unit Finishes an upgrade
    Unit - A unit Dies
  Conditions
    GameSelection Equal to False
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        (Owner of (Triggering unit)) Equal to Player 7 (Green)
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Triggering unit)) Equal to Necropolis
        (Unit-type of (Triggering unit)) Equal to Halls of the Dead
        (Unit-type of (Triggering unit)) Equal to Black Citadel
        (Unit-type of (Triggering unit)) Equal to Altar of Darkness
        (Unit-type of (Triggering unit)) Equal to Graveyard
        (Unit-type of (Triggering unit)) Equal to Sacrificial Pit
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Triggering unit) is alive) Equal to True
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Necropolis
            RequirementTech[1] Equal to False
          Then - Actions
            Set RequirementTech[1] = True
            Sound - Play Hint <gen>
            Game - Display to (All players) the text:
            Game - Display to (All players) the text: (|cff6666ccTECHTREE|r - + ((Name of (Owner of (Triggering unit))) + has contructed a Necropolis for both players.))
            Unit - Create 1 RequirementUnitType[1] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP1[1] = (Last created unit)
            Unit - Create 1 RequirementUnitType[1] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP2[1] = (Last created unit)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Halls of the Dead
            RequirementTech[2] Equal to False
          Then - Actions
            Set RequirementTech[2] = True
            Sound - Play Hint <gen>
            Game - Display to (All players) the text:
            Game - Display to (All players) the text: (|cff6666ccTECHTREE|r - + ((Name of (Owner of (Triggering unit))) + has upgraded to a Halls of the Dead for both players.))
            Unit - Create 1 RequirementUnitType[2] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP1[2] = (Last created unit)
            Unit - Create 1 RequirementUnitType[2] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP2[2] = (Last created unit)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Black Citadel
            RequirementTech[3] Equal to False
          Then - Actions
            Set RequirementTech[3] = True
            Sound - Play Hint <gen>
            Game - Display to (All players) the text:
            Game - Display to (All players) the text: (|cff6666ccTECHTREE|r - + ((Name of (Owner of (Triggering unit))) + has upgraded to a Black Citadel for both players.))
            Unit - Create 1 RequirementUnitType[3] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP1[3] = (Last created unit)
            Unit - Create 1 RequirementUnitType[3] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP2[3] = (Last created unit)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Altar of Darkness
            RequirementTech[4] Equal to False
          Then - Actions
            Set RequirementTech[4] = True
            Sound - Play Hint <gen>
            Game - Display to (All players) the text:
            Game - Display to (All players) the text: (|cff6666ccTECHTREE|r - + ((Name of (Owner of (Triggering unit))) + has contructed an Altar of Darkness for both players.))
            Unit - Create 1 RequirementUnitType[4] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP1[4] = (Last created unit)
            Unit - Create 1 RequirementUnitType[4] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP2[4] = (Last created unit)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Graveyard
            RequirementTech[5] Equal to False
          Then - Actions
            Set RequirementTech[5] = True
            Sound - Play Hint <gen>
            Game - Display to (All players) the text:
            Game - Display to (All players) the text: (|cff6666ccTECHTREE|r - + ((Name of (Owner of (Triggering unit))) + has contructed a Graveyard for both players.))
            Unit - Create 1 RequirementUnitType[5] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP1[5] = (Last created unit)
            Unit - Create 1 RequirementUnitType[5] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP2[5] = (Last created unit)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Sacrificial Pit
            RequirementTech[6] Equal to False
          Then - Actions
            Set RequirementTech[6] = True
            Sound - Play Hint <gen>
            Game - Display to (All players) the text:
            Game - Display to (All players) the text: (|cff6666ccTECHTREE|r - + ((Name of (Owner of (Triggering unit))) + has contructed a Sacrificial Pit for both players.))
            Unit - Create 1 RequirementUnitType[6] for Player 4 (Purple) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP1[6] = (Last created unit)
            Unit - Create 1 RequirementUnitType[6] for Player 7 (Green) at (Center of Requirement_Region) facing Default building facing degrees
            Set RequirementUnitP2[6] = (Last created unit)
          Else - Actions
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Necropolis
            RequirementTech[1] Equal to True
            (Number of living Necropolis units owned by Player 4 (Purple)) Equal to 0
            (Number of living Necropolis units owned by Player 7 (Green)) Equal to 0
            (Number of living Halls of the Dead units owned by Player 4 (Purple)) Equal to 0
            (Number of living Halls of the Dead units owned by Player 7 (Green)) Equal to 0
            (Number of living Black Citadel units owned by Player 4 (Purple)) Equal to 0
            (Number of living Black Citadel units owned by Player 7 (Green)) Equal to 0
          Then - Actions
            Set RequirementTech[1] = False
            Unit - Remove RequirementUnitP1[1] from the game
            Unit - Remove RequirementUnitP2[1] from the game
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Halls of the Dead
            RequirementTech[1] Equal to True
            (Number of living Halls of the Dead units owned by Player 4 (Purple)) Equal to 0
            (Number of living Halls of the Dead units owned by Player 7 (Green)) Equal to 0
            (Number of living Black Citadel units owned by Player 4 (Purple)) Equal to 0
            (Number of living Black Citadel units owned by Player 7 (Green)) Equal to 0
          Then - Actions
            Set RequirementTech[2] = False
            Unit - Remove RequirementUnitP1[2] from the game
            Unit - Remove RequirementUnitP2[2] from the game
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Number of living Necropolis units owned by Player 4 (Purple)) Equal to 0
                (Number of living Necropolis units owned by Player 7 (Green)) Equal to 0
              Then - Actions
                Set RequirementTech[1] = False
                Unit - Remove RequirementUnitP1[1] from the game
                Unit - Remove RequirementUnitP2[1] from the game
              Else - Actions
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Black Citadel
            RequirementTech[3] Equal to True
            (Number of living Black Citadel units owned by Player 4 (Purple)) Equal to 0
            (Number of living Black Citadel units owned by Player 7 (Green)) Equal to 0
          Then - Actions
            Set RequirementTech[3] = False
            Unit - Remove RequirementUnitP1[3] from the game
            Unit - Remove RequirementUnitP2[3] from the game
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Number of living Halls of the Dead units owned by Player 4 (Purple)) Equal to 0
                (Number of living Halls of the Dead units owned by Player 7 (Green)) Equal to 0
              Then - Actions
                Set RequirementTech[2] = False
                Unit - Remove RequirementUnitP1[2] from the game
                Unit - Remove RequirementUnitP2[2] from the game
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Number of living Necropolis units owned by Player 4 (Purple)) Equal to 0
                    (Number of living Necropolis units owned by Player 7 (Green)) Equal to 0
                  Then - Actions
                    Set RequirementTech[1] = False
                    Unit - Remove RequirementUnitP1[1] from the game
                    Unit - Remove RequirementUnitP2[1] from the game
                  Else - Actions
              Else - Actions
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Altar of Darkness
            RequirementTech[4] Equal to True
            (Number of living Altar of Darkness units owned by Player 4 (Purple)) Equal to 0
            (Number of living Altar of Darkness units owned by Player 7 (Green)) Equal to 0
          Then - Actions
            Set RequirementTech[4] = False
            Unit - Remove RequirementUnitP1[4] from the game
            Unit - Remove RequirementUnitP2[4] from the game
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Graveyard
            RequirementTech[5] Equal to True
            (Number of living Graveyard units owned by Player 4 (Purple)) Equal to 0
            (Number of living Graveyard units owned by Player 7 (Green)) Equal to 0
          Then - Actions
            Set RequirementTech[5] = False
            Unit - Remove RequirementUnitP1[5] from the game
            Unit - Remove RequirementUnitP2[5] from the game
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Triggering unit)) Equal to Sacrificial Pit
            RequirementTech[6] Equal to True
            (Number of living Sacrificial Pit units owned by Player 4 (Purple)) Equal to 0
            (Number of living Sacrificial Pit units owned by Player 7 (Green)) Equal to 0
          Then - Actions
            Set RequirementTech[6] = False
            Unit - Remove RequirementUnitP1[6] from the game
            Unit - Remove RequirementUnitP2[6] from the game
          Else - Actions
Computer Upkeeps
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    For each (Integer A) from 1 to 12, 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
                (Integer A) Equal to 5
                (Integer A) Equal to 6
                (Integer A) Equal to 9
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Player((Integer A))) Food used) Less than 50
              Then - Actions
                Player - Set (Player((Integer A))) Gold upkeep rate to 0
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Player((Integer A))) Food used) Less than 80
                ((Player((Integer A))) Food used) Greater than or equal to 50
              Then - Actions
                Player - Set (Player((Integer A))) Gold upkeep rate to 30
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Player((Integer A))) Food used) Greater than or equal to 80
              Then - Actions
                Player - Set (Player((Integer A))) Gold upkeep rate to 60
              Else - Actions
          Else - Actions
Player Limits
  Events
    Map initialization
  Conditions
  Actions
    Player - Set Player 4 (Purple) Food max to 60
    Player - Set Player 7 (Green) Food max to 60
Init Gametext
  Events
    Map initialization
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Player 4 (Purple) controller) Equal to User
        (Player 7 (Green) controller) Equal to User
        (Player 4 (Purple) slot status) Equal to Is playing
        (Player 7 (Green) slot status) Equal to Is playing
      Then - Actions
        Set EnoughPlayers = True
        Trigger - Run Startgame_Text <gen> (ignoring conditions)
      Else - Actions
        Trigger - Run Startgame_Text_3 <gen> (ignoring conditions)
Skip Cinematic
  Events
    Player - Player 4 (Purple) skips a cinematic sequence
    Player - Player 7 (Green) skips a cinematic sequence
  Conditions
    Cinematic Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Triggering player) Equal to Player 4 (Purple)
        SkipVote1 Equal to False
        SkipVote2 Equal to False
      Then - Actions
        Set SkipVote1 = True
        Game - Display to (All players) the text: ((Name of Player 4 (Purple)) + wishes to skip the cinematic.)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Triggering player) Equal to Player 7 (Green)
        SkipVote1 Equal to False
        SkipVote2 Equal to False
      Then - Actions
        Set SkipVote2 = True
        Game - Display to (All players) the text: ((Name of Player 7 (Green)) + wishes to skip the cinematic.)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Triggering player) Equal to Player 4 (Purple)
        SkipVote1 Equal to False
        SkipVote2 Equal to True
      Then - Actions
        Set SkipVote1 = True
        Trigger - Turn off (This trigger)
        Game - Display to (All players) the text: Cinematic was skipped.
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (OpeningCancelled <gen> is on) Equal to True
          Then - Actions
            Trigger - Run OpeningCancelled <gen> (checking conditions)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (EndingCancelled <gen> is on) Equal to True
          Then - Actions
            Trigger - Run EndingCancelled <gen> (checking conditions)
          Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Triggering player) Equal to Player 7 (Green)
        SkipVote1 Equal to True
        SkipVote2 Equal to False
      Then - Actions
        Set SkipVote1 = True
        Trigger - Turn off (This trigger)
        Game - Display to (All players) the text: Cinematic was skipped.
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (OpeningCancelled <gen> is on) Equal to True
          Then - Actions
            Trigger - Run OpeningCancelled <gen> (checking conditions)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (EndingCancelled <gen> is on) Equal to True
          Then - Actions
            Trigger - Run EndingCancelled <gen> (checking conditions)
          Else - Actions
      Else - Actions
Leaves Game
  Events
    Player - Player 4 (Purple) leaves the game
    Player - Player 7 (Green) leaves the game
  Conditions
  Actions
    Game - Display to (All players) the text: ((Name of (Triggering player)) + has left the game.)
    Sound - Play CreepAggroWhat1 <gen>
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GameSelection Equal to True
      Then - Actions
        Set EnoughPlayers = False
        Cinematic - Clear the screen of text messages for (All players)
        Sound - Play QuestLog <gen>
        Trigger - Run Startgame_Text_3 <gen> (checking conditions)
      Else - Actions
Endgame Text
  Events
  Conditions
  Actions
    Sound - Play ClanInvitation <gen>
    Set CampaignScore = (CampaignScore + (SubquestsComplete x ScoreSubquests))
    Set CampaignScore = (CampaignScore + (BonusesFound x ScoreBonuses))
    Set CampaignScore = (CampaignScore + (Extra x ScoreExtra))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        TimeSecondsTotal Less than or equal to (Integer(TimeMin))
      Then - Actions
        Set CampaignScore = (CampaignScore + ScoreTime)
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            TimeSecondsTotal Greater than or equal to (Integer(TimeMax))
          Then - Actions
          Else - Actions
            Set CampaignScore = (CampaignScore + (Integer((((Real(ScoreTime)) - (((Real(ScoreTime)) / TimeRange) x ((Real(TimeSecondsTotal)) - TimeMin))) + 0.50))))
    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
            (Item carried by Hero1 in slot (Integer A)) Not equal to No item
          Then - Actions
            Set FinalInventory[(Integer A)] = ((Name of (Item carried by Hero1 in slot (Integer A))) + , )
          Else - Actions
            Set FinalInventory[(Integer A)] =
    For each (Integer A) from 7 to 12, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item carried by Hero2 in slot ((Integer A) - 6)) Not equal to No item
          Then - Actions
            Set FinalInventory[(Integer A)] = ((Name of (Item carried by Hero2 in slot ((Integer A) - 6))) + , )
          Else - Actions
            Set FinalInventory[(Integer A)] =
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        CampaignScore Greater than or equal to ScoreLimit[1]
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            CampaignScore Greater than or equal to ScoreLimit[2]
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                CampaignScore Greater than or equal to ScoreLimit[3]
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    CampaignScore Greater than or equal to ScoreLimit[4]
                  Then - Actions
                    Set FinalRank = |cff00ff00A|r
                    Set RankInteger = 5
                  Else - Actions
                    Set FinalRank = |cffccff00B|r
                    Set RankInteger = 4
              Else - Actions
                Set FinalRank = |cffffff00C|r
                Set RankInteger = 3
          Else - Actions
            Set FinalRank = |cffff0000D|r
            Set RankInteger = 2
      Else - Actions
        Set FinalRank = |cff990000E|r
        Set RankInteger = 1
    Set Save[1] = MissionNumber
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        SumRank Greater than or equal to 1
      Then - Actions
        Set Save[2] = (SumRank + RankInteger)
      Else - Actions
        Set Save[2] = 0
    Set Save[3] = (Level of Death Coil for Hero1)
    Set Save[4] = (Level of Death Pact for Hero1)
    Set Save[5] = (Level of Unholy Aura for Hero1)
    Set Save[6] = (Level of Animate Dead for Hero1)
    Set Save[7] = FalricsSpells[1]
    Set Save[8] = FalricsSpells[2]
    Set Save[9] = FalricsSpells[3]
    Set Save[10] = FalricsSpells[4]
    Set SaveCount = 11
    Set Save[SaveCount] = (Number of items carried by Hero1)
    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
            ((Item carried by Hero1 in slot (Integer A)) is owned) Equal to True
          Then - Actions
            Set SaveCount = (SaveCount + 1)
            Set TempItem = (Item carried by Hero1 in slot (Integer A))
            Custom script: set udg_Save[udg_SaveCount] = SaveLoad_Item2Integer( udg_TempItem )
            Set SaveCount = (SaveCount + 1)
            Set Save[SaveCount] = (Charges remaining in (Item carried by Hero1 in slot (Integer A)))
          Else - Actions
    Set SaveCount = (SaveCount + 1)
    Set Save[SaveCount] = (Number of items carried by Hero2)
    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
            ((Item carried by Hero2 in slot (Integer A)) is owned) Equal to True
          Then - Actions
            Set SaveCount = (SaveCount + 1)
            Set TempItem = (Item carried by Hero2 in slot (Integer A))
            Custom script: set udg_Save[udg_SaveCount] = SaveLoad_Item2Integer( udg_TempItem )
            Set SaveCount = (SaveCount + 1)
            Set Save[SaveCount] = (Charges remaining in (Item carried by Hero2 in slot (Integer A)))
          Else - Actions
    Custom script: set udg_Code = SaveLoad_Encode()
    Game - Display to (All players) for 600.00 seconds the text: |cff7733aa-= UNDEAD CHAPTER 7 COMPLETED =-|r
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00Rank: |r + FinalRank)
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00Score: |r + (String(CampaignScore)))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Game - Display to (All players) for 600.00 seconds the text: |cffffcc00Difficulty: |rInsane
      Else - Actions
        Game - Display to (All players) for 600.00 seconds the text: |cffffcc00Difficulty: |rNormal
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00Time Taken:|r + TimeTakenString)
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00Subquest Completed:|r + ((String(SubquestsComplete)) + ( / + (String(SubquestsTotal)))))
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00Bonuses Found:|r + ((String(BonusesFound)) + ( / + (String(BonusesTotal)))))
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00EXTRA - Researches Completed:|r + ((String(Extra)) + ( / + (String(ExtraTotal)))))
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00Player 1's Inventory:|r + (FinalInventory[1] + (FinalInventory[2] + (FinalInventory[3] + (FinalInventory[4] + (FinalInventory[5] + FinalInventory[6]))))))
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00Player 2's Inventory:|r + (FinalInventory[7] + (FinalInventory[8] + (FinalInventory[9] + (FinalInventory[10] + (FinalInventory[11] + FinalInventory[12]))))))
    Game - Display to (All players) for 600.00 seconds the text: (|cffffcc00Save Code:|r + Code)
Startgame Text
  Events
    Player - Player 4 (Purple) types a chat message containing -normal as An exact match
    Player - Player 7 (Green) types a chat message containing -normal as An exact match
  Conditions
    INSANEMODE Equal to True
    GameSelection Equal to True
  Actions
    Cinematic - Clear the screen of text messages for (All players)
    Sound - Play QuestLog <gen>
    Game - Display to (All players) for 600.00 seconds the text: |cff7733aa-= UNDEAD CHAPTER 7=-|r
    Game - Display to (All players) for 600.00 seconds the text: The Siege of Dalaran
    Game - Display to (All players) for 600.00 seconds the text:
    Game - Display to (All players) for 600.00 seconds the text: Type '-load' and your code you obtained from the previous chapter.
    Game - Display to (All players) for 600.00 seconds the text:
    Game - Display to (All players) for 600.00 seconds the text: Alternatively, both players type '-new' if you do not have a code.
    Game - Display to (All players) for 600.00 seconds the text: New Game is at Normal difficulty. Type '-insane' to play at a higher difficulty.
    Set INSANEMODE = False
Startgame Text 2
  Events
    Player - Player 4 (Purple) types a chat message containing -insane as An exact match
    Player - Player 7 (Green) types a chat message containing -insane as An exact match
  Conditions
    INSANEMODE Equal to False
    GameSelection Equal to True
  Actions
    Cinematic - Clear the screen of text messages for (All players)
    Sound - Play QuestLog <gen>
    Game - Display to (All players) for 600.00 seconds the text: |cff7733aa-= UNDEAD CHAPTER 7=-|r
    Game - Display to (All players) for 600.00 seconds the text: The Siege of Dalaran
    Game - Display to (All players) for 600.00 seconds the text:
    Game - Display to (All players) for 600.00 seconds the text: Type '-load' and your code you obtained from the previous chapter.
    Game - Display to (All players) for 600.00 seconds the text:
    Game - Display to (All players) for 600.00 seconds the text: Alternatively, both players type '-new' if you do not have a code.
    Game - Display to (All players) for 600.00 seconds the text: New Game is at Insane difficulty. Type '-normal' to play at a lower difficulty.
    Set INSANEMODE = True
Startgame Text 3
  Events
  Conditions
  Actions
    Game - Display to (All players) for 600.00 seconds the text: |cff7733aa-= UNDEAD CHAPTER 7=-|r
    Game - Display to (All players) for 600.00 seconds the text: The Siege of Dalaran
    Game - Display to (All players) for 600.00 seconds the text:
    Game - Display to (All players) for 600.00 seconds the text: Not enough players have been detected ingame.
    Game - Display to (All players) for 600.00 seconds the text: Atleast 2 players are required to begin the map.
Startgame New
  Events
    Player - Player 4 (Purple) types a chat message containing -new as An exact match
    Player - Player 7 (Green) types a chat message containing -new as An exact match
  Conditions
    GameSelection Equal to True
    EnoughPlayers Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Triggering player) Equal to Player 4 (Purple)
        NewVote1 Equal to False
        NewVote2 Equal to False
      Then - Actions
        Set NewVote1 = True
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Triggering player) Equal to Player 7 (Green)
        NewVote1 Equal to False
        NewVote2 Equal to False
      Then - Actions
        Set NewVote2 = True
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Triggering player) Equal to Player 4 (Purple)
        NewVote1 Equal to False