1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Baltic Crusades.w3x
Variables
Initialization
Melee Initialization
Resources
Player starting wealth
Player starting wood
Capture settlements
Invulnerable Destructibles
Text
Units
Morale
Unit decrease Mana
Unit Increase Mana
Flee
Unit Timer
Zooming
Press Right
Release Right
Press Left
Release Left
Press Up
Release Up
Press Down
Release Down
Adjust Camera
Ally System
Setup
Ally
War
City Capture System
Settlement capture
Dock capture
Tax System
Annual tax
Annual wood
Map information
Ally dialog 1
Ally dialog 2
Ally dialog 3
Tax double
tax
add tax
Mongol Invasion
Raid
Union of Kalmar
Scandinavia
Black Screen
Fade
Arrows
Mana loss
Quests
Quest
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
Ally_Command string No
Ally_Dialog_Button button Yes
Ally_Request integer Yes
AllyDialog dialog Yes
Cart_amount integer Yes
Carters_Building_ID integer No
Color string Yes
DialogOn boolean Yes
Disable_Cam_For_Arrow_Keys location No
Down_Pressed_Player boolean Yes
Left_Pressed_Player boolean Yes
location1 rect No
MS_constant_loss boolean Yes
MS_general unit Yes
MS_mana_gain real No
MS_mana_lost real No
numberOfBuildings integer Yes
NumberOfPlayers integer No
PlayerGroup force No
PlayerName string Yes
plNR integer No
point location No
Reply_Ally_Dialog_Button button Yes
Right_Pressed_Player boolean Yes
settlements unit No UnitNull
Size_Large integer Yes
Size_Small integer Yes
String string No
Temp_Group group No
Temp_Group_2 group No
Temp_Group_3 group No
Temp_loc location No
Temp_point location No
TempLoc location No
TempNr integer No
Unally_Command string No
Units_Without_Mana group No
Up_Pressed_Player boolean Yes
Your_Unit unit No UnitNull
Default melee game initialization for all players
Melee Initialization
  Events
    Map initialization
  Conditions
  Actions
    Melee Game - Limit Heroes to 1 per Hero-type (for all players)
    Game - Set the time of day to 12
    Game - Set time of day speed to 0.00% of the default speed
    Melee Game - Run melee AI scripts (for computer players)
    Melee Game - Enforce victory/defeat conditions (for all players)
Player starting wealth
  Events
    Map initialization
  Conditions
  Actions
    Player - Set Player 1 (Red) Current gold to 14000
    Player - Set Player 2 (Blue) Current gold to 8000
    Player - Set Player 3 (Teal) Current gold to 5000
    Player - Set Player 4 (Purple) Current gold to 7000
    Player - Set Player 5 (Yellow) Current gold to 28000
    Player - Set Player 7 (Green) Current gold to 23000
    Player - Set Player 8 (Pink) Current gold to 16000
    Player - Set Player 9 (Gray) Current gold to 20000
Player starting wood
  Events
    Map initialization
  Conditions
  Actions
    Player - Set Player 1 (Red) Current lumber to 5000
    Player - Set Player 2 (Blue) Current lumber to 8000
    Player - Set Player 3 (Teal) Current lumber to 7000
    Player - Set Player 4 (Purple) Current lumber to 4000
    Player - Set Player 5 (Yellow) Current lumber to 10000
    Player - Set Player 7 (Green) Current lumber to 17000
    Player - Set Player 8 (Pink) Current lumber to 21000
    Player - Set Player 9 (Gray) Current lumber to 6000
Below unit description

Attack (damage base)
Defence (defence base)
Armour (hit points)
Morale

Teutonic-Pikeman, Squire (gondor shieldbearer), Sword Brother (gondor soldier), Crusader, Cranequinier, Cleric (monk), Teutonic Knight, Half Brother (Captain), Lancer
Danish- Voulgier
Unit decrease Mana
  Events
    Unit - A unit Dies
  Conditions
  Actions
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Owner of (Triggering unit)) Equal to (Player((Integer A)))
          Then - Actions
            Custom script: set bj_wantDestroyGroup = true
            Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Actions)
              Loop - Actions
                Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 5.00)
          Else - Actions
Unit Increase Mana
  Events
    Unit - A unit Dies
  Conditions
  Actions
    Unit - Set mana of (Killing unit) to ((Mana of (Killing unit)) + 5.00)
