1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. And she's bought a stairway to heaven. The 6th Special Effect Contest Results are here.
    Dismiss Notice
  3. Seek unity between the elements in the 22nd Terraining Contest Poll.
    Dismiss Notice
  4. Seize the moment! The 18th Mini Mapping Contest has commenced.
    Dismiss Notice
  5. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  6. 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 Undead04 v2.03 (1.26).w3x
Variables
Initialization
Pre Init
Initialization
Intro Cinematic
Intro Cinematic
IntroCancel
SpiderEntance
SpiderArrival
SpiderArrival Queue
SylvanasCrossesBridge
Repair01
Repair02
SylvanasReturnsHome
RevealSecrets
RevealSecret01
Waygate Hints
WaygateHint01A
WaygateHint01B
WaygateHint01C
WaygateHint01D
WaygateHint01E
WaygateHint01F
2
WaygateHint02A
WaygateHint02B
WaygateHint02C
WaygateHint02D
WaygateHint02E
WaygateHint02F
Destructibles
Crate01
Crate02
Crate03
Computer Resources
LightBlueGold
LightBlueLumber
DarkGreenGold
DarkGreenLumber
BrownGold
BrownLumber
Start AI
Start AI
Begin Attack Waves
Begin Attack Waves Timer Safety
Dragon Hawks
Dragon Hawk Hint
Dragon Hawk Hint Queue
Altars
Kill Altar01
Kill Altar02
Kill Altar03
All Altars have been destroyed
Keys
Key01 Acquired
Key02 Acquired
Key03 Acquired
Reveal Gate Quest
Any Key Acquired
Key Combining
Rescue Zeppelins
Rescue Zeppelins
Rescue Zeppelins Queue
DisableVisibility
Cap Arthas Experience
Cap Arthas Experience
Cap Falric Experience
Hints
Unsummon Hint
Unsummon QUE
Mooncrystal01Hint
Mooncrystal02Hint
Mooncrystal03Hint
Gate
Insufficient Keys
No Keys Hint
Victory
Trigger Victory
Victory Cinematic
Victory Cancel
Defeat
Defeat Lose Buildings
Defeat Lose Units
Change Defeat conditions
Other Triggers
Item Drop Bonuses
Haunt mine extra
Custom Variables
Timer Trigger
Setup Insane
EnergyBridge
EnergyBridgeDies
Gametext
Skip Cinematic
Leaves Game
Endgame Text
Startgame Text
Startgame Text 2
Startgame Text 3
Startgame New
Startgame Load
Systems
Research Init
Research Begins
Research Cancelled
Research Complete
Requirement Init
Requirement Update
Computer Upkeeps
Player Limits
ResourceDrop Order
ResourceDrop Destroy
ResourceDrop Build
ResourceDrop Init
Send Lumber
Send Gold
Exchange Unit
Death Select
Deselect Unit
Select Unit
Init Gametext
Spells
Tainted Blow 1
Tainted Blow 2
Blood Pledge 1
Blood Pledge 2
Blood Pledge 3
Call of the Departed 1
Call of the Departed 2
Solar Beam 1
Solar Beam 2
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
AAAP_Undead player No Player03
AAAPG_Undead force No Force03
AIAttacking boolean No false
Altar01 unit No UnitNull
Altar01Destroyed boolean No false
Altar01Visibilitya fogmodifier No
Altar01Visibilityb fogmodifier No
Altar02 unit No UnitNull
Altar02Destroyed boolean No false
Altar02Visibilitya fogmodifier No
Altar02Visibilityb fogmodifier No
Altar03 unit No UnitNull
Altar03Destroyed boolean No false
Altar03Visibilitya fogmodifier No
Altar03Visibilityb fogmodifier No
Arthas unit No UnitNull
BonusesFound integer No
BonusesTotal integer No
Bridge01 destructable No DestructableNull
BridgeSound01 sound No
BridgeSound02 sound No
CampaignScore integer No
Cinematic boolean No true
CinematicArthas unit No UnitNull
Code string No
DepartedDummy unit No
DragonHawk01 unit No
DragonHawk02 unit No
EffectDarkSummoning effect No
ElfGate01 destructable No DestructableNull
ElfGate02 destructable No DestructableNull
EnergyBridge timer No
EnergyInteger integer No
EnoughPlayers boolean 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
Falric unit No
FinalInventory string Yes
FinalRank string No
FleeingElf01 unit No
FleeingElf02 unit No
FleeingElf03 unit No
GameOver boolean No false
GameSelection boolean No true
GoblinLaboratory unit No
GoldMine integer No 0
GoldMineBoolean boolean Yes
Golem01 unit No
Hero1 unit No
Hero2 unit No
InitialArcher01 unit No
InitialArcher02 unit No
InitialArcher03 unit No
InitialBystander01 unit No
InitialBystander02 unit No
InitialFiendA unit No
InitialFiendB unit No
InitialFiendC unit No
InitialGhoulA unit No UnitNull
InitialGhoulB unit No UnitNull
InitialGhoulC unit No UnitNull
InitialGhoulD unit No UnitNull
InitialNecromancerA unit No UnitNull
InitialNecromancerB unit No UnitNull
InitialRepairer01 unit No
InitialRepairer02 unit No
INSANEMODE boolean No
IntroCancelled boolean No false
Key01 item No ItemNull
Key01Acquired boolean No false
Key02 item No ItemNull
Key02Acquired boolean No false
Key03 item No ItemNull
Key03Acquired boolean No false
Key2Part item No
Key3Part item No
MassTeleport effect Yes
MissionNumber integer No
NewVote1 boolean No
NewVote2 boolean No
NumberOfPiecesFound integer No 0
P_HighElves01 player No Player09
P_HighElves02 player No Player10
P_HighElves03 player No Player11
P_HighElves04 player No Player07
P_Reinforcements player No Player06
QuestGate quest No
QuestGateRequirementArthas questitem No
QuestKey quest No
QuestKeyRequirementAltars questitem No
QuestKeyRequirementPieces questitem 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
SecretSound sound No
SelectionGroup1 group No
SelectionGroup2 group No
SkipVote1 boolean No
SkipVote2 boolean No
SolarBeam unit No
SolarBeamDummy unit No
SpawnedStartingTroops boolean No false
SpawnGolemSound01 sound No
SpawnGolemSound02 sound No
SpawnSpiderSound01 sound No
SpecialEffect01 effect No
StarfallFX effect No
StartAITimer timer No
SubquestsComplete integer No
SubquestsTotal integer No
SumRank integer No
Sylvanas unit No
SylvanusBanshee unit No
SylvanusBansheeCreated boolean No false
SylvanusCinematicRunning boolean No false
TempBoolean boolean No
TempInteger integer No
TempItem item No
TempItemType itemcode No
TempPGroup force No
TempPGroup2 force No
TempPlayer player No
temppoint location No
TempPoint location No
temppoint2 location No
TempUGroup group 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
VictoryCancelled boolean No false
VictoryInProgress boolean No false
VisibilityGatea fogmodifier No
VisibilityGateb fogmodifier No
VisibilityLandingSpota fogmodifier No
VisibilityLandingSpotb fogmodifier No
WaygateHint01 boolean No false
WaygateHint02 boolean No false
x real No
y real No
Zeppelin01 unit No
Zeppelin02 unit No
Pre Init
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet Arthas = Death Knight 0107 <gen>
    Set VariableSet Falric = Death Knight 0111 <gen>
    Set VariableSet Hero1 = Arthas
    Set VariableSet Hero2 = Falric
    Cinematic - Fade out over 0.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Player - Make P_HighElves01 treat AAAP_Undead as an Enemy
    Player - Make P_HighElves01 treat Player 9 (Gray) as an Enemy
    Player - Make P_HighElves01 treat P_HighElves02 as an Ally
    Player - Make P_HighElves01 treat P_HighElves03 as an Ally
    Player - Make P_HighElves01 treat P_HighElves04 as an Ally
    Player - Make P_HighElves01 treat Neutral Hostile as an Ally
    Player - Make P_HighElves02 treat AAAP_Undead as an Enemy
    Player - Make P_HighElves02 treat Player 9 (Gray) as an Enemy
    Player - Make P_HighElves02 treat P_HighElves01 as an Ally
    Player - Make P_HighElves02 treat P_HighElves03 as an Ally
    Player - Make P_HighElves02 treat P_HighElves04 as an Ally
    Player - Make P_HighElves02 treat Neutral Hostile as an Ally
    Player - Make P_HighElves03 treat AAAP_Undead as an Enemy
    Player - Make P_HighElves03 treat Player 9 (Gray) as an Enemy
    Player - Make P_HighElves03 treat P_HighElves01 as an Ally
    Player - Make P_HighElves03 treat P_HighElves02 as an Ally
    Player - Make P_HighElves03 treat P_HighElves04 as an Ally
    Player - Make P_HighElves03 treat Neutral Hostile as an Ally
    Player - Make P_HighElves04 treat AAAP_Undead as an Enemy
    Player - Make P_HighElves04 treat Player 9 (Gray) as an Enemy
    Player - Make P_HighElves04 treat P_HighElves01 as an Ally
    Player - Make P_HighElves04 treat P_HighElves02 as an Ally
    Player - Make P_HighElves04 treat P_HighElves03 as an Ally
    Player - Make P_HighElves04 treat Neutral Hostile as an Ally
    Player - Make AAAP_Undead treat P_HighElves01 as an Enemy
    Player - Make AAAP_Undead treat P_HighElves02 as an Enemy
    Player - Make AAAP_Undead treat P_HighElves03 as an Enemy
    Player - Make AAAP_Undead treat P_HighElves04 as an Enemy
    Player - Make AAAP_Undead treat P_Reinforcements as an Ally with shared vision
    Player - Make Player 9 (Gray) treat P_Reinforcements as an Ally with shared vision
    Player - Make P_Reinforcements treat Player 9 (Gray) as an Ally with shared vision
    Player - Make P_Reinforcements treat AAAP_Undead as an Ally with shared vision
    Player - Make Player 9 (Gray) treat P_HighElves01 as an Enemy
    Player - Make Player 9 (Gray) treat P_HighElves02 as an Enemy
    Player - Make Player 9 (Gray) treat P_HighElves03 as an Enemy
    Player - Make Player 9 (Gray) treat P_HighElves04 as an Enemy
    Player - Make Player 9 (Gray) treat Player 4 (Purple) as an Ally with shared vision
    Player - Make Player 4 (Purple) treat Player 9 (Gray) as an Ally with shared vision
    Player - Make Neutral Hostile treat P_HighElves01 as an Ally
    Player - Make Neutral Hostile treat P_HighElves02 as an Ally
    Player - Make Neutral Hostile treat P_HighElves03 as an Ally
    Player - Make Neutral Hostile treat P_HighElves04 as an Ally
    Player - Set AAAP_Undead.Current gold to 750
    Player - Set AAAP_Undead.Current lumber to 320
    Player - Set Player 9 (Gray).Current gold to 750
    Player - Set Player 9 (Gray).Current lumber to 320
    Player - Set P_HighElves01.Current gold to 5000
    Player - Set P_HighElves01.Current lumber to 1500
    Player - Set P_HighElves02.Current gold to 5000
    Player - Set P_HighElves02.Current lumber to 1500
    Player - Set P_HighElves03.Current gold to 5000
    Player - Set P_HighElves03.Current lumber to 1500
    Player - Change color of P_HighElves01 to Blue, Changing color of existing units
    Player - Change color of P_HighElves02 to Teal, Changing color of existing units
    Player - Change color of P_HighElves03 to Blue, Changing color of existing units
    Player - Change color of P_HighElves04 to Blue, Changing color of existing units
    Player - Change color of Player 3 (Teal) to Blue, Changing color of existing units
    Player - For P_HighElves01, turn Friendly spell targeting Off toward Neutral Hostile
    Player - For P_HighElves02, turn Friendly spell targeting Off toward Neutral Hostile
    Player - For P_HighElves03, turn Friendly spell targeting Off toward Neutral Hostile
    Player - For P_HighElves04, turn Friendly spell targeting Off toward Neutral Hostile
    Player - For Neutral Hostile, turn Friendly spell targeting Off toward P_HighElves01
    Player - For Neutral Hostile, turn Friendly spell targeting Off toward P_HighElves02
    Player - For Neutral Hostile, turn Friendly spell targeting Off toward P_HighElves03
    Player - For Neutral Hostile, turn Friendly spell targeting Off toward P_HighElves04
    Player - For Neutral Hostile, turn Friendly spell targeting Off toward Player 3 (Teal)
    Player - Hide P_HighElves02 in the post-game score screen
    Player - Hide P_HighElves03 in the post-game score screen
    Player - Hide P_HighElves04 in the post-game score screen
    Player - Hide Player 3 (Teal) in the post-game score screen
    Player - Hide P_Reinforcements in the post-game score screen
