Author Topic: How to make your YELL Command Colourful!  (Read 204 times)

Offline Maniack

  • Steel Member
  • *
  • Posts: 36
  • Rep 0
    • View Profile
How to make your YELL Command Colourful!
« on: March 09, 2011, 06:11:27 pm »
Description: Making a Colourful Yell System.
Difficulty: 2-3/10
Assumed Knowledge: Able to use Ctrl+F, copy + paste
Files/Classes Modified: Client and Server: Client.java

Client

1. Open Client.java.

2. Search for this:

Code: [Select]
String s = aString887.toLowerCase();
And under that, add this:

                   
Code: [Select]
if(s.startsWith("@or1@")) {
                        aString887 = aString887.substring(5);
                        method77(aString887, 14, "", aBoolean991);
                        aString887 = "";
                        break;
                    }
                    if(s.startsWith("@yel@")) {
                        aString887 = aString887.substring(5);
                        method77(aString887, 15, "", aBoolean991);
                        aString887 = "";
                        break;
                    }
                    if(s.startsWith("@red@")) {
                        aString887 = aString887.substring(5);
                        method77(aString887, 16, "", aBoolean991);
                        aString887 = "";
                        break;
                    }
                    if(s.startsWith("@gre@")) {
                        aString887 = aString887.substring(5);
                        method77(aString887, 17, "", aBoolean991);
                        aString887 = "";
                        break;
                    }
                    if(s.startsWith("@pur@")) {
                        aString887 = aString887.substring(5);
                        method77(aString887, 20, "", aBoolean991);
                        aString887 = "";
                    break;
                    }
                    if(s.startsWith("@blu@")) {
                        aString887 = aString887.substring(5);
                        method77(aString887, 19, "", aBoolean991);
                        aString887 = "";
                        break;
                    }

3. Search for this:

