IF
Global("RevealMap","Zy1800",0)
THEN
RESPONSE #100
SetGlobal("RevealMap","Zy1800",1)
SetGlobal("ZyStartSampleBattlefield","GLOBAL",1)
Explore()
MoveViewObject(Player1,INSTANT)
SetGlobal("ZyORReserveSquads","GLOBAL",36)
SetGlobal("ZyELReserveSquads","GLOBAL",16)
CreateCreature("Zy1800Wl",[0.0],0) // Zy1800WP
ActionOverride("Zy1800Wl",ChangeAIScript("ZyELSPWN",RACE))
CreateCreature("Zy1800Wm",[0.0],0) // Zy1800WP
ActionOverride("Zy1800Wm",ChangeAIScript("ZyORSPWN",RACE))
CreateCreature("Zy1800Wa",[1325.750],0) // Zy1800WP
CreateCreature("Zy1800Wb",[915.740],0) // Zy1800WP
CreateCreature("Zy1800Wc",[1090.930],0) // Zy1800WP
CreateCreature("Zy1800Wd",[1580.1030],0) // Zy1800WP
CreateCreature("Zy1800We",[1320.130],0) // Zy1800WP
ActionOverride("Zy1800We",ChangeAIScript("ZyELSPWP",GENERAL))
ActionOverride("Zy1800We",ChangeAIScript("Zy1800ET",RACE))
CreateCreature("Zy1800Wf",[2270.850],0) // Zy1800WP
ActionOverride("Zy1800Wf",ChangeAIScript("ZyELSPWP",GENERAL))
ActionOverride("Zy1800Wf",ChangeAIScript("Zy1800ET",RACE))
CreateCreature("Zy1800Wg",[2265.1545],0) // Zy1800WP
ActionOverride("Zy1800Wg",ChangeAIScript("ZyORSPWP",GENERAL))
ActionOverride("Zy1800Wg",ChangeAIScript("Zy1800OT",RACE))
CreateCreature("Zy1800Wh",[190.1350],0) // Zy1800WP
ActionOverride("Zy1800Wh",ChangeAIScript("ZyORSPWP",GENERAL))
ActionOverride("Zy1800Wh",ChangeAIScript("Zy1800OT",RACE))
CreateCreature("Zy1800Wi",[150.130],0) // Zy1800WP
ActionOverride("Zy1800Wi",ChangeAIScript("ZyORSPWP",GENERAL))
ActionOverride("Zy1800Wi",ChangeAIScript("Zy1800OT",RACE))
SetGlobal("ZyELCommInField","GLOBAL",1)
CreateCreature("ZyELSQMa",[1450.630],0) // ZyELSQM
END
IF
Global("ZyYouhavedeserted","GLOBAL",1)
Global("EKSSlain","Zy1800",0)
THEN
RESPONSE #100
SetGlobal("EKSSlain","Zy1800",1)
Continue()
END
IF
Global("SpawnWarden","Zy1800",1)
THEN
RESPONSE #100
SetGlobal("SpawnWarden","Zy1800",2)
ActionOverride("Zy1800We",SetGlobalTimer("MyOwnTimer","LOCALS",EIGHTEEN_MINUTES))
ActionOverride("Zy1800Wf",SetGlobalTimer("MyOwnTimer","LOCALS",EIGHT_MINUTES))
ActionOverride("Zy1800Wg",SetGlobalTimer("MyOwnTimer","LOCALS",0))
ActionOverride("Zy1800Wh",SetGlobalTimer("MyOwnTimer","LOCALS",FIVE_ROUNDS))
ActionOverride("Zy1800Wi",SetGlobalTimer("MyOwnTimer","LOCALS",TEN_ROUNDS))
SetGlobal("ZyELCheckCommNum","GLOBAL",1)
SetGlobal("ZyORCheckCommNum","GLOBAL",1)
Continue()
END
IF
Global("WardenSlain","Zy1800",1)
Global("ZyElvesLose","Zy1800",0)
Global("ZyElvesWin","Zy1800",0)
THEN
RESPONSE #100
SetGlobal("ZyElvesLose","Zy1800",1)
SetGlobal("ZyStartSampleBattlefield","GLOBAL",2)
SetGlobal("ZyELflee","GLOBAL",1)
DisplayStringHead(Player1,183518) // The Warden has been slain and the elves are retreating!
EraseJournalEntry(183519) // Aiding Sylmar - Keep the Warden Alive Help the elven forces destroy the orcs, as many as possible, until the commanders of the Orcish army are forced to show themselves. During this period of time, you must keep the Warden of the Elves alive.
EraseJournalEntry(183520) // Aiding Sylmar - Keep the Elven King Shade Alive The mighty Elven King Arveinas, with his dancing sword Anguirel, has risen as a Shade from his burial grounds to aid you in your desperate battle. However his spirit keeps the place hallowed, and you must keep him alive in order to win the battle. The Elven King Shade may not be healed of damage.
EraseJournalEntry(183521) // Aiding Sylmar - Slay the Balrogs After having defeated countless waves of orcs, the intelligence behind the brutish army has emerged - Balrogs, fiery fell demons of great cunning and evil. Destroy the three Balrogs, but each one is fearsome and deadly, so you may wish to take them on so only with sufficient troop support.
EraseJournalEntry(183522) // Aiding Sylmar - Elven Squad Reserves Depleted The reserve squads of the elves have been depleted, and henceforth new allied squads will enter the battlefield at a very slow rate. To have any hope of winning at all, you will need to conserve your troops better and keep the elven squad commanders alive.
EraseJournalEntry(183523) // Aiding Sylmar - Orcish Squad Reserves Depleted The reserve squads of the orcs have been depleted, and henceforth new enemy squads will enter the battlefield at a very slow rate. This would be the time to push forward and use your superior numbers to overwhelm the enemy, possibly by luring them to your gathering points.
AddJournalEntry(183524,QUEST_DONE) // Aiding the Sylmar Elves - Warden Slain With the death of the Elven leader, the elves rapidly retreat, leaving the orcs to desecrate the sacred grounds.
AddXPObject(Player1,-60000)
AddXPObject(Player2,-60000)
AddXPObject(Player3,-60000)
AddXPObject(Player4,-60000)
AddXPObject(Player5,-60000)
AddXPObject(Player6,-60000)
ReputationInc(-1)
END
IF
Global("ZyELCheckCommNum","GLOBAL",1)
GlobalGT("ZyELCommInField","GLOBAL",2)
THEN
RESPONSE #100
SetGlobal("ZyELCheckCommNum","GLOBAL",0)
SetGlobal("ZyELNeedMoreComm","GLOBAL",0)
Continue()
END
IF
Global("ZyELCheckCommNum","GLOBAL",1)
!GlobalGT("ZyELCommInField","GLOBAL",2)
THEN
RESPONSE #100
SetGlobal("ZyELCheckCommNum","GLOBAL",0)
SetGlobal("ZyELNeedMoreComm","GLOBAL",1)
Continue()
END
IF
Global("ZyORCheckCommNum","GLOBAL",1)
GlobalGT("ZyORCommInField","GLOBAL",6)
THEN
RESPONSE #100
SetGlobal("ZyORCheckCommNum","GLOBAL",0)
SetGlobal("ZyORNeedMoreComm","GLOBAL",0)
Continue()
END
IF
Global("ZyORCheckCommNum","GLOBAL",1)
!GlobalGT("ZyORCommInField","GLOBAL",6)
THEN
RESPONSE #100
SetGlobal("ZyORCheckCommNum","GLOBAL",0)
SetGlobal("ZyORNeedMoreComm","GLOBAL",1)
Continue()
END
IF
Global("RevealMap","Zy1800",1)
GlobalLT("ZyORReserveSquads","GLOBAL",28)
GlobalLT("ZyORWarning","Zy1800",1)
THEN
RESPONSE #100
SetGlobal("ZyORWarning","Zy1800",1)
DisplayStringHead(Player1,183508) // Three quarters of the orcish army remains in reserve.
END
IF
Global("RevealMap","Zy1800",1)
GlobalLT("ZyORReserveSquads","GLOBAL",19)
GlobalLT("ZyORWarning","Zy1800",2)
THEN
RESPONSE #100
SetGlobal("ZyORWarning","Zy1800",2)
DisplayStringHead(Player1,183509) // Half of the orcish army remains in reserve.
END
IF
Global("RevealMap","Zy1800",1)
GlobalLT("ZyORReserveSquads","GLOBAL",10)
GlobalLT("ZyORWarning","Zy1800",3)
THEN
RESPONSE #100
SetGlobal("ZyORWarning","Zy1800",3)
DisplayStringHead(Player1,183510) // Only a quarter of the orcish army remains in reserve.
CreateCreature("Zy1800Wk",[150.130],0) // Zy1800WP
ActionOverride("Zy1800Wk",ChangeAIScript("ZyORLDSP",GENERAL))
CreateCreature("Zy1800Wn",[2265.1545],0) // Zy1800WP
ActionOverride("Zy1800Wn",ChangeAIScript("ZyORLDSP",GENERAL))
CreateCreature("Zy1800Wo",[190.1550],0) // Zy1800WP
ActionOverride("Zy1800Wo",ChangeAIScript("ZyORLDSP",GENERAL))
CreateCreature("ZyObserv",[150.130],0) // No such index
ActionOverride("Zy1800Wk",SetGlobal("SpawnSquadLeader","LOCALS",12))
END
IF
Global("SetBalrogDialog","Zy1800",1)
THEN
RESPONSE #100
SetGlobal("SetBalrogDialog","Zy1800",2)
CreateCreature("ZyObserv",[2265.1545],0) // No such index
ActionOverride("Zy1800Wn",SetGlobal("SpawnSquadLeader","LOCALS",12))
END
IF
Global("SetBalrogDialog","Zy1800",3)
THEN
RESPONSE #100
SetGlobal("SetBalrogDialog","Zy1800",4)
CreateCreature("ZyObserv",[190.1550],0) // No such index
ActionOverride("Zy1800Wo",SetGlobal("SpawnSquadLeader","LOCALS",12))
END
IF
Global("RevealMap","Zy1800",1)
GlobalLT("ZyORReserveSquads","GLOBAL",1)
GlobalLT("ZyORWarning","Zy1800",4)
THEN
RESPONSE #100
SetGlobal("ZyORWarning","Zy1800",4)
DisplayStringHead(Player1,183511) // All nearby orcish squads have been deployed.
AddJournalEntry(183523,QUEST) // Aiding Sylmar - Orcish Squad Reserves Depleted The reserve squads of the orcs have been depleted, and henceforth new enemy squads will enter the battlefield at a very slow rate. This would be the time to push forward and use your superior numbers to overwhelm the enemy, possibly by luring them to your gathering points.
END
IF
GlobalGT("SetBalrogDialog","Zy1800",10)
Global("ZyElvesWin","Zy1800",0)
Global("ZyElvesLose","Zy1800",0)
THEN
RESPONSE #100
SetGlobal("ZyElvesWin","Zy1800",1)
SetGlobal("ZyStartSampleBattlefield","GLOBAL",2)
SetGlobal("ZyORflee","GLOBAL",1)
SetGlobal("ZyORReserveSquads","GLOBAL",0)
DisplayStringHead(Player1,183525) // The Balrogs have been slain and the elves have won!
AddXPObject(Player1,112500)
AddXPObject(Player2,112500)
AddXPObject(Player3,112500)
AddXPObject(Player4,112500)
AddXPObject(Player5,112500)
AddXPObject(Player6,112500)
ReputationInc(2)
END
IF
Global("RevealMap","Zy1800",1)
GlobalLT("ZyELReserveSquads","GLOBAL",13)
GlobalLT("ZyELWarning","Zy1800",1)
THEN
RESPONSE #100
SetGlobal("ZyELWarning","Zy1800",1)
DisplayStringHead(Player1,183512) // Three quarters of the elven army remains in reserve.
END
IF
Global("RevealMap","Zy1800",1)
GlobalLT("ZyELReserveSquads","GLOBAL",9)
GlobalLT("ZyELWarning","Zy1800",2)
THEN
RESPONSE #100
SetGlobal("ZyELWarning","Zy1800",2)
DisplayStringHead(Player1,183513) // Half of the elven army remains in reserve.
END
IF
Global("RevealMap","Zy1800",1)
GlobalLT("ZyELReserveSquads","GLOBAL",5)
GlobalLT("ZyELWarning","Zy1800",3)
THEN
RESPONSE #100
SetGlobal("ZyELWarning","Zy1800",3)
DisplayStringHead(Player1,183514) // Only a quarter of the elven army remains in reserve.
CreateCreature("Zy1800Wj",[1535.575],0) // Zy1800WP
ActionOverride("Zy1800Wj",ChangeAIScript("ZyELLDSP",GENERAL))
ActionOverride("Zy1800Wj",SetGlobal("SpawnSquadLeader","LOCALS",12))
END
IF
Global("EKSSlain","Zy1800",1)
Global("EKSHere","Zy1800",1)
Global("ZyElvesLose","Zy1800",0)
Global("ZyElvesWin","Zy1800",0)
THEN
RESPONSE #100
SetGlobal("ZyElvesLose","Zy1800",1)
SetGlobal("ZyStartSampleBattlefield","GLOBAL",2)
SetGlobal("EKSSlain","Zy1800",2)
SetGlobal("ZyELflee","GLOBAL",1)
DisplayStringHead(Player1,183526) // The Elven King Shade has been slain and the elves are retreating!
AddXPObject(Player1,-90000)
AddXPObject(Player2,-90000)
AddXPObject(Player3,-90000)
AddXPObject(Player4,-90000)
AddXPObject(Player5,-90000)
AddXPObject(Player6,-90000)
ReputationInc(-1)
END
IF
Global("RevealMap","Zy1800",1)
GlobalLT("ZyELReserveSquads","GLOBAL",1)
GlobalLT("ZyELWarning","Zy1800",4)
THEN
RESPONSE #100
SetGlobal("ZyELWarning","Zy1800",4)
DisplayStringHead(Player1,183515) // All nearby elven squads have been deployed.
AddJournalEntry(183522,QUEST) // Aiding Sylmar - Elven Squad Reserves Depleted The reserve squads of the elves have been depleted, and henceforth new allied squads will enter the battlefield at a very slow rate. To have any hope of winning at all, you will need to conserve your troops better and keep the elven squad commanders alive.
END
IF
Global("w_mmaze","GLOBAL",2)
CombatCounter(0)
!RealGlobalTimerNotExpired("w_mmazet","GLOBAL")
THEN
RESPONSE #100
SetGlobal("w_mmaze","GLOBAL",0)
ApplySpellRES("W_MFREE","W_MULE") // No such index
END