Initialization
  Events
  Conditions
  Actions
    Unit - Change ownership of Arthas to Player 4 (Purple) and Change color
    Unit - Change ownership of Falric to Player 9 (Gray) and Change color
    Unit - Change ownership of Ghoul 0041 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Necromancer 0257 <gen> to Player 4 (Purple) and Change color
    Unit - Change ownership of Ghoul 0040 <gen> to Player 9 (Gray) and Change color
    Unit - Change ownership of Necromancer 0258 <gen> to Player 9 (Gray) and Change color
    -------- Init Variables --------
    Hero - Make AAAP_Undead Heroes gain 40.00% experience from future kills
    Hero - Make Player 9 (Gray) Heroes gain 40.00% experience from future kills
    Set VariableSet Sylvanas = Ranger 0033 <gen>
    Set VariableSet Altar01 = Altar of Kings 0093 <gen>
    Set VariableSet Altar02 = Altar of Kings 0094 <gen>
    Set VariableSet Altar03 = Altar of Kings 0098 <gen>
    Set VariableSet Zeppelin01 = Goblin Zeppelin 0034 <gen>
    Set VariableSet Zeppelin02 = Goblin Zeppelin 0036 <gen>
    Set VariableSet InitialGhoulC = Ghoul 0041 <gen>
    Set VariableSet InitialGhoulD = Ghoul 0040 <gen>
    Set VariableSet InitialNecromancerA = Necromancer 0257 <gen>
    Set VariableSet InitialNecromancerB = Necromancer 0258 <gen>
    Set VariableSet InitialRepairer01 = High Elf 0162 <gen>
    Set VariableSet InitialRepairer02 = High Elf 0158 <gen>
    Set VariableSet InitialBystander02 = High Elf 0149 <gen>
    Set VariableSet InitialArcher01 = Archer 0264 <gen>
    Set VariableSet InitialArcher02 = Archer 0266 <gen>
    Set VariableSet InitialArcher03 = Archer 0265 <gen>
    Set VariableSet FleeingElf01 = High Elf 0269 <gen>
    Set VariableSet FleeingElf02 = High Elf 0150 <gen>
    Set VariableSet FleeingElf03 = High Elf 0267 <gen>
    Set VariableSet GoblinLaboratory = Goblin Laboratory 0047 <gen>
    -------- Init Doodads --------
    Set VariableSet Bridge01 = Long Wooden Bridge 1401 <gen>
    Set VariableSet ElfGate01 = Elven Gate 1804 <gen>
    Set VariableSet ElfGate02 = Elven Gate 0180 <gen>
    Destructible - Make ElfGate02 Invulnerable
    -------- Init Sounds --------
    Set VariableSet SpawnGolemSound01 = AncientUprootDeath1 <gen>
    Set VariableSet SpawnGolemSound02 = RockGolemYes2 <gen>
    Set VariableSet SpawnSpiderSound01 = SpiderYesAttack2 <gen>
    Set VariableSet SecretSound = SecretFound <gen>
    Set VariableSet BridgeSound01 = BridgeDeath <gen>
    Set VariableSet BridgeSound02 = BattleShipDeath1 <gen>
    Sound - Set position of BridgeSound01 to (Center of BridgeCollapse <gen>) with Z offset 0
    Sound - Set position of BridgeSound02 to (Center of BridgeCollapse <gen>) with Z offset 0
    Sound - Attach GoblinZeppelinReady1 <gen> to GoblinLaboratory
    Cinematic - Turn cinematic mode On for AAAPG_Undead
    Cinematic - Turn cinematic mode On for Player Group - Player 9 (Gray)
    Sound - Clear the music list
    Wait 0.01 seconds
    Sound - Set the music list to Music, starting with song 0
    Sound - Play Dark Victory.
    -------- Set Invulnerability --------
    Unit - Make InitialGhoulA Invulnerable
    Unit - Make InitialGhoulB Invulnerable
    Unit - Make InitialGhoulC Invulnerable
    Unit - Make InitialGhoulD Invulnerable
    Unit - Make InitialNecromancerA Invulnerable
    Unit - Make InitialNecromancerB Invulnerable
    Unit - Make Arthas Invulnerable
    Unit - Make Falric Invulnerable
    Unit - Make Sylvanas Invulnerable
    Unit - Make FleeingElf01 Invulnerable
    Unit - Make FleeingElf02 Invulnerable
    Unit - Make FleeingElf03 Invulnerable
    Unit - Make InitialRepairer01 Invulnerable
    Unit - Make InitialRepairer02 Invulnerable
    Unit - Change color of Sylvanas to Blue
    -------- Init Player Properties --------
    -------- Init Unit Properties --------
    Hero - Disable experience gain for Arthas.
    Hero - Disable experience gain for Falric.
    Hero - Set Sylvanas Hero-level to 5, Hide level-up graphics
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Hero - Set Sylvanas Hero-level to 9, Hide level-up graphics
      Else - Actions
    Hero - Disable experience gain for Sylvanas.
    Hero - Learn skill for Sylvanas: Special Sylvanas Windrunner - Cold Arrows
    Hero - Learn skill for Sylvanas: Special Sylvanas Windrunner - Cold Arrows
    Hero - Learn skill for Sylvanas: Special Sylvanas Windrunner - Cold Arrows
    Hero - Learn skill for Sylvanas: Night Elf Priestess Of The Moon - Trueshot Aura
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to True
      Then - Actions
        Hero - Learn skill for Sylvanas: Night Elf Priestess Of The Moon - Trueshot Aura
        Hero - Learn skill for Sylvanas: Feral Spirit (New)
        Hero - Learn skill for Sylvanas: Feral Spirit (New)
        Hero - Learn skill for Sylvanas: Feral Spirit (New)
        Hero - Learn skill for Sylvanas: Solar Beam
      Else - Actions
    Unit - Make units Change color when rescued
    Unit - Order InitialBystander01 to Patrol To.(Center of InitialPatrol01 <gen>)
    Unit - Order InitialBystander02 to Patrol To.(Center of InitialPatrol02 <gen>)
    Unit - Order FleeingElf02 to Stop.
    Unit - Order High Elf 0158 <gen> to Stop.
    Unit - Order High Elf 0162 <gen> to Stop.
    AI - Ignore Dragon Hawk 0286 <gen>'s guard position
    AI - Ignore Dragon Hawk 0287 <gen>'s guard position
    AI - Ignore High Elven Farm 0127 <gen>'s guard position
    AI - Ignore High Elven Farm 0208 <gen>'s guard position
    AI - Ignore High Elven Farm 0280 <gen>'s guard position
    -------- Brown near gate --------
    AI - Ignore Sorceress 0272 <gen>'s guard position
    AI - Ignore Dragon Hawk 0204 <gen>'s guard position
    AI - Ignore Dragon Hawk 0203 <gen>'s guard position
    AI - Ignore Sorceress 0169 <gen>'s guard position
    AI - Ignore Sorceress 0248 <gen>'s guard position
    AI - Ignore Dragon Hawk 0206 <gen>'s guard position
    AI - Ignore Dragon Hawk 0205 <gen>'s guard position
    AI - Ignore Sorceress 0271 <gen>'s guard position
    AI - Ignore Priest 0274 <gen>'s guard position
    -------- Brown on middle island --------
    AI - Ignore Priest 0012 <gen>'s guard position
    AI - Ignore Sorceress 0067 <gen>'s guard position
    AI - Ignore Dragon Hawk 0277 <gen>'s guard position
    AI - Ignore Archer 0245 <gen>'s guard position
    AI - Ignore Swordsman 0219 <gen>'s guard position
    AI - Ignore Archer 0242 <gen>'s guard position
    AI - Ignore Swordsman 0123 <gen>'s guard position
    AI - Ignore Dragon Hawk 0278 <gen>'s guard position
    AI - Ignore Archer 0241 <gen>'s guard position
    AI - Ignore Priest 0075 <gen>'s guard position
    AI - Ignore Archer 0077 <gen>'s guard position
    -------- Init Funky No Pathing Towers --------
    Unit Group - Pick every unit in (Units in PATH_Guard_TowersA <gen>) and do (Turn collision for (Picked unit) Off.)
    Unit Group - Pick every unit in (Units in PATH_Guard_TowersB <gen>) and do (Turn collision for (Picked unit) Off.)
    Unit - Move (Random unit from (Units in PATH_Guard_TowersA <gen>)) instantly to (Center of PATH_Guard_Tower01A <gen>)
    Unit - Move (Random unit from (Units in PATH_Guard_TowersA <gen>)) instantly to (Center of PATH_Guard_Tower02A <gen>)
    Unit - Move (Random unit from (Units in PATH_Guard_TowersA <gen>)) instantly to (Center of PATH_Guard_Tower03A <gen>)
    Unit - Move (Random unit from (Units in PATH_Guard_TowersB <gen>)) instantly to (Center of PATH_Guard_Tower01B <gen>)
    Unit - Move (Random unit from (Units in PATH_Guard_TowersB <gen>)) instantly to (Center of PATH_Guard_Tower02B <gen>)
    Unit - Move (Random unit from (Units in PATH_Guard_TowersB <gen>)) instantly to (Center of PATH_Guard_Tower03B <gen>)
    -------- Init Map Settings --------
    Environment - Set sky to Lordaeron Fall Sky
    Environment - Set fog to style 0 (fogstyle), z-start 2500.00, z-end 11000.00, density 0 and color (0.00%, 50.00%, 30.00%)
    Game - Set the time of day to 20.00
    -------- Init Quests --------
    Quest - Create a Required quest titled Three Moons with the description A second enchanted Elfgate blocks the path to Silvermoon City. To bypass the mighty gate, you must locate and combine the three separate Mooncrystals which, when pieced together, form the Key of the Three Moons., using icon path ReplaceableTextures\CommandButtons\BTN3M3.tga
    Set VariableSet QuestKey = (Last created quest)
    Quest - Create a quest requirement for QuestKey with the description Destroy the three High Elf Altars
    Set VariableSet QuestKeyRequirementAltars = (Last created quest requirement)
    Quest - Create a quest requirement for QuestKey with the description Combine all three Mooncrystals
    Set VariableSet QuestKeyRequirementPieces = (Last created quest requirement)
    Quest - Create a Required, undiscovered quest titled Gates of Silvermoon with the description Now that the Key of the Three Moons has been completed, you must bring it to the heavily guarded Elfgate and unleash its ancient power. , using icon path ReplaceableTextures\CommandButtons\BTNCOP.tga
    Set VariableSet QuestGate = (Last created quest)
    Quest - Create a quest requirement for QuestGate with the description Bring Arthas to the Elfgate
    Set VariableSet QuestGateRequirementArthas = (Last created quest requirement)
    -------- Init Triggers --------
    AI - Ignore Archer 0266 <gen>'s guard position
    AI - Ignore Archer 0264 <gen>'s guard position
    AI - Ignore Archer 0265 <gen>'s guard position
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        INSANEMODE Equal to False
      Then - Actions
        Unit - Remove High Elven Barracks 0042 <gen> from the game
        Unit - Remove Dragon Hawk 0043 <gen> from the game
        Unit - Remove Dragon Hawk 0112 <gen> from the game
        Unit - Remove Archer 0125 <gen> from the game
        Unit - Remove Archer 0133 <gen> from the game
        Unit - Remove Archer 0134 <gen> from the game
        Unit - Remove Swordsman 0122 <gen> from the game
        Unit - Remove Swordsman 0116 <gen> from the game
        Unit - Remove Swordsman 0115 <gen> from the game
        Unit - Remove Swordsman 0114 <gen> from the game
        Unit - Remove Energy Gate 0146 <gen> from the game
        Unit - Remove Energy Gate 0145 <gen> from the game
      Else - Actions
    Unit - Hide Necromancer 0257 <gen>
    Unit - Hide Death Knight 0111 <gen>
    Unit - Hide Necromancer 0258 <gen>
    Trigger - Run Intro_Cinematic <gen> (checking conditions)
    Trigger - Turn on Defeat_Lose_Units <gen>