Code: [Select]
method18(int
And replace that Method with this:


   
Code: [Select]
public final void method18(int i) {

        aClass15_1166.method237(0);
        Class30_Sub2_Sub1_Sub3.anIntArray1472 = anIntArray1180;
        aClass30_Sub2_Sub1_Sub1_1198.method348(0, 16083, 0);
        if(aBoolean1256) {
            aClass30_Sub2_Sub1_Sub4_1272.method381(0, aString1121, 23693, 40, 239);
            aClass30_Sub2_Sub1_Sub4_1272.method381(128, aString1212 + "*", 23693, 60, 239);
        } else
        if(anInt1225 == 1) {
            aClass30_Sub2_Sub1_Sub4_1272.method381(0, "Enter amount:", 23693, 40, 239);
            aClass30_Sub2_Sub1_Sub4_1272.method381(128, aString1004 + "*", 23693, 60, 239);
        } else
        if(anInt1225 == 2) {
            aClass30_Sub2_Sub1_Sub4_1272.method381(0, "Enter name:", 23693, 40, 239);
            aClass30_Sub2_Sub1_Sub4_1272.method381(128, aString1004 + "*", 23693, 60, 239);
        } else
        if(aString844 != null) {
            aClass30_Sub2_Sub1_Sub4_1272.method381(0, aString844, 23693, 40, 239);
            aClass30_Sub2_Sub1_Sub4_1272.method381(128, "Click to continue", 23693, 60, 239);
        } else
        if(anInt1276 != -1)
            method105(8, 0, 0, Class9.aClass9Array210[anInt1276], 0);
        else if(anInt1042 != -1) {
            method105(8, 0, 0, Class9.aClass9Array210[anInt1042], 0);
        } else {
            Class30_Sub2_Sub1_Sub4 class30_sub2_sub1_sub4 = aClass30_Sub2_Sub1_Sub4_1271;
            int j = 0;
            Class30_Sub2_Sub1.method333(77, 0, false, 463, 0);
            for(int k = 0; k < 100; k++)
            if(aStringArray944[k] != null)
            {
                int l = anIntArray942[k];
                int i1 = (70 - j * 14) + anInt1089;
                String s1 = aStringArray943[k];
                byte byte0 = 0;
                if(s1 != null && s1.startsWith("@cr1@")) //mod icons
                {
                    s1 = s1.substring(5);
                    byte0 = 1;
                }
                if(s1 != null && s1.startsWith("@cr2@")) {
                    s1 = s1.substring(5);
                    byte0 = 2;
                }



                if(l == 0) {

                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method389(false, false, 4, 0, aStringArray944[k], i1);
                    j++;
                }



                if((l == 1 || l == 2 ) && (l == 1 || anInt1287 == 0 || anInt1287 == 1 && method109(false, s1))) {
                    if(i1 > 0 && i1 < 120) {



                        int j1 = 4;

                        if(byte0 == 1) { //draws mod icons
                            aClass30_Sub2_Sub1_Sub2Array1219[0].method361(j1, 16083, i1 - 12);
                            j1 += 14;
                        }
                        if(byte0 == 2) {

                            aClass30_Sub2_Sub1_Sub2Array1219[1].method361(j1, 16083, i1 - 12);
                            j1 += 14;
                        }



                        class30_sub2_sub1_sub4.method385(UserLoader.namesetcolour, s1 + ":", i1, 822, j1);
                        j1 += class30_sub2_sub1_sub4.method383(anInt1116, s1) + 8;
                        class30_sub2_sub1_sub4.method385(UserLoader.chatsetcolour, aStringArray944[k], i1, 822, j1); //name colour chatbox






                    }
                    j++;
                }

                if(l == 10 && anInt1195 == 0) {
                    if(i1 > 0 && i1 < 120)
                    if(s1 != null && s1.startsWith("@cr4@")) {
                        s1 = s1.substring(5);
                        byte0 = 6;
                    }
                    class30_sub2_sub1_sub4.method385(255, aStringArray944[k], i1, 822, 4);
                }




                if((l == 3 || l == 7) && anInt1195 == 0 && (l == 7 || anInt845 == 0 || anInt845 == 1 && method109(false, s1))) { //(pm system)
                    if(i1 > 0 && i1 < 120) {
                        int k1 = 4;
                        class30_sub2_sub1_sub4.method385(0x800000, "From", i1, 822, k1);//friends(pm system)
                        k1 += class30_sub2_sub1_sub4.method383(anInt1116, "From ");
                        if(byte0 == 1) {
                            //aClass30_Sub2_Sub1_Sub1Array1219[0].method348(k1, 16083, i1 - 12);
                            aClass30_Sub2_Sub1_Sub2Array1219[0].method361(k1, 16083, i1 - 12);
                            k1 += 14;
                        }
                        if(byte0 == 2) {
                            //aClass30_Sub2_Sub1_Sub1Array1219[1].method348(k1, 16083, i1 - 12);
                            aClass30_Sub2_Sub1_Sub2Array1219[1].method361(k1, 16083, i1 - 12);
                            k1 += 14;
                        }

                        class30_sub2_sub1_sub4.method385(0x800000, s1 + ":", i1, 822, k1);
                        k1 += class30_sub2_sub1_sub4.method383(anInt1116, s1) + 8;


                        //class30_sub2_sub1_sub4.method385(0x800000, aStringArray944[k], i1, 822, k1);
                        class30_sub2_sub1_sub4.method385(0x800000, aStringArray944[k], i1, 822, k1);
                    }
                    j++;
                }
                if(l == 4 && (anInt1248 == 0 || anInt1248 == 1 && method109(false, s1))) {
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0x800080, s1 + " " + aStringArray944[k], i1, 822, 4);
                    j++;
                }
                if(l == 5 && anInt1195 == 0 && anInt845 < 2) {
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0x800000, aStringArray944[k], i1, 822, 4);
                    j++;
                }
                if(l == 6 && anInt1195 == 0 && anInt845 < 2) {
                    if(i1 > 0 && i1 < 120) {
                        class30_sub2_sub1_sub4.method385(0x800000, "To " + s1 + ":", i1, 822, 4);
                        class30_sub2_sub1_sub4.method385(0x800000, aStringArray944[k], i1, 822, 12 + class30_sub2_sub1_sub4.method383(anInt1116, "To " + s1));
                    }
                    j++;
                }
                if(l == 80)
                {
                    if(i1 > 0 && i1 < 120)
                    {
                        class30_sub2_sub1_sub4.method385(0x800000, s1 + " " + aStringArray944[k], i1, 822, 4);
                    }
                    j++;
                }
                if(l == 8 && (anInt1248 == 0 || anInt1248 == 1 && method109(false, s1))) {
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0x7e3200, s1 + " " + aStringArray944[k], i1, 822, 4);
                    j++;
                }


                if((l == 9) && (l == 1 || anInt1287 == 0 || anInt1287 == 1 && method109(false, s1))) {
                    if(i1 > 0 && i1 < 120) {

                        int j1 = 4;

                        if(byte0 == 1) {
                            aClass30_Sub2_Sub1_Sub2Array1219[0].method361(j1, 16083, i1 - 12);
                            j1 += 14;
                        }
                        if(byte0 == 2) {
                            aClass30_Sub2_Sub1_Sub2Array1219[1].method361(j1, 16083, i1 - 12);
                            j1 += 14;
                        }
                        j1 += class30_sub2_sub1_sub4.method383(anInt1116, s1) + 8;
                        class30_sub2_sub1_sub4.method385(0xFF0000, aStringArray944[k], i1, 822, j1); //name colour chatbox



                    }
                    j++;
                }


                if(l == 14) { //@or1@ +msg
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0xEE8700, aStringArray944[k], i1, 822, 0);
                    j++;
                }
                if(l == 15) { //@yel@ +msg
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0xEEEE00, aStringArray944[k], i1, 822, 0);
                    j++;
                }
                if(l == 16) { //@red@ +msg
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0xCC0000, aStringArray944[k], i1, 822, 0);
                    j++;
                }
                if(l == 17) { //@gre@ +msg
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0x00A403, aStringArray944[k], i1, 822, 0);
                    j++;
                }
                if(l == 19) { //@blu@ +msg
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0x006FA4, aStringArray944[k], i1, 822, 0);
                    j++;
                }
                if(l == 20) { //@pur@ +msg
                    if(i1 > 0 && i1 < 120)
                    class30_sub2_sub1_sub4.method385(0xEE009B, aStringArray944[k], i1, 822, 0);
                    j++;
                }
            }


            Class30_Sub2_Sub1.method332(4);
            anInt1211 = j * 14 + 7;
            if(anInt1211 < 78)
                anInt1211 = 78;
            method30(519, 77, anInt1211 - anInt1089 - 77, 0, 463, anInt1211);
            String s;
            if(aClass30_Sub2_Sub4_Sub1_Sub2_1126 != null && aClass30_Sub2_Sub4_Sub1_Sub2_1126.aString1703 != null)
                s = aClass30_Sub2_Sub4_Sub1_Sub2_1126.aString1703;
            else
                s = Class50.method587(-45804, aString1173);
            class30_sub2_sub1_sub4.method385(0x002f06, s + ":", 90, 822, 4);
            class30_sub2_sub1_sub4.method385(0x0000ff, aString887 + "*", 90, 822, 6 + class30_sub2_sub1_sub4.method383(anInt1116, s + ": "));
            Class30_Sub2_Sub1.method339(77, 0, 479, 0, (byte)4);
        }
        if(aBoolean885 && anInt948 == 2)
            method40((byte)9);
        aClass15_1166.method238(357, 23680, super.aGraphics12, 17);
        aClass15_1165.method237(0);
        Class30_Sub2_Sub1_Sub3.anIntArray1472 = anIntArray1182;
        if(i < 6 || i > 6)
            aBoolean991 = !aBoolean991;
    }

Server.

1. Open Client.java

Now find your yell command and replace it with this. If you don't have a yell command, then just add this where
the commands are;

Code: [Select]
    if (command.startsWith("yell") && command.length() > 5) {
        String text = command.substring(5);
        String color[] = { "@dre@", "@or2@", "@red@", "@mag@", "@dre@" };
        text = Character.toUpperCase(text.charAt(0)) + text.substring(1);
        if (muted == 1) {
            sendMessage("You are muted and cannot yell!");
            return;
        }
        yell(playerName + ": " + color[playerRights] + "" + censorString(text));
    }

2. Nearly done, you have to now add these Methods.

Code: [Select]
    public String censorString(String text) {
        String[] censor = { playerPass, "****", " ass ", "****", "hoe", "fag", "******", "****", "f u c k", "****", "****", "no-ip", "servergame", "no - ip", "jagex", "runescape", "****", "dick", "****",  "skank", "bastard", "****", "******", "beaner", "beener", "this server sucks", "nigga", "negro", "cracka", "honkey", "homo", "****", "wet back", "chink" };
        text = text.toLowerCase();
        for (int x = 0; x < censor.length; x++) {
            if (text.contains(censor[x])) {
                text = text.replaceAll(censor[x], "****");
            }
        }
        text = Character.toUpperCase(text.charAt(0)) + text.substring(1);
        return text;
    }

    public void yell(String msg) {
        String text = msg;
        if (msg.startsWith("@")) {
            text = Character.toUpperCase(text.charAt(5)) + text.substring(6);
        } else {
            text = Character.toUpperCase(text.charAt(0)) + text.substring(1);
        }
        server.playerHandler.messageToAll = text;
    }



This tutorial is suggested for NON-DELTA Based Servers !

You could try it, but it may not work.
The codes can always be converted for delta though  :)


Tbh, the colours can get annoying  8)
But, it's something unique and makes servers less boring.  :)

100% Credits to RobGob
« Last Edit: March 11, 2011, 12:34:25 am by Moe »

Share on Bluesky Share on Facebook


Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #1 on: March 09, 2011, 06:17:14 pm »
Simple But nice
Well done (Y)

Offline brandon

  • Veteran
  • Dragon Member
  • *
  • Posts: 240
  • Rep 12
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #2 on: March 09, 2011, 06:49:59 pm »
Nice tutorial.

