• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Surrender System Needed

Status
Not open for further replies.
Level 4
Joined
Apr 23, 2008
Messages
119
I need a system that allows a person to enter "/surrender" to take a vote to end the game. The surrender voting cannot happen until 20 minutes in and the voting must be majority of the players on a team. So if a team has a leaver the vote will be 3 out of 4. If there are 5 then 4 out of 5. Players are 2-6 and 8-12. If the voting is denied i would like it to say denied and the vote cannot be redone for 5 more minutes.

If you have questions about this system i am free to answer.

Thank you and as always +rep to people who help.
 
Level 5
Joined
Apr 17, 2010
Messages
124
Would you like the voting to be anonymous? And also, what would the teams be?
As in, is the order Red, blue, teal, etc, but 6v6?


EDIT: Here you are, but this is very sloppily done. I've left it easily cleanable so you can learn some things.


  • Timesurrender
    • Events
      • Time - Elapsed game time is 1200.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn on entered surrender <gen>

  • entered surrender
    • Events
      • Player - Player 7 (Green) types a chat message containing /surrender as A substring
      • Player - Player 8 (Pink) types a chat message containing /surrender as A substring
      • Player - Player 9 (Gray) types a chat message containing /surrender as A substring
      • Player - Player 10 (Light Blue) types a chat message containing /surrender as A substring
      • Player - Player 11 (Dark Green) types a chat message containing /surrender as A substring
      • Player - Player 12 (Brown) types a chat message containing /surrender as A substring
      • Player - Player 1 (Red) types a chat message containing /surrender as A substring
      • Player - Player 2 (Blue) types a chat message containing /surrender as A substring
      • Player - Player 3 (Teal) types a chat message containing /surrender as A substring
      • Player - Player 4 (Purple) types a chat message containing /surrender as A substring
      • Player - Player 5 (Yellow) types a chat message containing /surrender as A substring
      • Player - Player 6 (Orange) types a chat message containing /surrender as A substring
    • Conditions
    • Actions
      • Dialog - Create a dialog button for votedialog labelled Yes
      • Set voteYES = (Last created dialog Button)
      • Dialog - Create a dialog button for votedialog labelled No
      • Set voteNO = (Last created dialog Button)
      • Player Group - Pick every player in surrender_team and do (Actions)
        • Loop - Actions
          • Dialog - Show votedialog for (Picked player)
      • Multiboard - Create a multiboard with 2 columns and 2 rows, titled Votes
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Yes
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to No
      • Trigger - Turn on votes surrender <gen>
      • Trigger - Turn off (This trigger)

  • votes surrender
    • Events
      • Dialog - A dialog button is clicked for votedialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to voteYES
        • Then - Actions
          • Set votesYES = (votesYES + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to (String(votesYES))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to voteNO
            • Then - Actions
              • Set votesNO = (votesNO + 1)
              • Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (String(votesNO))
            • Else - Actions
      • Trigger - Turn on victorydefeat <gen>

  • victorydefeat
    • Events
      • Time - Elapsed game time is 15.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • votesYES Greater than votesNO
        • Then - Actions
          • Player Group - Pick every player in surrender_team and do (Game - Defeat (Picked player) with the message: FUCKIN OWNED! )
          • Player Group - Pick every player in (All enemies of (Random player from surrender_team)) and do (Game - Victory (Picked player) (Skip dialogs, Show scores))
        • Else - Actions
          • Game - Display to (All players) the text: The vote to surrend...
      • Trigger - Turn on time resurrender <gen>
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off entered surrender <gen>
      • Trigger - Turn off votes surrender <gen>

  • time resurrender
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Trigger - Turn on entered surrender <gen>
      • Trigger - Turn off time resurrender 2 <gen>
      • Trigger - Turn off time resurrender <gen>

  • time resurrender 2
    • Events
      • Player - Player 7 (Green) types a chat message containing /surrender as A substring
      • Player - Player 8 (Pink) types a chat message containing /surrender as A substring
      • Player - Player 9 (Gray) types a chat message containing /surrender as A substring
      • Player - Player 10 (Light Blue) types a chat message containing /surrender as A substring
      • Player - Player 11 (Dark Green) types a chat message containing /surrender as A substring
      • Player - Player 12 (Brown) types a chat message containing /surrender as A substring
      • Player - Player 1 (Red) types a chat message containing /surrender as A substring
      • Player - Player 2 (Blue) types a chat message containing /surrender as A substring
      • Player - Player 3 (Teal) types a chat message containing /surrender as A substring
      • Player - Player 4 (Purple) types a chat message containing /surrender as A substring
      • Player - Player 5 (Yellow) types a chat message containing /surrender as A substring
      • Player - Player 6 (Orange) types a chat message containing /surrender as A substring
    • Conditions
    • Actions
      • Game - Display to (All allies of (Triggering player)) the text: You can't call a su...

 
Last edited:
Level 4
Joined
Apr 23, 2008
Messages
119
it looks like it could work. I would have to make it to know haha. Plus rep for the attempt. I like the idea of the dialog box.

Teams were player 2-6 and 8-12. When someone types surrender only the members of their team vote in this system right?
 
Level 5
Joined
Apr 17, 2010
Messages
124
it looks like it could work. I would have to make it to know haha. Plus rep for the attempt. I like the idea of the dialog box.

Teams were player 2-6 and 8-12. When someone types surrender only the members of their team vote in this system right?

Okay, I redid a little of it.

It only shows the dialogs( the voting ) for allies of the player who typed /surrender, aka his team.

I fixed it. I'll give you a test map instead, so you can easily import the triggers.
 

Attachments

  • Surrender.w3x
    14.8 KB · Views: 76
Level 4
Joined
Apr 23, 2008
Messages
119
Thanks for the Rep though i do not understand why i get rep haha. i would give you more rep but i can't I always appreciate help :). Ill take a look at the trigger real quick.. I like it, It appears to be what i need, But i will be sure to post if i find any problems during implementation. Again thank you for helping.
 
Status
Not open for further replies.
Top