Flee
  Events
    Time - Every 0.30 seconds of game time
  Conditions
  Actions
    Custom script: set bj_wantDestroyGroup = true
    Set Units_Without_Mana = (Units in (Playable map area) matching (((Mana of (Matching unit)) Less than or equal to 1.00) and ((Custom value of (Matching unit)) Equal to 0)))
    Unit Group - Pick every unit in Units_Without_Mana and do (Actions)
      Loop - Actions
        Unit - Set the custom value of (Picked unit) to 5
        Unit - Order (Picked unit) to Stop
        Set TempLoc = (Random point in (Playable map area))
        Unit - Order (Picked unit) to Move To TempLoc
        Custom script: call RemoveLocation(udg_TempLoc)
Unit Timer
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Custom value of (Picked unit)) Not equal to 0
          Then - Actions
            Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)
          Else - Actions
Press Right
  Events
    Player - Player 1 (Red) Presses the Right Arrow key
    Player - Player 2 (Blue) Presses the Right Arrow key
    Player - Player 3 (Teal) Presses the Right Arrow key
    Player - Player 4 (Purple) Presses the Right Arrow key
    Player - Player 5 (Yellow) Presses the Right Arrow key
    Player - Player 7 (Green) Presses the Right Arrow key
    Player - Player 8 (Pink) Presses the Right Arrow key
    Player - Player 8 (Pink) Presses the Right Arrow key
  Conditions
  Actions
    Set Right_Pressed_Player[(Player number of (Triggering player))] = True
Release Right
  Events
    Player - Player 1 (Red) Releases the Right Arrow key
    Player - Player 2 (Blue) Releases the Right Arrow key
    Player - Player 3 (Teal) Releases the Right Arrow key
    Player - Player 4 (Purple) Releases the Right Arrow key
    Player - Player 5 (Yellow) Releases the Right Arrow key
    Player - Player 7 (Green) Releases the Right Arrow key
    Player - Player 8 (Pink) Releases the Right Arrow key
    Player - Player 9 (Gray) Releases the Right Arrow key
  Conditions
  Actions
    Set Right_Pressed_Player[(Player number of (Triggering player))] = False
Press Left
  Events
    Player - Player 1 (Red) Presses the Left Arrow key
    Player - Player 2 (Blue) Presses the Left Arrow key
    Player - Player 3 (Teal) Presses the Left Arrow key
    Player - Player 4 (Purple) Presses the Left Arrow key
    Player - Player 5 (Yellow) Presses the Left Arrow key
    Player - Player 7 (Green) Presses the Left Arrow key
    Player - Player 8 (Pink) Presses the Left Arrow key
    Player - Player 9 (Gray) Presses the Left Arrow key
  Conditions
  Actions
    Set Left_Pressed_Player[(Player number of (Triggering player))] = True
Release Left
  Events
    Player - Player 1 (Red) Releases the Left Arrow key
    Player - Player 2 (Blue) Releases the Left Arrow key
    Player - Player 3 (Teal) Releases the Left Arrow key
    Player - Player 4 (Purple) Releases the Left Arrow key
    Player - Player 5 (Yellow) Releases the Left Arrow key
    Player - Player 7 (Green) Releases the Left Arrow key
    Player - Player 8 (Pink) Releases the Left Arrow key
    Player - Player 9 (Gray) Releases the Left Arrow key
  Conditions
  Actions
    Set Left_Pressed_Player[(Player number of (Triggering player))] = False
Press Up
  Events
    Player - Player 1 (Red) Presses the Up Arrow key
    Player - Player 2 (Blue) Presses the Up Arrow key
    Player - Player 3 (Teal) Presses the Up Arrow key
    Player - Player 4 (Purple) Presses the Up Arrow key
    Player - Player 5 (Yellow) Presses the Up Arrow key
    Player - Player 7 (Green) Presses the Up Arrow key
    Player - Player 8 (Pink) Presses the Up Arrow key
    Player - Player 9 (Gray) Presses the Up Arrow key
  Conditions
  Actions
    Set Up_Pressed_Player[(Player number of (Triggering player))] = True
