Thread: How you can enable "_" "/" "<" ">"

Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1 How you can enable "_" "/" "<" ">" 
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    251
    This is a responce to the thread:

    [Only registered and activated users can see links. ]

    Let get started:





    server sided:

    1.find in misc.java:

    xlateTable[]


    in that array add the chars u want to add
    Note* make sure u add them in the arrays i point out in the same order.



    2.find the method:

    public static void textPack

    and replace it with :


    Spoiler for :
    public static void textPack(byte packedData[], java.lang.String text) {
    if (text.length() > 80)
    text = text.substring(0, 80);
    text = text.toLowerCase();

    int carryOverNibble = -1;
    int ofs = 0;
    for (int idx = 0; idx < text.length(); idx++) {
    char c = text.charAt(idx);
    int tableIdx = 0;
    for (int i = 0; i < xlateTable.length; i++) {
    if (c == xlateTable[i]) {
    tableIdx = i;
    break;
    }
    }
    packedData[ofs++] = (byte) (carryOverNibble);
    }
    }



    3.find the method:


    public static String textUnpack

    and replace it with :


    Spoiler for :
    public static String textUnpack(byte packedData[], int size) {
    int idx = 0; //highNibble = -1;
    for (int i = 0; i < size; i++) {
    int val = packedData[i];
    decodeBuf[idx++] = xlateTable[val];
    }
    return new String(decodeBuf, 0, idx);
    }
    }





    Now for client sided work:


    RENAMED CLIENTS ONLY:


    in Textinput.java replace the following methods:


    1.Method525 with:


    Spoiler for :
    public static String method525(int i, ByteBuffer stream)
    {
    int j = 0;
    int k = -1;
    for(int l = 0; l < i; l++)
    {
    int i1 = stream.readUnsignedByte();//recieved from server
    aCharArray631[j++] = validChars[i1];
    }

    boolean flag1 = true;
    for(int k1 = 0; k1 < j; k1++)
    {
    char c = aCharArray631[k1];
    if(flag1 && c >= 'a' && c <= 'z')
    {
    aCharArray631[k1] += '\uFFE0';
    flag1 = false;
    }
    if(c == '.' || c == '!' || c == '?')
    flag1 = true;
    }

    return new String(aCharArray631, 0, j);
    }



    2.Method526 with:


    Spoiler for :
    public static void method526(String s, ByteBuffer stream)
    {
    if(s.length() > 80)
    s = s.substring(0, 80);
    s = s.toLowerCase();
    int i = -1;
    for(int j = 0; j < s.length(); j++)
    {
    char c = s.charAt(j);
    int k = 0;
    for(int l = 0; l < validChars.length; l++)
    {
    if(c != validChars[l])
    continue;
    k = l;
    break;
    }
    stream.writeWordBigEndian(k);//sending to server
    }
    }



    3.and in the array private static final char[] validChars
    add w.e symbols you want to add, and added before in your server, the same way that is already done.



    Unrenamed:


    1.

    Spoiler for :
    public static String method525(int i, boolean flag, Class30_Sub2_Sub2 class30_sub2_sub2)
    {
    int j = 0;
    int k = -1;
    for(int l = 0; l < i; l++)
    {
    int i1 = class30_sub2_sub2.method408();//recieved from server
    aCharArray631[j++] = aCharArray633[i1];
    }

    boolean flag1 = true;
    for(int k1 = 0; k1 < j; k1++)
    {
    char c = aCharArray631[k1];
    if(flag1 && c >= 'a' && c <= 'z')
    {
    aCharArray631[k1] += '\uFFE0';
    flag1 = false;
    }
    if(c == '.' || c == '!' || c == '?')
    flag1 = true;
    }

    if(!flag)
    anInt628 = 466;
    return new String(aCharArray631, 0, j);
    }



    2.

    Spoiler for :
    public static void method526(String s, boolean flag, Class30_Sub2_Sub2 class30_sub2_sub2)
    {
    if(s.length() > 80)
    s = s.substring(0, 80);
    s = s.toLowerCase();
    int i = -1;
    for(int j = 0; j < s.length(); j++)
    {
    char c = s.charAt(j);
    int k = 0;
    for(int l = 0; l < aCharArray633.length; l++)
    {
    if(c != aCharArray633[l])
    continue;
    k = l;
    break;
    }
    class30_sub2_sub2.method398(k);//sending to server
    }
    }



    3.and in the array "private static char aCharArray633[]" add the character u added/wish
    to add.


    and there we have it, enjoy.


    PICTURE:



    Credits:

    wowfreakjoking - for original thread(just dident wanna bump it)
     

  2. Thankful user:


  3. #2  
    Chemist

    Advocatus's Avatar
    Join Date
    Dec 2009
    Age
    28
    Posts
    2,549
    Thanks given
    192
    Thanks received
    761
    Discord
    View profile
    Rep Power
    1332
    Fix the tags please. Thanks
    Quote Originally Posted by blakeman8192 View Post
    Quitting is the only true failure.
     

  4. #3  
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    251
    Quote Originally Posted by Advocatus Diaboli View Post
    Fix the tags please. Thanks
    was working on it after i clicked post lol.
     

  5. #4  
    Client God

    Join Date
    Aug 2009
    Posts
    3,130
    Thanks given
    3
    Thanks received
    614
    Rep Power
    896
    I just edited validChars in TextInput.java awhile back and It worked fine .

    Good job on this for the people who don't know how to do it
     

  6. #5  
    If you read this you're gay!
    Infexis's Avatar
    Join Date
    Aug 2009
    Age
    25
    Posts
    4,561
    Thanks given
    1,158
    Thanks received
    1,173
    Rep Power
    2949
    How would I enable that characters like "*, ä, *" are writeable? Because when I type these they are not even appearing in chat.
    [Only registered and activated users can see links. ]
    "If you can't explain it simply, you don't understand it well enough." - Albert Einstein
     

  7. #6  
    Registered Member
    Purple's Avatar
    Join Date
    Feb 2010
    Age
    26
    Posts
    2,799
    Thanks given
    467
    Thanks received
    260
    Rep Power
    312
    Quote Originally Posted by Infexis View Post
    How would I enable that characters like "*, ä, *" are writeable? Because when I type these they are not even appearing in chat.
    The fonts are sprites packed in to cache, you would have to pack them and then do this tutorial.
     

  8. #7  
    Donator

    Join Date
    Jul 2010
    Posts
    276
    Thanks given
    0
    Thanks received
    1
    Rep Power
    26
    Cool, thanks

    Edit: doesn't work for PI get's many errors, with Method526 / Bytebuffer
     

  9. #8  
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    251
    Quote Originally Posted by Blackup View Post
    Cool, thanks

    Edit: doesn't work for PI get's many errors, with Method526 / Bytebuffer
    then rename it accordingly, it works u just need to make a small edition.
     

  10. #9  
    Registered Member
    Teemuzz's Avatar
    Join Date
    Oct 2009
    Posts
    2,710
    Thanks given
    1,132
    Thanks received
    400
    Rep Power
    701
    does it support **ä?
    I'm back.
    ScapeEmulator #592 Convert [Only registered and activated users can see links. ]/[Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
     

  11. #10  
    Fuck the rest join the best, WoR
    Jinx's Avatar
    Join Date
    Oct 2010
    Posts
    635
    Thanks given
    99
    Thanks received
    65
    Rep Power
    364
    I love how there are so many steps in simply enabling four characters. I don't really understand why it would take so long to do it, but I guess it is what it is. Thank you for the release. I am probably going to be adding this to my server. .
    The wor has begun.


     

Page 1 of 2 12 LastLast

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. Replies: 60
    Last Post: 10-01-2012, 02:13 PM
  2. Replies: 12
    Last Post: 11-26-2010, 01:53 AM
  3. Stop making "Methods" or "Frames" classes..
    By Colby in forum RS2 Server
    Replies: 32
    Last Post: 01-03-2010, 02:05 PM
  4. "hed","head","headicon" command like ::emote Rep++
    By «I Gf I» ©£ in forum Help
    Replies: 12
    Last Post: 10-06-2009, 05:30 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •