Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
This is an alliance system that makes creating alliances easy and fast for both players!
Supports 12 players!
Q: How does it work? A: Well it starts the same as any other alliance system, you type "-ally (color)" but after that it creates a dialog box for that player giving them two choices. They can either Accept, and be allied to the other player or Decline, and not be allied.
Q: Is there an alliance limit? A: No, you can ally as many players as you want but only one at a time.
Q: What if someone just used this system to troll with at key moments in battle? A: Simple, thanks to the help of Champara Bros the anti-spam feature will only allow 3 failed alliance attempts before the player has to wait for 3 minutes before they can ally again.
Q: Once someone comes off of the anti-spam timer, can't they just do it again? A: As of Version 1.4, after the first timer the can only get the timer one more time before being removed from the game.
Q: If I use this system in my map, who should I give credit to? A: Give credit to 13oot-Me.
Setup
Events
Map initialization
Conditions
Actions
Set Color_s[1] = red
Set Color_s[2] = blue
Set Color_s[3] = teal
Set Color_s[4] = purple
Set Color_s[5] = yellow
Set Color_s[6] = orange
Set Color_s[7] = green
Set Color_s[8] = pink
Set Color_s[9] = gray
Set Color_s[10] = light blue
Set Color_s[11] = dark green
Set Color_s[12] = brown
Quest - Create a Required quest titled AA System with the description === Advanced Allian..., using icon path ReplaceableTextures\WorldEditUI\Editor-MultipleUnits.blp
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Set AllyDecision_boo[(Integer A)] = False
Set AllianceAttempt_int[(Integer A)] = 0
Set AllianceWaits_int[(Integer A)] = 0
Auto War
Events
Unit - A unit owned by Player 1 (Red) Is attacked
Unit - A unit owned by Player 2 (Blue) Is attacked
Unit - A unit owned by Player 3 (Teal) Is attacked
Unit - A unit owned by Player 4 (Purple) Is attacked
Unit - A unit owned by Player 5 (Yellow) Is attacked
Unit - A unit owned by Player 6 (Orange) Is attacked
Unit - A unit owned by Player 7 (Green) Is attacked
Unit - A unit owned by Player 8 (Pink) Is attacked
Unit - A unit owned by Player 9 (Gray) Is attacked
Unit - A unit owned by Player 10 (Light Blue) Is attacked
Unit - A unit owned by Player 11 (Dark Green) Is attacked
Unit - A unit owned by Player 12 (Brown) Is attacked
Conditions
And - All (Conditions) are true
Conditions
((Attacked unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
(Owner of (Attacking unit)) Not equal to (Owner of (Attacked unit))
Actions
Game - Display to (All players) for 10.00 seconds the text: ((|cffffcc00 + ((Name of (Owner of (Attacked unit))) + |r)) + (( has been betrayed by + (|cffffcc00 + (Name of (Owner of (Attacking unit))))) + |r!))
Player - Make (Owner of (Attacked unit)) treat (Owner of (Attacking unit)) as an Enemy
Player - Make (Owner of (Attacking unit)) treat (Owner of (Attacked unit)) as an Enemy
Make Alliance
Events
Player - Player 1 (Red) types a chat message containing - as A substring
Player - Player 2 (Blue) types a chat message containing - as A substring
Player - Player 3 (Teal) types a chat message containing - as A substring
Player - Player 4 (Purple) types a chat message containing - as A substring
Player - Player 5 (Yellow) types a chat message containing - as A substring
Player - Player 6 (Orange) types a chat message containing - as A substring
Player - Player 7 (Green) types a chat message containing - as A substring
Player - Player 8 (Pink) types a chat message containing - as A substring
Player - Player 9 (Gray) types a chat message containing - as A substring
Player - Player 10 (Light Blue) types a chat message containing - as A substring
Player - Player 11 (Dark Green) types a chat message containing - as A substring
Player - Player 12 (Brown) types a chat message containing - as A substring
Conditions
Actions
Set PlayerNumber_int = (Player number of (Triggering player))
Set tempforce1 = (Player group((Triggering player)))
Set StopMessageLoop_boo[(Player number of (Triggering player))] = False
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AllianceAttempt_int[(Player number of (Triggering player))] Less than 3
Then - Actions
Set StopTimerLoop_boo[(Player number of (Triggering player))] = False
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Entered chat string) Equal to (-ally + Color_s[(Integer A)])
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AllyDecision_boo[PlayerNumber_int] Equal to True
Then - Actions
If (StopMessageLoop_boo[(Player number of (Triggering player))] Equal to False) then do (Game - Display to tempforce1 for 10.00 seconds the text: |cFF60D213An allian...) else do (Do nothing)
Set StopMessageLoop_boo[(Player number of (Triggering player))] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Player((Integer A))) slot status) Equal to Is playing) and (((Player((Integer A))) controller) Equal to User)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) is an ally of (Player((Integer A)))) Equal to True
Then - Actions
If (StopMessageLoop_boo[(Integer A)] Equal to False) then do (Game - Display to tempforce1 for 10.00 seconds the text: |cFF60D213You are a...) else do (Do nothing)
Set StopMessageLoop_boo[(Player number of (Triggering player))] = True
Else - Actions
Set AllyDecision_boo[PlayerNumber_int] = True
Set AlliancePlayerNumber_int = (Integer A)
Set Player_p[AlliancePlayerNumber_int] = (Player((Integer A)))
Set AllyingPlayer_p[PlayerNumber_int] = (Triggering player)
Dialog - Clear Dialog_Box_A
Dialog - Change the title of Dialog_Box_A to ((Name of (Triggering player)) + would like to ally with you,|n would you like to form an alliance?|n You can always unally this player later.)
Dialog - Create a dialog button for Dialog_Box_A labelled Accept
Set Dialog_Button_A = (Last created dialog Button)
Dialog - Create a dialog button for Dialog_Box_A labelled Decline
Set Dialog_Button_B = (Last created dialog Button)
Dialog - Show Dialog_Box_A for Player_p[AlliancePlayerNumber_int]
Dialog - Clear Dialog_Box_B
Dialog - Change the title of Dialog_Box_B to (Waiting for + ((Name of Player_p[AlliancePlayerNumber_int]) + |nto decide the alliance...))
Dialog - Create a dialog button for Dialog_Box_B labelled Cancel
Set Dialog_Button_C = (Last created dialog Button)
Dialog - Show Dialog_Box_A for Player_p[AlliancePlayerNumber_int]
Dialog - Show Dialog_Box_B for AllyingPlayer_p[PlayerNumber_int]
Trigger - Turn on Ally Decision <gen>
Trigger - Turn on Cancel <gen>
Else - Actions
If (StopMessageLoop_boo[(Player number of (Triggering player))] Equal to False) then do (Game - Display to tempforce1 for 10.00 seconds the text: |cFF60D213There is ...) else do (Do nothing)
Set StopMessageLoop_boo[(Player number of (Triggering player))] = True
Else - Actions
Else - Actions
Custom script: call DestroyForce(udg_tempforce1)
Ally Decision
Events
Dialog - A dialog button is clicked for Dialog_Box_A
Conditions
(Triggering player) Equal to Player_p[AlliancePlayerNumber_int]
Actions
Set tempforce2 = (Player group(AllyingPlayer_p[PlayerNumber_int]))
Set tempforce3 = (Player group(Player_p[AlliancePlayerNumber_int]))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Dialog_Button_A
Then - Actions
Player - Make Player_p[AlliancePlayerNumber_int] treat AllyingPlayer_p[PlayerNumber_int] as an Ally with shared vision
Player - Make AllyingPlayer_p[PlayerNumber_int] treat Player_p[AlliancePlayerNumber_int] as an Ally with shared vision
Game - Display to tempforce2 for 10.00 seconds the text: ((|cffffcc00 + (Name of Player_p[AlliancePlayerNumber_int])) + |r |cFF165ED3accepted your alliance!|r)
Game - Display to tempforce3 for 10.00 seconds the text: ((|cffffcc00 + (Name of AllyingPlayer_p[PlayerNumber_int])) + |r |cFF165ED3and you are now allies!|r)
Else - Actions
Game - Display to tempforce2 for 10.00 seconds the text: ((|cffffcc00 + (Name of Player_p[AlliancePlayerNumber_int])) + |r |cFFB01E1Edeclined your alliance!|r)
Set AllianceAttempt_int[PlayerNumber_int] = (AllianceAttempt_int[PlayerNumber_int] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AllianceAttempt_int[PlayerNumber_int] Greater than or equal to 3
Then - Actions
Set AllianceWaits_int[PlayerNumber_int] = (AllianceWaits_int[PlayerNumber_int] + 1)
Trigger - Run Remove Trolling Player <gen> (ignoring conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
StopTimerLoop_boo[(Player number of (Triggering player))] Equal to False
Then - Actions
Set StopTimerLoop_boo[(Player number of (Triggering player))] = True
Game - Display to tempforce2 for 10.00 seconds the text: |cFFB01E1EYou have ...
Countdown Timer - Start WaitTimer_t[PlayerNumber_int] as a One-shot timer that will expire in 180.00 seconds
Countdown Timer - Create a timer window for WaitTimer_t[PlayerNumber_int] with title Can't ally for...
Set WaitTimerWindow_tw[PlayerNumber_int] = (Last created timer window)
Countdown Timer - Show WaitTimerWindow_tw[PlayerNumber_int] for AllyingPlayer_p[PlayerNumber_int]
Wait 180.00 game-time seconds
Set AllianceAttempt_int[PlayerNumber_int] = 0
Game - Display to tempforce2 for 10.00 seconds the text: |cFF165ED3You can n...
Countdown Timer - Hide WaitTimerWindow_tw[PlayerNumber_int] for AllyingPlayer_p[PlayerNumber_int]
Dialog - Hide Dialog_Box_A for Player_p[AlliancePlayerNumber_int]
Dialog - Hide Dialog_Box_B for AllyingPlayer_p[PlayerNumber_int]
Custom script: call DestroyForce(udg_tempforce2)
Custom script: call DestroyForce(udg_tempforce3)
Set AllyDecision_boo[PlayerNumber_int] = False
Trigger - Turn off (This trigger)
Cancel
Events
Dialog - A dialog button is clicked for Dialog_Box_B
Conditions
(Triggering player) Equal to AllyingPlayer_p[PlayerNumber_int]
Actions
Set tempforce2 = (Player group(AllyingPlayer_p[PlayerNumber_int]))
Set tempforce3 = (Player group(Player_p[AlliancePlayerNumber_int]))
Game - Display to tempforce2 for 10.00 seconds the text: ((|cFFB01E1EYou canceled the alliance request with|r |cffffcc00 + (Name of Player_p[AlliancePlayerNumber_int])) + |r!)
Game - Display to tempforce3 for 10.00 seconds the text: ((|cffffcc00 + (Name of AllyingPlayer_p[PlayerNumber_int])) + |r |cFFB01E1Ehas canceled their alliance request with you!|r)
Dialog - Hide Dialog_Box_A for Player_p[AlliancePlayerNumber_int]
Dialog - Hide Dialog_Box_B for AllyingPlayer_p[PlayerNumber_int]
Set AllyDecision_boo[PlayerNumber_int] = False
Set AllianceAttempt_int[PlayerNumber_int] = (AllianceAttempt_int[PlayerNumber_int] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AllianceAttempt_int[PlayerNumber_int] Greater than or equal to 3
Then - Actions
Set AllianceWaits_int[PlayerNumber_int] = (AllianceWaits_int[PlayerNumber_int] + 1)
Trigger - Run Remove Trolling Player <gen> (ignoring conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
StopTimerLoop_boo[(Player number of (Triggering player))] Equal to False
Then - Actions
Set StopTimerLoop_boo[(Player number of (Triggering player))] = True
Game - Display to tempforce2 for 10.00 seconds the text: |cFFB01E1EYou have ...
Countdown Timer - Start WaitTimer_t[PlayerNumber_int] as a One-shot timer that will expire in 180.00 seconds
Countdown Timer - Create a timer window for WaitTimer_t[PlayerNumber_int] with title Can't ally for...
Set WaitTimerWindow_tw[PlayerNumber_int] = (Last created timer window)
Countdown Timer - Show WaitTimerWindow_tw[PlayerNumber_int] for AllyingPlayer_p[PlayerNumber_int]
Wait 180.00 game-time seconds
Set AllianceAttempt_int[PlayerNumber_int] = 0
Game - Display to tempforce2 for 10.00 seconds the text: |cFF165ED3You can n...
Countdown Timer - Hide WaitTimerWindow_tw[PlayerNumber_int] for AllyingPlayer_p[PlayerNumber_int]
Player - Player 1 (Red) types a chat message containing - as A substring
Player - Player 2 (Blue) types a chat message containing - as A substring
Player - Player 3 (Teal) types a chat message containing - as A substring
Player - Player 4 (Purple) types a chat message containing - as A substring
Player - Player 5 (Yellow) types a chat message containing - as A substring
Player - Player 6 (Orange) types a chat message containing - as A substring
Player - Player 7 (Green) types a chat message containing - as A substring
Player - Player 8 (Pink) types a chat message containing - as A substring
Player - Player 9 (Gray) types a chat message containing - as A substring
Player - Player 10 (Light Blue) types a chat message containing - as A substring
Player - Player 11 (Dark Green) types a chat message containing - as A substring
Player - Player 12 (Brown) types a chat message containing - as A substring
Conditions
Actions
Set StopMessageLoop_boo[(Player number of (Triggering player))] = True
Set tempforce4 = (Player group((Triggering player)))
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Entered chat string) Equal to (-unally + Color_s[(Integer A)])
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Player((Integer A))) slot status) Equal to Is playing) and (((Player((Integer A))) controller) Equal to User)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) is an enemy of (Player((Integer A)))) Equal to True
Then - Actions
If (StopMessageLoop_boo[(Player number of (Triggering player))] Equal to False) then do (Game - Display to tempforce4 for 10.00 seconds the text: (|cFF60D213You're already at war with|r |cffffcc00 + ((Name of UnalliedPlayer_p[AlliancePlayerNumber_int]) + |r!))) else do (Do nothing)
Set StopMessageLoop_boo[(Player number of (Triggering player))] = False
Else - Actions
Set AlliancePlayerNumber_int = (Integer A)
Set UnalliedPlayer_p[AlliancePlayerNumber_int] = (Player((Integer A)))
Set tempforce5 = (Player group(UnalliedPlayer_p[AlliancePlayerNumber_int]))
Player - Make UnalliedPlayer_p[AlliancePlayerNumber_int] treat (Triggering player) as an Enemy
Player - Make (Triggering player) treat UnalliedPlayer_p[AlliancePlayerNumber_int] as an Enemy
If (StopMessageLoop_boo[(Player number of (Triggering player))] Equal to False) then do (Game - Display to tempforce4 for 10.00 seconds the text: (|cFFB01E1EYou have declared war on|r |cffffcc00 + ((Name of UnalliedPlayer_p[AlliancePlayerNumber_int]) + |r!))) else do (Do nothing)
If (StopMessageLoop_boo[(Player number of (Triggering player))] Equal to False) then do (Game - Display to tempforce5 for 10.00 seconds the text: (|cffffcc00 + ((Name of (Triggering player)) + |r |cFFB01E1Ehas declared war on you!|r))) else do (Do nothing)
Set StopMessageLoop_boo[(Player number of (Triggering player))] = False
Else - Actions
If (StopMessageLoop_boo[(Player number of (Triggering player))] Equal to False) then do (Game - Display to tempforce4 for 10.00 seconds the text: |cFF60D213No one is...) else do (Do nothing)
Set StopMessageLoop_boo[(Player number of (Triggering player))] = False
Else - Actions
Custom script: call DestroyForce(udg_tempforce4)
Custom script: call DestroyForce(udg_tempforce5)
Remove Trolling Player
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AllianceWaits_int[PlayerNumber_int] Equal to 3
Then - Actions
Game - Defeat AllyingPlayer_p[PlayerNumber_int] with the message: Don't waste allianc...
Game - Display to (All players) for 10.00 seconds the text: ((|cffffcc00 + (Name of AllyingPlayer_p[PlayerNumber_int])) + |r |cFFB01E1Ehas been removed from the game!|r)
Else - Actions
AllianceAttempt_int = Integer Array (1)
AlliancePlayerNumber_int = Integer
AllianceWaits_int = Integer Array
AllyDecision_boo = Boolean Array (1)
AllyingPlayer_p = Player Array (1)
Color_s = String Array (1)
Dialog_Box_A = Dialog
Dialog_Box_B = Dialog
Dialog_Button_A = Dialog Button
Dialog_Button_B = Dialog Button
Dialog_Button_C = Dialog Button
Player_p = Player Array (1)
PlayerNumber_int = Integer
StopMessageLoop_boo = Boolean Array (1)
StopTimerLoop_boo = Boolean Array (1)
tempforce1 = Player Group
tempforce2 = Player Group
tempforce3 = Player Group
tempforce4 = Player Group
tempforce5 = Player Group
UnalliedPlayer_p = Player Array (1)
WaitTimer_t = Timer Array (1)
WaitTimerWindow_tw = Timer Window Array (1)
Updates
Version 1.0
Release on 7/21/2011
Version 1.1
Made to support 12 players.
Changed code to make it easier to change.
Version 1.2
Reduced trigger amount from 27 to 6
Version 1.3
Fixed message loop bug
Fixed player group leaks
Added Anti-Spam feature
Version 1.4
Added player removal for failing 9 alliance attempts
Added color to text
Increased trigger amount from 6 to 7
I am open to criticism and suggestions! If you have either of them please post them and i'll see what I can do.
If you use this in your map please give credit!
Thank you ap0calypse for helping me out with this, thank you Jazztastic for pointing out that this could have been used to troll with, and thank you Champara Bros for helping me out with the anti-spam feature!
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
10 Nov 2011
Bribe: Your "Wait 180.00 game-time seconds" makes this not-MPI. You might need to use a local variable to do this correctly.
I also think the 180-seconds should be...
Oh... I didn't see anything other than the simple way when you type "-ally (color)" it ONLY allies you to that player, that player would have to do the same to you.
Could you please tell me how exactly it's not usable? i used it for a risk map I made and it works great!
Idea is good but it still need a lot of work to be done properly.
Don't you think that forcing users to create 12 triggers for ally and 12 triggers for unally is a bit frustrating?
Work with hashtables. Since actions are always connected with player color written by other user you can store players as name of the colors.
So, the maximum amount of players-human is 12 we just need to store 12 positions.
I recommend doing that on map initialization trigger:
I'm sorry if players handle can be saved too, but integers works here as well.
Now, when you got players saved, you no longer have to check entered chat string in conditions as constants.
Egzample:
check
Actions
Set tempstring = (Entered chat string)
Set tempplayer = Player(Load tempstring of 1 from AShash)
<next stuff>
I have just told you the idea, I'd use custom script with setting player too but I dont have editor around now and I'm unsure about the code.
Anyways, there are plenty of methods. If you need help, feel free to ask.
What about the possilibity of using this to troll? Any player could type -ally and the color of their enemy while attacking them to make a pop-up box. Players cant do things in pop-up boxes except click the options, so you could do it at a critical moment in battle and win the battle because the other player can't respond.
What about the possilibity of using this to troll? Any player could type -ally and the color of their enemy while attacking them to make a pop-up box. Players cant do things in pop-up boxes except click the options, so you could do it at a critical moment in battle and win the battle because the other player can't respond.
What about the possilibity of using this to troll? Any player could type -ally and the color of their enemy while attacking them to make a pop-up box. Players cant do things in pop-up boxes except click the options, so you could do it at a critical moment in battle and win the battle because the other player can't respond.
Sadly, it doesnt work. When I have all the triggers c/p in, and I try to save my map it comes up with multiple errors for each trigger. Then it makes them disabled. (btw I have create variables on).
If I somehow did something wrong, I'd be glad to know what.
P.S. I'll sure to use it when it works, especially if you ever add a anti-spam feature to it.
@Czarofthewest, did you make your own variables or use the ones I have already set? If you added the triggers in before you put in the variables or if you miss typed some variables the triggers will become disabled. I haven't had any problems with it and I wouldn't upload it if there was a problem like that.
I am currently working on an addition thanks to Champara Bros where if (for example) Player A attempts to ally Player B, and Player B declines or Player A cancels the alliance request, Player A has added +1 to a variable and when that variable reaches 3, Player A will be unable to try and ally for 3 minutes.
is there time limit for those three failed alliances? lets say the player gets failed two times and he is scared to do it third time because he can be declined and get the penalty? I mean like those two should perish over time because if its for 12 players people troll him; tell him to become an ally and then they decline. if they do that multiple times they can kick the player out of the game...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.