Intro Cinematic
  Events
  Conditions
  Actions
    Game - Turn the day/night cycle Off
    Sound - Add WaterStreamLoop1 <gen> across StreamLoop01 <gen>
    Environment - Set fog to style 0 (fogstyle), z-start 900.00, z-end 4500.00, density 0 and color (0.00%, 40.00%, 60.00%)
    Sound - Reset all volume channels to 100%
    Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    -------- Banging On The Gate --------
    Camera - .Apply. gg_cam_Intro00 for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_Intro00 for Player 9 (Gray) over 0 seconds
    Unit - Order Arthas to Attack.ElfGate01
    Wait 1.00 seconds
    -------- NOW SKIPPABLE --------
    Trigger - Turn on IntroCancel <gen>
    Trigger - Turn on Skip_Cinematic <gen>
    Wait 1.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order InitialRepairer01 to Move To.(Center of Repair01 <gen>)
    Unit - Order InitialRepairer02 to Move To.(Center of Repair02 <gen>)
    Wait 2.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Intro01 for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_Intro01 for Player 9 (Gray) over 0 seconds
    Wait 2.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Destructible - Kill ElfGate01
    Unit - Make InitialRepairer01 Vulnerable
    Unit - Make InitialRepairer02 Vulnerable
    Wait 0.10 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Animation - Reset InitialRepairer01's animation
    Unit - Explode InitialRepairer02.
    Unit - Set life of InitialRepairer01 to 150.00
    Player - Make P_HighElves01 treat AAAP_Undead as an Enemy
    Player - Make AAAP_Undead treat P_HighElves01 as an Enemy
    Player - Make P_HighElves01 treat Player 9 (Gray) as an Enemy
    Player - Make Player 9 (Gray) treat P_HighElves01 as an Enemy
    Wait 0.20 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order Arthas to Attack.InitialRepairer01
    Unit - Make Arthas Vulnerable
    Unit - Order InitialArcher01 to Move To.(Position of Arthas)
    Wait 0.70 seconds
    Unit - Kill InitialRepairer01
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order Arthas to Attack.InitialArcher01
    Unit - Order InitialArcher01 to Attack.Arthas
    Wait 2.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 0.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Unhide Necromancer 0257 <gen>
    Unit - Unhide Death Knight 0111 <gen>
    Unit - Unhide Necromancer 0258 <gen>
    Unit - Order Arthas to Attack-Move To.(Center of Arthas02 <gen>)
    Unit - Order Falric to Attack-Move To.(Center of Falric01 <gen>)
    Unit - Order InitialGhoulA to Attack-Move To.(Center of InitialGhoulA02 <gen>)
    Unit - Order InitialGhoulB to Attack-Move To.(Center of InitialGhoulB02 <gen>)
    Unit - Order InitialGhoulC to Attack-Move To.(Center of InitialGhoulC02 <gen>)
    Unit - Order InitialGhoulD to Attack-Move To.(Center of InitialGhoulD02 <gen>)
    Unit - Order InitialNecromancerA to Attack-Move To.(Center of InitialNecroA02 <gen>)
    Unit - Order InitialNecromancerB to Attack-Move To.(Center of InitialNecroB02 <gen>)
    -------- Through the Gate --------
    Camera - .Apply. gg_cam_Intro02 for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_Intro02 for Player 9 (Gray) over 0 seconds
    Wait 0.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Intro03 for AAAP_Undead over 6.00 seconds
    Camera - .Apply. gg_cam_Intro03 for Player 9 (Gray) over 6.00 seconds
    Cinematic - Fade in over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 6.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 0.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- Undead Advancing --------
    Camera - .Apply. gg_cam_Intro04 for AAAP_Undead over 0.00 seconds
    Camera - .Apply. gg_cam_Intro04 for Player 9 (Gray) over 0.00 seconds
    Wait 0.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade in over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Camera - .Apply. gg_cam_Intro05 for AAAP_Undead over 4.00 seconds
    Camera - .Apply. gg_cam_Intro05 for Player 9 (Gray) over 4.00 seconds
    Wait 4.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Unit - Order FleeingElf01 to Move To.(Random point in FleeingElfDestination <gen>)
    Unit - Order FleeingElf02 to Move To.(Random point in FleeingElfDestination <gen>)
    Unit - Order FleeingElf03 to Move To.(Random point in FleeingElfDestination <gen>)
    Wait 1.20 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- Bridge Scene --------
    Camera - .Apply. gg_cam_Intro06 for AAAP_Undead over 0.00 seconds
    Camera - .Apply. gg_cam_Intro06 for Player 9 (Gray) over 0.00 seconds
    Unit - Make Arthas Invulnerable
    Unit - Order InitialGhoulA to Stop.
    Unit - Order InitialGhoulB to Stop.
    Unit - Order InitialGhoulC to Stop.
    Unit - Order InitialGhoulD to Stop.
    Unit - Order InitialNecromancerA to Stop.
    Unit - Order InitialNecromancerB to Stop.
    Unit - Order Arthas to Stop.
    Unit - Order Falric to Stop.
    Unit - Move InitialGhoulA instantly to (Center of InitialGhoulA01 <gen>)
    Unit - Move InitialGhoulB instantly to (Center of InitialGhoulB01 <gen>)
    Unit - Move InitialGhoulC instantly to (Center of InitialGhoulC01 <gen>)
    Unit - Move InitialGhoulD instantly to (Center of InitialGhoulD01 <gen>)
    Unit - Move Falric instantly to (Center of Falric01 <gen>)
    Unit - Move InitialNecromancerA instantly to (Center of InitialNecroA01 <gen>)
    Unit - Move InitialNecromancerB instantly to (Center of InitialNecroB01 <gen>)
    Unit - Move Arthas instantly to (Center of Arthas01 <gen>)
    Unit - Make Falric face (Center of InitialGhoulA02 <gen>) over 0 seconds
    Unit - Make InitialGhoulA face (Center of InitialGhoulA02 <gen>) over 0 seconds
    Unit - Make InitialGhoulB face (Center of InitialGhoulB02 <gen>) over 0 seconds
    Unit - Make InitialGhoulC face (Center of InitialGhoulC02 <gen>) over 0 seconds
    Unit - Make InitialGhoulD face (Center of InitialGhoulD02 <gen>) over 0 seconds
    Unit - Make InitialNecromancerA face (Center of InitialNecroA02 <gen>) over 0 seconds
    Unit - Make InitialNecromancerB face (Center of InitialNecroB02 <gen>) over 0 seconds
    Unit - Make Arthas face (Center of Arthas02 <gen>) over 0 seconds
    Wait 0.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Intro07 for AAAP_Undead over 6.00 seconds
    Camera - .Apply. gg_cam_Intro07 for Player 9 (Gray) over 6.00 seconds
    Unit - Order Arthas to Move To.(Center of Arthas02 <gen>)
    Unit - Order Falric to Move To.(Center of InitialGhoulA02 <gen>)
    Unit - Order InitialGhoulA to Move To.(Center of InitialGhoulA02 <gen>)
    Unit - Order InitialGhoulB to Move To.(Center of InitialGhoulB02 <gen>)
    Unit - Order InitialGhoulC to Move To.(Center of InitialGhoulC02 <gen>)
    Unit - Order InitialGhoulD to Move To.(Center of InitialGhoulD02 <gen>)
    Unit - Order InitialNecromancerA to Move To.(Center of InitialNecroA02 <gen>)
    Unit - Order InitialNecromancerB to Move To.(Center of InitialNecroB02 <gen>)
    Cinematic - Fade in over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 1.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order Sylvanas to Move To.(Center of Sylvanas01 <gen>)
    Unit - Make FleeingElf02 Vulnerable
    Unit - Set life of FleeingElf02 to 20.00
    Unit - Order Arthas to Undead Death Knight - Death Coil.FleeingElf02
    Wait 3.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Sylvanas named Sylvanas Windrunner: Play U04ASylvanas03 <gen> and display Fall back to the trees!. Modify duration: Add 0 seconds and Wait
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Wait 1.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 1.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- Bridge Scene --------
    Camera - .Apply. gg_cam_Intro08 for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_Intro08 for Player 9 (Gray) over 0 seconds
    Set VariableSet SpawnedStartingTroops = True
    Unit - Create 1.Meat Wagon for AAAP_Undead at (Center of Meatwagon01 <gen>) facing 135.00 degrees
    Unit - Create 1.Acolyte for AAAP_Undead at (Center of Acolyte01 <gen>) facing 135.00 degrees
    Unit - Create 1.Acolyte for AAAP_Undead at (Center of Acolyte02 <gen>) facing 135.00 degrees
    Unit - Create 1.Acolyte for Player 9 (Gray) at (Center of Acolyte03 <gen>) facing 135.00 degrees
    Unit - Create 1.Acolyte for Player 9 (Gray) at (Center of Acolyte04 <gen>) facing 135.00 degrees
    Unit - Make Sylvanas face Arthas over 0 seconds
    Cinematic - Fade in over 0.50 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Sound - Setup all volume channels for cinematics
    Wait 0.25 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Intro09 for AAAP_Undead over 12.00 seconds
    Camera - .Apply. gg_cam_Intro09 for Player 9 (Gray) over 12.00 seconds
    Wait 0.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Wait for U04ASylvanas03 <gen> to be 1.00 seconds from finished playing
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Sound - Play Dark Agents.
    Cinematic - Send transmission to (All players) from Sylvanas named Sylvanas Windrunner: Play U04ASylvanas01 <gen> and display You've won through this gate, butcher, but you won't get through the second. The inner gate to Silvermoon can only be opened with a special key, and it shall never be yours!. Modify duration: Add 0 seconds and Wait
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order Sylvanas to Move To.(Center of Sylvanas02 <gen>)
    Wait 0.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Intro10 for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_Intro10 for Player 9 (Gray) over 0 seconds
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U04AArthas04 <gen> and display You waste your time, woman. You cannot outrun the inevitable.. Modify duration: Add 0 seconds and Wait
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Intro11 for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_Intro11 for Player 9 (Gray) over 0 seconds
    Cinematic - Send transmission to (All players) from Sylvanas named Sylvanas Windrunner: Play U04ASylvanas05 <gen> and display You think that I'm running from you? Apparently you've never fought elves before.. Modify duration: Subtract 1.00 seconds and Wait
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Intro12 for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_Intro12 for Player 9 (Gray) over 0 seconds
    Animation - Play Sylvanas's spell (animationname) animation
    Wait 1.00 seconds
    Animation - Reset Sylvanas's animation
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Create 1.Solar Beam (Cinematic) for Player 10 (Light Blue) at (Center of Region_087 <gen>) facing Default building facing degrees
    Unit - Change color of (Last created unit) to Yellow
    Unit - Turn collision for (Last created unit) Off.
    Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
    Unit - Order (Last created unit) to Move To.(Center of Region_088 <gen>)
    Set VariableSet SolarBeam = (Last created unit)
    Set VariableSet temppoint = (Position of SolarBeam)
    Unit - Create 1.Dummy for Player 10 (Light Blue) at temppoint facing Default building facing degrees
    Set VariableSet SolarBeamDummy = (Last created unit)
    Unit - Add a 6.50 second Generic expiration timer to (Last created unit)
    Unit - Add Solar Beam Strike (Dummy) to (Last created unit)
    Custom script: call RemoveLocation (udg_temppoint)
    Trigger - Turn on Solar_Beam_2 <gen>
    Destructible - Open Long Wooden Bridge 1401 <gen>
    Wait 1.00 seconds
    Sound - Play BridgeSound01
    Wait 2.50 seconds
    Sound - Play BridgeSound02
    Wait 1.25 seconds
    Trigger - Turn off Solar_Beam_2 <gen>
    Wait 1.50 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Intro08 for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_Intro08 for Player 9 (Gray) over 0 seconds
    Environment - Reset fog to default values
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U04AArthas06 <gen> and display Damn that woman! We must find a way to cross the river!. Modify duration: Add 0 seconds and Wait
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 1.00 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- NO LONGER SKIPPABLE --------
    Trigger - Turn off IntroCancel <gen>
    Trigger - Turn off Skip_Cinematic <gen>
    Set VariableSet SkipVote1 = False
    Set VariableSet SkipVote2 = False
    -------- End Cinematic --------
    Camera - Reset camera for AAAP_Undead to standard game-view over 0.00 seconds
    Camera - Reset camera for Player 9 (Gray) to standard game-view over 0.00 seconds
    Camera - Pan camera for AAAP_Undead to (Center of Arthas01 <gen>) over 0.00 seconds
    Camera - Pan camera for Player 9 (Gray) to (Center of Arthas01 <gen>) over 0.00 seconds
    Environment - Set sky to None
    -------- Set Unit Facing --------
    Unit - Make InitialGhoulA face 135.00 over 0 seconds
    Unit - Make InitialGhoulB face 135.00 over 0 seconds
    Unit - Make InitialGhoulC face 135.00 over 0 seconds
    Unit - Make InitialGhoulD face 135.00 over 0 seconds
    Unit - Make InitialNecromancerA face 135.00 over 0 seconds
    Unit - Make InitialNecromancerB face 135.00 over 0 seconds
    Unit - Make Falric face 135.00 over 0 seconds
    -------- Visibility Settings --------
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Reveal01 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Reveal02 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Reveal03 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Reveal01 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Reveal02 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Reveal03 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Cinematic - Turn cinematic mode Off for (All players)
    Game - Turn the day/night cycle On
    Unit - Remove FleeingElf01 from the game
    Unit - Remove FleeingElf02 from the game
    Unit - Remove FleeingElf03 from the game
    Unit Group - Pick every unit in (Units in (Playable map area) owned by P_HighElves01) and do (Make (Picked unit) Vulnerable)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by P_HighElves02) and do (Make (Picked unit) Vulnerable)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by P_HighElves03) and do (Make (Picked unit) Vulnerable)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by AAAP_Undead) and do (Make (Picked unit) Vulnerable)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 9 (Gray)) and do (Make (Picked unit) Vulnerable)
    Hero - Enable experience gain for Falric.
    Hero - Enable experience gain for Arthas.
    Trigger - Run SylvanasReturnsHome <gen> (checking conditions)
    Unit - Set mana of Arthas to 100%
    Selection - Select Arthas for Player 4 (Purple)
    Selection - Select Falric for Player 9 (Gray)
    Cinematic - Fade in over 2.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Trigger - Run SpiderEntance <gen> (checking conditions)
    Set VariableSet Cinematic = False
    Wait 2.00 seconds
    Quest - Display to (All players) the Quest Discovered message: |cffffcc00MAIN QUEST|rThree Moons - Destroy the three High Elf Altars - Collect all three Mooncrystals
    Wait 0.50 seconds
    -------- Reveal Visibility Regions --------
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Altar01 <gen>) to a radius of 512.
    Set VariableSet Altar01Visibilitya = (Last created visibility modifier)
    Visibility - Disable Altar01Visibilitya
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Altar02 <gen>) to a radius of 512.
    Set VariableSet Altar02Visibilitya = (Last created visibility modifier)
    Visibility - Disable Altar02Visibilitya
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Altar03 <gen>) to a radius of 512.
    Set VariableSet Altar03Visibilitya = (Last created visibility modifier)
    Visibility - Disable Altar03Visibilitya
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Altar01 <gen>) to a radius of 512.
    Set VariableSet Altar01Visibilityb = (Last created visibility modifier)
    Visibility - Disable Altar01Visibilityb
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Altar02 <gen>) to a radius of 512.
    Set VariableSet Altar02Visibilityb = (Last created visibility modifier)
    Visibility - Disable Altar02Visibilityb
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Altar03 <gen>) to a radius of 512.
    Set VariableSet Altar03Visibilityb = (Last created visibility modifier)
    Visibility - Disable Altar03Visibilityb
    Cinematic - Ping minimap for (All players) at (Center of Altar01 <gen>) for 7.00 seconds
    Cinematic - Ping minimap for (All players) at (Center of Altar02 <gen>) for 7.00 seconds
    Cinematic - Ping minimap for (All players) at (Center of Altar03 <gen>) for 7.00 seconds
    Trigger - Run Start_AI <gen> (checking conditions)
IntroCancel
  Events
  Conditions
    IntroCancelled Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Set VariableSet SkipVote1 = False
    Set VariableSet SkipVote2 = False
    Set VariableSet IntroCancelled = True
    -------- Move Units Into Position --------
    Unit - Unhide Necromancer 0257 <gen>
    Unit - Unhide Death Knight 0111 <gen>
    Unit - Unhide Necromancer 0258 <gen>
    Unit - Move InitialGhoulA instantly to (Center of InitialGhoulA02 <gen>)
    Unit - Move InitialGhoulB instantly to (Center of InitialGhoulB02 <gen>)
    Unit - Move InitialGhoulC instantly to (Center of InitialGhoulC02 <gen>)
    Unit - Move InitialGhoulD instantly to (Center of InitialGhoulD02 <gen>)
    Unit - Move InitialNecromancerA instantly to (Center of InitialNecroA02 <gen>)
    Unit - Move InitialNecromancerB instantly to (Center of InitialNecroB02 <gen>)
    Unit - Move Arthas instantly to (Center of Arthas02 <gen>)
    Unit - Make Arthas face 135.00 over 0 seconds
    Unit - Move Falric instantly to (Center of InitialGhoulA02 <gen>)
    Unit - Make Falric face 135.00 over 0 seconds
    Unit - Make InitialGhoulA face 135.00 over 0 seconds
    Unit - Make InitialGhoulB face 135.00 over 0 seconds
    Unit - Make InitialGhoulC face 135.00 over 0 seconds
    Unit - Make InitialGhoulD face 135.00 over 0 seconds
    Unit - Make InitialNecromancerA face 135.00 over 0 seconds
    Unit - Make InitialNecromancerB face 135.00 over 0 seconds
    If (SpawnedStartingTroops Equal to False) then do (Create 1.Meat Wagon for AAAP_Undead at (Center of Meatwagon01 <gen>) facing 135.00 degrees) else do (Do nothing)
    If (SpawnedStartingTroops Equal to False) then do (Create 1.Acolyte for AAAP_Undead at (Center of Acolyte01 <gen>) facing 135.00 degrees) else do (Do nothing)
    If (SpawnedStartingTroops Equal to False) then do (Create 1.Acolyte for AAAP_Undead at (Center of Acolyte02 <gen>) facing 135.00 degrees) else do (Do nothing)
    If (SpawnedStartingTroops Equal to False) then do (Create 1.Acolyte for Player 9 (Gray) at (Center of Acolyte03 <gen>) facing 135.00 degrees) else do (Do nothing)
    If (SpawnedStartingTroops Equal to False) then do (Create 1.Acolyte for Player 9 (Gray) at (Center of Acolyte04 <gen>) facing 135.00 degrees) else do (Do nothing)
    Unit - Move Sylvanas instantly to (Center of Sylvanas02 <gen>)
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Order (Picked unit) to Stop.)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by P_HighElves01) and do (Make (Picked unit) Vulnerable)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by P_HighElves02) and do (Make (Picked unit) Vulnerable)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by P_HighElves03) and do (Make (Picked unit) Vulnerable)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by AAAP_Undead) and do (Make (Picked unit) Vulnerable)
    Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 9 (Gray)) and do (Make (Picked unit) Vulnerable)
    Unit - Remove High Elf 0158 <gen> from the game
    Unit - Remove High Elf 0162 <gen> from the game
    Unit - Remove Archer 0264 <gen> from the game
    Unit - Remove Archer 0265 <gen> from the game
    Unit - Remove Archer 0266 <gen> from the game
    Unit - Remove High Elf 0149 <gen> from the game
    Unit - Remove FleeingElf01 from the game
    Unit - Remove FleeingElf02 from the game
    Unit - Remove FleeingElf03 from the game
    Trigger - Run SylvanasReturnsHome <gen> (checking conditions)
    -------- Kill Gate and Bridge --------
    Destructible - Kill ElfGate01
    Destructible - Open Bridge01
    -------- Reset Camera and Environmental Settings --------
    Sound - Stop (Last played sound) After fading
    Camera - Reset camera for AAAP_Undead to standard game-view over 0.00 seconds
    Camera - Reset camera for Player 9 (Gray) to standard game-view over 0.00 seconds
    Camera - Pan camera for AAAP_Undead to (Center of Arthas01 <gen>) over 0.00 seconds
    Camera - Pan camera for Player 9 (Gray) to (Center of Arthas01 <gen>) over 0.00 seconds
    Environment - Set fog to style 0 (fogstyle), z-start 1500.00, z-end 12000.00, density 0 and color (100%, 60.00%, 20.00%)
    Cinematic - Turn cinematic mode Off for (All players)
    Game - Turn the day/night cycle On
    Environment - Set sky to None
    Hero - Enable experience gain for Arthas.
    Hero - Enable experience gain for Falric.
    -------- Visibility Settings --------
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of BridgeCollapse <gen>) to a radius of 768.00.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Reveal01 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Reveal02 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Reveal03 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of BridgeCollapse <gen>) to a radius of 768.00.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Reveal01 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Reveal02 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Reveal03 <gen>) to a radius of 512.
    Visibility - Destroy (Last created visibility modifier)
    Unit - Set mana of Arthas to 100%
    Selection - Select Arthas for Player 4 (Purple)
    Selection - Select Falric for Player 9 (Gray)
    Cinematic - Fade in over 2.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    -------- Go Go Power Crypt Fiends Intro --------
    Trigger - Run SpiderEntance <gen> (checking conditions)
    Set VariableSet Cinematic = False
    Wait 2.00 seconds
    -------- Quest Settings --------
    Quest - Display to (All players) the Quest Discovered message: |cffffcc00MAIN QUEST|rThree Moons - Destroy the three High Elf Altars - Collect all three Mooncrystals
    Wait 0.50 seconds
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Altar01 <gen>) to a radius of 512.
    Set VariableSet Altar01Visibilitya = (Last created visibility modifier)
    Visibility - Disable Altar01Visibilitya
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Altar02 <gen>) to a radius of 512.
    Set VariableSet Altar02Visibilitya = (Last created visibility modifier)
    Visibility - Disable Altar02Visibilitya
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of Altar03 <gen>) to a radius of 512.
    Set VariableSet Altar03Visibilitya = (Last created visibility modifier)
    Visibility - Disable Altar03Visibilitya
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Altar01 <gen>) to a radius of 512.
    Set VariableSet Altar01Visibilityb = (Last created visibility modifier)
    Visibility - Disable Altar01Visibilityb
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Altar02 <gen>) to a radius of 512.
    Set VariableSet Altar02Visibilityb = (Last created visibility modifier)
    Visibility - Disable Altar02Visibilityb
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of Altar03 <gen>) to a radius of 512.
    Set VariableSet Altar03Visibilityb = (Last created visibility modifier)
    Visibility - Disable Altar03Visibilityb
    Cinematic - Ping minimap for (All players) at (Center of Altar01 <gen>) for 7.00 seconds
    Cinematic - Ping minimap for (All players) at (Center of Altar02 <gen>) for 7.00 seconds
    Cinematic - Ping minimap for (All players) at (Center of Altar03 <gen>) for 7.00 seconds
    Unit - Remove SolarBeam from the game
    Unit - Remove SolarBeamDummy from the game
    Trigger - Turn off Solar_Beam_2 <gen>
    Trigger - Run Start_AI <gen> (checking conditions)
