Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
(6)EmeraldShores.w3x
Variables
Initialization
Upgrade
Player 1
CheckTownhall
Dialog button 1
Dialog button 2
Dialog button 3
Dialog button 4
Dialog button 5
Dialog button 6
Random Race
Init Done
Race Create
Melee Initialization
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
Dialog
dialog
Yes
DialogB
button
Yes
Num
integer
No
Number
integer
No
Player
player
No
Race
race
Yes
StrRace
string
No
Timer
timer
No
Upgrade
Events
Unit - A unit Finishes research
Conditions
(Researched tech-type) Equal to R00A (Unexpected type: 'techcode')
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current research level of R00F (Unexpected type: 'techcode') for (Owner of (Researching unit))) Equal to 0
Then - Actions
Player - Set the current research level of R00F (Unexpected type: 'techcode') to 1 for (Owner of (Researching unit))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current research level of R00G (Unexpected type: 'techcode') for (Owner of (Researching unit))) Equal to 0
Then - Actions
Player - Set the current research level of R00G (Unexpected type: 'techcode') to 1 for (Owner of (Researching unit))
Else - Actions
Player - Set the current research level of R00H (Unexpected type: 'techcode') to 1 for (Owner of (Researching unit))
Player 1
Events
Player - Player 1 (Red) leaves the game with a defeat
Player - Player 2 (Blue) leaves the game with a defeat
Player - Player 3 (Teal) leaves the game with a defeat
Player - Player 4 (Purple) leaves the game with a defeat
Player - Player 5 (Yellow) leaves the game with a defeat
Player - Player 6 (Orange) leaves the game with a defeat
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player 1 (Red) slot status) Equal to Has left the game) or ((Player 1 (Red) slot status) Equal to Is unused)
((Player 2 (Blue) slot status) Equal to Has left the game) or ((Player 2 (Blue) slot status) Equal to Is unused)
((Player 3 (Teal) slot status) Equal to Has left the game) or ((Player 3 (Teal) slot status) Equal to Is unused)
((Player 4 (Purple) slot status) Equal to Has left the game) or ((Player 4 (Purple) slot status) Equal to Is unused)
((Player 5 (Yellow) slot status) Equal to Has left the game) or ((Player 5 (Yellow) slot status) Equal to Is unused)
Then - Actions
Game - Victory Player 6 (Orange) ( Show dialogs, Show scores)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player 1 (Red) slot status) Equal to Has left the game) or ((Player 1 (Red) slot status) Equal to Is unused)
((Player 2 (Blue) slot status) Equal to Has left the game) or ((Player 2 (Blue) slot status) Equal to Is unused)
((Player 3 (Teal) slot status) Equal to Has left the game) or ((Player 3 (Teal) slot status) Equal to Is unused)
((Player 4 (Purple) slot status) Equal to Has left the game) or ((Player 4 (Purple) slot status) Equal to Is unused)
((Player 6 (Orange) slot status) Equal to Has left the game) or ((Player 6 (Orange) slot status) Equal to Is unused)
Then - Actions
Game - Victory Player 5 (Yellow) ( Show dialogs, Show scores)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player 1 (Red) slot status) Equal to Has left the game) or ((Player 1 (Red) slot status) Equal to Is unused)
((Player 2 (Blue) slot status) Equal to Has left the game) or ((Player 2 (Blue) slot status) Equal to Is unused)
((Player 3 (Teal) slot status) Equal to Has left the game) or ((Player 3 (Teal) slot status) Equal to Is unused)
((Player 5 (Yellow) slot status) Equal to Has left the game) or ((Player 5 (Yellow) slot status) Equal to Is unused)
((Player 6 (Orange) slot status) Equal to Has left the game) or ((Player 6 (Orange) slot status) Equal to Is unused)
Then - Actions
Game - Victory Player 4 (Purple) ( Show dialogs, Show scores)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player 1 (Red) slot status) Equal to Has left the game) or ((Player 1 (Red) slot status) Equal to Is unused)
((Player 2 (Blue) slot status) Equal to Has left the game) or ((Player 2 (Blue) slot status) Equal to Is unused)
((Player 4 (Purple) slot status) Equal to Has left the game) or ((Player 4 (Purple) slot status) Equal to Is unused)
((Player 5 (Yellow) slot status) Equal to Has left the game) or ((Player 5 (Yellow) slot status) Equal to Is unused)
((Player 6 (Orange) slot status) Equal to Has left the game) or ((Player 6 (Orange) slot status) Equal to Is unused)
Then - Actions
Game - Victory Player 3 (Teal) ( Show dialogs, Show scores)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player 1 (Red) slot status) Equal to Has left the game) or ((Player 1 (Red) slot status) Equal to Is unused)
((Player 3 (Teal) slot status) Equal to Has left the game) or ((Player 3 (Teal) slot status) Equal to Is unused)
((Player 4 (Purple) slot status) Equal to Has left the game) or ((Player 4 (Purple) slot status) Equal to Is unused)
((Player 5 (Yellow) slot status) Equal to Has left the game) or ((Player 5 (Yellow) slot status) Equal to Is unused)
((Player 6 (Orange) slot status) Equal to Has left the game) or ((Player 6 (Orange) slot status) Equal to Is unused)
Then - Actions
Game - Victory Player 2 (Blue) ( Show dialogs, Show scores)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player 2 (Blue) slot status) Equal to Has left the game) or ((Player 2 (Blue) slot status) Equal to Is unused)
((Player 3 (Teal) slot status) Equal to Has left the game) or ((Player 3 (Teal) slot status) Equal to Is unused)
((Player 4 (Purple) slot status) Equal to Has left the game) or ((Player 4 (Purple) slot status) Equal to Is unused)
((Player 5 (Yellow) slot status) Equal to Has left the game) or ((Player 5 (Yellow) slot status) Equal to Is unused)
((Player 6 (Orange) slot status) Equal to Has left the game) or ((Player 6 (Orange) slot status) Equal to Is unused)
Then - Actions
Game - Victory Player 1 (Red) ( Show dialogs, Show scores)
Else - Actions
CheckTownhall
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A structure) Equal to True
Actions
If ((Count structures controlled by (Owner of (Triggering unit)) (Exclude incomplete structures)) Less than or equal to 1) then do (Defeat (Owner of (Triggering unit)) with the message: Defeat!) else do (Do nothing)
Dialog button 1
Events
Dialog - A dialog button is clicked for Dialog[1]
Conditions
Actions
Set Variable Set Number = "1"
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogB[Number]
Then - Actions
Set Variable Set Race[Number] = Demon
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Else - Actions
Set Variable Set Race[Number] = (Race of (Player(Number)))
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Cinematic - Disable user control for (All players controlled by a ((Player(Number)) controller) player) .
Dialog - Hide Dialog[Number] for (Player(Number))
Dialog button 2
Events
Dialog - A dialog button is clicked for Dialog[2]
Conditions
Actions
Set Variable Set Number = "2"
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogB[Number]
Then - Actions
Set Variable Set Race[Number] = Demon
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Else - Actions
Set Variable Set Race[Number] = (Race of (Player(Number)))
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Cinematic - Disable user control for (All players controlled by a ((Player(Number)) controller) player) .
Dialog - Hide Dialog[Number] for (Player(Number))
Dialog button 3
Events
Dialog - A dialog button is clicked for Dialog[3]
Conditions
Actions
Set Variable Set Number = "3"
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogB[Number]
Then - Actions
Set Variable Set Race[Number] = Demon
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Else - Actions
Set Variable Set Race[Number] = (Race of (Player(Number)))
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Cinematic - Disable user control for (All players controlled by a ((Player(Number)) controller) player) .
Dialog - Hide Dialog[Number] for (Player(Number))
Dialog button 4
Events
Dialog - A dialog button is clicked for Dialog[4]
Conditions
Actions
Set Variable Set Number = "4"
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogB[Number]
Then - Actions
Set Variable Set Race[Number] = Demon
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Else - Actions
Set Variable Set Race[Number] = (Race of (Player(Number)))
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Cinematic - Disable user control for (All players controlled by a ((Player(Number)) controller) player) .
Dialog - Hide Dialog[Number] for (Player(Number))
Dialog button 5
Events
Dialog - A dialog button is clicked for Dialog[5]
Conditions
Actions
Set Variable Set Number = "5"
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogB[Number]
Then - Actions
Set Variable Set Race[Number] = Demon
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Else - Actions
Set Variable Set Race[Number] = (Race of (Player(Number)))
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Cinematic - Disable user control for (All players controlled by a ((Player(Number)) controller) player) .
Dialog - Hide Dialog[Number] for (Player(Number))
Dialog button 6
Events
Dialog - A dialog button is clicked for Dialog[6]
Conditions
Actions
Set Variable Set Number = "6"
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogB[Number]
Then - Actions
Set Variable Set Race[Number] = Demon
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Else - Actions
Set Variable Set Race[Number] = (Race of (Player(Number)))
Set Variable Set Player = (Player(Number))
Trigger - Run Race_Create <gen> (checking conditions)
Cinematic - Disable user control for (All players controlled by a ((Player(Number)) controller) player) .
Dialog - Hide Dialog[Number] for (Player(Number))
Random Race
Events
Conditions
Actions
Set Variable Set Number = (Random integer number between 1 and 5)
If (Number Equal to 1) then do (Set VariableSet Race[(Player number of Player)] = Human) else do (Do nothing)
If (Number Equal to 2) then do (Set VariableSet Race[(Player number of Player)] = Orc) else do (Do nothing)
If (Number Equal to 3) then do (Set VariableSet Race[(Player number of Player)] = Undead) else do (Do nothing)
If (Number Equal to 4) then do (Set VariableSet Race[(Player number of Player)] = Night Elf) else do (Do nothing)
If (Number Equal to 5) then do (Set VariableSet Race[(Player number of Player)] = Demon) else do (Do nothing)
Init Done
Events
Time - Timer expires
Conditions
Actions
Countdown Timer - Hide (Last created timer window)
For each (Integer A) from 1 to 6 , do (Actions)
Loop - Actions
Set Variable Set Player = (Player((Integer A)))
Player - Set Player . Available free Heroes to 1
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player controller) Equal to Computer
Then - Actions
If (Race[(Player number of Player)] Equal to Human) then do (Start campaign AI script for Player: war3mapImported\Human.ai (Unexpected type: 'aiscript')) else do (Do nothing)
If (Race[(Player number of Player)] Equal to Orc) then do (Start campaign AI script for Player: war3mapImported\Orc.ai (Unexpected type: 'aiscript')) else do (Do nothing)
If (Race[(Player number of Player)] Equal to Undead) then do (Start campaign AI script for Player: war3mapImported\Undead.ai (Unexpected type: 'aiscript')) else do (Do nothing)
If (Race[(Player number of Player)] Equal to Night Elf) then do (Start campaign AI script for Player: war3mapImported\NightElf.ai (Unexpected type: 'aiscript')) else do (Do nothing)
If (Race[(Player number of Player)] Equal to Demon) then do (Start campaign AI script for Player: war3mapImported\Naga.ai (Unexpected type: 'aiscript')) else do (Do nothing)
Else - Actions
Melee Game - Set starting resources (for all players)
Cinematic - Enable user control for (All players controlled by a User player) .
Race Create
Events
Conditions
Actions
If ((Player controller) Equal to Computer) then do (Run Random_Race <gen> (ignoring conditions)) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Race[(Player number of Player)] Equal to Demon
Then - Actions
Unit - Create 1 . Temple of Tides for Player at (Player start location) facing Default building facing degrees
Unit - Create 5 . Mur'gul Slave for Player at (Player start location) facing Default building facing degrees
Else - Actions
Melee Game - Create Race[(Player number of Player)] starting units for Player at (Player start location) ( Exclude Heroes)
Default melee game initialization for all players
Melee Initialization
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Countdown Timer - Start Timer as a One-shot timer that will expire in 10.00 seconds
Countdown Timer - Create a timer window for Timer with title Game Starts In....
Countdown Timer - Show (Last created timer window)
Melee Game - Use melee time of day (for all players)
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
Melee Game - Remove creeps and critters from used start locations (for all players)
For each (Integer A) from 1 to 6 , do (Actions)
Loop - Actions
Player - Limit training of Naga Tidelord to 1 for (Player((Integer A)))
Player - Limit training of Mur'gul Stormweaver to 1 for (Player((Integer A)))
Player - Limit training of Naga Siren Queen to 1 for (Player((Integer A)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) controller) Equal to Computer
Then - Actions
Set Variable Set Player = (Player((Integer A)))
Trigger - Run Race_Create <gen> (checking conditions)
Else - Actions
Dialog - Create a dialog button for Dialog[(Integer A)] labelled Stay as Chosen Race
Dialog - Create a dialog button for Dialog[(Integer A)] labelled Play as Naga
Set Variable Set DialogB[(Integer A)] = (Last created dialog Button)
Dialog - Change the title of Dialog[(Integer A)] to Change Race
Dialog - Show Dialog[(Integer A)] for (Player((Integer A)))
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.