Ok I think this should work (can't test it because need more players).
That dialog was a real pain but what ever... you'll need to deal with it not me ^^
This is for 4 players, think about 8/10/12 players lol.
And yes you are right about the substrings.
Anyway here it is
[Things you need to know about for basic understanding]
•
Variables
•
Loops
•
Substrings
•
Arrays
•
A lot of patience making this trigger for more players
[Variables used]
•
dialog - dialog variable, arrayed
•
dialogbuttons - dialog button variable, arrayed
-
Init
-

Events
-

Conditions
-

Actions
-


For each (Integer A) from 1 to 16, do (Actions)
-



Loop - Actions
-




Dialog - Create a dialog button for dialog[(Integer A)] labelled Agree
-




Set dialogbuttons[(Integer A)] = (Last created dialog Button)
-


For each (Integer A) from 17 to 32, do (Actions)
-



Loop - Actions
-




Dialog - Create a dialog button for dialog[((Integer A) - 16)] labelled Refuse
-




Set dialogbuttons[(Integer A)] = (Last created dialog Button)
-
Typing
-

Events
-


Player - Player 1 (Red) types a chat message containing -ally as A substring
-


Player - Player 2 (Blue) types a chat message containing -ally as A substring
-


Player - Player 3 (Teal) types a chat message containing -ally as A substring
-


Player - Player 4 (Purple) types a chat message containing -ally as A substring
-

Conditions
-


(Substring((Entered chat string), 1, 5)) Equal to -ally
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Substring((Entered chat string), 7, 9)) Equal to red
-



Then - Actions
-




Dialog - Show dialog[(Player number of (Triggering player))] for Player 1 (Red)
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Substring((Entered chat string), 7, 10)) Equal to blue
-





Then - Actions
-






Dialog - Show dialog[((Player number of (Triggering player)) + 4)] for Player 2 (Blue)
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Substring((Entered chat string), 7, 10)) Equal to teal
-







Then - Actions
-








Dialog - Show dialog[((Player number of (Triggering player)) + 8)] for Player 3 (Teal)
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Substring((Entered chat string), 7, 12)) Equal to purple
-









Then - Actions
-










Dialog - Show dialog[((Player number of (Triggering player)) + 12)] for Player 4 (Purple)
-









Else - Actions
-
Buttons clicked
-

Events
-


Dialog - A dialog button is clicked for dialog[1]
-


Dialog - A dialog button is clicked for dialog[2]
-


Dialog - A dialog button is clicked for dialog[3]
-


Dialog - A dialog button is clicked for dialog[4]
-


Dialog - A dialog button is clicked for dialog[5]
-


Dialog - A dialog button is clicked for dialog[6]
-


Dialog - A dialog button is clicked for dialog[7]
-


Dialog - A dialog button is clicked for dialog[8]
-


Dialog - A dialog button is clicked for dialog[9]
-


Dialog - A dialog button is clicked for dialog[10]
-


Dialog - A dialog button is clicked for dialog[11]
-


Dialog - A dialog button is clicked for dialog[12]
-


Dialog - A dialog button is clicked for dialog[13]
-


Dialog - A dialog button is clicked for dialog[14]
-


Dialog - A dialog button is clicked for dialog[15]
-


Dialog - A dialog button is clicked for dialog[16]
-

Conditions
-

Actions
-


For each (Integer A) from 1 to 4, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Clicked dialog button) Equal to dialogbuttons[(Integer A)]
-





Then - Actions
-






Player - Make Player 1 (Red) treat (Player((Integer A))) as an Ally with shared vision
-






Player - Make (Player((Integer A))) treat Player 1 (Red) as an Ally with shared vision
-





Else - Actions
-


For each (Integer A) from 5 to 8, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Clicked dialog button) Equal to dialogbuttons[(Integer A)]
-





Then - Actions
-






Player - Make Player 2 (Blue) treat (Player(((Integer A) - 4))) as an Ally with shared vision
-






Player - Make (Player(((Integer A) - 4))) treat Player 2 (Blue) as an Ally with shared vision
-





Else - Actions
-


For each (Integer A) from 9 to 12, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Clicked dialog button) Equal to dialogbuttons[(Integer A)]
-





Then - Actions
-






Player - Make Player 3 (Teal) treat (Player(((Integer A) - 8))) as an Ally with shared vision
-






Player - Make (Player(((Integer A) - 8))) treat Player 3 (Teal) as an Ally with shared vision
-





Else - Actions
-


For each (Integer A) from 13 to 16, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Clicked dialog button) Equal to dialogbuttons[(Integer A)]
-





Then - Actions
-






Player - Make Player 4 (Purple) treat (Player(((Integer A) - 12))) as an Ally with shared vision
-






Player - Make (Player(((Integer A) - 12))) treat Player 4 (Purple) as an Ally with shared vision
-





Else - Actions
-


For each (Integer A) from 17 to 20, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Clicked dialog button) Equal to dialogbuttons[(Integer A)]
-





Then - Actions
-






Game - Display to (Player group((Player(((Integer A) - 16))))) the text: Player 1 has refuse...
-






Player - Make Player 1 (Red) treat (Player(((Integer A) - 16))) as an Enemy
-






Player - Make (Player(((Integer A) - 16))) treat Player 1 (Red) as an Enemy
-





Else - Actions
-


For each (Integer A) from 21 to 24, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Clicked dialog button) Equal to dialogbuttons[(Integer A)]
-





Then - Actions
-






Game - Display to (Player group((Player(((Integer A) - 20))))) the text: Player 2 has refuse...
-






Player - Make Player 2 (Blue) treat (Player(((Integer A) - 20))) as an Enemy
-






Player - Make (Player(((Integer A) - 20))) treat Player 2 (Blue) as an Enemy
-





Else - Actions
-


For each (Integer A) from 25 to 28, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Clicked dialog button) Equal to dialogbuttons[(Integer A)]
-





Then - Actions
-






Game - Display to (Player group((Player(((Integer A) - 24))))) the text: Player 3 has refuse...
-






Player - Make Player 3 (Teal) treat (Player(((Integer A) - 24))) as an Enemy
-






Player - Make (Player(((Integer A) - 24))) treat Player 3 (Teal) as an Enemy
-





Else - Actions
-


For each (Integer A) from 29 to 32, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Clicked dialog button) Equal to dialogbuttons[(Integer A)]
-





Then - Actions
-






Game - Display to (Player group((Player(((Integer A) - 28))))) the text: Player 4 has refuse...
-






Player - Make Player 4 (Purple) treat (Player(((Integer A) - 28))) as an Enemy
-






Player - Make (Player(((Integer A) - 28))) treat Player 4 (Purple) as an Enemy
-





Else - Actions
Pretty long isn't it...