Thread: Basic Muting

Results 1 to 8 of 8
  1. #1 Basic Muting 
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    29
    Posts
    1,390
    Thanks given
    7
    Thanks received
    30
    Rep Power
    853
    I'm not sure if it'll work , but it should
    Define this in RSPlayer
    Code:
    public int muted = 0;
    Find:
    Code:
    		case ClientPackets.CHAT_TEXT:
    Replace the whole packet with:
    Code:
    		case ClientPackets.CHAT_TEXT:
    		if (muted == 1) {
    			sendMessageFrame("You're muted!");
                    } else if(muted == 0) {
    			chatEffects = inStream.readUnsignedWord();
    			int numChars = inStream.readUnsignedByte();
    			chatText = misc.decryptPlayerChat2(inStream, numChars);
    			System.out.println("[" + playerName + "] chat: " + chatText);
    			updateRequired = true;
    			chatTextUpdateRequired = true;
    		}
    			break;
    Now save ect, open Sqlhandler...
    Add this to your imports
    Code:
    import net.cellkyborg.RSInstances.RSPlayer;
    Define this:
    Code:
    	public static RSPlayer RSPlayer;
    Add this to your loading method:
    Code:
                    if (rs.getInt("muted") == 1) {
                        RSPlayer.muted = 1;
                    } else if(rs.getInt("muted") == 0) {
                        RSPlayer.muted = 0;
                    }
    Don't forget to create a new row in your character:
    Name: muted
    Type: int
    Value: 3

    I'm not sure it'll work...I can test...just compile
    Reply With Quote  
     

  2. #2  
    Ben
    Guest
    sendMessageFrame wont work for me for some reason, does it work for you?
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Feb 2007
    Age
    28
    Posts
    6,414
    Thanks given
    354
    Thanks received
    323
    Rep Power
    5000
    Who you going to mute? ROFL
    Reply With Quote  
     

  4. #4  
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    29
    Posts
    1,390
    Thanks given
    7
    Thanks received
    30
    Rep Power
    853
    Lul, define this in RSPlayer:
    Code:
            public void sendMessageFrame(String str) {
    		outStream.createFrame(135);
    		outStream.writeByte(str.length() + 1);
    		outStream.writeString(str);
    	}
    Reply With Quote  
     

  5. #5  
    Community Veteran


    Join Date
    Jun 2007
    Posts
    1,148
    Thanks given
    1
    Thanks received
    19
    Rep Power
    812
    Meh theres no point O cUL i R muting my s3lf
    Reply With Quote  
     

  6. #6  
    Ben
    Guest
    I have sendMessageFrame, it just crashes me.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    29
    Posts
    1,390
    Thanks given
    7
    Thanks received
    30
    Rep Power
    853
    Does it work though
    Reply With Quote  
     

  8. #8  
    Ben
    Guest
    Not sendMessageFrame..?
    Im sure this wouild work though.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •