Here is the first trigger, this one seems to work fine:
challenge
Events
Player - Player 1 (Red) types a chat message containing -challenge as An exact match
Player - Player 2 (Blue) types a chat message containing -challenge as An exact match
Player - Player 3 (Teal) types a chat message containing -challenge as An exact match
Player - Player 5 (Yellow) types a chat message containing -challenge as An exact match
Player - Player 6 (Orange) types a chat message containing -challenge as An exact match
Player - Player 7 (Green) types a chat message containing -challenge as An exact match
Player - Player 9 (Gray) types a chat message containing -challenge as An exact match
Player - Player 10 (Light Blue) types a chat message containing -challenge as An exact match
Conditions
Actions
Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challenger = (Picked unit)
Unit Group - Pick every unit in (Units in arena <gen> owned by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Equal to challenger
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) is an ally of Player 1 (Red)) Equal to True
Then - Actions
Dialog - Clear challenge
Dialog - Change the title of challenge to Challenge:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for challenge labelled (Name of Player 2 (Blue))
Set challenge1 = (Last created dialog Button)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for challenge labelled (Name of Player 3 (Teal))
Set challenge2 = (Last created dialog Button)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 9 (Gray) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for challenge labelled (Name of Player 9 (Gray))
Set challenge3 = (Last created dialog Button)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 10 (Light Blue) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for challenge labelled (Name of Player 10 (Light Blue))
Set challenge4 = (Last created dialog Button)
Else - Actions
Do nothing
Dialog - Create a dialog button for challenge labelled Cancel
Set challengecancel = (Last created dialog Button)
Dialog - Show challenge for (Triggering player)
Else - Actions
Dialog - Clear challenge
Dialog - Change the title of challenge to Challenge:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for challenge labelled (Name of Player 1 (Red))
Set challenge1 = (Last created dialog Button)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 5 (Yellow) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for challenge labelled (Name of Player 5 (Yellow))
Set challenge2 = (Last created dialog Button)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 6 (Orange) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for challenge labelled (Name of Player 6 (Orange))
Set challenge3 = (Last created dialog Button)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 7 (Green) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for challenge labelled (Name of Player 7 (Green))
Set challenge4 = (Last created dialog Button)
Else - Actions
Do nothing
Dialog - Create a dialog button for challenge labelled Cancel
Set challengecancel = (Last created dialog Button)
Dialog - Show challenge for (Triggering player)
Else - Actions
Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) the text: You must be in the ...
Trigger - Turn off (This trigger)
This second one works too, but I had to readd picking of the triggering player's units because I noticed it didn't list the owner of unit in the game message:
set contest
Events
Dialog - A dialog button is clicked for challenge
Conditions
(Clicked dialog button) Not equal to challengecancel
Actions
Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challenger = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) is an ally of Player 1 (Red)) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to challenge1
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challengee = (Picked unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to challenge2
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 3 (Teal) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challengee = (Picked unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to challenge3
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challengee = (Picked unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to challenge4
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 10 (Light Blue) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challengee = (Picked unit)
Else - Actions
Do nothing
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to challenge1
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challengee = (Picked unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to challenge2
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 5 (Yellow) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challengee = (Picked unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to challenge3
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 6 (Orange) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challengee = (Picked unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to challenge4
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 7 (Green) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Set challengee = (Picked unit)
Else - Actions
Do nothing
Game - Display to (All players) the text: ((Name of (Owner of challenger)) + ( has challenged + ((Name of (Owner of challengee)) + to a duel!)))
Game - Display to (All players) the text: (Sorry, this is unr...
Unit Group - Pick every unit in (Units in arena <gen> matching ((Matching unit) Not equal to challenger)) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of city center <gen>)
Unit - Move challenger instantly to (Center of arena1 <gen>)
Unit - Move challengee instantly to (Center of arena2 <gen>)
Unit - Set life of challengee to 100.00%
Unit - Set life of challenger to 100.00%
Unit - Set mana of challengee to 100.00%
Unit - Set mana of challenger to 100.00%
Trigger - Turn on buffer in <gen>
Trigger - Turn on buffer out <gen>
Here's where I notice problems. It allows both players to leave the arena, and the other doesn't allow anyone, even the fighters in:
buffer out
Events
Unit - A unit leaves arena <gen>
Conditions
(challenge <gen> is on) Equal to False
Actions
Game - Display to (All players matching ((Matching player) Equal to (Owner of (Triggering unit)))) the text: You cannot leave th...
Unit - Move (Triggering unit) instantly to (Center of arena <gen>)
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 25.00 damage of attack type Chaos and damage type Normal
buffer in
Events
Unit - A unit enters arena <gen>
Conditions
And - All (Conditions) are true
Conditions
(Triggering unit) Not equal to challengee
(Triggering unit) Not equal to challenger
Actions
Game - Display to (All players matching ((Matching player) Equal to (Owner of (Triggering unit)))) the text: Do not interfere in...
Unit - Move (Triggering unit) instantly to (Center of city center <gen>)
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 100.00 damage of attack type Chaos and damage type Normal
And this next one just plainly doesn't work:
reset challenge
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Dying unit) Equal to challenger
Then - Actions
Game - Display to (All players) the text: ((Name of (Owner of challengee)) + has won the challenge!)
Unit - Set life of challengee to 100.00%
Unit - Move challengee instantly to (Center of city center <gen>)
Trigger - Turn on challenge <gen>
Trigger - Turn off buffer in <gen>
Trigger - Turn off buffer out <gen>
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Dying unit) Equal to challengee
Then - Actions
Game - Display to (All players) the text: ((Name of (Owner of challenger)) + has won the challenge!)
Unit - Set life of challenger to 100.00%
Unit - Move challenger instantly to (Center of city center <gen>)
Trigger - Turn on challenge <gen>
Trigger - Turn off buffer in <gen>
Trigger - Turn off buffer out <gen>
Else - Actions
Do nothing
Set challengee = No unit
Set challenger = No unit
And I'll add the last one, but I don't think it's important:
cancel challenge
Events
Dialog - A dialog button is clicked for challenge
Conditions
(Clicked dialog button) Equal to challengecancel
Actions
Trigger - Turn on challenge <gen>
Well, is that any help? Also, if you know anyway to streamline this thing, please let me know. Thanks for any help you all provide.