I made my own risk system and about 10 minutes into a game (when im doing nothing) wc3 crashes
I have attached the systems test map, a screenshot of the crash error and posted the triggers below
I have attached the systems test map, a screenshot of the crash error and posted the triggers below
-
Map Int
-
Events
- Map initialization
- Conditions
-
Actions
- Set turn = 0
- Set timeIntegerStart = 60
- Set defaultUnitType = |cffff8000Private|r
- Set dummyType = Guard Dummy
- Set circleOfPowerType = COP
- Set Guard_AoE = 150.00
- Set Guard_MaximumRange = 700.00
- Game - Set the time of day to 12.00
- Game - Set time of day speed to 0.00% of the default speed
- Game - Turn the day/night cycle Off
- Game - Set game speed to Fastest
- Game - Lock the game speed
-
For each (Integer P) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Player(P)) slot status) Equal to Is playing
-
Then - Actions
- Trigger - Add to Zoom <gen> the event (Player - (Player(P)) types a chat message containing -c as A substring)
- Trigger - Add to Angle <gen> the event (Player - (Player(P)) types a chat message containing -a as A substring)
- Trigger - Add to Rotation <gen> the event (Player - (Player(P)) types a chat message containing -r as A substring)
- Camera - Set (Player(P))'s camera Distance to target to 2900.00 over 0.00 seconds
- Camera - Set (Player(P))'s camera Angle of attack to -70.00 over 0.00 seconds
- Set income = 8
- Set incomeBase = 8
- Set playerAliveString = |cff00ff00Alive|r
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyTrigger( GetTriggeringTrigger() )
-
Events
-
Start Message
-
Events
- Time - Elapsed game time is 1.00 seconds
- Conditions
-
Actions
- Game - Display to (All players) the text: Please wait while t...
-
Events
-
Set Countries
-
Events
- Time - Elapsed game time is 3.00 seconds
- Conditions
-
Actions
- -------- Count Players --------
- Set tempForce1 = (All players matching (((Matching player) slot status) Equal to Is playing))
- Set numOfPlayers = (Number of players in tempForce1)
- -------- ------------------------- --------
- Set activeCityCount = (Number of units in (Units owned by Neutral Hostile matching (((Matching unit) is A structure) Equal to True)))
- Set numOfBasesPerPlayer = (activeCityCount / numOfPlayers)
- -------- ------------------------- --------
- -------- Set Bases --------
- -------- ------------------------- --------
- Set B = 1
- -------- ------------------------- --------
- Set countryArea1[B] = Region 001 <gen>
- Set countryName[B] = Morocco
- Set countrySpawn[B] = 1 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 003 <gen>
- Set countryName[B] = Algeria
- Set countrySpawn[B] = 2 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = 3 <gen>
- Set countryName[B] = Malta
- Set countrySpawn[B] = 23 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 010 <gen>
- Set countryName[B] = Sardinia
- Set countrySpawn[B] = 11 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 007 <gen>
- Set countryArea2[B] = Region 008 <gen>
- Set countryName[B] = Italy
- Set countrySpawn[B] = 10 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 012 <gen>
- Set countryName[B] = Spain
- Set countrySpawn[B] = 12 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 014 <gen>
- Set countryName[B] = Portugal
- Set countrySpawn[B] = 13 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 016 <gen>
- Set countryArea2[B] = Region 017 <gen>
- Set countryName[B] = France
- Set countrySpawn[B] = 14 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 034 <gen>
- Set countryName[B] = Switzerland
- Set countrySpawn[B] = 20 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 032 <gen>
- Set countryName[B] = Austria
- Set countrySpawn[B] = 21 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 036 <gen>
- Set countryName[B] = Slovenia
- Set countrySpawn[B] = 22 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 038 <gen>
- Set countryName[B] = Bosnia
- Set countrySpawn[B] = 25 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 040 <gen>
- Set countryName[B] = Greece
- Set countrySpawn[B] = 24 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 058 <gen>
- Set countryName[B] = Turkey
- Set countrySpawn[B] = 7 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 056 <gen>
- Set countryName[B] = Isreal
- Set countrySpawn[B] = 6 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 054 <gen>
- Set countryName[B] = Egypt
- Set countrySpawn[B] = 5 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 052 <gen>
- Set countryName[B] = Libya
- Set countrySpawn[B] = 4 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 060 <gen>
- Set countryName[B] = Georgia
- Set countrySpawn[B] = 8 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 062 <gen>
- Set countryName[B] = Armenia
- Set countrySpawn[B] = 9 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 019 <gen>
- Set countryName[B] = Belguim
- Set countrySpawn[B] = 15 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 021 <gen>
- Set countryName[B] = Netherlands
- Set countrySpawn[B] = 16 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 023 <gen>
- Set countryName[B] = Denmark
- Set countrySpawn[B] = 17 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 025 <gen>
- Set countryArea2[B] = 18 <gen>
- Set countryName[B] = Germany
- Set countrySpawn[B] = Region 024 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 044 <gen>
- Set countryName[B] = Hungary
- Set countrySpawn[B] = 26 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 030 <gen>
- Set countryName[B] = Czechoslovakia
- Set countrySpawn[B] = 30 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 028 <gen>
- Set countryName[B] = Poland
- Set countrySpawn[B] = 19 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 048 <gen>
- Set countryName[B] = Belarus
- Set countrySpawn[B] = 31 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 046 <gen>
- Set countryName[B] = Ukraine
- Set countrySpawn[B] = 29 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 064 <gen>
- Set countryName[B] = Moldova
- Set countrySpawn[B] = 28 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 042 <gen>
- Set countryName[B] = Romania
- Set countrySpawn[B] = 27 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 050 <gen>
- Set countryName[B] = Lithuania
- Set countrySpawn[B] = 32 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 065 <gen>
- Set countryArea2[B] = Region 066 <gen>
- Set countryName[B] = Russia
- Set countrySpawn[B] = 33 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 069 <gen>
- Set countryName[B] = Finland
- Set countrySpawn[B] = 34 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 071 <gen>
- Set countryArea2[B] = Region 072 <gen>
- Set countryName[B] = Sweden
- Set countrySpawn[B] = 35 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 073 <gen>
- Set countryArea2[B] = Region 074 <gen>
- Set countryName[B] = Norway
- Set countrySpawn[B] = 36 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 077 <gen>
- Set countryName[B] = Svalbard
- Set countrySpawn[B] = 37 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 081 <gen>
- Set countryName[B] = Ireland
- Set countrySpawn[B] = 40 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 082 <gen>
- Set countryName[B] = Wales
- Set countrySpawn[B] = 39 <gen>
- -------- ------------------------- --------
- Set B = (B + 1)
- -------- ------------------------- --------
- Set countryArea1[B] = Region 083 <gen>
- Set countryArea2[B] = Region 084 <gen>
- Set countryName[B] = England
- Set countrySpawn[B] = 38 <gen>
- -------- ------------------------- --------
- -------- ------------------------- --------
- -------- ------------------------- --------
- Set countryCount = B
- -------- ------------------------- --------
- -------- ------------------------- --------
- -------- ------------------------- --------
-
For each (Integer B) from 1 to countryCount, do (Actions)
-
Loop - Actions
- Set countryRegions[B] = (Units in countryArea1[B] owned by Neutral Hostile)
- Unit Group - Add all units of (Units in countryArea2[B] owned by Neutral Hostile) to countryRegions[B]
- Set countryCityCount[B] = ((Number of units in (Units in countryArea1[B] owned by Neutral Hostile)) + (Number of units in (Units in countryArea2[B] owned by Neutral Hostile)))
- Set tempPointArray1[B] = (Center of countrySpawn[B])
- Set tempPointArray2[B] = (tempPointArray1[B] offset by (-85.00, -125.00))
- Floating Text - Create floating text that reads (|cFFFF0303 + (countryName[B] + ((( + () + ((String(countryCityCount[B])) + ))) + |r))) at tempPointArray2[B] with Z offset 0.00, using font size 13.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- -------- ------------------------- --------
- -------- ------------------------- --------
- -------- ------------------------- --------
-
Unit Group - Pick every unit in (Random numOfPlayers units from (Units owned by Neutral Hostile matching (((Matching unit) is in countryRegions[B]) Equal to True))) and do (Actions)
-
Loop - Actions
- Set tempUnit1 = (Picked unit)
- Set tempPoint1 = (Position of tempUnit1)
- Set tempPoint2 = (tempPoint1 offset by (0.00, -220.00))
- Set tempPlayer1 = (Random player from tempForce1)
- Set G_TempGroup = (Units within 150.00 of tempPoint2 matching ((((((Matching unit) is alive) Equal to True) and (((Matching unit) is in G_Group) Not equal to True)) and (((Matching unit) is A structure) Not equal to True)) and ((Owner of (Matching unit)) Equal to tempPlayer1))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (G_TempGroup is empty) Equal to False
- Then - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- tempInt[(Player number of tempPlayer1)] Less than numOfBasesPerPlayer
- tempInt[(Player number of tempPlayer1)] Less than 40
-
Then - Actions
- Unit - Create 1 defaultUnitType for tempPlayer1 at tempPoint2 facing Default building facing degrees
- Set tempUnit2 = (Last created unit)
- Unit - Change ownership of tempUnit1 to tempPlayer1 and Change color
- Unit - Order tempUnit1 to Undead Necromancer - Unholy Frenzy tempUnit2
- Set tempInt[(Player number of tempPlayer1)] = (tempInt[(Player number of tempPlayer1)] + 1)
- Player Group - Remove tempPlayer1 from tempForce1
- Player Group - Add tempPlayer1 to tempForce2
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Custom script: call RemoveLocation( udg_tempPoint1 )
- Custom script: call RemoveLocation( udg_tempPoint2 )
- Custom script: call DestroyGroup( udg_G_TempGroup )
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of players in tempForce1) Equal to 0
-
Then - Actions
-
Player Group - Pick every player in tempForce2 and do (Actions)
-
Loop - Actions
- Player Group - Add (Picked player) to tempForce1
- Player Group - Remove (Picked player) from tempForce2
-
Loop - Actions
-
Player Group - Pick every player in tempForce2 and do (Actions)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by Neutral Hostile matching (((Matching unit) is in countryRegions[B]) Equal to True)) and do (Actions)
-
Loop - Actions
- Set tempUnit1 = (Picked unit)
- Set tempPoint1 = (Position of tempUnit1)
- Set tempPoint2 = (tempPoint1 offset by (0.00, -220.00))
- Unit - Create 1 defaultUnitType for Neutral Hostile at tempPoint2 facing Default building facing degrees
- Set tempUnit2 = (Last created unit)
- Unit - Order tempUnit1 to Undead Necromancer - Unholy Frenzy tempUnit2
-
Loop - Actions
-
Loop - Actions
- Game - Display to (All players) the text: The game will begin...
-
Events
-
Player Colors
-
Events
- Map initialization
- Conditions
-
Actions
- Set player_Colour[1] = (Name of Player 1 (Red))
- Set player_Colour[2] = (Name of Player 2 (Blue))
- Set player_Colour[3] = (Name of Player 3 (Teal))
- Set player_Colour[4] = (Name of Player 4 (Purple))
- Set player_Colour[5] = (Name of Player 5 (Yellow))
- Set player_Colour[6] = (Name of Player 6 (Orange))
- Set player_Colour[7] = (Name of Player 7 (Green))
- Set player_Colour[8] = (Name of Player 8 (Pink))
- Set player_Colour[9] = (Name of Player 9 (Gray))
- Set player_Colour[10] = (Name of Player 10 (Light Blue))
- Set player_Colour[11] = (Name of Player 11 (Dark Green))
- Set player_Colour[12] = (Name of Player 12 (Brown))
- Set colorCode[1] = |cffff0000
- Set colorCode[2] = |cff0000ff
- Set colorCode[3] = |cff00ffff
- Set colorCode[4] = |cffa020f0
- Set colorCode[5] = |cffffff00
- Set colorCode[6] = |cffee9a00
- Set colorCode[7] = |cff00cd00
- Set colorCode[8] = |cffdb7093
- Set colorCode[9] = |cff7f7f7f
- Set colorCode[10] = |cff87ceeb
- Set colorCode[11] = |cff006400
- Set colorCode[12] = |cff804000
- Set colourColor[1] = Red
- Set colourColor[2] = Blue
- Set colourColor[3] = Teal
- Set colourColor[4] = Purple
- Set colourColor[5] = Yellow
- Set colourColor[6] = Orange
- Set colourColor[7] = Green
- Set colourColor[8] = Pink
- Set colourColor[9] = Gray
- Set colourColor[10] = Light Blue
- Set colourColor[11] = Dark Green
- Set colourColor[12] = Brown
-
For each (Integer P) from 1 to 12, do (Actions)
-
Loop - Actions
-
For each (Integer C) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Color of (Player(P))) Equal to colourColor[C]
-
Then - Actions
- Set player_Colour = (colorCode[C] + player_Colour)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer C) from 1 to 12, do (Actions)
-
Loop - Actions
- Custom script: call DestroyTrigger( GetTriggeringTrigger() )
-
Events
-
Create Multiboard
-
Events
- Time - Elapsed game time is 10.00 seconds
- Conditions
-
Actions
- Visibility - Disable fog of war
- Visibility - Disable black mask
- Multiboard - Create a multiboard with 4 columns and 2 rows, titled Scoreboard
- Set mBoard = (Last created multiboard)
- Multiboard - Change the title of mBoard to (|cffD70000 + (Middle Earth Risk + |r))
- Multiboard - Set the width for mBoard item in column 1, row 1 to 9.00% of the total screen width
- Multiboard - Set the width for mBoard item in column 2, row 1 to 6.00% of the total screen width
- Multiboard - Set the width for mBoard item in column 3, row 1 to 0.10% of the total screen width
- Multiboard - Set the width for mBoard item in column 4, row 1 to 0.10% of the total screen width
- Multiboard - Set the width for mBoard item in column 1, row 2 to 6.00% of the total screen width
- Multiboard - Set the width for mBoard item in column 2, row 2 to 3.50% of the total screen width
- Multiboard - Set the width for mBoard item in column 3, row 2 to 3.50% of the total screen width
- Multiboard - Set the width for mBoard item in column 4, row 2 to 9.00% of the total screen width
- Multiboard - Set the text for mBoard item in column 2, row 1 to (|cffFF0080 + (Turn + (|r + (|cffffcc00 + ((String(turn)) + |r)))))
- Multiboard - Set the text for mBoard item in column 1, row 2 to (|cffffcc00 + (Player + |r))
- Multiboard - Set the text for mBoard item in column 2, row 2 to (|cffFFD700 + (Income + |r))
- Multiboard - Set the text for mBoard item in column 3, row 2 to (|cffffcc00 + (Cities + |r))
- Multiboard - Set the text for mBoard item in column 4, row 2 to (|cffffcc00 + (Status + |r))
- Multiboard - Set the display style for mBoard item in column 1, row 1 to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 2, row 1 to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 3, row 1 to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 4, row 1 to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 1, row 2 to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 2, row 2 to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 3, row 2 to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 4, row 2 to Show text and Hide icons
- Set tempInt[1] = 2
-
For each (Integer tempInt[0]) from 1 to 12, do (Actions)
-
Loop - Actions
- Custom script: set udg_tempPlayer1 = Player( udg_tempInt[0] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (tempPlayer1 slot status) Equal to Is playing
-
Then - Actions
- Set tempInt[1] = (tempInt[1] + 1)
- Multiboard - Change the number of rows for mBoard to tempInt[1]
- Multiboard - Set the width for mBoard item in column 1, row tempInt[1] to 6.00% of the total screen width
- Multiboard - Set the width for mBoard item in column 2, row tempInt[1] to 3.50% of the total screen width
- Multiboard - Set the width for mBoard item in column 3, row tempInt[1] to 3.50% of the total screen width
- Multiboard - Set the width for mBoard item in column 4, row tempInt[1] to 3.50% of the total screen width
- Multiboard - Set the text for mBoard item in column 1, row tempInt[1] to player_Colour[(Player number of tempPlayer1)]
- Multiboard - Set the text for mBoard item in column 2, row tempInt[1] to (|cFFF8FC00 + ((String(income[(Player number of tempPlayer1)])) + |r))
- Multiboard - Set the text for mBoard item in column 3, row tempInt[1] to (|cFFB4B7E3 + ((String(cities[(Player number of tempPlayer1)])) + |r))
- Multiboard - Set the text for mBoard item in column 4, row tempInt[1] to playerAliveString[(Player number of tempPlayer1)]
- Multiboard - Set the display style for mBoard item in column 1, row tempInt[1] to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 2, row tempInt[1] to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 3, row tempInt[1] to Show text and Hide icons
- Multiboard - Set the display style for mBoard item in column 4, row tempInt[1] to Show text and Hide icons
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: set udg_tempPlayer1 = null
- Trigger - Turn on Multiboard Timer <gen>
- Trigger - Turn on Update Board <gen>
- Trigger - Turn on Update Player Status <gen>
- Custom script: call DestroyTrigger( GetTriggeringTrigger() )
-
Events
-
Multiboard Timer
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- timeInteger Equal to 0
-
Then - Actions
- Set timeInteger = timeIntegerStart
- Set turn = (turn + 1)
- Multiboard - Set the text for mBoard item in column 2, row 1 to (|cffFF0080 + (Turn + (|r + (|cff00FF00 + ((String(turn)) + |r)))))
-
For each (Integer P) from 1 to 12, do (Actions)
-
Loop - Actions
- Set income = 8
-
For each (Integer B) from 1 to countryCount, do (Actions)
-
Loop - Actions
- Set tempInt[B] = (Number of units in (Units owned by (Player(P)) matching (((Matching unit) is in countryRegions[B]) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- tempInt[B] Equal to countryCityCount[B]
-
Then - Actions
- Set income = (income + (countryCityCount[B] - 1))
- Set tempPoint1 = (Center of countrySpawn[B])
- Unit - Create (countryCityCount[B] - 1) defaultUnitType for (Player(P)) at tempPoint1 facing Default building facing degrees
- Custom script: call RemoveLocation( udg_tempPoint1 )
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Player - Add income to (Player(P)) Current gold
- Player - Set (Player(P)) Food cap to turn
- Player - Set (Player(P)) Food used to 60
- Player - Add 1 to (Player(P)) Current lumber
-
Loop - Actions
-
Else - Actions
-
For each (Integer P) from 1 to 12, do (Actions)
-
Loop - Actions
- Player - Add -1 to (Player(P)) Food used
-
Loop - Actions
-
For each (Integer P) from 1 to 12, do (Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- timeInteger Less than or equal to 5
-
Then - Actions
- Set turnTimerColor = |cffff0000
- Multiboard - Set the text for mBoard item in column 1, row 1 to (|cffFF00FF + (Next Turn + (turnTimerColor + ((String(timeInteger)) + |r))))
-
Else - Actions
- Set turnTimerColor = |cff00FF00
- Multiboard - Set the text for mBoard item in column 1, row 1 to (|cffFF00FF + (Next Turn + (turnTimerColor + ((String(timeInteger)) + |r))))
-
If - Conditions
- Set timeInteger = (timeInteger - 1)
- Trigger - Run Update Board <gen> (checking conditions)
- Trigger - Run Update Player Status <gen> (checking conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Update Board
- Events
- Conditions
-
Actions
- Set tempInt[2] = 2
-
For each (Integer tempInt[0]) from 1 to 12, do (Actions)
-
Loop - Actions
- Custom script: set udg_tempPlayer1 = Player( udg_tempInt[0] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (tempPlayer1 slot status) Equal to Is playing
-
Then - Actions
- Set tempInt[2] = (tempInt[2] + 1)
- Set cities[(Player number of tempPlayer1)] = (Number of units in (Units owned by tempPlayer1 matching (((Matching unit) is A town-hall-type unit) Equal to True)))
- Multiboard - Set the text for mBoard item in column 2, row tempInt[2] to (|cFFF8FC00 + (String(income[(Player number of tempPlayer1)])))
- Multiboard - Set the text for mBoard item in column 3, row tempInt[2] to (|cFFB4B7E3 + (String(cities[(Player number of tempPlayer1)])))
- Multiboard - Set the text for mBoard item in column 4, row tempInt[2] to playerAliveString[(Player number of tempPlayer1)]
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: set udg_tempPlayer1 = null
-
Update Player Status
- Events
- Conditions
-
Actions
-
For each (Integer P) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Player(P)) slot status) Equal to Has left the game
-
Then - Actions
- Set playerAliveString = |cff00ff00Left|r
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer P) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in (Units owned by (Player(P)) matching (((Matching unit) is A town-hall-type unit) Equal to True))) Equal to 0
-
Then - Actions
- Set playerAliveString = |cff00ff00Dead|r
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer P) from 1 to 12, do (Actions)
-
Guard
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Guard
- (Owner of (Casting unit)) Equal to (Owner of (Target unit of ability being cast))
-
Actions
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- -------- Checking if target is already guarding. --------
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Target unit of ability being cast) is in G_Group) Equal to True
-
Then - Actions
- Do nothing
-
Else - Actions
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- -------- Replacing current Guard, if cast on a new unit. --------
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
-
For each (Integer G_Loop) from 1 to G_Index, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- G_Caster[G_Loop] Equal to (Casting unit)
-
Then - Actions
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- -------- Removing Dummy flag --------
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of G_Unit[G_Loop]) Equal to Guard Dummy
-
Then - Actions
- Unit - Remove G_Unit[G_Loop] from the game
- Else - Actions
-
If - Conditions
- Unit Group - Remove G_Unit[G_Loop] from G_Group
- Set G_Unit[G_Loop] = (Target unit of ability being cast)
- Unit Group - Add G_Unit[G_Loop] to G_Group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- G_Index Equal to 1
-
Then - Actions
- Trigger - Turn on Guard Loop <gen>
- Else - Actions
-
If - Conditions
- Skip remaining actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set G_Index = (G_Index + 1)
- Set G_Caster[G_Index] = (Casting unit)
- Set G_Unit[G_Index] = (Target unit of ability being cast)
- Unit Group - Add G_Unit[G_Index] to G_Group
- Set G_OffsetDistance[G_Index] = 320.00
- Set G_Location[G_Index] = ((Position of G_Caster[G_Index]) offset by G_OffsetDistance[G_Index] towards 270.00 degrees)
- Unit - Create 1 circleOfPowerType for (Owner of G_Caster[G_Index]) at G_Location[G_Index] facing Default building facing degrees
- Set G_Cop[G_Index] = (Last created unit)
- Set G_Location[G_Index] = (Position of G_Cop[G_Index])
- Unit - Move G_Unit[G_Index] instantly to G_Location[G_Index]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- G_Index Equal to 1
-
Then - Actions
- Trigger - Turn on Guard Loop <gen>
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Events
-
Guard Killer Replacement
-
Events
- Unit - A unit Dies
-
Conditions
- ((Killing unit) is in G_Group) Not equal to True
-
Actions
-
For each (Integer G_Loop) from 1 to G_Index, do (Actions)
-
Loop - Actions
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- -------- Makes the killer the new guard, Killer takes control of building. --------
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- G_Unit[G_Loop] Equal to (Dying unit)
-
Then - Actions
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- -------- Checking if dying guard has any buddies in the circle with him, who are able to become the new gaurd. --------
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- Set G_TempGroup = (Units within Guard_AoE of G_Location[G_Loop] matching (((((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal to G_Caster[G_Loop])) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to G_Cop[G_Loop]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (G_TempGroup is empty) Equal to True
-
Then - Actions
- Set tempPlayer1 = (Owner of (Killing unit))
- Unit Group - Remove G_Unit[G_Loop] from G_Group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Killing unit) is A structure) Equal to True
-
Then - Actions
- Unit - Create 1 Guard Dummy for tempPlayer1 at G_Location[G_Loop] facing Default building facing degrees
- Set G_Unit[G_Loop] = (Last created unit)
- Unit Group - Add (Last created unit) to G_Group
- Unit - Change ownership of G_Caster[G_Loop] to tempPlayer1 and Change color
- Unit - Change ownership of G_Cop[G_Loop] to tempPlayer1 and Change color
- Custom script: set udg_tempPlayer1 = null
-
Else - Actions
- Unit - Move (Killing unit) instantly to G_Location[G_Loop]
- Set G_Unit[G_Loop] = (Killing unit)
- Unit Group - Add (Killing unit) to G_Group
- Unit - Change ownership of G_Caster[G_Loop] to tempPlayer1 and Change color
- Unit - Change ownership of G_Cop[G_Loop] to tempPlayer1 and Change color
- Custom script: set udg_tempPlayer1 = null
-
If - Conditions
-
Else - Actions
- Unit Group - Remove G_Unit[G_Loop] from G_Group
- Set G_Unit[G_Loop] = (Random unit from G_TempGroup)
- Unit Group - Add G_Unit[G_Loop] to G_Group
-
If - Conditions
- Custom script: call DestroyGroup (udg_G_TempGroup)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer G_Loop) from 1 to G_Index, do (Actions)
-
Events
-
Guard Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer G_Loop) from 1 to G_Index, do (Actions)
-
Loop - Actions
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- -------- Checking if guard left his/her post. --------
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (G_Unit[G_Loop] is in (Units within Guard_AoE of G_Location[G_Loop])) Equal to False
-
Then - Actions
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- -------- Replacing leaving Guard with someone else in the circle. --------
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- Set G_TempGroup = (Units within Guard_AoE of G_Location[G_Loop] matching (((((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal to G_Caster[G_Loop])) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to G_Cop[G_Loop]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (G_TempGroup is empty) Equal to True
-
Then - Actions
- Unit - Move G_Unit[G_Loop] instantly to G_Location[G_Loop]
-
Else - Actions
- Unit Group - Remove G_Unit[G_Loop] from G_Group
- Set G_Unit[G_Loop] = (Random unit from G_TempGroup)
- Unit Group - Add G_Unit[G_Loop] to G_Group
-
If - Conditions
- Custom script: call DestroyGroup (udg_G_TempGroup)
- Else - Actions
-
If - Conditions
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
- -------- Scanning for new guard, if guard dies. --------
- -------- --------------------------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (G_Unit[G_Loop] is dead) Equal to True
-
Then - Actions
- Unit Group - Remove G_Unit[G_Loop] from G_Group
- Set G_TempGroup = (Units within Guard_MaximumRange of G_Location[G_Loop] matching (((((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal to G_Caster[G_Loop])) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to G_Cop[
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (G_TempGroup is empty) Equal to False
-
Then - Actions
- Set G_Unit[G_Loop] = (Random unit from G_TempGroup)
- Unit Group - Add G_Unit[G_Loop] to G_Group
-
Else - Actions
- Unit - Create 1 dummyType for (Owner of G_Caster[G_Loop]) at G_Location[G_Loop] facing Default building facing degrees
- Set G_Unit[G_Loop] = (Last created unit)
- Unit Group - Add G_Unit[G_Loop] to G_Group
-
If - Conditions
- Custom script: call DestroyGroup (udg_G_TempGroup)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer G_Loop) from 1 to G_Index, do (Actions)
-
Events
-
Zoom
- Events
- Conditions
-
Actions
- Set Real[1] = (Real((Substring((Entered chat string), 4, (Length of (Entered chat string))))))
- Camera - Set (Triggering player)'s camera Distance to target to Real[1] over 0.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Real[1] Less than 1200.00
-
Then - Actions
- Camera - Set (Triggering player)'s camera Distance to target to 1200.00 over 0.00 seconds
- Game - Display to (All players) the text: The minimum distanc...
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Real[1] Greater than 4000.00
-
Then - Actions
- Camera - Set (Triggering player)'s camera Distance to target to 4000.00 over 0.00 seconds
- Game - Display to (All players) the text: The max distance is...
- Else - Actions
-
If - Conditions
-
Angle
- Events
- Conditions
-
Actions
- Set Real[2] = (Real((Substring((Entered chat string), 4, (Length of (Entered chat string))))))
- Camera - Set (Triggering player)'s camera Angle of attack to Real[2] over 0.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Real[2] Less than 300.00
-
Then - Actions
- Camera - Set (Triggering player)'s camera Angle of attack to 300.00 over 0.00 seconds
- Game - Display to (Player group((Triggering player))) the text: You can only change...
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Real[2] Greater than 360.00
-
Then - Actions
- Camera - Set (Triggering player)'s camera Angle of attack to 360.00 over 0.00 seconds
- Game - Display to (Player group((Triggering player))) the text: You can only change...
- Else - Actions
-
If - Conditions
-
Rotation
- Events
- Conditions
-
Actions
- Set Real[3] = (Real((Substring((Entered chat string), 4, (Length of (Entered chat string))))))
- Camera - Set (Triggering player)'s camera Rotation to Real[3] over 0.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Real[3] Less than 0.00
-
Then - Actions
- Game - Display to (All players) the text: You can only rotate...
- Camera - Set (Triggering player)'s camera Rotation to 0.00 over 0.00 seconds
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Real[3] Greater than 360.00
-
Then - Actions
- Game - Display to (All players) the text: You can only rotate...
- Camera - Set (Triggering player)'s camera Rotation to 360.00 over 0.00 seconds
- Else - Actions
-
If - Conditions
Attachments
Last edited: