• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Request rank system

Status
Not open for further replies.
Level 1
Joined
Feb 20, 2009
Messages
1
Make a rank command that sets a rank for any player (Red-Brown), using this information:

1. Ranking uses a number system.
2. 1-199 is "Noob", 200-399 is "Normy", 400-899 is "Pro", 900+ is "Jesus"
3. The variables are as following; Numbers (1-900+) is an Integer, Ranks (Noob-Jesus) are Strings
4. The string follows after the player's name.
5. The command should be able to set the player's rank, not just add to it.
6. If they try to enter an integer over 1000, their rank is set to 1000
 
Level 2
Joined
Aug 23, 2008
Messages
25
Here are the triggers:

  • set default name
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • 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
              • ((Player((Integer A))) controller) Equal to User
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Set PlayerNormalName[(Integer A)] = (Name of (Player((Integer A))))
            • Else - Actions
  • set rank
    • Events
      • Player - Player 1 (Red) types a chat message containing -rank as A substring
      • Player - Player 2 (Blue) types a chat message containing -rank as A substring
      • Player - Player 3 (Teal) types a chat message containing -rank as A substring
      • Player - Player 4 (Purple) types a chat message containing -rank as A substring
      • Player - Player 5 (Yellow) types a chat message containing -rank as A substring
      • Player - Player 6 (Orange) types a chat message containing -rank as A substring
      • Player - Player 7 (Green) types a chat message containing -rank as A substring
      • Player - Player 8 (Pink) types a chat message containing -rank as A substring
      • Player - Player 9 (Gray) types a chat message containing -rank as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -rank as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -rank as A substring
      • Player - Player 12 (Brown) types a chat message containing -rank as A substring
    • Conditions
    • Actions
      • Set RankNumber[(Player number of (Triggering player))] = (Integer((Substring((Entered chat string), 7, 12))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -rank none
        • Then - Actions
          • Player - Set name of (Triggering player) to PlayerNormalName[(Player number of (Triggering player))]
          • Set PlayerRank[(Player number of (Triggering player))] = <Empty String>
          • Set RankNumber[(Player number of (Triggering player))] = 0
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RankNumber[(Player number of (Triggering player))] Less than or equal to 199
            • Then - Actions
              • Set PlayerRank[(Player number of (Triggering player))] = Noob
              • Player - Set name of (Triggering player) to (PlayerNormalName[(Player number of (Triggering player))] + (Noob))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RankNumber[(Player number of (Triggering player))] Less than or equal to 399
                • Then - Actions
                  • Set PlayerRank[(Player number of (Triggering player))] = Normy
                  • Player - Set name of (Triggering player) to (PlayerNormalName[(Player number of (Triggering player))] + (Normy))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RankNumber[(Player number of (Triggering player))] Less than or equal to 899
                    • Then - Actions
                      • Set PlayerRank[(Player number of (Triggering player))] = Pro
                      • Player - Set name of (Triggering player) to (PlayerNormalName[(Player number of (Triggering player))] + (Pro))
                    • Else - Actions
                      • Set PlayerRank[(Player number of (Triggering player))] = Jesus
                      • Player - Set name of (Triggering player) to (PlayerNormalName[(Player number of (Triggering player))] + (Jesus))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RankNumber[(Player number of (Triggering player))] Greater than 1000
                        • Then - Actions
                          • Set RankNumber[(Player number of (Triggering player))] = 1000
                        • Else - Actions
Also made it in a map.
 

Attachments

  • rank system.w3x
    17.5 KB · Views: 47
Status
Not open for further replies.
Top