Thread: 614 mute commands for you guys and kick and unfreeze command and afk and back command

Results 1 to 5 of 5
  1. #1 614 mute commands for you guys and kick and unfreeze command and afk and back command 
    Donator
    Zᴀᴄʜ's Avatar
    Join Date
    Aug 2009
    Age
    23
    Posts
    999
    Thanks given
    111
    Thanks received
    64
    Rep Power
    13
    got rid of cause peeps think its bad
     

  2. #2  
    Banned

    Join Date
    May 2010
    Age
    25
    Posts
    1,023
    Thanks given
    199
    Thanks received
    87
    Rep Power
    0
    L2use code tags.
     

  3. #3  
    Banned

    Join Date
    Jun 2010
    Age
    33
    Posts
    4,337
    Thanks given
    4
    Thanks received
    274
    Rep Power
    0
    Yes, L2 use tag's please. My font is kinda Large.
     

  4. #4  
    Banned
    Join Date
    Jun 2009
    Posts
    855
    Thanks given
    208
    Thanks received
    64
    Rep Power
    0
    Quote Originally Posted by x-Taunted View Post
    L2use code tags.
    Quote Originally Posted by `Marcus View Post
    Yes, L2 use tag's please. My font is kinda Large.
    Learn to spell.
     

  5. #5  
    Registered Member M4ntach's Avatar
    Join Date
    Nov 2010
    Posts
    352
    Thanks given
    127
    Thanks received
    19
    Rep Power
    23
    This totally wasn't a double post.

    Anyway, here gays.

    Code:
    } else if (cmd[0].equals("unmute")) {
        Player p2 = World.getPlayers().get(World.getIdFromName(cmd[1]));
        p2.isMuted = false;
        p.getFrames().sendChatMessage(0, "You have unmuted " + p2.getUsername() + ".");
    } else if (cmd[0].equals("unfreeze")) {
        Player p2 = World.getPlayers().get(World.getIdFromName(cmd[1]));
        p2.combat.frozen = 0;
        p2.isFrozen = false; 
        p2.frozen = false;
        p.getFrames().sendChatMessage(0, "You have unfrozen " + p2.getUsername() + "."); 
        p2.getFrames().sendChatMessage(0, "You have been unfrozen by " + p.getUsername() + ".");
    } else if (cmd[0].equals("mute")) {
        Player p2 = World.getPlayers().get(World.getIdFromName(cmd[1]));
        p2.isMuted = true;
        p.getFrames().sendChatMessage(0, "You have muted " + p2.getUsername() + ".");
    } else if (cmd[0].equals("afk")) {
        p.animate(4117);
        p.getMask().setForceTextUpdate(true);
        p.forceText("I'm afk guys!!");
    } else if (cmd[0].equals("back")) {
        p.animate(6297);
        p.getMask().setForceTextUpdate(true);
        p.forceText("Hey guys!, i'm back!");
    } else if (cmd[0].equals("kick")) {
        Player p2 = World.getPlayers().get(World.getIdFromName(cmd[1]));
        p2.getFrames().sendLogout();
        p.getFrames().sendChatMessage(0, "You have kicked " + p2.getUsername() + ".");
    Code:
    /**
     * Chat
     */
    @SuppressWarnings("unused")
    private static void PacketId_25(InStream Packet, int Size, Player p) {
        int effects = Packet.readUnsignedShort();
        int numChars = Packet.readUnsignedByte();
        if (numChars > 100 || numChars < 0 || effects < 0)
            return;
        String text = Misc.decryptPlayerChat(Packet, numChars);
        if (text == null || text.equals(""))
            return;
        StringBuilder newText = new StringBuilder();
        boolean wasSpace = true;
        for (int i = 0; i < text.length(); i++) {
            if (wasSpace) {
                newText.append(("" + text.charAt(i)).toUpperCase());
                if (!String.valueOf(text.charAt(i)).equals(" "))
                    wasSpace = false;
            } else
                newText.append(("" + text.charAt(i)).toLowerCase());
            if (String.valueOf(text.charAt(i)).contains(".") || String.valueOf(text.charAt(i)).contains("!")
    || String.valueOf(text.charAt(i)).contains("?"))
            wasSpace = true;
        }
            if (p.isMuted()) {
                p.getFrames().sendChatMessage(0, "You are muted and cannot talk.");
                return;
            }
            text = newText.toString();
            if (text.startsWith("::")) {
            text = text.replaceAll("::", "");
            CommandHandler.executeCommand(p, text);
            return;
        }
        if (text.startsWith("/")) {
            text = text.replace("/", "");
            p.getFrames().sendClanMessage(p.getUsername(), p.getDisplayName(), text, p.getRights());
            return;
        }
        p.getMask().setLastChatMessage(new ChatMessage(effects, numChars, text));
        p.getMask().setChatUpdate(true);
    }
    Then replace your chat method in packets.java with this for mute
    Code:
    f(p.isMuted()) {
        p.getFrames().sendChatMessage(0, "You are muted and cannot talk.");
        return;
    }
    Sir Tom has made 13 Projects so far.
    Each and every one failed with the same NIO based and cancelled within a week
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. [PI]Kick command
    By erde0 in forum Snippets
    Replies: 9
    Last Post: 12-23-2010, 09:39 PM
  2. [PI] kick and mute commands
    By Debugger in forum Help
    Replies: 7
    Last Post: 11-02-2010, 04:39 PM
  3. [PI] Kick Command?
    By Aristotle in forum Help
    Replies: 4
    Last Post: 07-28-2010, 08:22 AM
  4. Replies: 1
    Last Post: 10-03-2009, 01:23 PM
  5. [525] mute and kick command
    By Ramsin in forum Help
    Replies: 5
    Last Post: 06-16-2009, 03:43 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •