lol its a screen shot from ragestory ;p and yes bass did already release this , but thanks anyways ;p
Printable View
lol its a screen shot from ragestory ;p and yes bass did already release this , but thanks anyways ;p
Mine is a lot shorter xd
Here's Bass'
Code:public String greenCharacters(String characters) {
String[] letters = new String[]{"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","-"," ","\\","?",",","."};
int[] items = new int[69];
for (int i = 0; i < 25; i++) {
items[i] = (3991026 + i);
}
for (int a = 0; a < 25; a++) {
items[a+26] = (3991026 + a);
}
for (int u = 0; u < 9; u++) {
items[u+53] = (3990010 + u);
}
items[62] = 3990022;
items[63] = 3990023;
items[64] = 0;
items[65] = 1;
items[66] = 2;
items[67] = 3;
items[68] = 4;
StringBuffer buf = new StringBuffer();
buf.append("");
for (int z = 0; z < characters.length(); z++) {
for (int h = 0; h < letters.length; h++) {
if (characters.substring(z, (z+1)).equals(letters[h])) {
if (items[h] > 4) {
buf.append("#v" + items[h] + "#");
} else if (items[h] == 0) {
buf.append(" ");
} else if (items[h] == 1) {
buf.append("\r\n");
} else if (items[h] == 2) {
buf.append("?");
} else if (items[h] == 3) {
buf.append(",");
} else if (items[h] == 4) {
buf.append(".");
}
}
}
}
return buf.toString();
}
lol nice release
Nice release Anu.
Might come in handy when I make a server.
Although its easy to figure out:
C# version:
Code:char[] togrn = text.ToLower().ToCharArray();
int itemId;
string newString = "";
foreach (char character in togrn)
{
itemId = (int)Char.GetNumericValue(character) + 3991016;
newString += itemId != 3991015 ? "#v" + itemId + "#" : " ";
}
Response.WriteByte(4);
Response.WriteInt((uint)NPCID); //NPCID
Response.WriteByte(0);
Response.WriteStringLen(newString);
Response.WriteByte(0);
Response.WriteByte(0);
player.SendPacket(Response.GetWrittenBuffer());
lol yes itsa screen shot from ragestory :3 i ripped the pic from krypto too lol im sucha criminal :D