Release Up
  Events
    Player - Player 1 (Red) Releases the Up Arrow key
    Player - Player 2 (Blue) Releases the Up Arrow key
    Player - Player 3 (Teal) Releases the Up Arrow key
    Player - Player 4 (Purple) Releases the Up Arrow key
    Player - Player 5 (Yellow) Releases the Up Arrow key
    Player - Player 7 (Green) Releases the Up Arrow key
    Player - Player 8 (Pink) Releases the Up Arrow key
    Player - Player 9 (Gray) Releases the Up Arrow key
  Conditions
  Actions
    Set Up_Pressed_Player[(Player number of (Triggering player))] = False
Press Down
  Events
    Player - Player 1 (Red) Presses the Down Arrow key
    Player - Player 2 (Blue) Presses the Down Arrow key
    Player - Player 3 (Teal) Presses the Down Arrow key
    Player - Player 4 (Purple) Presses the Down Arrow key
    Player - Player 5 (Yellow) Presses the Down Arrow key
    Player - Player 7 (Green) Presses the Down Arrow key
    Player - Player 8 (Pink) Presses the Down Arrow key
    Player - Player 9 (Gray) Presses the Down Arrow key
  Conditions
  Actions
    Set Down_Pressed_Player[(Player number of (Triggering player))] = True
Release Down
  Events
    Player - Player 1 (Red) Releases the Down Arrow key
    Player - Player 2 (Blue) Releases the Down Arrow key
    Player - Player 3 (Teal) Releases the Down Arrow key
    Player - Player 4 (Purple) Releases the Down Arrow key
    Player - Player 5 (Yellow) Releases the Down Arrow key
    Player - Player 7 (Green) Releases the Down Arrow key
    Player - Player 8 (Pink) Releases the Down Arrow key
    Player - Player 9 (Gray) Releases the Down Arrow key
  Conditions
  Actions
    Set Down_Pressed_Player[(Player number of (Triggering player))] = False
Adjust Camera
  Events
    Time - Every 0.01 seconds of game time
  Conditions
  Actions
    Set Disable_Cam_For_Arrow_Keys = (Target of (Current camera))
    For each (Integer A) from 1 to 10, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Up_Pressed_Player[(Integer A)] Equal to True
          Then - Actions
            Camera - Set (Player((Integer A)))'s camera Distance to target to ((Distance to target of (Current camera)) - 100.00) over 0.10 seconds
            Camera - Pan camera for (Player((Integer A))) to Disable_Cam_For_Arrow_Keys over 0 seconds
            Custom script: call RemoveLocation(udg_Disable_Cam_For_Arrow_Keys)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Down_Pressed_Player[(Integer A)] Equal to True
              Then - Actions
                Camera - Set (Player((Integer A)))'s camera Distance to target to ((Distance to target of (Current camera)) + 100.00) over 0.10 seconds
                Camera - Pan camera for (Player((Integer A))) to Disable_Cam_For_Arrow_Keys over 0 seconds
                Custom script: call RemoveLocation(udg_Disable_Cam_For_Arrow_Keys)
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    Left_Pressed_Player[(Integer A)] Equal to True
                  Then - Actions
                    Camera - Pan camera for (Player((Integer A))) to Disable_Cam_For_Arrow_Keys over 0 seconds
                    Custom script: call RemoveLocation(udg_Disable_Cam_For_Arrow_Keys)
                  Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        Right_Pressed_Player[(Integer A)] Equal to True
                      Then - Actions
                        Camera - Pan camera for (Player((Integer A))) to Disable_Cam_For_Arrow_Keys over 0 seconds
                        Custom script: call RemoveLocation(udg_Disable_Cam_For_Arrow_Keys)
                      Else - Actions
Setup
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    -------- Edit if you must. --------
    Set NumberOfPlayers = 9
    Set Ally_Command = -ally
    Set Unally_Command = -war
    Set Color[1] = red
    Set Color[2] = blue
    Set Color[3] = teal
    Set Color[4] = purple
    Set Color[5] = yellow
    Set Color[6] = orange
    Set Color[7] = green
    Set Color[8] = pink
    Set Color[9] = gray
    Set Color[10] = light blue
    Set Color[11] = dark green
    Set Color[12] = brown
    For each (Integer A) from 1 to NumberOfPlayers, do (Actions)
      Loop - Actions
        Set PlayerName[(Integer A)] = (String((Name of (Player((Integer A))))) as Lower case)
    For each (Integer A) from 1 to NumberOfPlayers, do (Actions)
      Loop - Actions
        Trigger - Add to Ally <gen> the event ((Player((Integer A))) types a chat message containing Ally_Command as A substring)
        Trigger - Add to War <gen> the event ((Player((Integer A))) types a chat message containing Unally_Command as A substring)
