Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   Trigger (GUI)/ AI editor Tutorials (http://www.wc3c.net/forumdisplay.php?f=426)
-   -   Playing with Player Names (http://www.wc3c.net/showthread.php?t=86272)

MrApples 08-12-2006 04:15 PM

Playing with Player Names
 
1 Attachment(s)
MrApple's Guide to Playing with Player Names
V2.1 -7/17/06

Introduction
In this tutorial you will learn how to check for certain player names, change player names, color player names, and a whole bunch of other player name stuff. Also you will learn how to get around capitalization, take care of spoofers, and lock triggers so only you may use them in-game!


---1 – Coloring Names---

So, what’s a ‘Player Name’?
The Player Name is the Name of the Player, the account name. Such as my account name on these forums is MrApples.

Ever wonder how people color text in their maps? They use a thing called Color Codes.

What are Color Codes?
Color Codes are a way of telling the game what color to use in text.
The look like this; |c00FF0303|r

00FF0303 is the Actual Code.
|c is the start.
|r is the end.

(TIP: The "|" sign is the "Shift" form of "\", it's right above the "Enter" key )

The Text you want to color goes in between and Code, and the End.
|c00FF0303TextGoesHere|r

Some Basic Color Codes
|c00FF0303TEXT|r = Red
|c000042FFTEXT|r = Blue
|c001CE6B9TEXT|r = Teal
|c00540081TEXT|r = Purple
|c00FFFC01TEXT|r = Yellow
|c00FEBA0ETEXT|r = Orange
|c0020C000TEXT|r = Green
|c00E55BB0TEXT|r = Pink
|c00959697TEXT|r = Gray
|c007EBFF1TEXT|r = Light Blue
|c00106246TEXT|r = Dark Green
|c004E2A04TEXT|r = Brown
(TIP: Need a specific color? You can generate any color you want with this tool.)

Ok, I get the Color Codes part, but how am I supposed to color the names?
Ok here is where it gets tricky, you may be thinking “How do you expect me to check what the Player’s Color is for every player just to put out a simple message”, and well I don’t expect you to do that.

You have to use something called an Array Variable, don’t know what that is? Then you must [http://www.wc3campaigns.net/showthread.php?t=81210]read this before continuing.[/url]

Using the Array Variable for your bidding
Now you must add the following actions to your Initialization Trigger.
(TIP: All triggers seen in this tutorial are available in a map attached below. But I recommend beginners to try to find all the actions yourself first. )
Trigger:
Initilization
Collapse Events
Map initialization
Conditions
Collapse Actions
-------- ADD THESE ACTIONS TO YOUR INITILIZATION TRIGGER --------
-------- What you need for this Trigger. --------
-------- //A Array String Variable Named Color --------
-------- //A Array String Variable Named PlayerName --------
-------- //A Array String Variable Named OriginalName --------
-------- //A Array String Variable Named BlockedName --------
Set BlockedName[1] = EnterNameHere
Set BlockedName[2] = EnterNameHere
-------- You will use BlockedName later on in the tutorial. --------
Set Color[1] = |c00FF0303
Set Color[1] = |c00FF0303
Set Color[2] = |c000042FF
Set Color[3] = |c001CE6B9
Set Color[4] = |c00540081
Set Color[5] = |c00FFFC01
Set Color[6] = |c00FEBA0E
Set Color[7] = |c0020C000
Set Color[8] = |c00E55BB0
Set Color[9] = |c00959697
Set Color[10] = |c007EBFF1
Set Color[11] = |c00106246
Set Color[12] = |c004E2A04
-------- These Color Codes are just good to keep on a variable. --------
-------- Now you can color text alot easier. --------
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Set OriginalName[(Player number of (Picked player))] = (Name of TempPlayer)
-------- Player Number is a Integer. For Player 1 (Red), it would be 1, for Player 2 (Blue), it would be 2, etc. --------
-------- OriginalName is also for later on in the tutorial. --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Red
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[1] + (Name of (Picked player))) + |r)
Else - Actions
-------- This checks looks for the player with the certain color... --------
-------- and then adds the correct color code to the string variable which holds their name. --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Blue
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[2] + (Name of (Picked player))) + |r)
Collapse Else - Actions
-------- You can put each If/Then/Else on the -Else part of the one before it for better triggering. --------
-------- For example, you would put the If(All Conditions Are True...) below where this comment is. --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Teal
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[3] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Purple
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[4] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Yellow
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[5] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Orange
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[6] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Green
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[7] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Pink
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[8] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Gray
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[9] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Light Blue
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[10] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Dark Green
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[11] + (Name of (Picked player))) + |r)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of TempPlayer) Equal to Brown
Collapse Then - Actions
Set PlayerName[(Player number of (Picked player))] = ((Color[12] + (Name of (Picked player))) + |r)
Else - Actions

Voila! Now it’s all set up, but you’re wondering how to actually use it? Well it’s easy!
Trigger:
UsingTheColoredName
Events
Conditions
Collapse Actions
-------- All you have to do is use the PlayerName variable [The Number of the Player you want the name for] --------
-------- Say I wanted to display that "Player 1 Red (in Color) is a peanut head!", I would do this... --------
Game - Display to (All players) the text: (PlayerName[1] + is a peanut head!)
-------- Note: I used Concentrate Strings, put the variable in the first slow, and " is a peanut head!" in the second. --------
-------- --------
-------- Now, what if you want to display that "(Triggering Player) is a smelly goose!" in one of your triggers? --------
-------- You would do this! --------
Game - Display to (All players) the text: (PlayerName[(Player number of (Triggering player))] + is a smelly goose!)
-------- Do you get it now? I hope so. If not make sure to reply to the thread and tell me what you don't get. --------

Now you know how to use colorful Player Names in-game, awesome! But let’s not stop here, there’s a lot more fun to be had when you’re Playing with Player Names!


---2 – Changing Player Names---

Say wha? Changing Player Names?!?
Yes you can change Player Names in-game, it’s actually very easy, you just use the Action “Player – Set Name”. But however, changing the player’s name to what the player wants, and keeping it colored, is a little trickier. Also, its only in-game, once they leave the game their name will be reset.

(TIP: This part of the tutorial requires you have a basic understanding of Chat Event Triggers, read my tutorial here!)

Great! So you know how to use Chat Event Triggers! Well I am going to show you a trigger where when a player types –name, everything after –name(including a space), will be set to a variable(as long as its not longer then 20 characters), and then the players name will be changed to that variable.
Trigger:
Rename Simple
Collapse 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
Collapse Conditions
(Substring((Entered chat string), 1, 6)) Equal to -name
Collapse Actions
-------- Note: Theres a space after -name. --------
-------- You will need for this trigger... --------
-------- //A String Variable named NewName --------
-------- --------
-------- This is a simple rename trigger. --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Length of (Entered chat string)) Greater than 27
Collapse 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. --------
Collapse 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!
Trigger:
Rename
Collapse 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
Collapse Conditions
(Substring((Entered chat string), 1, 6)) Equal to -name
Collapse 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) --------
-------- --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Length of (Entered chat string)) Greater than 27
Collapse 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. --------
Collapse Else - Actions
Set NewName = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
-------- If not, it takes all. --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
NewName Equal to OriginalName[(Player number of (Triggering player))]
Collapse 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
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
-------- For each integer is a loop action that goes through once for each number --------
-------- (Integer A) = The number of the current loop. --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
NewName Equal to (Name of (Player((Integer A))))
NewName Equal to OriginalName[(Integer A)]
NewName Equal to BlockedName[(Integer A)]
Collapse 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
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
NameVio Equal to False
Collapse 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) --------
Collapse 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))

Congratulations, you just learned how to make your very own Rename trigger! And a very good one at that.

Unmasking the Bandit
So in-game it’s great, everyone is amazed by your Player-Name abilities, but what if you come across someone who’s acting really nasty and their hiding behind their new name so you can’t act nasty back. Don’t you wish you could check what their real username is?

