• 🏆 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!

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: 45
Status
Not open for further replies.
Top