Ally
  Events
  Conditions
  Actions
    -------- DO NOT EDIT ANYTHING BELOW THIS LINE IF YOU DO NOT KNOW WHAT YOU'RE DOING --------
    Set String = (String((Entered chat string)) as Lower case)
    For each (Integer A) from 1 to NumberOfPlayers, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            String Equal to ((Ally_Command + ) + (String((Integer A))))
          Then - Actions
            Player - Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision
            Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cff00FF00has declared an alliance with |r + ((Name of (Player((Integer A)))) + !)))
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                String Equal to ((Ally_Command + ) + PlayerName[(Integer A)])
              Then - Actions
                Player - Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision
                Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cff00FF00has declared an alliance with |r + ((Name of (Player((Integer A)))) + !)))
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    String Equal to ((Ally_Command + ) + Color[(Integer A)])
                  Then - Actions
                    Player - Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision
                    Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cff00FF00has declared an alliance with |r + ((Name of (Player((Integer A)))) + !)))
                  Else - Actions
War
  Events
  Conditions
  Actions
    -------- DO NOT EDIT ANYTHING BELOW THIS LINE IF YOU DO NOT KNOW WHAT YOU'RE DOING --------
    Set String = (String((Entered chat string)) as Lower case)
    For each (Integer A) from 1 to NumberOfPlayers, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            String Equal to ((Unally_Command + ) + (String((Integer A))))
          Then - Actions
            Player - Make (Triggering player) treat (Player((Integer A))) as an Enemy
            Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cffFF0000has declared a war with |r + ((Name of (Player((Integer A)))) + !)))
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                String Equal to ((Unally_Command + ) + PlayerName[(Integer A)])
              Then - Actions
                Player - Make (Triggering player) treat (Player((Integer A))) as an Enemy
                Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cffFF0000has declared a war with |r + ((Name of (Player((Integer A)))) + !)))
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    String Equal to ((Unally_Command + ) + Color[(Integer A)])
                  Then - Actions
                    Player - Make (Triggering player) treat (Player((Integer A))) as an Enemy
                    Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cffFF0000has declared a war with |r + ((Name of (Player((Integer A)))) + !)))
                  Else - Actions
Settlement capture
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A town-hall-type unit) Equal to True
  Actions
    Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Killing unit)) at (Position of (Dying unit)) facing Default building facing degrees
Dock capture
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Dock
  Actions
    Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Killing unit)) at (Position of (Dying unit)) facing Default building facing degrees
Annual tax
  Events
    Time - Every 60.00 seconds of game time
  Conditions
  Actions
    Player - Add 250 to Player 1 (Red) Current gold
    Player - Add 250 to Player 2 (Blue) Current gold
    Player - Add 250 to Player 3 (Teal) Current gold
    Player - Add 250 to Player 4 (Purple) Current gold
    Player - Add 250 to Player 5 (Yellow) Current gold
    Player - Add 250 to Player 7 (Green) Current gold
    Player - Add 250 to Player 8 (Pink) Current gold
    Player - Add 250 to Player 9 (Gray) Current gold
Annual wood
  Events
    Time - Every 60.00 seconds of game time
  Conditions
  Actions
    Player - Add 250 to Player 1 (Red) Current lumber
    Player - Add 250 to Player 2 (Blue) Current lumber
    Player - Add 250 to Player 3 (Teal) Current lumber
    Player - Add 250 to Player 4 (Purple) Current lumber
    Player - Add 250 to Player 5 (Yellow) Current lumber
    Player - Add 250 to Player 7 (Green) Current lumber
    Player - Add 250 to Player 8 (Pink) Current lumber
    Player - Add 250 to Player 9 (Gray) Current lumber