Well I made this nice trigger here just for that!
Trigger:
NameCheck
Collapse Events
Player - Player 1 (Red) types a chat message containing -namecheck as A substring
Player - Player 2 (Blue) types a chat message containing -namecheck as A substring
Collapse Conditions
(Substring((Entered chat string), 1, 11)) Equal to -namecheck
Collapse Actions
-------- Note: Theres a space after -namecheck. --------
-------- You will need for this trigger... --------
-------- //A String Variable named TempString --------
Set TempString = (Substring((Entered chat string), 12, (Length of (Entered chat string))))
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Name of (Player((Integer A)))) Equal to TempString
Collapse Then - Actions
-------- This goes through every Player Name seeing if any of them are equal to TempString --------
-------- If it does then it displays to the person who typed the -namecheck the... --------
-------- ...Original Name of the player who owns the matching player name. --------
Game - Display to (All players) for 30.00 seconds the text: (PlayerName[(Integer A)] + ( real Username is + OriginalName[(Integer A)]))
Else - Actions

Now you can get nasty right back at that nasty guy.


---3 – Capitalization---

Dear MrApples, your triggers suck! The rename trigger doesn’t stop framing at all, and the name check never works!:emote_thumbdown:
Wow, I’m such a bad person. Actually the triggers do work, but Capitalization is not supported. If a BlockedName is MrApples, and someone does –name Mrapples (Notice the a), then the game will accept it.

But don’t worry; there is a way to fix even this! And it’s actually really easy. Just follow the few instructions in the following 2 triggers.
Trigger:
Rename Cap
Events
Conditions
Collapse Actions
-------- All you must do to fix the Rename Trigger so i works with capitalization is to edit all of the String Comparisons --------
-------- So that now they are Conversion - Convert String as Lowercase(WhatItWasBefore) --------
-------- Then it will check all the strings as if they were lowercase, but not change them. --------
-------- --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Length of (Entered chat string)) Greater than 27
Collapse Then - Actions
Set NewName = (Substring((Entered chat string), 7, 27))
Collapse Else - Actions
Set NewName = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(String(NewName) as Lower case) Equal to (String(OriginalName[(Player number of (Triggering player))]) as Lower case)
Collapse Then - Actions
-------- It was done in the above condition --------
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
Else - Actions
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
(String(NewName) as Lower case) Equal to (String((Name of (Player((Integer A))))) as Lower case)
(String(NewName) as Lower case) Equal to (String(OriginalName[(Integer A)]) as Lower case)
(String(NewName) as Lower case) Equal to (String(BlockedName[(Integer A)]) as Lower case)
Collapse Then - Actions
-------- And in all of the above conditions here. --------
Set NameVio = True
-------- Thats it! You can stop here, this trigger has been coverted to work in Capitalization. --------
Else - Actions
Trigger:
NameCheck Cap
Collapse Events
Player - Player 1 (Red) types a chat message containing -namecheck as A substring
Player - Player 2 (Blue) types a chat message containing -namecheck as A substring
Collapse Conditions
(Substring((Entered chat string), 1, 11)) Equal to -namecheck
Collapse Actions
-------- And you must do the same thing for name check. --------
Set TempString = (Substring((Entered chat string), 12, (Length of (Entered chat string))))
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(String((Name of (Player((Integer A))))) as Lower case) Equal to (String(TempString) as Lower case)
Collapse Then - Actions
-------- As done in the above String Comparison. --------
Game - Display to (All players) for 30.00 seconds the text: (PlayerName[(Integer A)] + ( real Username is + OriginalName[(Integer A)]))
Else - Actions

Congratulations, you’re done with the Capitalization Section!

---4- Security---

Locking your Triggers
Say you have some test triggers, or ‘cheats’ in-game you only want certain people using, well it can be done! All you have to do is add a condition to the Chat Event Trigger like Case ((Player Name of (Triggering Player))) as lower case = NameOfYourself.
Trigger:
Gimme Gold
Collapse Events
Player - Player 1 (Red) types a chat message containing gimme gold as An exact match
Player - Player 2 (Blue) types a chat message containing gimme gold as An exact match
Collapse Conditions
(String(OriginalName[(Player number of (Triggering player))]) as Lower case) Equal to mrapples
Collapse Actions
-------- Note that I used Original Name, this is so people you want to can still use it even if they changed their name. --------
-------- Remember the name its checking if its equal to has to be in lowercase. --------
Player - Add 7827 to (Triggering player) Current gold

Voila! The trigger will only work when someone with your name types the event. But you may notice that those naughty framers can go on to even a higher level with this.

