Login Register






RSPS - PI - Fixing Private Messaging - Client Sided filter_list
Author
Message
RSPS - PI - Fixing Private Messaging - Client Sided #1
So I didn't just write this for the purpose of Code Community, but I noticed that the java section is pretty empty so I thought I would share this useful tutorial/snippet.

Open up your client class and search for:

Code:
case 196:

You should see something that looks like this:

Code:
case 196: long l5 = inStream.readQWord(); int j18 = inStream.readDWord(); int l21 = inStream.readUnsignedByte(); boolean flag5 = false; for(int i28 = 0; i28 < 100; i28++) { if(anIntArray1240[i28] != j18) continue; flag5 = true; } if(l21 <= 1) { for(int l29 = 0; l29 < ignoreCount; l29++) { if(ignoreListAsLongs[l29] != l5) continue; flag5 = true; } } if(!flag5 && anInt1251 == 0) try { anIntArray1240[anInt1169] = j18; anInt1169 = (anInt1169 + 1) % 100; String s9 = TextInput.method525(pktSize - 13, inStream); //if(l21 != 3) //s9 = Censor.doCensor(s9); if(l21 == 2 || l21 == 3) pushMessage(s9, 7, "@cr2@" + TextClass.fixName(TextClass.nameForLong(l5))); else if(l21 == 1) pushMessage(s9, 7, "@cr1@" + TextClass.fixName(TextClass.nameForLong(l5))); else pushMessage(s9, 3, TextClass.fixName(TextClass.nameForLong(l5))); } catch(Exception exception1) { signlink.reporterror("cde1"); } pktType = -1; return true;

Simply remove it all and replace it with this:
Code:
case 196: long l5 = inStream.readQWord(); int j18 = inStream.readDWord(); int l21 = inStream.readUnsignedByte(); boolean flag5 = false; if(l21 <= 1) { for(int l29 = 0; l29 < ignoreCount; l29++) { if(ignoreListAsLongs[l29] != l5) continue; flag5 = true; } } if(!flag5 && anInt1251 == 0) try { String s9 = TextInput.method525(pktSize - 13, inStream); //if(l21 != 3) //s9 = Censor.doCensor(s9); if(l21 == 2 || l21 == 3) pushMessage(s9, 7, "@cr2@" + TextClass.fixName(TextClass.nameForLong(l5))); else if(l21 == 1) pushMessage(s9, 7, "@cr1@" + TextClass.fixName(TextClass.nameForLong(l5))); else pushMessage(s9, 3, TextClass.fixName(TextClass.nameForLong(l5))); } catch(Exception exception1) { signlink.reporterror("cde1"); } pktType = -1; return true;

You're welcome. I know its not much of a tutorial but lots of people have asked me how to do this on multiple RSPS communities.

Reply

RE: RSPS - PI - Fixing Private Messaging #2
Good job there! Also, you should probably mention if it's server-sided or client-sided.

Didn't really think there were any rsps developers on here, but if enough people want, I'll create a series of tutorials on setting up a server and coding it.

I've also been meaning on creating basic java tutorials soon, but I just have to finish writing it first.
[Image: WV5eQ42.jpg]

If you've got any questions regarding c++ or java, feel free to hit me up with a private message at any time.

http://adf.ly/UyTEk

Reply

RE: RSPS - PI - Fixing Private Messaging #3
(07-29-2013, 07:44 AM)Xiledcore Wrote: Good job there! Also, you should probably mention if it's server-sided or client-sided.

Didn't really think there were any rsps developers on here, but if enough people want, I'll create a series of tutorials on setting up a server and coding it.

I've also been meaning on creating basic java tutorials soon, but I just have to finish writing it first.

Its pretty obvious its client sided.... But I'll put it there anyways xD

Reply

RE: RSPS - PI - Fixing Private Messaging #4
(07-29-2013, 07:46 AM)Minato Wrote:
(07-29-2013, 07:44 AM)Xiledcore Wrote: Good job there! Also, you should probably mention if it's server-sided or client-sided.

Didn't really think there were any rsps developers on here, but if enough people want, I'll create a series of tutorials on setting up a server and coding it.

I've also been meaning on creating basic java tutorials soon, but I just have to finish writing it first.

Its pretty obvious its client sided.... But I'll put it there anyways xD

Well, it doesn't have to be obvious for beginners. Also, you got a rune-server account?
[Image: WV5eQ42.jpg]

If you've got any questions regarding c++ or java, feel free to hit me up with a private message at any time.

http://adf.ly/UyTEk

Reply

RE: RSPS - PI - Fixing Private Messaging - Client Sided #5
(07-29-2013, 07:48 AM)Xiledcore Wrote:
(07-29-2013, 07:46 AM)Minato Wrote:
(07-29-2013, 07:44 AM)Xiledcore Wrote: Good job there! Also, you should probably mention if it's server-sided or client-sided.

Didn't really think there were any rsps developers on here, but if enough people want, I'll create a series of tutorials on setting up a server and coding it.

I've also been meaning on creating basic java tutorials soon, but I just have to finish writing it first.

Its pretty obvious its client sided.... But I'll put it there anyways xD

Well, it doesn't have to be obvious for beginners. Also, you got a rune-server account?

I used to use a friends but he went on a rampage and now its banned for no reason forever. I'm pretty done with RSPS anyways.

Reply