|
| 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
|
  |
| 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 |
|
|
|
| 09 Feb 2015 07:11 PM |
oooo, burn
::_::io.write(_VERSION..'\n')goto _; |
|
|
| Report Abuse |
|
|
|
| 09 Feb 2015 07:15 PM |
It's getting hot in here!1!11111
"I like to program." - Bosswalrus |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 09 Feb 2015 07:45 PM |
>colour since when are you british |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 20 Jun 2014 |
| Total Posts: 1136 |
|
| |
|