SpiderEntance
  Events
  Conditions
  Actions
    Unit - Create 1.Crypt Fiend for P_Reinforcements at (Center of InitialFiendA01 <gen>) facing 135.00 degrees
    Set VariableSet InitialFiendA = (Last created unit)
    Unit - Create 1.Crypt Fiend for P_Reinforcements at (Center of InitialFiendB01 <gen>) facing 135.00 degrees
    Set VariableSet InitialFiendB = (Last created unit)
    Unit - Create 1.Crypt Fiend for P_Reinforcements at (Center of InitialFiendC01 <gen>) facing 135.00 degrees
    Set VariableSet InitialFiendC = (Last created unit)
    Unit - Order InitialFiendA to Move To.(Center of InitialFiendA02 <gen>)
    Unit - Order InitialFiendB to Move To.(Center of InitialFiendB02 <gen>)
    Unit - Order InitialFiendC to Move To.(Center of InitialFiendC02 <gen>)
SpiderArrival
  Events
    Unit - A unit enters InitialFiendA02 <gen>
  Conditions
    (Entering unit) Equal to InitialFiendA
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Add SpiderArrival_Queue <gen> to the trigger queue (Checking conditions)
SpiderArrival Queue
  Events
  Conditions
    GameOver Equal to False
  Actions
    Camera - Pan camera as necessary for AAAP_Undead to (Position of InitialFiendA) over 0.5 seconds
    Camera - Pan camera as necessary for Player 9 (Gray) to (Position of InitialFiendA) over 0.5 seconds
    Sound - Setup all volume channels for speech
    Cinematic - Send transmission to (All players) from a AAAP_Undead.Crypt Fiend named Crypt Fiend at (Position of InitialFiendA): Play U04BCryptFiend06 <gen> and display Greetings, death knight.. Modify duration: Add 0 seconds and Wait
    Sound - Reset all volume channels to 100%
    Unit - Rescue InitialFiendA for Player 9 (Gray) and Change color
    Unit - Rescue InitialFiendB for AAAP_Undead and Change color
    Unit - Rescue InitialFiendC for Player 9 (Gray) and Change color
    Unit - Order InitialFiendA to Undead Crypt Fiend - Activate Web.
    Unit - Order InitialFiendB to Undead Crypt Fiend - Activate Web.
    Unit - Order InitialFiendC to Undead Crypt Fiend - Activate Web.
    Wait 1.00 seconds
    Quest - Display to (All players) the New Unit Acquired message: |cff87ceebNEW UNIT ACQUIRED|rCrypt Fiend - Crypt Fiends possess the Web ability, which can pull flying units from the air.
    Wait Campaign quest delay seconds
    Trigger - Remove (This trigger) from the trigger queue
SylvanasCrossesBridge
  Events
    Unit - A unit enters Sylvanas02 <gen>
  Conditions
    (Entering unit) Equal to Sylvanas
  Actions
    Trigger - Turn off (This trigger)
    Unit - Order Sylvanas to Stop.
    Unit - Make Sylvanas face Arthas over 0.20 seconds
Repair01
  Events
    Unit - A unit enters Repair01 <gen>
  Conditions
    (Entering unit) Equal to InitialRepairer01
  Actions
    Trigger - Turn off (This trigger)
    Wait 0.20 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order InitialRepairer01 to Stop.
    Animation - Play InitialRepairer01's Stand Work (animationname) animation
Repair02
  Events
    Unit - A unit enters Repair02 <gen>
  Conditions
    (Entering unit) Equal to InitialRepairer02
  Actions
    Trigger - Turn off (This trigger)
    Wait 0.20 seconds
    If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Order InitialRepairer02 to Stop.
    Animation - Play InitialRepairer02's Stand Work (animationname) animation
SylvanasReturnsHome
  Events
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Animation - Reset Sylvanas's animation
    Unit - Order Sylvanas to Move To.(Center of SylvanasHome <gen>)
RevealSecret01
  Events
    Unit - A unit enters RevealSecret01A <gen>
    Unit - A unit enters RevealSecret01B <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Entering unit)) Equal to AAAP_Undead
        (Owner of (Entering unit)) Equal to Player 9 (Gray)
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Unit - Grant shared vision of Swordsman 0021 <gen> to AAAP_Undead
    Unit - Grant shared vision of Swordsman 0037 <gen> to AAAP_Undead
    Unit - Grant shared vision of Swordsman 0021 <gen> to Player 9 (Gray)
    Unit - Grant shared vision of Swordsman 0037 <gen> to Player 9 (Gray)
    Cinematic - Ping minimap for (All players) at (Center of Secret01 <gen>) for 1.00 seconds
    Sound - Set position of SecretSound to (Center of Secret01 <gen>) with Z offset 0
    Sound - Play SecretSound
    Animation - Play the death (animationname) animation for all doodads of type XOmr (doodadcode) within RevealSecret01A <gen>.
    Animation - Play the death (animationname) animation for all doodads of type XOmr (doodadcode) within RevealSecret01B <gen>.
WaygateHint01A
  Events
    Unit - A unit comes within 512.00 of Way Gate 0005 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to False
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Set VariableSet WaygateHint01 = True
    Trigger - Turn off WaygateHint02A <gen>
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Units can move through Way Gates to reach distant lands.
WaygateHint01B
  Events
    Unit - A unit comes within 512.00 of Way Gate 0110 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to False
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Set VariableSet WaygateHint01 = True
    Trigger - Turn off WaygateHint02B <gen>
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Units can move through Way Gates to reach distant lands.
WaygateHint01C
  Events
    Unit - A unit comes within 512.00 of Way Gate 0108 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint01 = True
    Trigger - Turn off (This trigger)
    Trigger - Turn off WaygateHint02C <gen>
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Units can move through Way Gates to reach distant lands.
WaygateHint01D
  Events
    Unit - A unit comes within 512.00 of Way Gate 0019 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint01 = True
    Trigger - Turn off (This trigger)
    Trigger - Turn off WaygateHint02D <gen>
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Units can move through Way Gates to reach distant lands.
WaygateHint01E
  Events
    Unit - A unit comes within 512.00 of Way Gate 0109 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint01 = True
    Trigger - Turn off (This trigger)
    Trigger - Turn off WaygateHint02E <gen>
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Units can move through Way Gates to reach distant lands.
WaygateHint01F
  Events
    Unit - A unit comes within 512.00 of Way Gate 0038 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint01 = True
    Trigger - Turn off (This trigger)
    Trigger - Turn off WaygateHint02F <gen>
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Units can move through Way Gates to reach distant lands.
2
  Events
  Conditions
  Actions
WaygateHint02A
  Events
    Unit - A unit comes within 512.00 of Way Gate 0005 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to True
    WaygateHint02 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint02 = True
    Trigger - Turn off (This trigger)
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - When appropriate, units will automatically move through Way Gates to reach their destination.
WaygateHint02B
  Events
    Unit - A unit comes within 512.00 of Way Gate 0110 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to True
    WaygateHint02 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint02 = True
    Trigger - Turn off (This trigger)
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - When appropriate, units will automatically move through Way Gates to reach their destination.
WaygateHint02C
  Events
    Unit - A unit comes within 512.00 of Way Gate 0108 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to True
    WaygateHint02 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint02 = True
    Trigger - Turn off (This trigger)
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - When appropriate, units will automatically move through Way Gates to reach their destination.
WaygateHint02D
  Events
    Unit - A unit comes within 512.00 of Way Gate 0019 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to True
    WaygateHint02 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint02 = True
    Trigger - Turn off (This trigger)
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - When appropriate, units will automatically move through Way Gates to reach their destination.
WaygateHint02E
  Events
    Unit - A unit comes within 512.00 of Way Gate 0109 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to True
    WaygateHint02 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint02 = True
    Trigger - Turn off (This trigger)
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - When appropriate, units will automatically move through Way Gates to reach their destination.
WaygateHint02F
  Events
    Unit - A unit comes within 512.00 of Way Gate 0038 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Triggering unit)) Not equal to Goblin Zeppelin
    WaygateHint01 Equal to True
    WaygateHint02 Equal to False
    GameOver Equal to False
  Actions
    Set VariableSet WaygateHint02 = True
    Trigger - Turn off (This trigger)
    Cinematic - Ping minimap for (All players) at (Position of (Triggering unit)) for 1 seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - When appropriate, units will automatically move through Way Gates to reach their destination.
Crate01
  Events
    Destructible - Crates 1605 <gen> dies
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Wait 0.10 seconds
    Item - Create Scroll of Mana at (Center of Crate01 <gen>)
    Set VariableSet BonusesFound = (BonusesFound + 1)
Crate02
  Events
    Destructible - Crates 2722 <gen> dies
  Conditions
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Wait 0.10 seconds
    Unit - Create 1.Rat for Neutral Hostile at (Center of Crate02 <gen>) facing 225.00 degrees
    Sound - Attach SpawnSpiderSound01 to (Last created unit)
    Sound - Play SpawnSpiderSound01
    Camera - Set a spacebar-point for AAAP_Undead at (Position of (Last created unit))
    Cinematic - Ping minimap for AAAPG_Undead at (Position of (Last created unit)) for 1.00 seconds
Crate03
  Events
    Destructible - Crates 1369 <gen> dies
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Wait 0.10 seconds
    Item - Create Potion of Greater Healing at (Center of Crate03 <gen>)
    Set VariableSet BonusesFound = (BonusesFound + 1)
LightBlueGold
  Events
    Player - Player 10 (Light Blue)'s Current gold becomes Less than 1000
  Conditions
  Actions
    Player - Add 1000 to Player 10 (Light Blue).Current gold
LightBlueLumber
  Events
    Player - Player 10 (Light Blue)'s Current lumber becomes Less than 300.00
  Conditions
  Actions
    Player - Add 300 to Player 10 (Light Blue).Current lumber
DarkGreenGold
  Events
    Player - Player 11 (Dark Green)'s Current gold becomes Less than 1000
  Conditions
  Actions
    Player - Add 1000 to Player 11 (Dark Green).Current gold
DarkGreenLumber
  Events
    Player - Player 11 (Dark Green)'s Current lumber becomes Less than 300.00
  Conditions
  Actions
    Player - Add 300 to Player 11 (Dark Green).Current lumber
BrownGold
  Events
    Player - Player 12 (Brown)'s Current gold becomes Less than 1000
  Conditions
  Actions
    Player - Add 1000 to Player 12 (Brown).Current gold
BrownLumber
  Events
    Player - Player 12 (Brown)'s Current lumber becomes Less than 300.00
  Conditions
  Actions
    Player - Add 300 to Player 12 (Brown).Current lumber
Start AI
  Events
  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
        AI - Start campaign AI script for P_HighElves01: war3mapImported\U4 Insane LightBlue.ai (aiscript)
        AI - Start campaign AI script for P_HighElves02: war3mapImported\U4 Insane Darkgreen.ai (aiscript)
        AI - Start campaign AI script for P_HighElves03: war3mapImported\U4 Insane Brown.ai (aiscript)
        Countdown Timer - Start EnergyBridge as a One-shot timer that will expire in 120.00 seconds
      Else - Actions
        AI - Start campaign AI script for P_HighElves01: u04_lightblue.ai (aiscript)
        AI - Start campaign AI script for P_HighElves02: u04_darkgreen.ai (aiscript)
        AI - Start campaign AI script for P_HighElves03: u04_brown.ai (aiscript)
        Countdown Timer - Start StartAITimer as a One-shot timer that will expire in 240.00 seconds
Begin Attack Waves
  Events
    Unit - A unit owned by Player 4 (Purple).Finishes construction
    Unit - A unit owned by Player 9 (Gray).Finishes construction
  Conditions
    AIAttacking Equal to False
    (Unit-type of (Constructed structure)) Equal to Haunted Gold Mine
    INSANEMODE Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Run Begin_Attack_Waves_Timer_Safety <gen> (checking conditions)
Begin Attack Waves Timer Safety
  Events
    Time - StartAITimer expires
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Set VariableSet AIAttacking = True
    AI - Send Player 11 (Dark Green) the AI Command (0, 0)
    AI - Send Player 10 (Light Blue) the AI Command (0, 0)
    Trigger - Turn on Unsummon_QUE <gen>
Dragon Hawk Hint
  Events
    Unit - A unit comes within 512.00 of Dragon Hawk 0286 <gen>
    Unit - A unit comes within 512.00 of Dragon Hawk 0287 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Add Dragon_Hawk_Hint_Queue <gen> to the trigger queue (Checking conditions)
