- Joined
- Jul 20, 2011
- Messages
- 77
My friend made me an alliance system a few months ago and has stopped playing warcraft 3. his alliance system he made for my map is bugged and i have no clue how to fix it. if anyone could help me fix it, that would be very appreciated
Currently it only works when another player types -ally red. it does not work any other way. not sure why it is doing this because i am not very good at the editor, im learning though.
Rep will be given to whomever helps.
-
setup
-

Events
-


Time - Elapsed game time is 0.00 seconds
-
-

Conditions
-

Actions
-


Set NumberOfPlayers = 6
-


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
-


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 - (Player((Integer A))) types a chat message containing Ally_Command as A substring)
-




Trigger - Add to War <gen> the event (Player - (Player((Integer A))) types a chat message containing Unally_Command as A substring)
-




Trigger - Add to Ally Accept <gen> the event (Dialog - A dialog button is clicked for DialogAlly[(Integer A)])
-
-
-
-
-
Ally
-

Events
-

Conditions
-

Actions
-


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
-






Or - Any (Conditions) are true
-







Conditions
-








String Equal to ((Ally_Command + ) + PlayerName[(Integer A)])
-








String Equal to ((Ally_Command + ) + Color[(Integer A)])
-








String Equal to ((Ally_Command + ) + (String((Integer A))))
-
-
-
-





Then - Actions
-






Set AskedPlayer = (Player((Integer A)))
-






Dialog - Clear DialogAlly[(Player number of AskedPlayer)]
-






Dialog - Change the title of DialogAlly[(Player number of AskedPlayer)] to (PlayerName[(Player number of (Triggering player))] + wishes to create an alliance with you)
-






Dialog - Create a dialog button for DialogAlly[(Player number of AskedPlayer)] labelled |cffadff2fYes|r
-






Set Button1[(Player number of AskedPlayer)] = (Last created dialog Button)
-






Dialog - Create a dialog button for DialogAlly[(Player number of AskedPlayer)] labelled |cffff0000No|r
-






Set Button2[(Player number of AskedPlayer)] = (Last created dialog Button)
-






Dialog - Show DialogAlly[(Player number of AskedPlayer)] for AskedPlayer
-






Set Allying_player[(Player number of (Player((Integer A))))] = (Triggering player)
-
-





Else - Actions
-
-
-
-
-
-
War
-

Events
-

Conditions
-

Actions
-


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
-






Player - Make (Player((Integer A))) treat (Triggering player) as an Enemy
-






Set PlayerMessaging = (All players matching ((Matching player) Equal to (Triggering player)))
-






Game - Display to PlayerMessaging for 10.00 seconds the text: (You have declared war on + PlayerName[(Player number of (Player((Integer A))))])
-






Custom script: call DestroyForce(udg_PlayerMessaging)
-






Set PlayerMessaging = (All players matching ((Matching player) Equal to (Player((Integer A)))))
-






Game - Display to PlayerMessaging for 10.00 seconds the text: ((Name of (Triggering player)) + has declared war on you)
-






Custom script: call DestroyForce(udg_PlayerMessaging)
-
-





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
-








Player - Make (Player((Integer A))) treat (Triggering player) as an Enemy
-








Set PlayerMessaging = (All players matching ((Matching player) Equal to (Triggering player)))
-








Game - Display to PlayerMessaging for 10.00 seconds the text: (You have declared war on + PlayerName[(Player number of (Player((Integer A))))])
-








Custom script: call DestroyForce(udg_PlayerMessaging)
-








Set PlayerMessaging = (All players matching ((Matching player) Equal to (Player((Integer A)))))
-








Game - Display to PlayerMessaging for 10.00 seconds the text: ((Name of (Triggering player)) + has declared war on you)
-








Custom script: call DestroyForce(udg_PlayerMessaging)
-
-







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
-










Player - Make (Player((Integer A))) treat (Triggering player) as an Enemy
-










Set PlayerMessaging = (All players matching ((Matching player) Equal to (Triggering player)))
-










Game - Display to PlayerMessaging for 10.00 seconds the text: (You have declared war on + PlayerName[(Player number of (Player((Integer A))))])
-










Custom script: call DestroyForce(udg_PlayerMessaging)
-










Set PlayerMessaging = (All players matching ((Matching player) Equal to (Player((Integer A)))))
-










Game - Display to PlayerMessaging for 10.00 seconds the text: ((Name of (Triggering player)) + has declared war on you)
-










Custom script: call DestroyForce(udg_PlayerMessaging)
-
-









Else - Actions
-
-
-
-
-
-
-
-
-
-
Ally Accept
-

Events
-

Conditions
-

Actions
-


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
-






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





Then - Actions
-






Player - Make (Triggering player) treat Allying_player[(Player number of (Triggering player))] as an Ally with shared vision
-






Player - Make Allying_player[(Player number of (Triggering player))] treat (Triggering player) as an Ally with shared vision
-






Set PlayerMessaging = (All players matching ((Matching player) Equal to (Triggering player)))
-






Game - Display to PlayerMessaging for 10.00 seconds the text: ((Name of Allying_player[(Player number of (Triggering player))]) + has accpeted alliance)
-






Custom script: call DestroyForce(udg_PlayerMessaging)
-






Set PlayerMessaging = (All players matching ((Matching player) Equal to Allying_player[(Player number of (Triggering player))]))
-






Game - Display to PlayerMessaging for 10.00 seconds the text: ((Name of (Triggering player)) + has became an ally)
-






Custom script: call DestroyForce(udg_PlayerMessaging)
-
-





Else - Actions
-
-




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





If - Conditions
-






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





Then - Actions
-






Set PlayerMessaging = (All players matching ((Matching player) Equal to (Triggering player)))
-






Game - Display to PlayerMessaging for 10.00 seconds the text: (You has rejected alliance with + (Name of Allying_player[(Player number of (Triggering player))]))
-






Custom script: call DestroyForce(udg_PlayerMessaging)
-






Set PlayerMessaging = (All players matching ((Matching player) Equal to Allying_player[(Player number of (Triggering player))]))
-






Game - Display to PlayerMessaging for 10.00 seconds the text: ((Name of (Triggering player)) + has rejected alliance)
-






Custom script: call DestroyForce(udg_PlayerMessaging)
-
-





Else - Actions
-
-
-
-
-
Currently it only works when another player types -ally red. it does not work any other way. not sure why it is doing this because i am not very good at the editor, im learning though.
Rep will be given to whomever helps.