Ally dialog 1
  Events
    Player - Player 1 (Red) types a chat message containing -map as An exact match
    Player - Player 2 (Blue) types a chat message containing -map as An exact match
    Player - Player 3 (Teal) types a chat message containing -map as An exact match
    Player - Player 4 (Purple) types a chat message containing -map as An exact match
    Player - Player 5 (Yellow) types a chat message containing -map as An exact match
    Player - Player 6 (Orange) types a chat message containing -map as An exact match
    Player - Player 7 (Green) types a chat message containing -map as An exact match
    Player - Player 8 (Pink) types a chat message containing -map as An exact match
    Player - Player 9 (Gray) types a chat message containing -map as An exact match
    Player - Player 10 (Light Blue) types a chat message containing -map as An exact match
  Conditions
  Actions
    Set plNR = (Player number of (Triggering player))
    Set DialogOn[plNR] = True
    Dialog - Clear AllyDialog[plNR]
    Dialog - Change the title of AllyDialog[plNR] to Diplomacy
    For each (Integer A) from 1 to 10, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Player number of (Triggering player)) Not equal to (Integer A)
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Player((Integer A))) controller) Equal to User
                ((Player((Integer A))) slot status) Equal to Is playing
                ((Triggering player) is an ally of (Player((Integer A)))) Equal to True
              Then - Actions
                Custom script: set udg_Ally_Dialog_Button[GetForLoopIndexA()] = DialogAddButton(udg_AllyDialog[udg_plNR], ( GetPlayerName(ConvertedPlayer(GetForLoopIndexA())) + ": Shared Vision Request!" ),0)
              Else - Actions
          Else - Actions
    Custom script: set udg_Ally_Dialog_Button[0] = DialogAddButton(udg_AllyDialog[udg_plNR], "Cancel",0)
    Dialog - Show AllyDialog[plNR] for (Player(plNR))
Ally dialog 2
  Events
    Dialog - A dialog button is clicked for AllyDialog[1]
    Dialog - A dialog button is clicked for AllyDialog[2]
    Dialog - A dialog button is clicked for AllyDialog[3]
    Dialog - A dialog button is clicked for AllyDialog[4]
    Dialog - A dialog button is clicked for AllyDialog[5]
    Dialog - A dialog button is clicked for AllyDialog[6]
    Dialog - A dialog button is clicked for AllyDialog[7]
    Dialog - A dialog button is clicked for AllyDialog[8]
    Dialog - A dialog button is clicked for AllyDialog[9]
    Dialog - A dialog button is clicked for AllyDialog[10]
  Conditions
  Actions
    Set plNR = (Player number of (Triggering player))
    Set DialogOn[plNR] = False
    For each (Integer A) from 1 to 10, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Ally_Dialog_Button[(Integer A)] Equal to (Clicked dialog button)
          Then - Actions
            Set TempNr = (Integer A)
          Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Triggering player) is an ally of (Player(TempNr))) Equal to True
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DialogOn[TempNr] Equal to True
          Then - Actions
            Set Ally_Request[(Player number of (Player(TempNr)))] = 0
            Set PlayerGroup = (Player group((Player(TempNr))))
            Game - Display to PlayerGroup for 15.00 seconds the text: ((Name of (Triggering player)) + want share vision with you but he busy at moment.)
            Custom script: call DestroyForce(udg_PlayerGroup)
          Else - Actions
            Set DialogOn[TempNr] = True
            Set Ally_Request[TempNr] = plNR
            Dialog - Create a dialog button for AllyDialog[TempNr] labelled Reply to Shared Vision
            Custom script: set udg_Reply_Ally_Dialog_Button[0] = DialogAddButton(udg_AllyDialog[udg_TempNr], ( "Accept!" ),0)
            Custom script: set udg_Reply_Ally_Dialog_Button[1] = DialogAddButton(udg_AllyDialog[udg_TempNr], ( "Decline " + GetPlayerName(ConvertedPlayer(udg_TempNr)) ),0)
      Else - Actions
        Set PlayerGroup = (Player group((Player(TempNr))))
        Game - Display to PlayerGroup for 15.00 seconds the text: ((Name of (Player(TempNr))) + is enemy, cant make shared vision with enemy.)
        Custom script: call DestroyForce(udg_PlayerGroup)