(TIP: You can reverse this method to get back at people you don’t like. Say Bobwhostoleyourcereal plays your map, you can check if anyone’s name is Bobwhostoleyourcereal, and then change it to something like BADCEREALSTEALER. That’ll teach him.)


Stopping Spoofers
Here are 2 problems with using user-name locked triggers.

1. Usernames are not cross-server; someone can register your name on another server and use the trigger.
2. Spoofers. Spoofs make it so the game detects the hacker’s name as something else, such as yours.

It’s easy to fix 1, register your username on all the servers, if its taken, keep trying every month, or your out of luck.

For 2, it’s not so easy. There is no way to detect a difference between a spoofer’s username and yours. But however, you are 2 different people nevertheless, so you have to use something you know that the hacker doesn’t, like a password!

You will have to make 2 triggers to do this, 1 trigger that accepts the password, and another trigger that after 5 minutes has passed, detects if anyone has your username, and if they have entered a password or not.

(TIP: Make sure everyone who is supposed to use the password types it in Observers, so other players can’t see. If you want to be extra safe, change the triggering players name to a really long space until the message has faded so its hidden.
Trigger:
Password
Collapse Events
Player - Player 1 (Red) types a chat message containing applesnacks as An exact match
Player - Player 2 (Blue) types a chat message containing applesnacks as An exact match
Conditions
Collapse Actions
-------- You will need for this trigger --------
-------- //A Array Boolean Variable called Clear --------
Set Clear[(Player number of (Triggering player))] = True
-------- Thats it for this trigger, all done. But if you want to be extra safe add the below --------
-------- Remember this is very buggy. --------
Player - Set name of (Triggering player) to ...
Wait 45.00 game-time seconds
Player - Set name of (Triggering player) to (Substring(PlayerName[(Player number of (Triggering player))], 11, ((Length of PlayerName[(Player number of (Triggering player))]) - 2)))
-------- I can't fit all of the above action, but this is what it does --------
-------- Set Name of (Triggering Player) = PlayerName variable - Color Code and |r --------
-------- It only takes the stuff between the Color Code and |r --------
Trigger:
Check Names
Collapse Events
Time - Elapsed game time is 300.00 seconds
Conditions
Collapse Actions
-------- 300 seconds is 5 minutes for the slow ones. --------
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
OriginalName[(Integer A)] Equal to mrapples
OriginalName[(Integer A)] Equal to anothernamehere
Clear[(Integer A)] Equal to False
Collapse Then - Actions
-------- It checks if a players name is equal to any of the names they shouldn't have. --------
-------- And then it checks if that player has been cleared by typing in the password. --------
-------- If he hasn't, then these actions are played. --------
Set OriginalName[(Integer A)] = SpoofingBadGuy
Set PlayerName[(Integer A)] = ((Substring(PlayerName[(Integer A)], 1, 10)) + (SpoofingBadGuy + |r))
Player - Set name of (Player((Integer A))) to SpoofingBadGuy
-------- This changes the OriginalName, CurrentName, and the Colored CurrentName to SpoofingBadGuy --------
-------- You can of course here punish that player here. Boot him, take his gold, whatever you want. --------
Collapse Else - Actions
-------- Thanks for reading my tutorial, hope you learned something. --------
-------- Till next time, -MrApples --------


Please comment on how this tutorial can be improved, if you find anything that you find confusing, or may be confusing to others, please post it.

Notice: This tutorial is written in a more experimental style then my previous ones so it is essential you tell me if you understood everything or not!

I remind you that if you find a tutorial or post that were helpful to you to give the Author good rep.

Vexorian 08-12-2006 04:25 PM

what? you used images instead of trigger tags?

MrApples 08-12-2006 04:27 PM

Yeah I did, this is originally for TheHelper.

You think DarkOrange goes good with this background? Also did you know that Edit > Find doesn't work well with 'Advanced' post editing, it locks up half the time.

ragingspeedhorn 08-12-2006 05:43 PM

Quote:

Avoid to rely on color tags
It might seem cool in the style you are using but it might suck in other styles, avoid to use them. The only exception would be a tutorial where you want to show color codes, although we have enough of them already.


0 external images
We don't want to rely on other sites and the least thing we want is to leech their bandwidth, attach the images to the post instead.

MrApples 08-12-2006 06:03 PM

Trust me, if you seen my past coloring schemes this is 'avoiding them'. Also if it didn't have color I myself would have trouble reading it... ADD.

And the combined images for this are like 8megebytes, i'msure theres a upload limit? Besides the file type isn't accepted.

Tim. 08-12-2006 09:31 PM

You need to use trigger tags, not images.

The)TideHunter( 08-12-2006 11:18 PM

Trigger tags Advantages, IMO
-CnP
-Low filesize to store
-Easy to implement
-Open and Close (+ & -)
-Icons (help for people to find which trigger is in which place)
-Alot of others things

It makes me cry that every other forum dosent have them, they are a great idea.

Tim. 08-14-2006 06:26 AM

Thank you for adding the [trigger] tags. Mike or someone please review this.

PitzerMike 08-15-2006 08:31 AM

Yeah, I think this covers everything there is about player names.
Very entertaining too.

I have one suggestion: Where you show the basic color codes like
|c00FF0303TEXT|r = Red
you could show the TEXT inside the color that it is, like:
|c00FF0303TEXT|r = Red

I took the freedom to change the orange text to a different font instead of orange and approve this.

MrApples 08-15-2006 06:04 PM

Don't like it now, but w/e, I won't update this.

Waynebebay 08-16-2006 06:21 AM

Great tutorial, very creative and fun thing to impliment. Props

BertTheJasser 08-17-2006 02:01 PM

You do not need to create an global array to colour the text properly. Just use this:
Collapse JASS:
function GetStringColored takes player id, string r returns string
  local playercolor col=GetPlayerColor(id)
    if col == PLAYER_COLOR_RED then
        set r="|cffff0000"+r+"|r"
    elseif col == PLAYER_COLOR_BLUE then
        set r="|cff0000ff"+r+"|r"
    elseif col == PLAYER_COLOR_CYAN then
        set r="|cff93ffc9"+r+"|r"
    elseif col == PLAYER_COLOR_PURPLE then
        set r="|cff400080"+r+"|r"
    elseif col == PLAYER_COLOR_YELLOW then
        set r="|cffffff00"+r+"|r"
    elseif col == PLAYER_COLOR_ORANGE then
        set r="|cffff8000"+r+"|r"
    elseif col == PLAYER_COLOR_GREEN then
        set r="|cff00c400"+r+"|r"
    elseif col == PLAYER_COLOR_PINK then
        set r="|cffff80c0"+r+"|r"
    elseif col == PLAYER_COLOR_LIGHT_GRAY then
        set r="|cff808080"+r+"|r"
    elseif col == PLAYER_COLOR_LIGHT_BLUE then
        set r="|cffCCDDFF"+r+"|r"
    elseif col == PLAYER_COLOR_AQUA then
        set r="|cff004000"+r+"|r"
    elseif col == PLAYER_COLOR_BROWN then
        set r="|cff663300"+r+"|r"
    else
        set r="|cff000000"+r+"|r"
    endif
 set col=null
 return r
endfunction

function GetPlayerNameColored takes player id returns string
 return GetStringColored(id,GetPlayerName(id))
endfunction

FrankHamand 08-30-2006 07:46 PM

Quote:

Originally Posted by MrApples
For 2, it’s not so easy. There is no way to detect a difference between a spoofer’s username and yours. But however, you are 2 different people nevertheless, so you have to use something you know that the hacker doesn’t, like a password!

Actually, there is a way to detect name spoofers, i'm just not sure what it is. I joined a custom game once with some namespoofers in, and at the start it said "Name spoofers detected! Sorry this game doesn't allow name spoofers to play, press escape to quit (it was in cinematic mode)" and everyone had to leave. Don't know which custom game that was, point is it is possible

MrApples 09-09-2006 01:50 AM

No it's not possible, your wrong. There are ways to detect a FEW spoofers but it is impossible to be certain of it.

Darkness568 09-03-2007 01:55 AM

Great tutorial i'll be sure to use some of these in my map.:emote_thumbup2:


All times are GMT. The time now is 03:19 AM.

Powered by vBulletin (Copyright ©2000 - 2020, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services