Dragon Hawk Hint Queue
  Events
  Conditions
    GameOver Equal to False
  Actions
    Cinematic - Ping minimap for (All players) at (Position of Dragon Hawk 0286 <gen>) for 5.00 seconds
    Sound - Setup all volume channels for speech
    Cinematic - Send transmission to (All players) from a AAAP_Undead.Necromancer named Necromancer at (Position of Necromancer 0257 <gen>): Play U04BNecromancer08 <gen> and display Lord Arthas, our forces cannot attack the flying beasts!. Modify duration: Add 0 seconds and Wait
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U04BArthas09 <gen> and display Fear not. The crypt fiends can force them to the ground!. Modify duration: Add 0 seconds and Wait
    Sound - Reset all volume channels to 100%
    Unit Group - Pick every unit in (Units owned by AAAP_Undead of type Crypt Fiend) and do (Flash a speech indicator for (Picked unit) of color (100%, 100%, 100%) with 0% transparency)
    Wait Campaign hint delay seconds
    Trigger - Remove (This trigger) from the trigger queue
Kill Altar01
  Events
    Unit - A unit owned by Player 10 (Light Blue).Dies
  Conditions
    (Dying unit) Equal to Altar01
  Actions
    Trigger - Turn off (This trigger)
    Wait 0.20 seconds
    Unit - Unpause High Elven Barracks 0042 <gen>
    Item - Create Mooncrystal at (Center of Altar01 <gen>)
    Set VariableSet Key01 = (Last created item)
    Set VariableSet Altar01Destroyed = True
    Item - Make Key01 Invulnerable
    Trigger - Run All_Altars_have_been_destroyed <gen> (checking conditions)
    Trigger - Run Mooncrystal01Hint <gen> (checking conditions)
Kill Altar02
  Events
    Unit - A unit owned by Player 11 (Dark Green).Dies
  Conditions
    (Dying unit) Equal to Altar02
  Actions
    Trigger - Turn off (This trigger)
    Wait 0.20 seconds
    Item - Create Mooncrystal at (Center of Altar02 <gen>)
    Set VariableSet Key02 = (Last created item)
    Set VariableSet Altar02Destroyed = True
    Item - Make Key02 Invulnerable
    Trigger - Run All_Altars_have_been_destroyed <gen> (checking conditions)
    Trigger - Run Mooncrystal02Hint <gen> (checking conditions)
Kill Altar03
  Events
    Unit - A unit owned by Player 12 (Brown).Dies
  Conditions
    (Dying unit) Equal to Altar03
  Actions
    Trigger - Turn off (This trigger)
    Wait 0.20 seconds
    Item - Create Mooncrystal at (Center of Altar03 <gen>)
    Set VariableSet Key03 = (Last created item)
    Set VariableSet Altar03Destroyed = True
    Item - Make Key03 Invulnerable
    Trigger - Run All_Altars_have_been_destroyed <gen> (checking conditions)
    Trigger - Run Mooncrystal03Hint <gen> (checking conditions)
All Altars have been destroyed
  Events
  Conditions
    Altar01Destroyed Equal to True
    Altar02Destroyed Equal to True
    Altar03Destroyed Equal to True
    GameOver Equal to False
  Actions
    Quest - Mark QuestKeyRequirementAltars as Completed
    If (NumberOfPiecesFound Equal to 0) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - |cff808080Destroy the three High Elf Altars (Completed)|r - Collect all three Mooncrystals) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 1) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - |cff808080Destroy the three High Elf Altars (Completed)|r - Combine all three Mooncrystals |cff808080|cff808080(1 Part Acquired)|r) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 2) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - |cff808080Destroy the three High Elf Altars (Completed)|r - Combine all three Mooncrystals |cff808080|cff808080(2 Parts Combined)|r) else do (Do nothing)
Key01 Acquired
  Events
    Unit - A unit owned by Player 4 (Purple).Acquires an item
    Unit - A unit owned by Player 9 (Gray).Acquires an item
  Conditions
    Key01 Equal to (Item being manipulated)
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Set VariableSet Key01Acquired = True
    Sound - Setup all volume channels for speech
    Cinematic - Ping minimap for (All players) at (Center of Altar01 <gen>) for 1.00 seconds
    If (NumberOfPiecesFound Equal to 0) then do (Send transmission to (All players) from a AAAP_Undead.Kel'Thuzad (Ghost) named Kel'Thuzad at (Center of Altar01 <gen>): Play U04AKelThuzad10 <gen> and display That mooncrystal is a component of the Key of the Three Moons. The other two crystals must be found... if the elfgate is to be unlocked.. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - Destroy the three High Elf Altars - Combine all three Mooncrystals |cff808080(1 Part Acquired)|r) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Change the description of QuestKeyRequirementPieces to Combine all three Mooncrystals |cff808080(1 Part Acquired)|r) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Set VariableSet NumberOfPiecesFound = 1) else do (Do nothing)
    Sound - Reset all volume channels to 100%
    If (Key02Acquired Equal to False) then do (Ping minimap for (All players) at (Center of Altar02 <gen>) for 7.00 seconds) else do (Do nothing)
    If (Key03Acquired Equal to False) then do (Ping minimap for (All players) at (Center of Altar03 <gen>) for 7.00 seconds) else do (Do nothing)
    Wait 2.00 seconds
    If (NumberOfPiecesFound Equal to 1) then do (Display to AAAPG_Undead the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - Destroy the three High Elf Altars - Combine all three Mooncrystals |cff808080(1 Part Acquired)|r) else do (Do nothing)
    Visibility - Destroy Altar01Visibilitya
    Visibility - Destroy Altar01Visibilityb
Key02 Acquired
  Events
    Unit - A unit owned by Player 4 (Purple).Acquires an item
    Unit - A unit owned by Player 9 (Gray).Acquires an item
  Conditions
    Key02 Equal to (Item being manipulated)
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Set VariableSet Key02Acquired = True
    Sound - Setup all volume channels for speech
    Cinematic - Ping minimap for (All players) at (Center of Altar03 <gen>) for 1.00 seconds
    If (NumberOfPiecesFound Equal to 0) then do (Send transmission to (All players) from a AAAP_Undead.Kel'Thuzad (Ghost) named Kel'Thuzad at (Center of Altar01 <gen>): Play U04AKelThuzad10 <gen> and display That mooncrystal is a component of the Key of the Three Moons. The other two crystals must be found... if the elfgate is to be unlocked.. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - Destroy the three High Elf Altars - Combine all three Mooncrystals |cff808080(1 Part Acquired)|r) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Change the description of QuestKeyRequirementPieces to Combine all three Mooncrystals |cff808080(1 Part Acquired)|r) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Set VariableSet NumberOfPiecesFound = 1) else do (Do nothing)
    Sound - Reset all volume channels to 100%
    If (Key01Acquired Equal to False) then do (Ping minimap for (All players) at (Center of Altar02 <gen>) for 7.00 seconds) else do (Do nothing)
    If (Key03Acquired Equal to False) then do (Ping minimap for (All players) at (Center of Altar03 <gen>) for 7.00 seconds) else do (Do nothing)
    Wait 2.00 seconds
    Visibility - Destroy Altar02Visibilitya
    Visibility - Destroy Altar02Visibilityb
Key03 Acquired
  Events
    Unit - A unit owned by Player 4 (Purple).Acquires an item
    Unit - A unit owned by Player 9 (Gray).Acquires an item
  Conditions
    Key03 Equal to (Item being manipulated)
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Set VariableSet Key03Acquired = True
    Sound - Setup all volume channels for speech
    Cinematic - Ping minimap for (All players) at (Center of Altar03 <gen>) for 1.00 seconds
    If (NumberOfPiecesFound Equal to 0) then do (Send transmission to (All players) from a AAAP_Undead.Kel'Thuzad (Ghost) named Kel'Thuzad at (Center of Altar01 <gen>): Play U04AKelThuzad10 <gen> and display That mooncrystal is a component of the Key of the Three Moons. The other two crystals must be found... if the elfgate is to be unlocked.. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - Destroy the three High Elf Altars - Combine all three Mooncrystals |cff808080(1 Part Acquired)|r) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Change the description of QuestKeyRequirementPieces to Combine all three Mooncrystals |cff808080(1 Part Acquired)|r) else do (Do nothing)
    If (NumberOfPiecesFound Equal to 0) then do (Set VariableSet NumberOfPiecesFound = 1) else do (Do nothing)
    Sound - Reset all volume channels to 100%
    If (Key01Acquired Equal to False) then do (Ping minimap for (All players) at (Center of Altar03 <gen>) for 7.00 seconds) else do (Do nothing)
    If (Key02Acquired Equal to False) then do (Ping minimap for (All players) at (Center of Altar02 <gen>) for 7.00 seconds) else do (Do nothing)
    Wait 2.00 seconds
    Visibility - Destroy Altar03Visibilitya
    Visibility - Destroy Altar03Visibilityb
Reveal Gate Quest
  Events
  Conditions
    NumberOfPiecesFound Equal to 3
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Quest - Mark QuestKey as Completed
    Quest - Mark QuestKeyRequirementPieces as Completed
    Quest - Mark QuestGate as Discovered
    Quest - Flash the quest dialog button
    Wait 7.00 seconds
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Position of ElfGate02) to a radius of 512.
    Set VariableSet VisibilityGatea = (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Position of ElfGate02) to a radius of 512.
    Set VariableSet VisibilityGateb = (Last created visibility modifier)
    Cinematic - Ping minimap for (All players) at (Position of ElfGate02) for 7.00 seconds
    Quest - Display to (All players) the Quest Discovered message: |cffffcc00MAIN QUEST|rGates of Silvermoon - Bring Arthas to the Gate
Any Key Acquired
  Events
    Unit - A unit owned by Player 4 (Purple).Acquires an item
    Unit - A unit owned by Player 9 (Gray).Acquires an item
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Item being manipulated) Equal to Key01
        (Item being manipulated) Equal to Key02
        (Item being manipulated) Equal to Key03
        (Item being manipulated) Equal to Key2Part
        (Item being manipulated) Equal to Key3Part
  Actions
    Trigger - Add __Key_Combining <gen> to the trigger queue (Checking conditions)
Key Combining
  Events
  Conditions
  Actions
    Wait 0.05 seconds
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Hero manipulating item) has Key01) Equal to True
        ((Hero manipulating item) has Key02) Equal to True
      Then - Actions
        Item - Remove Key01
        Item - Remove Key02
        Hero - Create Partial Key of the Three Moons and give it to (Hero manipulating item)
        Set VariableSet Key2Part = (Last created item)
        Item - Make (Last created item) Invulnerable
        Set VariableSet NumberOfPiecesFound = 2
        If (2 Equal to 2) then do (Send transmission to (All players) from Arthas named Arthas: Play U04AArthas13 <gen> and display The second mooncrystal is ours!. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
        If (2 Equal to 2) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - Destroy the three High Elf Altars - Combine all three Mooncrystals |cff808080(2 Parts Combined)|r) else do (Do nothing)
        Quest - Change the description of QuestKeyRequirementPieces to Combine all three Mooncrystals |cff808080(2 Parts Combined)|r
        Sound - Reset all volume channels to 100%
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Hero manipulating item) has Key02) Equal to True
        ((Hero manipulating item) has Key03) Equal to True
      Then - Actions
        Item - Remove Key02
        Item - Remove Key03
        Hero - Create Partial Key of the Three Moons and give it to (Hero manipulating item)
        Set VariableSet Key2Part = (Last created item)
        Item - Make (Last created item) Invulnerable
        Sound - Setup all volume channels for speech
        Set VariableSet NumberOfPiecesFound = 2
        If (2 Equal to 2) then do (Send transmission to (All players) from Arthas named Arthas: Play U04AArthas13 <gen> and display The second mooncrystal is ours!. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
        If (2 Equal to 2) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - Destroy the three High Elf Altars - Combine all three Mooncrystals |cff808080(2 Parts Combined)|r) else do (Do nothing)
        Quest - Change the description of QuestKeyRequirementPieces to Combine all three Mooncrystals |cff808080(2 Parts Combined)|r
        Sound - Reset all volume channels to 100%
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Hero manipulating item) has Key01) Equal to True
        ((Hero manipulating item) has Key03) Equal to True
      Then - Actions
        Item - Remove Key01
        Item - Remove Key03
        Hero - Create Partial Key of the Three Moons and give it to (Hero manipulating item)
        Set VariableSet Key2Part = (Last created item)
        Item - Make (Last created item) Invulnerable
        Sound - Setup all volume channels for speech
        Set VariableSet NumberOfPiecesFound = 2
        If (2 Equal to 2) then do (Send transmission to (All players) from Arthas named Arthas: Play U04AArthas13 <gen> and display The second mooncrystal is ours!. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
        If (2 Equal to 2) then do (Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST UPDATE|rThree Moons - Destroy the three High Elf Altars - Combine all three Mooncrystals |cff808080(2 Parts Combined)|r) else do (Do nothing)
        Quest - Change the description of QuestKeyRequirementPieces to Combine all three Mooncrystals |cff808080(2 Parts Combined)|r
        Sound - Reset all volume channels to 100%
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Hero manipulating item) has Key2Part) Equal to True
        Or - Any (Conditions) are true
          Conditions
            ((Hero manipulating item) has Key01) Equal to True
            ((Hero manipulating item) has Key02) Equal to True
            ((Hero manipulating item) has Key03) Equal to True
      Then - Actions
        Item - Remove Key01
        Item - Remove Key02
        Item - Remove Key03
        Item - Remove Key2Part
        Hero - Create Key of Three Moons and give it to (Hero manipulating item)
        Set VariableSet Key3Part = (Last created item)
        Item - Make (Last created item) Invulnerable
        Sound - Setup all volume channels for speech
        Set VariableSet NumberOfPiecesFound = 3
        If (3 Equal to 3) then do (Send transmission to AAAPG_Undead from a AAAP_Undead.Kel'Thuzad (Ghost) named Kel'Thuzad at (Center of Altar01 <gen>): Play U04AKelThuzad15 <gen> and display At last... the third mooncrystal! The Key of the Three Moons is complete!. Modify duration: Add 0 seconds and Wait) else do (Do nothing)
        If (2 Equal to 2) then do (Display to (All players) the Quest Completed message: |cffffcc00MAIN QUEST COMPLETED|rThree Moons) else do (Do nothing)
        Quest - Mark QuestKey as Completed
        Sound - Reset all volume channels to 100%
        Trigger - Run __Reveal_Gate_Quest <gen> (checking conditions)
      Else - Actions
    Trigger - Remove (This trigger) from the trigger queue
