if wrong section plz move. (put here due to majority of code is client sided.)
ok open client.java and find
Code:
case 126:
String text = inStream.readString();
then under that case add this
Code:
case 127:
int textColor = inStream.method435();
int frame = inStream.method435();
setTextColour(textColor, frame);
pktType = -1;
return true;
then add this method
Code:
public void setTextColour(int str,int i) {
RSInterface.interfaceCache[i].textColor = str;
if(RSInterface.interfaceCache[i].parentID == tabInterfaceIDs[tabID])
needDrawTabArea = true;
}
now open sizeconstants and change packet 127 to size 8.
save and compile. then server sided add,
Code:
static void sendTextColor(int s, int id) {
try {
c.outStream.createFrameVarSizeWord(127);
c.outStream.writeWordA(s);
c.outStream.writeWordA(id);
c.outStream.endFrameVarSizeWord();
} catch (Exception e) {
}
}
save and compile.
Explanation:
instead of havin to change the text to change the color like so -
Code:
sendQuest("@red@hello", ####);
everytime you want to change a text's color. you can just use
Code:
setTextColor(0x######, linenumber);
so now it is alot easier to change a color o the line. with out any text edits.
this hasnt been tested wrote it now in this message. can someone plz test for me.