Ally dialog 3
  Events
    Dialog - A dialog button is clicked for AllyDialog[1]
    Dialog - A dialog button is clicked for AllyDialog[2]
    Dialog - A dialog button is clicked for AllyDialog[3]
    Dialog - A dialog button is clicked for AllyDialog[4]
    Dialog - A dialog button is clicked for AllyDialog[5]
    Dialog - A dialog button is clicked for AllyDialog[6]
    Dialog - A dialog button is clicked for AllyDialog[7]
    Dialog - A dialog button is clicked for AllyDialog[8]
    Dialog - A dialog button is clicked for AllyDialog[9]
    Dialog - A dialog button is clicked for AllyDialog[10]
  Conditions
    Or - Any (Conditions) are true
      Conditions
        Reply_Ally_Dialog_Button[1] Equal to (Clicked dialog button)
        Reply_Ally_Dialog_Button[0] Equal to (Clicked dialog button)
  Actions
    Set plNR = (Player number of (Triggering player))
    Set DialogOn[plNR] = False
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Reply_Ally_Dialog_Button[1] Equal to (Clicked dialog button)
      Then - Actions
        Player - For (Triggering player), turn Shared vision On toward (Player(Ally_Request[plNR]))
        Player - For (Player(Ally_Request[plNR])), turn Shared vision On toward (Triggering player)
      Else - Actions
        Set PlayerGroup = (Player group((Player(Ally_Request[plNR]))))
        Game - Display to PlayerGroup for 15.00 seconds the text: ((Name of (Triggering player)) + refused your request.)
        Custom script: call DestroyForce(udg_PlayerGroup)
    Set Ally_Request[plNR] = 0
tax
  Events
    Map initialization
  Conditions
    ((Triggering unit) is A structure) Equal to True
    ((Matching unit) is A town-hall-type unit) Equal to True
  Actions
    Set numberOfBuildings[(Player number of (Triggering player))] = ((Number of units in (Units owned by (Triggering player) matching ((((Matching unit) is A structure) Equal to True) and (((Matching unit) is alive) Equal to True)))) x 100)
add tax
  Events
    Time - Every 60.00 seconds of game time
  Conditions
  Actions
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        If (numberOfBuildings[(Integer A)] Equal to 0) then do (Set numberOfBuildings[(Integer A)] = 100) else do (Do nothing)
        Player - Add numberOfBuildings[(Integer A)] to (Player((Integer A))) Current gold
Raid
  Events
    Time - Every 30.00 seconds of game time
  Conditions
  Actions
    Set point = (Random point in Mongol_Invasion <gen>)
    Custom script: set bj_wantDestroyGroup = true
    Unit Group - Pick every unit in (Units in Golden_Horde <gen> matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Cossack (Rebel)))) and do (Actions)
      Loop - Actions
        Unit - Order (Picked unit) to Attack-Move To point
    Custom script: call RemoveLocation(udg_point)
Scandinavia
  Events
    Player - Player 4 (Purple) leaves the game with a defeat
  Conditions
  Actions
    Player - Set name of Player 1 (Red) to Scandinavia
    Game - Display to Player Group - Player 1 (Red) the text: Union of KalmarDenmark has united and became the ruler of Scandinavia.
Fade
  Events
    Map initialization
  Conditions
  Actions
    Cinematic - Fade out over 0.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 1.00 seconds
    Cinematic - Fade in over 0.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
Mana loss
  Events
    Unit - A unit Is attacked
  Conditions
    ((Attacked unit) has buff Cold Arrows (Stacking)) Equal to True
  Actions
    Unit - Set mana of (Attacked unit) to ((Mana of (Attacked unit)) - 10.00)
    Special Effect - Create a special effect attached to the overhead of (Attacked unit) using Doodads\Cinematic\FireRockSmall\FireRockSmall.mdl
Quest
  Events
    Map initialization
  Conditions
  Actions
    Quest - Create a Optional quest titled Information with the description The settlements are villages, towns and cities. To increase food, upgrade the settlements or conquer settlements. The units have morale instead of mana. Morale is lost when the enemies are outnumbered and when most of your army is dead. To restore morale, train a general. The map is designed for multiplayer., using icon path ReplaceableTextures\CommandButtons\BTNScrollUber.blp
    Quest - Create a Optional quest titled Commands with the description Press up to zoom in and down to zoom out.The player number can be player 1, 2, 3, 4, 5, 7 and 9.To declare alliance type -ally (Player number).To declare war type -war (Player number)., using icon path ReplaceableTextures\CommandButtons\BTNSnazzyScroll.blp
    Quest - Create a Optional quest titled Credits with the description The terrain is completely made by Animalpower.Resources:Wandering Soul, Tranquil, Mephestrial, HappyTauren, Kitabatake, Stormlegacy, Kuhnegetz, Mr. Bob, Radagast, Elenai, Zin-Creator, BlinkBoySystems:Hashjie, cHeRoL, using icon path ReplaceableTextures\CommandButtons\BTNTomeBrown.blp