Is this what your looking for?
set variables
Initialization
Events
Map initialization
Conditions
Actions
Set ControlColor[1] = red
Set ControlColor[2] = blue
Set ControlColor[3] = teal
Set ControlColor[4] = purple
set alliance
ally
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
Actions
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
Or - Any (Conditions) are true
Conditions
(Entered chat string) Equal to (-ally + (String((Integer A))))
(Entered chat string) Equal to (-ally + ControlColor[(Integer A)])
Then - Actions
Player - Make (Triggering player) treat (Player((Player number of (Triggering player)))) as an Ally with shared vision
Else - Actions
make enemy
enemy
Events
Player - Player 1 (Red) types a chat message containing -enemy as A substring
Player - Player 2 (Blue) types a chat message containing -enemy as A substring
Player - Player 3 (Teal) types a chat message containing -enemy as A substring
Player - Player 4 (Purple) types a chat message containing -enemy as A substring
Conditions
Actions
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
Or - Any (Conditions) are true
Conditions
(Entered chat string) Equal to (-enemy + (String((Integer A))))
(Entered chat string) Equal to (-enemy + ControlColor[(Integer A)])
Then - Actions
Player - Make (Triggering player) treat (Player((Player number of (Triggering player)))) as an Enemy
Else - Actions
you will have to type -ally players number or color and same with making them your enemy -enemy players number or color.
In a map

http://www.hiveworkshop.com/forums/p...0by%20text.w3x hope all the effort was usefull to you
edit: I think you'll need someone else to test it with or just use another computer but it should work