Rescue Zeppelins
  Events
    Unit - A unit comes within 512.00 of Goblin Laboratory 0047 <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Triggering unit)) Equal to AAAP_Undead
        (Owner of (Triggering unit)) Equal to Player 9 (Gray)
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Add Rescue_Zeppelins_Queue <gen> to the trigger queue (Checking conditions)
Rescue Zeppelins Queue
  Events
  Conditions
    GameOver Equal to False
  Actions
    Unit - Rescue Zeppelin01 for AAAP_Undead and Change color
    Unit - Rescue Zeppelin02 for Player 9 (Gray) and Change color
    Quest - Display to (All players) the Simple Hint message: |cff87CEEBNEW UNIT ACQUIRED|r Goblin Zeppelin - A flying unit that can transport your troops across rivers and can be purchased from the Goblin Laboratory.
    Cinematic - Ping minimap for (All players) at (Center of GoblinLaboratory <gen>) for 5.00 seconds
    Sound - Play GoblinZeppelinReady1 <gen>
    Unit - Grant shared vision of GoblinLaboratory to AAAP_Undead
    Unit - Deny shared vision of GoblinLaboratory to AAAP_Undead
    Unit - Grant shared vision of GoblinLaboratory to Player 9 (Gray)
    Unit - Deny shared vision of GoblinLaboratory to Player 9 (Gray)
    Wait Campaign quest delay seconds
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Use Zeppelins to transport your troops across rivers.
    Cinematic - Ping minimap for (All players) at (Center of RevealLandingSpot <gen>) for 5.00 seconds
    Visibility - Create an initially Enabled visibility modifier for AAAP_Undead emitting Visibility from (Center of RevealLandingSpot <gen>) to a radius of 512.
    Set VariableSet VisibilityLandingSpota = (Last created visibility modifier)
    Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from (Center of RevealLandingSpot <gen>) to a radius of 512.
    Set VariableSet VisibilityLandingSpotb = (Last created visibility modifier)
    Wait Campaign quest delay seconds
    Trigger - Remove (This trigger) from the trigger queue
DisableVisibility
  Events
    Unit - A unit enters RevealLandingSpot <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Entering unit)) Equal to AAAP_Undead
        (Owner of (Entering unit)) Equal to Player 9 (Gray)
    (Unit-type of (Entering unit)) Not equal to Goblin Zeppelin
  Actions
    Trigger - Turn off (This trigger)
    Wait 1.00 seconds
    Animation - Play the death (animationname) animation for all doodads of type XOmr (doodadcode) within RevealLandingSpot <gen>.
    Sound - Play GoodJob <gen>
    Wait 1.00 seconds
    Visibility - Disable VisibilityLandingSpota
    Visibility - Disable VisibilityLandingSpotb
Cap Arthas Experience
  Events
    Unit - A unit owned by Player 4 (Purple).Gains a level
  Conditions
    (Hero level of Arthas) Greater than or equal to 5
  Actions
    Trigger - Turn off (This trigger)
    Hero - Disable experience gain for Arthas.
Cap Falric Experience
  Events
    Unit - A unit owned by Player 9 (Gray).Gains a level
  Conditions
    (Hero level of Falric) Greater than or equal to 5
  Actions
    Trigger - Turn off (This trigger)
    Hero - Disable experience gain for Falric.
Unsummon Hint
  Events
  Conditions
    GameOver Equal to False
  Actions
    Quest - Display to (All players) the Simple Hint message: |cff32CD32HINT|r - Acolytes can Unsummon Undead buildings to recover gold and lumber. This is very useful when moving to a new base.
    Wait Campaign hint delay seconds
    Trigger - Remove (This trigger) from the trigger queue
Unsummon QUE
  Events
    Time - Every 2 seconds of game time
  Conditions
    Or - Any (Conditions) are true
      Conditions
        ((Player 4 (Purple) Current gold) Less than or equal to 299) and ((Number of units in (Units owned by Player 4 (Purple) of type Haunted Gold Mine)) Less than or equal to 0)
        ((Player 9 (Gray) Current gold) Less than or equal to 299) and ((Number of units in (Units owned by Player 9 (Gray) of type Haunted Gold Mine)) Less than or equal to 0)
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Add Unsummon_Hint <gen> to the trigger queue (Checking conditions)
Mooncrystal01Hint
  Events
  Conditions
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Wait 30.00 seconds
    If (Key01Acquired Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Quest - Display to (All players) the Hint message: |cff32CD32HINT|r - Arthas or Falric must pick up all three Mooncrystals in order to form the Key of the Three Moons.
    Cinematic - Ping minimap for (All players) at (Center of Altar01 <gen>) for 1.00 seconds
Mooncrystal02Hint
  Events
  Conditions
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Wait 30.00 seconds
    If (Key02Acquired Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Quest - Display to (All players) the Hint message: |cff32CD32HINT|r - Arthas or Falric must pick up all three Mooncrystals in order to form the Key of the Three Moons.
    Cinematic - Ping minimap for (All players) at (Center of Altar02 <gen>) for 1.00 seconds
Mooncrystal03Hint
  Events
  Conditions
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Wait 30.00 seconds
    If (Key03Acquired Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Quest - Display to (All players) the Hint message: |cff32CD32HINT|r - Arthas or Falric must pick up all three Mooncrystals in order to form the Key of the Three Moons.
    Cinematic - Ping minimap for (All players) at (Center of Altar03 <gen>) for 1.00 seconds
Insufficient Keys
  Events
    Unit - A unit enters Gate_Region <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Entering unit) Equal to Arthas
        (Entering unit) Equal to Falric
    ((Entering unit) has Key3Part) Equal to False
    Or - Any (Conditions) are true
      Conditions
        ((Entering unit) has Key01) Equal to True
        ((Entering unit) has Key02) Equal to True
        ((Entering unit) has Key03) Equal to True
        ((Entering unit) has Key2Part) Equal to True
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Camera - Pan camera for (Owner of (Entering unit)) to (Center of Gate_Region <gen>) over 1.00 seconds
    Cinematic - Ping minimap for (All players) at (Center of Gate_Region <gen>) for 4.00 seconds
    Sound - Setup all volume channels for speech
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U04AArthas16 <gen> and display The crystal glows brightly, but there is no effect on the gate.. Modify duration: Add 0 seconds and Wait
    Cinematic - Send transmission to (All players) from a AAAP_Undead.Kel'Thuzad (Ghost) named Kel'Thuzad at (Center of Gate_Region <gen>): Play U04AKelThuzad17 <gen> and display As I said, you must find all three mooncrystals for the key to be whole!. Modify duration: Add 0 seconds and Wait
    Sound - Reset all volume channels to 100%
No Keys Hint
  Events
    Unit - A unit enters Gate_Region <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Entering unit) Equal to Arthas
        (Entering unit) Equal to Falric
    GameOver Equal to False
    ((Entering unit) has Key2Part) Equal to False
    ((Entering unit) has Key03) Equal to False
    ((Entering unit) has Key02) Equal to False
    ((Entering unit) has Key01) Equal to False
    ((Entering unit) has Key3Part) Equal to False
  Actions
    Trigger - Turn off (This trigger)
    Camera - Pan camera for (Owner of (Entering unit)) to (Center of Gate_Region <gen>) over 1.00 seconds
    Cinematic - Ping minimap for (All players) at (Center of Gate_Region <gen>) for 4.00 seconds
    Quest - Display to (All players) the Hint message: |cff32cd32HINT|r - Arthas or Falric must gather the Mooncrystals by destroying the Altars in order to get through the gate.
Trigger Victory
  Events
    Unit - A unit enters Gate_Region <gen>
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Entering unit) Equal to Arthas
        (Entering unit) Equal to Falric
    GameOver Equal to False
    ((Entering unit) has Key3Part) Equal to True
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Turn off Insufficient_Keys <gen>
    Sound - Remove WaterStreamLoop1 <gen> across StreamLoop01 <gen>
    Set VariableSet VictoryInProgress = True
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Make (Picked unit) Invulnerable)
    Hero - Disable experience gain for Arthas.
    Sound - Play QuestCompleted <gen>
    Animation - Play the death (animationname) animation for all doodads of type XOmr (doodadcode) within COP <gen>.
    Unit - Set mana of Sylvanas to 0.00%
    Trigger - Run Victory_Cinematic <gen> (checking conditions)
Victory Cinematic
  Events
  Conditions
    GameOver Equal to False
  Actions
    Trigger - Turn off (This trigger)
    -------- Fade Out and Establish Setting --------
    Cinematic - Fade out over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Set VariableSet Cinematic = True
    Set VariableSet GameOver = True
    Wait 1.00 seconds
    Game - Turn the day/night cycle Off
    -------- Save Game Data --------
    Item - Remove Key3Part
    Trigger - Turn on Victory_Cancel <gen>
    Trigger - Turn on Skip_Cinematic <gen>
    -------- Start Cinematic --------
    Camera - .Apply. gg_cam_End00A for AAAP_Undead over 0 seconds
    Camera - .Apply. gg_cam_End00A for Player 9 (Gray) over 0 seconds
    Cinematic - Turn cinematic mode On for (All players)
    Environment - Set sky to Dalaran Sky
    Environment - Set fog to style 0 (fogstyle), z-start 900.00, z-end 4500.00, density 0 and color (0.00%, 40.00%, 60.00%)
    If ((Arthas is dead) Equal to True) then do (Instantly revive Arthas at (Center of Gate_Region <gen>), Hide revival graphics) else do (Move Arthas instantly to (Center of Gate_Region <gen>))
    If ((Falric is dead) Equal to True) then do (Instantly revive Falric at (Center of Region_089 <gen>), Hide revival graphics) else do (Move Falric instantly to (Center of Region_089 <gen>))
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Order (Picked unit) to Stop.)
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Remove All buffs from (Picked unit))
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Hide (Picked unit))
    Unit - Make Arthas Invulnerable
    Unit - Make Falric Invulnerable
    AI - Ignore Sylvanas's guard position
    Unit - Move Sylvanas instantly to (Center of EndSylvanas01 <gen>)
    Unit - Unhide Sylvanas
    Unit - Unhide Falric
    Unit - Create 1 Arthas (Cinematic) for AAAP_Undead at (Center of Gate_Region <gen>) facing (Position of Sylvanas)
    Set VariableSet CinematicArthas = (Last created unit)
    Unit - Make CinematicArthas Invulnerable
    Animation - Play CinematicArthas's stand ready (animationname) animation
    Unit - Make Sylvanas face CinematicArthas over 0 seconds
    Unit - Turn collision for CinematicArthas Off.
    Sound - Play Dark Victory.
    Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    -------- NOW SKIPPABLE --------
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- Arthas Powers Up --------
    Camera - .Apply. gg_cam_End00B for AAAP_Undead over 10.00 seconds
    Camera - .Apply. gg_cam_End00B for Player 9 (Gray) over 10.00 seconds
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Sound - Reset all volume channels to 100%
    Cinematic - Send transmission to (All players) from CinematicArthas named Arthas: Play EvilArthasYes1 <gen> and display Finally.... Modify duration: Add 0 seconds and Wait
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Animation - Play CinematicArthas's spell - 1 (animationname) animation
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Special Effect - Create a special effect attached to the origin (attachpoint) of CinematicArthas using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
    Special Effect - Create a special effect attached to the origin (attachpoint) of CinematicArthas using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
    Set VariableSet SpecialEffect01 = (Last created special effect)
    Sound - Attach DeathPactTargetBirth1 <gen> to CinematicArthas
    Sound - Play DeathPactTargetBirth1 <gen>
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Animation - Play CinematicArthas's stand ready (animationname) animation
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- Camera Pulls Out --------
    Camera - .Apply. gg_cam_End01A for AAAP_Undead over 0.00 seconds
    Camera - .Apply. gg_cam_End01A for Player 9 (Gray) over 0.00 seconds
    Camera - .Apply. gg_cam_End01B for AAAP_Undead over 8.00 seconds
    Camera - .Apply. gg_cam_End01B for Player 9 (Gray) over 8.00 seconds
    Wait 1.00 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Special Effect - Destroy (Last created special effect)
    Special Effect - Destroy (Last created special effect)
    -------- Arthas Attacks Gate --------
    Destructible - Make ElfGate02 Vulnerable
    Animation - Reset CinematicArthas's animation
    Unit - Order CinematicArthas to Attack.ElfGate02
    Wait 1.00 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- Gate Is Destroyed --------
    Sound - Set position of BuildingDeathLargeHuman <gen> to (Position of ElfGate02) with Z offset 0
    Sound - Play BuildingDeathLargeHuman <gen>
    Destructible - Kill ElfGate02
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- Arthas Talks and Enters the Gate --------
    Sound - Setup all volume channels for speech
    Cinematic - Send transmission to (All players) from CinematicArthas named Arthas: Play U04AArthas18 <gen> and display The gates have been opened! Once we've dealt with Sylvanas, the inner kingdom shall be ours!. Modify duration: Add 0 seconds and Wait
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Turn collision for CinematicArthas Off.
    Unit - Order CinematicArthas to Move To.(Center of EndArthas01 <gen>)
    Sound - Attach HorseLoop2 <gen> to CinematicArthas
    Sound - Play HorseLoop2 <gen>
    Unit - Order Falric to Move To.(Center of Region_090 <gen>)
    Unit - Turn collision for Falric Off.
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Unit - Order Falric to Move To.(Center of Region_091 <gen>)
    Wait 1.00 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    -------- Fade Out and Shift Camera --------
    Camera - .Apply. gg_cam_End02A for AAAP_Undead over 0.00 seconds
    Camera - .Apply. gg_cam_End02A for Player 9 (Gray) over 0.00 seconds
    Unit - Remove CinematicArthas from the game
    Set VariableSet CinematicArthas = No unit
    Unit - Unhide Arthas
    Unit - Move Arthas instantly to (Center of EndArthas02 <gen>), facing (Position of Sylvanas)
    Unit - Make Arthas Invulnerable
    Unit - Order Arthas to Move To.(Center of EndArthas03 <gen>)
    Unit - Move Falric instantly to (Center of Region_092 <gen>), facing (Position of Sylvanas)
    Unit - Make Falric Invulnerable
    Unit - Order Falric to Move To.(Center of Region_091 <gen>)
    Unit - Order Sylvanas to Move To.(Center of EndSylvanas02 <gen>)
    -------- Fade In and Arthas Moves Forward --------
    Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 0.50 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_End02B for AAAP_Undead over 5.00 seconds
    Camera - .Apply. gg_cam_End02B for Player 9 (Gray) over 5.00 seconds
    Wait 2.00 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Sound - Remove WaterStreamLoop1 <gen> across StreamLoop01 <gen>
    Camera - .Apply. gg_cam_EndSylvanas for AAAP_Undead over 0.00 seconds
    Camera - .Apply. gg_cam_EndSylvanas for Player 9 (Gray) over 0.00 seconds
    Cinematic - Send transmission to (All players) from Sylvanas named Sylvanas Windrunner: Play U04ASylvanas12 <gen> and display Damn you monsters! What will it take to drive you back?. Modify duration: Add 0 seconds and Wait
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Unit - Turn collision for Sylvanas Off.
    AI - Ignore Sylvanas's guard position
    Unit - Order Sylvanas to Move To.(Center of EndSylvanas01 <gen>)
    Wait 1.00 seconds
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Arthas named Arthas: Play U04AArthas11 <gen> and display The ranger woman is starting to vex me greatly.. Modify duration: Add 0 seconds and Wait
    If (VictoryCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_End05 for AAAP_Undead over 0.00 seconds
    Camera - .Apply. gg_cam_End05 for Player 9 (Gray) over 0.00 seconds
    -------- NO LONGER SKIPPABLE --------
    Trigger - Turn off Victory_Cancel <gen>
    Trigger - Turn off Skip_Cinematic <gen>
    Wait 1.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 - Fade out over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Cinematic - Turn cinematic mode Off for (All players)
    Trigger - Run Endgame_Text <gen> (checking conditions)
Victory Cancel
  Events
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Set VariableSet VictoryCancelled = True
    Sound - Stop (Last played sound) After fading
    Cinematic - Fade out over 1.00 seconds using texture White Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 1.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)
    If (CinematicArthas Not equal to No unit) then do (Remove CinematicArthas from the game) else do (Do nothing)
    Cinematic - Turn cinematic mode Off for (All players)
    Trigger - Run Endgame_Text <gen> (checking conditions)