Offline I Divine I

  • Adamant Member
  • *
  • Posts: 110
  • Rep 8
  • Proud Member of Rune-Kingdom.
  • Location: Look behind you.
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #3 on: March 10, 2011, 01:37:34 am »
Nice, ive been looking for this this will help a ton.
I cant figure out how to get my sig pic damit!

Offline robgob

  • Adamant Member
  • *
  • Posts: 120
  • Rep 5
  • I swarm like locust
  • Location: Michigan
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #4 on: March 10, 2011, 11:07:14 pm »
Yo wtf bro, you stole this from me.. lol
here's my original post on moparscape. Check the dates

http://www.moparscape.org/smf/index.php?topic=424444.0

Offline brandon

  • Veteran
  • Dragon Member
  • *
  • Posts: 240
  • Rep 12
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #5 on: March 10, 2011, 11:11:33 pm »
Yo wtf bro, you stole this from me.. lol
here's my original post on moparscape. Check the dates

http://www.moparscape.org/smf/index.php?topic=424444.0

Robgob there isn't much I can do about it, people leach things all the time. It is not against the rules to leach. Sorry, I will leave it up to Kyle.

Offline robgob

  • Adamant Member
  • *
  • Posts: 120
  • Rep 5
  • I swarm like locust
  • Location: Michigan
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #6 on: March 10, 2011, 11:19:41 pm »
Its fine, i dont mind much.

its jst like, leave me some credit why don't ya xD

but yeah, this tutorial is pointless to say the least. You can make this done by replacing one simple line.

Offline Moe505

  • Veteran
  • Firecape Member
  • *
  • Posts: 293
  • Rep 187
  • Location: Australia
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #7 on: March 11, 2011, 12:34:51 am »
There, he has given you credits now ;).

Offline robgob

  • Adamant Member
  • *
  • Posts: 120
  • Rep 5
  • I swarm like locust
  • Location: Michigan
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #8 on: March 11, 2011, 01:11:09 am »
lmao thanks man ;D

Offline Alex_Kilroy

  • Adamant Member
  • *
  • Posts: 91
  • Rep 2
  • Java programmer
  • Location: United Kingdom, England.
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #9 on: March 15, 2011, 07:41:15 am »
lmao thanks man ;D

Wasn't this already in Galkon's? Correct me if I'm wrong. But I'm pretty sure it was.
I'm a MEXICAN
#facepalm
My various other names are, Byte3, Kaex and Limbo.
I am now known as Alex_Kilroy.

Offline robgob

  • Adamant Member
  • *
  • Posts: 120
  • Rep 5
  • I swarm like locust
  • Location: Michigan
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #10 on: March 15, 2011, 08:04:23 am »
It was, this is for non renamed, and most winterlove clients didn't have it added at the time.. +it was a long time ago, before i knew about Galkon's client.

Offline Alex_Kilroy

  • Adamant Member
  • *
  • Posts: 91
  • Rep 2
  • Java programmer
  • Location: United Kingdom, England.
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #11 on: March 15, 2011, 08:44:05 am »
It was, this is for non renamed, and most winterlove clients didn't have it added at the time.. +it was a long time ago, before i knew about Galkon's client.

Explain what you mean Winterlove client, anyclient works with any deob fruscrated to it.
And its not hard to rename - non rename something.
I'm a MEXICAN
#facepalm
My various other names are, Byte3, Kaex and Limbo.
I am now known as Alex_Kilroy.

Offline robgob

  • Adamant Member
  • *
  • Posts: 120
  • Rep 5
  • I swarm like locust
  • Location: Michigan
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #12 on: March 15, 2011, 04:12:50 pm »
back when all there was was allstar and dodain, the clients used on allstar were usually meant for them. non renamed, and didnt have the color system.

Offline Alex_Kilroy

  • Adamant Member
  • *
  • Posts: 91
  • Rep 2
  • Java programmer
  • Location: United Kingdom, England.
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #13 on: March 15, 2011, 04:48:09 pm »
back when all there was was allstar and dodain, the clients used on allstar were usually meant for them. non renamed, and didnt have the color system.

You mean Jad's client, original 317... Winterlove lol. Theres no client for a specific server, as long as the revisions are the same they'll work.\

They wasn't ment for Allstar either, allstar just used some of the client code probably.
It already had the models.
I'm a MEXICAN
#facepalm
My various other names are, Byte3, Kaex and Limbo.
I am now known as Alex_Kilroy.

Offline robgob

  • Adamant Member
  • *
  • Posts: 120
  • Rep 5
  • I swarm like locust
  • Location: Michigan
    • View Profile
Re: How to make your YELL Command Colourful!
« Reply #14 on: March 15, 2011, 05:50:20 pm »
I know, but allstar was the most popular of the them. tho i 'know why, its a terrible thing to use..