Sinisterly
RSPS - PI - Fixing Private Messaging - Client Sided - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Java, JVM, & JRE (https://sinister.li/Forum-Java-JVM-JRE)
+--- Thread: RSPS - PI - Fixing Private Messaging - Client Sided (/Thread-RSPS-PI-Fixing-Private-Messaging-Client-Sided)



RSPS - PI - Fixing Private Messaging - Client Sided - Sasuke - 07-29-2013

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.


RE: RSPS - PI - Fixing Private Messaging - Xiledcore - 07-29-2013

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.


RE: RSPS - PI - Fixing Private Messaging - Sasuke - 07-29-2013

(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


RE: RSPS - PI - Fixing Private Messaging - Xiledcore - 07-29-2013

(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?


RE: RSPS - PI - Fixing Private Messaging - Client Sided - Sasuke - 07-29-2013

(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.