Defeat Lose Buildings
  Events
    Unit - A unit owned by Player 4 (Purple).Dies
    Unit - A unit owned by Player 9 (Gray).Dies
  Conditions
    (Count structures controlled by Player 4 (Purple) (Include incomplete structures)) Equal to 0
    (Count structures controlled by Player 9 (Gray) (Include incomplete structures)) Equal to 0
    GameOver Equal to False
  Actions
    Set VariableSet 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))
Defeat Lose Units
  Events
    Unit - A unit owned by Player 4 (Purple).Dies
    Unit - A unit owned by Player 9 (Gray).Dies
  Conditions
    (Count non-structure units controlled by Player 4 (Purple) (Exclude incomplete units)) Equal to 0
    (Count non-structure units controlled by Player 9 (Gray) (Exclude incomplete units)) Equal to 0
    GameOver Equal to False
  Actions
    Set VariableSet 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 units have been killed.
    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))
Change Defeat conditions
  Events
    Unit - A unit owned by Player 4 (Purple).Finishes construction
    Unit - A unit owned by Player 9 (Gray).Finishes construction
  Conditions
  Actions
    -------- -----Enable Defeat Conditions------ --------
    AI - Send Player 10 (Light Blue) the AI Command (0, 0)
    AI - Send Player 12 (Brown) the AI Command (0, 0)
    Trigger - Turn off (This trigger)
    Trigger - Turn on Defeat_Lose_Buildings <gen>
    Trigger - Turn off Defeat_Lose_Units <gen>
Item Drop Bonuses
  Events
    Unit - A unit Dies
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Dying unit) Equal to Gnoll Overseer 0193 <gen>
        (Dying unit) Equal to Gnoll Overseer 0192 <gen>
        (Dying unit) Equal to Gnoll Hut 0071 <gen>
        (Dying unit) Equal to Gnoll Overseer 0210 <gen>
        (Dying unit) Equal to Gnoll Hut 0204 <gen>
        (Dying unit) Equal to Rock Golem 0079 <gen>
        (Dying unit) Equal to Gnoll Overseer 0213 <gen>
  Actions
    Set VariableSet BonusesFound = (BonusesFound + 1)
