generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Name Colour in Chat

Previous Thread :: Next Thread 
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
09 Feb 2015 07:01 PM
I guarantee you this is exactly how it is computed:


ChatColors = {
BrickColor.new("Bright red"),
BrickColor.new("Bright blue"),
BrickColor.new("Earth green"),
BrickColor.new("Bright violet"),
BrickColor.new("Bright orange"),
BrickColor.new("Bright yellow"),
BrickColor.new("Light reddish violet"),
BrickColor.new("Brick yellow"),
}

local function GetNameValue(pName)
local value = 0
for index = 1, #pName do
local cValue = string.byte(string.sub(pName, index, index))
local reverseIndex = #pName - index + 1
if #pName%2 == 1 then
reverseIndex = reverseIndex - 1
end
if reverseIndex%4 >= 2 then
cValue = -cValue
end
value = value + cValue
end
return value%8
end

function Chat:ComputeChatColor(pName)
return ChatColors[GetNameValue(pName) + 1].Color
end
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
09 Feb 2015 07:10 PM
No really, sherlock, you ripped it from the ChatScript core script

https://github.com/ROBLOX/Core-Scripts/blob/master/CoreScriptsRoot/CoreScripts/ChatScript.lua
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
09 Feb 2015 07:11 PM
oooo, burn


::_::io.write(_VERSION..'\n')goto _;
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
09 Feb 2015 07:15 PM
It's getting hot in here!1!11111

"I like to program." - Bosswalrus
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
09 Feb 2015 07:18 PM
@Mew No? Really? I totally did not know that!

Since, unlike you, I don't spend all night creating random mathematical algorithms and such trying to crack a weird little function :D



But seriously, I just posted here so people would quit asking like "How does chat color work"
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
09 Feb 2015 07:19 PM
Whenever people ask, I always give them this page.
http://wiki.roblox.com/index.php?title=User:NoliCAIKS/Code/Chat_Color
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
09 Feb 2015 07:45 PM
>colour
since when are you british
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
09 Feb 2015 07:45 PM
I'm very sure nobody asked how chat color is computed. It's relevant for like 2% of Scripters on here.

You posted this here to look cool, and you're insulting me as a retaliation.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
09 Feb 2015 08:09 PM
@Max Lol, sometimes I just drop red herrings just to throw you off trail :D

You shall never know how I spell color/colour.

By the way, More than British people spell it that way lol.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
09 Feb 2015 08:10 PM
@mew You don't know me, and even if you did, you cannot say this. You do not know what I'm thinking nor my reasoning behind my actions.

I posted this here for a quick reference for both me, and anybody who asks me how it works.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
09 Feb 2015 08:10 PM
ur right
former britist colonies other than America and CANADA
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
09 Feb 2015 08:24 PM
That's a pretty dumb reason to post that. Anyone who would even care to want the computed chat color would be smart enough to resource to the corescript.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
09 Feb 2015 08:33 PM
not everyone knows how to get to the corescripts

stop being so butthurt
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
09 Feb 2015 08:34 PM
OP had no reason to post this.

Stuff like this is the reason why this forum is awful now. People spam repetitive code then get upset when they get called out on it.
Report Abuse
AkxKaxXa is not online. AkxKaxXa
Joined: 12 Sep 2013
Total Posts: 72
09 Feb 2015 08:38 PM
off topic but literally every '06 account has a badge from mew
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
09 Feb 2015 08:40 PM
Yeah, it was a HTTPGet exploit with the ApiKey me and a few other people were in on a loooong time ago.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
09 Feb 2015 10:16 PM
"off topic but literally every '06 account has a badge from mew"

hax!!!
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
09 Feb 2015 10:32 PM
As off-topic is this is, this forum has almost always been bad Mew.
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
09 Feb 2015 10:40 PM
Actually this can be useful to some people who are planning on changing their name but don't want a pink or unwanted color as their name. But for scripting wise this does not help as much unless we are making a chat script.
Report Abuse
Aalok is not online. Aalok
Joined: 20 Jun 2014
Total Posts: 1136
02 Sep 2016 11:37 AM
He has copied it
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image