You have ALOT of -reps...
Anyway, for the name changing trigger, I think there's a tutorial on it in the tutorials section.
But basically put, its something like this.
-
[[trigger]
-
Rename Simple
-
Events
-
Player - Player 1 (Red) types a chat message containing -name as A substring
-
Player - Player 2 (Blue) types a chat message containing -name as A substring
-
Conditions
-
(Substring((Entered chat string), 1, 6)) Equal to -name
-
Actions
-
-------- Note: Theres a space after -name. --------
-
-------- You will need for this trigger... --------
-
-------- //A String Variable named NewName --------
-
-------- --------
-
-------- This is a simple rename trigger. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Length of (Entered chat string)) Greater than 27
-
Then - Actions
-
-------- This takes everything after -name_ and adds it to NewName as long as its no longer then 20 characters. --------
-
Set NewName = (Substring((Entered chat string), 7, 27))
-
-------- If it is longer, it only takes 20, as shown above. --------
-
Else - Actions
-
Set NewName = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
-
-------- If not, it takes all. --------
-
Player - Set name of (Triggering player) to NewName
-
-------- But what if you wanted to make it so players couldn't frame other players? --------
-
-------- Or frame you even, the creator of your map? --------
-
-------- What if you wanted to know who someones Original Name was before they changed it? --------
-
-------- Well this is all going to be explained, yay! --------
So what if you want to make a trigger that checks if it’s ok for the player to have that name. By ok I mean that it does not conflict with another player’s current name, original name, or any name on the BlockedName list I told you to make before.
OriginalName keeps track of the players original name, incase anyone wants to check who they are, and so no one gets mixed up. BlockedName is a list of 12 names that you want no one to change their name to in-game, like your name, so no one can frame you. But what happens if you join the game and your name is blocked? Well we can fix that too!
-
Rename
-
Events
-
Player - Player 1 (Red) types a chat message containing -name as A substring
-
Player - Player 2 (Blue) types a chat message containing -name as A substring
-
Conditions
-
(Substring((Entered chat string), 1, 6)) Equal to -name
-
Actions
-
-------- Note: Theres a space after -name. --------
-
-------- You will need for this trigger... --------
-
-------- //A String Variable named NewName --------
-
-------- //A Boolean Variable named NameVio (Stands for NameViolation) --------
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Length of (Entered chat string)) Greater than 27
-
Then - Actions
-
-------- This takes everything after -name_ and adds it to NewName as long as its no longer then 20 characters. --------
-
Set NewName = (Substring((Entered chat string), 7, 27))
-
-------- If it is longer, it only takes 20, as shown above. --------
-
Else - Actions
-
Set NewName = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
-
-------- If not, it takes all. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NewName Equal to OriginalName[(Player number of (Triggering player))]
-
Then - Actions
-
-------- This simply checks if the NewName is actually the players original name. --------
-
Player - Set name of (Triggering player) to NewName
-
Set PlayerName[(Player number of (Triggering player))] = ((Substring(PlayerName[(Player number of (Triggering player))], 1, 10)) + (NewName + |r))
-
Skip remaining actions
-
-------- If so, then it skips the rest, theres no point in continuing. --------
-
Else - Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
-------- For each integer is a loop action that goes through once for each number --------
-
-------- (Integer A) = The number of the current loop. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
NewName Equal to (Name of (Player((Integer A))))
-
NewName Equal to OriginalName[(Integer A)]
-
NewName Equal to BlockedName[(Integer A)]
-
Then - Actions
-
-------- If - Or Any Condtions are True is on the bottom of the action menu. --------
-
-------- If you have more then 12 BlockedNames, you will have to edit this to check all of them. --------
-
-------- If it detects that the requested NewName is equal to any of the following... --------
-
-------- --The Current name of a player. --------
-
-------- --The Original Name of a player. --------
-
-------- --A Name on your Blocked Names list --------
-
Set NameVio = True
-
-------- It will set NameVio = True, which means the players name isn't going to be changed... --------
-
-------- To what he/she wants anyway :). --------
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
-------- NameVio = False, no collision! The game will allow them to have that new name. --------
-
Player - Set name of (Triggering player) to NewName
-
Set PlayerName[(Player number of (Triggering player))] = ((Substring(PlayerName[(Player number of (Triggering player))], 1, 10)) + (NewName + |r))
-
-------- The Substring 1,10 is the Color Code. --------
-
-------- This Sets PlayerName = (The First 10 Characters of PlayerName(The Color Code)) + NewName + (|r) --------
-
Else - Actions
-
Set NewName = Stupid Idiot
-
-------- Aha!, a collision was detected, then now their new name will be Stupid Idiot. --------
-
-------- That'll teach them for trying to mess with people. --------
-
Player - Set name of (Triggering player) to NewName
-
Set PlayerName[(Player number of (Triggering player))] = ((Substring(PlayerName[(Player number of (Triggering player))], 1, 10)) + (NewName + |r))
TRIGGER]
The above is the part you wanted, here's the full tutorial:
http://wc3campaigns.net/showpost.php?p=830809&postcount=1.
Remember to take a look at it.