Haunt mine extra
  Events
    Unit - A unit Finishes construction
  Conditions
    (Unit-type of (Triggering unit)) Equal to Haunted Gold Mine
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GoldMineBoolean[1] Equal to False
        (Goldmine <gen> contains (Triggering unit)) Equal to True
      Then - Actions
        Set VariableSet GoldMineBoolean[1] = True
        Set VariableSet Extra = (Extra + 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GoldMineBoolean[2] Equal to False
        (Goldmine_Copy <gen> contains (Triggering unit)) Equal to True
      Then - Actions
        Set VariableSet GoldMineBoolean[2] = True
        Set VariableSet Extra = (Extra + 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GoldMineBoolean[3] Equal to False
        (Goldmine_Copy_2 <gen> contains (Triggering unit)) Equal to True
      Then - Actions
        Set VariableSet GoldMineBoolean[3] = True
        Set VariableSet Extra = (Extra + 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GoldMineBoolean[4] Equal to False
        (Goldmine_Copy_3 <gen> contains (Triggering unit)) Equal to True
      Then - Actions
        Set VariableSet GoldMineBoolean[4] = True
        Set VariableSet Extra = (Extra + 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GoldMineBoolean[5] Equal to False
        (Goldmine_Copy_4 <gen> contains (Triggering unit)) Equal to True
      Then - Actions
        Set VariableSet GoldMineBoolean[5] = True
        Set VariableSet Extra = (Extra + 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GoldMineBoolean[6] Equal to False
        (Goldmine_Copy_5 <gen> contains (Triggering unit)) Equal to True
      Then - Actions
        Set VariableSet GoldMineBoolean[6] = True
        Set VariableSet Extra = (Extra + 1)
      Else - Actions
Custom Variables
  Events
    Map initialization
  Conditions
  Actions
    Game - Set Lock resource trading to On
    Set VariableSet MissionNumber = 24
    Set VariableSet SubquestsTotal = 0
    Set VariableSet BonusesTotal = 2
    Set VariableSet ExtraTotal = 6
    Set VariableSet TimeMin = 1200.00
    Set VariableSet TimeMax = 4800.00
    Set VariableSet TimeRange = (TimeMax - TimeMin)
    Set VariableSet ScoreBonuses = 40
    Set VariableSet ScoreExtra = 15
    Set VariableSet ScoreSubquests = 0
    Set VariableSet ScoreTime = 120
    Set VariableSet ScoreMax = ((SubquestsTotal x ScoreSubquests) + ((BonusesTotal x ScoreBonuses) + ((ExtraTotal x ScoreExtra) + ScoreTime)))
    Set VariableSet ScoreLimit[4] = (Integer((((Real(ScoreMax)) x 0.90) + 0.50)))
    Set VariableSet ScoreLimit[3] = (Integer((((Real(ScoreMax)) x 0.75) + 0.50)))
    Set VariableSet ScoreLimit[2] = (Integer((((Real(ScoreMax)) x 0.55) + 0.50)))
    Set VariableSet ScoreLimit[1] = (Integer((((Real(ScoreMax)) x 0.30) + 0.50)))
    -------- Items To be Saved --------
    Set VariableSet SaveLoad_Items[1] = Potion of Healing
    Set VariableSet SaveLoad_Items[2] = Potion of Greater Mana
    Set VariableSet SaveLoad_Items[3] = Scroll of Healing
    Set VariableSet SaveLoad_Items[4] = Potion of Greater Healing
    Set VariableSet SaveLoad_Items[5] = Ring of Protection +2
    Set VariableSet SaveLoad_Items[6] = Spider Ring
    Set VariableSet SaveLoad_Items[7] = Gauntlets of Ogre Strength +3
    Set VariableSet SaveLoad_Items[8] = Urn of King Terenas
    Set VariableSet SaveLoad_Items[9] = Pendant of Energy
    Set VariableSet SaveLoad_Items[10] = Voodoo Doll
    Set VariableSet SaveLoad_Items[11] = Claws of Attack +6
    Set VariableSet SaveLoad_Items[12] = Gloves of Haste
    Set VariableSet SaveLoad_Items[13] = Goblin Night Scope
    Set VariableSet SaveLoad_Items[14] = Urn of King Terenas
    Set VariableSet SaveLoad_Items[15] = Scroll of the Beast
    Set VariableSet SaveLoad_Items[16] = Health Stone
    Set VariableSet SaveLoad_Items[17] = Book of the Dead
    Set VariableSet SaveLoad_Items[18] = Scroll of Mana
    Set VariableSet SaveLoad_Items[19] = Potion of Mana
    Set VariableSet SaveLoad_Items[20] = Scroll of Protection
    Set VariableSet SaveLoad_Items[21] = Wand of Negation
    Set VariableSet SaveLoad_Items[22] = Scroll of Town Portal
    Set VariableSet SaveLoad_Items_LastIndex = 22
    -------- Leave as is. Used to autocreate variables when copy & pasting to a new map --------
    Set VariableSet SaveLoad_Alphabet = ABCDEFGHIJKLMNPQRSTUVWXYZ123456789abcdefghijklmnopqrstuvwxyz
    Set VariableSet SaveLoad_CaseSensitive = True
    Set VariableSet SaveLoad_UsePlayername = False
    -------- Required: false --------
    Set VariableSet SaveLoad_Initialized = False
    Set VariableSet Code = AceHart
    Set VariableSet Save[1] = 0
    Set VariableSet SaveCount = 1
    Set VariableSet Validate = False
    Set VariableSet SaveLoad_Compress[1] = 0
    Set VariableSet SaveLoad_Uncompress[1] = 0
Timer Trigger
  Events
    Time - Every 1.00 seconds of game time
  Conditions
    Cinematic Equal to False
  Actions
    Set VariableSet TimeSecondsTotal = (TimeSecondsTotal + 1)
    Set VariableSet 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 VariableSet TimeSeconds = (TimeSeconds - 60)
        Set VariableSet 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 VariableSet TimeMins = (TimeMins - 60)
        Set VariableSet 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 VariableSet TimeTakenString = ((((String(TimeHours)) + :0) + (String(TimeMins))) + (:0 + (String(TimeSeconds))))
          Else - Actions
            Set VariableSet 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 VariableSet TimeTakenString = ((((String(TimeHours)) + :0) + (String(TimeMins))) + (: + (String(TimeSeconds))))
          Else - Actions
            Set VariableSet TimeTakenString = ((((String(TimeHours)) + :) + (String(TimeMins))) + (: + (String(TimeSeconds))))
Setup Insane
  Events
  Conditions
  Actions
    Environment - Change terrain type at (Center of Region_098_Copy <gen>) to Cityscape - Brick using variation -1 in an area of size 2 and shape Circle
    AI - Ignore the guard positions of all Player 10 (Light Blue) units
    Unit - Hide Energy Gate 0146 <gen>
    Unit - Hide Energy Gate 0145 <gen>
    Neutral Building - Disable Energy Gate 0145 <gen>
    Neutral Building - Disable Energy Gate 0146 <gen>
    Special Effect - Create a special effect at (Center of Region_094 <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
    Set VariableSet MassTeleport[1] = (Last created special effect)
    Special Effect - Create a special effect at (Center of Region_094_Copy <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
    Set VariableSet MassTeleport[2] = (Last created special effect)
    Special Effect - Create a special effect at (Center of Region_094_Copy_2 <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
    Set VariableSet MassTeleport[3] = (Last created special effect)
    Special Effect - Create a special effect at (Center of Region_094_Copy_3 <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
    Set VariableSet MassTeleport[4] = (Last created special effect)
    Set VariableSet MissionNumber = 34
    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 3
                (Integer A) Equal to 8
                (Integer A) Equal to 10
                (Integer A) Equal to 11
                (Integer A) Equal to 12
          Then - Actions
            Player - Set the max research level of Rhde (techcode) to 1 for (Player((Integer A)))
            Player - Set the max research level of Rhme (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 Rhpt (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 Resm (techcode) to 3 for (Player((Integer A)))
            Player - Set the max research level of Rema (techcode) to 3 for (Player((Integer A)))
            Player - Set the max research level of Repb (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 Rhac (techcode) to 2 for (Player((Integer A)))
            Player - Set the current research level of Rhde (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 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 Resm (techcode) to 3 for (Player((Integer A)))
            Player - Set the current research level of Rema (techcode) to 3 for (Player((Integer A)))
            Player - Set the current research level of Repb (techcode) to 1 for (Player((Integer A)))
            Player - Set the current research level of Rhan (techcode) to 1 for (Player((Integer A)))
          Else - Actions
    Unit Group - Pick every unit in (Units of type Sky-Fury Tower) and do (Actions)
      Loop - Actions
        Unit - Replace (Picked unit) with a Sky-Fury Tower (Insane) using The old unit's relative life and mana
    Unit Group - Pick every unit in (Units of type Earth-Fury Tower) and do (Actions)
      Loop - Actions
        Unit - Replace (Picked unit) with a Earth-Fury Tower (Insane) using The old unit's relative life and mana
    Unit - Pause High Elven Barracks 0042 <gen>
    Unit Group - Pick every unit in (Units in Region_012 <gen> owned by Player 10 (Light Blue)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (Unit-type of (Picked unit)) Equal to Swordsman
                (Unit-type of (Picked unit)) Equal to Archer
                (Unit-type of (Picked unit)) Equal to Dragon Hawk
                (Unit-type of (Picked unit)) Equal to Priest
                (Unit-type of (Picked unit)) Equal to Sorceress
          Then - Actions
            Unit - Change ownership of (Picked unit) to Player 8 (Pink) and Change color
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Picked unit)) Equal to Goblin Zeppelin (AI Version)
          Then - Actions
            Unit - Remove (Picked unit) from the game
          Else - Actions
EnergyBridge
  Events
    Time - EnergyBridge expires
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        EnergyInteger Equal to 0
        (Energy Gate Controller 0147 <gen> is alive) Equal to True
      Then - Actions
        Set VariableSet EnergyInteger = 1
        Countdown Timer - Start EnergyBridge as a One-shot timer that will expire in 45.00 seconds
        Neutral Building - Enable Energy Gate 0146 <gen>
        Neutral Building - Enable Energy Gate 0145 <gen>
        Unit - Unhide Energy Gate 0146 <gen>
        Unit - Unhide Energy Gate 0145 <gen>
        Skip remaining actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        EnergyInteger Equal to 1
        (Energy Gate Controller 0147 <gen> is alive) Equal to True
      Then - Actions
        Set VariableSet EnergyInteger = 0
        Countdown Timer - Start EnergyBridge as a One-shot timer that will expire in 120.00 seconds
        Neutral Building - Disable Energy Gate 0146 <gen>
        Neutral Building - Disable Energy Gate 0145 <gen>
        Unit - Hide Energy Gate 0145 <gen>
        Unit - Hide Energy Gate 0146 <gen>
        Skip remaining actions
      Else - Actions
EnergyBridgeDies
  Events
    Unit - Energy Gate Controller 0147 <gen> Dies
  Conditions
  Actions
    Neutral Building - Disable Energy Gate 0146 <gen>
    Neutral Building - Disable Energy Gate 0145 <gen>
    Unit - Hide Energy Gate 0145 <gen>
    Unit - Hide Energy Gate 0146 <gen>
    Countdown Timer - Pause EnergyBridge
    Special Effect - Destroy MassTeleport[1]
    Special Effect - Destroy MassTeleport[2]
    Special Effect - Destroy MassTeleport[3]
    Special Effect - Destroy MassTeleport[4]
Skip Cinematic
  Events
    Player - Player 4 (Purple) skips a cinematic sequence
    Player - Player 9 (Gray) 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 VariableSet 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 9 (Gray)
        SkipVote1 Equal to False
        SkipVote2 Equal to False
      Then - Actions
        Set VariableSet SkipVote2 = True
        Game - Display to (All players) the text: ((Name of Player 9 (Gray)) + 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 VariableSet 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
            (IntroCancel <gen> is on) Equal to True
          Then - Actions
            Trigger - Run IntroCancel <gen> (checking conditions)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Victory_Cancel <gen> is on) Equal to True
          Then - Actions
            Trigger - Run Victory_Cancel <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 9 (Gray)
        SkipVote1 Equal to True
        SkipVote2 Equal to False
      Then - Actions
        Set VariableSet 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
            (IntroCancel <gen> is on) Equal to True
          Then - Actions
            Trigger - Run IntroCancel <gen> (checking conditions)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Victory_Cancel <gen> is on) Equal to True
          Then - Actions
            Trigger - Run Victory_Cancel <gen> (checking conditions)
          Else - Actions
      Else - Actions
Leaves Game
  Events
    Player - Player 4 (Purple) leaves the game
    Player - Player 9 (Gray) 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 VariableSet 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 VariableSet CampaignScore = (CampaignScore + (SubquestsComplete x ScoreSubquests))
    Set VariableSet CampaignScore = (CampaignScore + (BonusesFound x ScoreBonuses))
    Set VariableSet 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 VariableSet 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 VariableSet 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 VariableSet FinalInventory[(Integer A)] = ((Name of (Item carried by Hero1 in slot (Integer A))) + , )
          Else - Actions
            Set VariableSet 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 VariableSet FinalInventory[(Integer A)] = ((Name of (Item carried by Hero2 in slot ((Integer A) - 6))) + , )
          Else - Actions
            Set VariableSet 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 VariableSet FinalRank = |cff00ff00A|r
                    Set VariableSet RankInteger = 5
                  Else - Actions
                    Set VariableSet FinalRank = |cffccff00B|r
                    Set VariableSet RankInteger = 4
              Else - Actions
                Set VariableSet FinalRank = |cffffff00C|r
                Set VariableSet RankInteger = 3
          Else - Actions
            Set VariableSet FinalRank = |cffff0000D|r
            Set VariableSet RankInteger = 2
      Else - Actions
        Set VariableSet FinalRank = |cff990000E|r
        Set VariableSet RankInteger = 1
    Set VariableSet SaveLoad_TotalTime = (SaveLoad_TotalTime + TimeSecondsTotal)
    Set VariableSet 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 VariableSet Save[2] = (SumRank + RankInteger)
      Else - Actions
        Set VariableSet Save[2] = 0
    Set VariableSet Save[3] = (Level of Death Coil for Hero1)
    Set VariableSet Save[4] = (Level of Death Pact for Hero1)
    Set VariableSet Save[5] = (Level of Unholy Aura for Hero1)
    Set VariableSet Save[6] = (Level of Animate Dead for Hero1)
    Set VariableSet Save[7] = (Level of Tainted Blow for Hero2)
    Set VariableSet Save[8] = (Level of Blood Pledge for Hero2)
    Set VariableSet Save[9] = (Level of Runebreak for Hero2)
    Set VariableSet Save[10] = (Level of Call of the Departed for Hero2)
    Set VariableSet SaveCount = 11
    Set VariableSet 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 VariableSet SaveCount = (SaveCount + 1)
            Set VariableSet TempItem = (Item carried by Hero1 in slot (Integer A))
            Custom script: set udg_Save[udg_SaveCount] = SaveLoad_Item2Integer( udg_TempItem )
            Set VariableSet SaveCount = (SaveCount + 1)
            Set VariableSet Save[SaveCount] = (Charges remaining in (Item carried by Hero1 in slot (Integer A)))
          Else - Actions
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet 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 VariableSet SaveCount = (SaveCount + 1)
            Set VariableSet TempItem = (Item carried by Hero2 in slot (Integer A))
            Custom script: set udg_Save[udg_SaveCount] = SaveLoad_Item2Integer( udg_TempItem )
            Set VariableSet SaveCount = (SaveCount + 1)
            Set VariableSet 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 4 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 - Mines Haunted:|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 (stringnoformat) as An exact match
    Player - Player 9 (Gray) types a chat message containing -normal (stringnoformat) 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 4=-|r
    Game - Display to (All players) for 600.00 seconds the text: Key of the Three Moons
    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 VariableSet INSANEMODE = False
Startgame Text 2
  Events
    Player - Player 4 (Purple) types a chat message containing -insane (stringnoformat) as An exact match
    Player - Player 9 (Gray) types a chat message containing -insane (stringnoformat) 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 4=-|r
    Game - Display to (All players) for 600.00 seconds the text: Key of the Three Moons
    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 VariableSet INSANEMODE = True
Startgame Text 3
  Events
  Conditions
  Actions
    Game - Display to (All players) for 600.00 seconds the text: |cff7733aa-= UNDEAD CHAPTER 4=-|r
    Game - Display to (All players) for 600.00 seconds the text: Key of the Three Moons
    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 (stringnoformat) as An exact match
    Player - Player 9 (Gray) types a chat message containing -new (stringnoformat) 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 VariableSet NewVote1 = True
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Triggering player) Equal to Player 9 (Gray)
        NewVote1 Equal to False
        NewVote2 Equal to False
      Then - Actions
        Set VariableSet 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
        NewVote2 Equal to True
      Then - Actions
        Cinematic - Clear the screen of text messages for (All players).
        Set VariableSet NewVote1 = True
        Set VariableSet GameSelection = False
        Sound - Play GoodJob <gen>
        Hero - Learn skill for Hero1: Undead Death Knight - Death Coil
        Hero - Learn skill for Hero1: Undead Death Knight - Death Coil
        Hero - Learn skill for Hero1: Undead Death Knight - Unholy Aura
        Hero - Learn skill for Hero1: Undead Death Knight - Death Pact
        Hero - Learn skill for Hero2: Tainted Blow
        Hero - Learn skill for Hero2: Tainted Blow
        Hero - Learn skill for Hero2: Blood Pledge
        Hero - Learn skill for Hero2: Runebreak
        Hero - Create Urn of King Terenas and give it to Arthas
        Item - Make (Last created item) Undroppable
        Wait 1.00 seconds
        Trigger - Run Initialization <gen> (checking conditions)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            INSANEMODE Equal to True
          Then - Actions
            Trigger - Run Setup_Insane <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 9 (Gray)
        NewVote1 Equal to True
        NewVote2 Equal to False
      Then - Actions
        Cinematic - Clear the screen of text messages for (All players).
        Set VariableSet NewVote2 = True
        Set VariableSet GameSelection = False
        Sound - Play GoodJob <gen>
        Hero - Learn skill for Hero1: Undead Death Knight - Death Coil
        Hero - Learn skill for Hero1: Undead Death Knight - Death Coil
        Hero - Learn skill for Hero1: Undead Death Knight - Unholy Aura
        Hero - Learn skill for Hero1: Undead Death Knight - Death Pact
        Hero - Learn skill for Hero2: Tainted Blow
        Hero - Learn skill for Hero2: Tainted Blow
        Hero - Learn skill for Hero2: Blood Pledge
        Hero - Learn skill for Hero2: Runebreak
        Hero - Create Urn of King Terenas and give it to Arthas
        Item - Make (Last created item) Undroppable
        Wait 1.00 seconds
        Trigger - Run Initialization <gen> (checking conditions)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            INSANEMODE Equal to True
          Then - Actions
            Trigger - Run Setup_Insane <gen> (checking conditions)
          Else - Actions
      Else - Actions
Startgame Load
  Events
    Player - Player 4 (Purple) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 9 (Gray) types a chat message containing -load (stringnoformat) as A substring
  Conditions
    (Substring((Entered chat string), 1, 6)) Equal to (Matched chat string)
    (Length of (Entered chat string)) Greater than 6
    GameSelection Equal to True
    EnoughPlayers Equal to True
  Actions
    Cinematic - Clear the screen of text messages for (All players).
    -------- Try to decode what was typed --------
    Set VariableSet Code = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
    Custom script: set udg_Validate = SaveLoad_Decode( udg_Code )
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            Save[1] Equal to 23
            Save[1] Equal to 33
        Validate Equal to True
      Then - Actions
        -------- Correct Code --------
        Set VariableSet GameSelection = False
        Sound - Play GoodJob <gen>
        Trigger - Turn off (This trigger)
        Set VariableSet SumRank = Save[2]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[3] Greater than or equal to 1
          Then - Actions
            For each (Integer A) from 1 to Save[3], do (Actions)
              Loop - Actions
                Hero - Learn skill for Hero1: Undead Death Knight - Death Coil
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[4] Greater than or equal to 1
          Then - Actions
            For each (Integer A) from 1 to Save[4], do (Actions)
              Loop - Actions
                Hero - Learn skill for Hero1: Undead Death Knight - Death Pact
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[5] Greater than or equal to 1
          Then - Actions
            For each (Integer A) from 1 to Save[5], do (Actions)
              Loop - Actions
                Hero - Learn skill for Hero1: Undead Death Knight - Unholy Aura
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[6] Greater than or equal to 1
          Then - Actions
            For each (Integer A) from 1 to Save[6], do (Actions)
              Loop - Actions
                Hero - Learn skill for Hero1: Undead Death Knight - Animate Dead
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[7] Greater than or equal to 1
          Then - Actions
            For each (Integer A) from 1 to Save[7], do (Actions)
              Loop - Actions
                Hero - Learn skill for Hero2: Tainted Blow
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[8] Greater than or equal to 1
          Then - Actions
            For each (Integer A) from 1 to Save[8], do (Actions)
              Loop - Actions
                Hero - Learn skill for Hero2: Blood Pledge
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[9] Greater than or equal to 1
          Then - Actions
            For each (Integer A) from 1 to Save[9], do (Actions)
              Loop - Actions
                Hero - Learn skill for Hero2: Runebreak
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[10] Greater than or equal to 1
          Then - Actions
            For each (Integer A) from 1 to Save[10], do (Actions)
              Loop - Actions
                Hero - Learn skill for Hero2: Call of the Departed
          Else - Actions
        Set VariableSet SaveCount = 11
        For each (Integer A) from 1 to Save[SaveCount], do (Actions)
          Loop - Actions
            -------- The actual item --------
            Set VariableSet SaveCount = (SaveCount + 1)
            Custom script: set udg_TempItemType = SaveLoad_Integer2Item(udg_Save[udg_SaveCount])
            Hero - Create TempItemType and give it to Hero1
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                TempItemType Equal to Urn of King Terenas
              Then - Actions
                Item - Make (Last created item) Undroppable
              Else - Actions
            -------- Number of charges --------
            Set VariableSet SaveCount = (SaveCount + 1)
            Item - Set charges remaining in (Last created item) to Save[SaveCount]
        Set VariableSet SaveCount = (SaveCount + 1)
        For each (Integer A) from 1 to Save[SaveCount], do (Actions)
          Loop - Actions
            -------- The actual item --------
            Set VariableSet SaveCount = (SaveCount + 1)
            Custom script: set udg_TempItemType = SaveLoad_Integer2Item(udg_Save[udg_SaveCount])
            Hero - Create TempItemType and give it to Hero2
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                TempItemType Equal to Urn of King Terenas
              Then - Actions
                Item - Make (Last created item) Undroppable
              Else - Actions
            -------- Number of charges --------
            Set VariableSet SaveCount = (SaveCount + 1)
            Item - Set charges remaining in (Last created item) to Save[SaveCount]
        Wait 1.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Save[1] Equal to 33
          Then - Actions
            Set VariableSet INSANEMODE = True
            Trigger - Run Initialization <gen> (checking conditions)
            Trigger - Run Setup_Insane <gen> (checking conditions)
          Else - Actions
            Set VariableSet INSANEMODE = False
            Trigger - Run Initialization <gen> (checking conditions)
      Else - Actions
        -------- Invalid code --------
        Sound - Play Error <gen>
        Game - Display to (All players) for 600.00 seconds the text: |cff7733aa-= UNDEAD CHAPTER 4=-|r
        Game - Display to (All players) for 600.00 seconds the text: Key of the Three Moons
        Game - Display to (All players) for 600.00 seconds the text:
        Game - Display to (All players) for 600.00 seconds the text: There was an error with the code, please try again.
        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.
        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: New game is at Insane difficulty. Type '-normal' to play at a lower difficulty.
          Else - Actions
            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.
        Skip remaining actions
Research Init
  Events
    Map initialization
  Conditions
  Actions
    -------- Limits --------
    For each (Integer A) from 1 to 13, do (Actions)
      Loop - Actions
        Set VariableSet ResearchEnabledT2[(Integer A)] = True
        Set VariableSet ResearchEnabledT3[(Integer A)] = True
    Set VariableSet ResearchEnabledT3[1] = False
    Set VariableSet ResearchEnabledT3[2] = False
    Set VariableSet ResearchEnabledT3[3] = False
    Set VariableSet ResearchEnabledT3[4] = False
    Set VariableSet ResearchEnabledT2[9] = False
    -------- Graveyard --------
    Set VariableSet ResearchType[1] = Rume (techcode)
    Set VariableSet ResearchStringT1[1] = Unholy Strength
    Set VariableSet ResearchStringT2[1] = Improved Unholy Strength
    Set VariableSet ResearchStringT3[1] = Advanced Unholy Strength
    Set VariableSet ResearchType[2] = Ruar (techcode)
    Set VariableSet ResearchStringT1[2] = Unholy Armor
    Set VariableSet ResearchStringT2[2] = Improved Unholy Armor
    Set VariableSet ResearchStringT3[2] = Advanced Unholy Armor
    Set VariableSet ResearchType[3] = Rura (techcode)
    Set VariableSet ResearchStringT1[3] = Creature Attack
    Set VariableSet ResearchStringT2[3] = Improved Creature Attack
    Set VariableSet ResearchStringT3[3] = Advanced Creature Attack
    Set VariableSet ResearchType[4] = Rucr (techcode)
    Set VariableSet ResearchStringT1[4] = Creature Carapace
    Set VariableSet ResearchStringT2[4] = Improved Creature Carapace
    Set VariableSet ResearchStringT3[4] = Advanced Creature Carapace
    -------- Crypt --------
    Set VariableSet ResearchType[5] = Ruac (techcode)
    Set VariableSet ResearchStringT1[5] = Cannibalize
    Set VariableSet ResearchType[6] = Ruwb (techcode)
    Set VariableSet ResearchStringT1[6] = Web
    Set VariableSet ResearchType[7] = Rugf (techcode)
    Set VariableSet ResearchStringT1[7] = Ghoul Frenzy
    Set VariableSet ResearchType[8] = Rusf (techcode)
    Set VariableSet ResearchStringT1[8] = Stone Form
    -------- Temple of the Damned --------
    Set VariableSet ResearchType[9] = Rune (techcode)
    Set VariableSet ResearchStringT1[9] = Necromancer Adept Training
    Set VariableSet ResearchStringT2[9] = Necromancer Master Training
    Set VariableSet ResearchType[10] = Ruba (techcode)
    Set VariableSet ResearchStringT1[10] = Banshee Adept Training
    Set VariableSet ResearchStringT2[10] = Banshee Master Training
    Set VariableSet ResearchType[11] = Rusl (techcode)
    Set VariableSet ResearchStringT1[11] = Skeletal Longevity
    -------- Slaughterhouse --------
    Set VariableSet ResearchType[12] = Rupc (techcode)
    Set VariableSet ResearchStringT1[12] = Disease Cloud
    -------- Boneyard --------
    Set VariableSet ResearchType[13] = Rufb (techcode)
    Set VariableSet 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 9 (Gray)
  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 VariableSet 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 9 (Gray)
              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 9 (Gray)
  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 VariableSet 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 9 (Gray)