Thread: RichScape Object Clicking Fix

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 RichScape Object Clicking Fix 
    Registered Member
    Auruo's Avatar
    Join Date
    Mar 2008
    Age
    29
    Posts
    749
    Thanks given
    20
    Thanks received
    15
    Rep Power
    499
    Purpose: To fix the bug that DC's the minimap if you mass click an object while under attack or just click an object from too far away while frozen.

    Difficulty: 1

    Tested On: RichScape Client v4 bug fix 2 (I don't have nor do I know if this bug still exists on the newer versions)
    I tested this by doing the following: I had my bro on the unfixed client and me on the fixed, he still dc'd but I didn't. I then gave him the updated and we tried again and neither of us DC'd and there were no repercussions. I'm not good with clients but here's the fix.

    One and only step:
    Open client.java (This is clientside, NOT server side) and find
    Code:
    void method34(int i)
    replace that whole method with
    Code:
        public final void method34(int i)
        {
    	try {
            anInt974 = 0;
            for(int j = -1; j < anInt891 + anInt836; j++)
            {
                Object obj;
                if(j == -1)
                    obj = aClass30_Sub2_Sub4_Sub1_Sub2_1126;
                else
                if(j < anInt891)
                    obj = aClass30_Sub2_Sub4_Sub1_Sub2Array890[anIntArray892[j]];
                else
                    obj = aClass30_Sub2_Sub4_Sub1_Sub1Array835[anIntArray837[j - anInt891]];
                if(obj == null || !((Class30_Sub2_Sub4_Sub1) (obj)).method449(aBoolean1224))
                    continue;
                if(obj instanceof Class30_Sub2_Sub4_Sub1_Sub1)
                {
                    Class5 class5 = ((Class30_Sub2_Sub4_Sub1_Sub1)obj).aClass5_1696;
                    if(class5.anIntArray88 != null)
                        class5 = class5.method161(anInt877);
                    if(class5 == null)
                        continue;
                }
                if(j < anInt891)
                {
                    int l = 30;
                    Class30_Sub2_Sub4_Sub1_Sub2 class30_sub2_sub4_sub1_sub2 = (Class30_Sub2_Sub4_Sub1_Sub2)obj;
                    if(class30_sub2_sub4_sub1_sub2.anInt1706 != 0)
                    {
                        method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507 + 15);
                        if(anInt963 > -1)
                        {
                            for(int i2 = 0; i2 < 8; i2++)
                                if((class30_sub2_sub4_sub1_sub2.anInt1706 & 1 << i2) != 0)
                                {
                                    aClass30_Sub2_Sub1_Sub1Array1095[i2].method348(anInt963 - 12, 16083, anInt964 - l);
                                    l += 25;
                                }
    
                        }
                    }
                    if(j >= 0 && anInt855 == 10 && anInt933 == anIntArray892[j])
                    {
                        method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507 + 15);
                        if(anInt963 > -1)
                            aClass30_Sub2_Sub1_Sub1Array1095[7].method348(anInt963 - 12, 16083, anInt964 - l);
                    }
                } else
                {
                    Class5 class5_1 = ((Class30_Sub2_Sub4_Sub1_Sub1)obj).aClass5_1696;
                    if(class5_1.anInt75 >= 0 && class5_1.anInt75 < aClass30_Sub2_Sub1_Sub1Array1095.length)
                    {
                        method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507 + 15);
                        if(anInt963 > -1)
                            aClass30_Sub2_Sub1_Sub1Array1095[class5_1.anInt75].method348(anInt963 - 12, 16083, anInt964 - 30);
                    }
                    if(anInt855 == 1 && anInt1222 == anIntArray837[j - anInt891] && anInt1161 % 20 < 10)
                    {
                        method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507 + 15);
                        if(anInt963 > -1)
                            aClass30_Sub2_Sub1_Sub1Array1095[2].method348(anInt963 - 12, 16083, anInt964 - 28);
                    }
                }
                if(((Class30_Sub2_Sub4_Sub1) (obj)).aString1506 != null && (j >= anInt891 || anInt1287 == 0 || anInt1287 == 3 || anInt1287 == 1 && method109(false, ((Class30_Sub2_Sub4_Sub1_Sub2)obj).aString1703)))
                {
                    method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507);
                    if(anInt963 > -1 && anInt974 < anInt975)
                    {
                        anIntArray979[anInt974] = aClass30_Sub2_Sub1_Sub4_1272.method384(((Class30_Sub2_Sub4_Sub1) (obj)).aString1506, true) / 2;
                        anIntArray978[anInt974] = aClass30_Sub2_Sub1_Sub4_1272.anInt1497;
                        anIntArray976[anInt974] = anInt963;
                        anIntArray977[anInt974] = anInt964;
                        anIntArray980[anInt974] = ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1513;
                        anIntArray981[anInt974] = ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1531;
                        anIntArray982[anInt974] = ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1535;
                        aStringArray983[anInt974++] = ((Class30_Sub2_Sub4_Sub1) (obj)).aString1506;
                        if(anInt1249 == 0 && ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1531 >= 1 && ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1531 <= 3)
                        {
                            anIntArray978[anInt974] += 10;
                            anIntArray977[anInt974] += 5;
                        }
                        if(anInt1249 == 0 && ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1531 == 4)
                            anIntArray979[anInt974] = 60;
                        if(anInt1249 == 0 && ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1531 == 5)
                            anIntArray978[anInt974] += 5;
                    }
                }
                if(((Class30_Sub2_Sub4_Sub1) (obj)).anInt1532 > anInt1161)
                {
                    method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507 + 15);
                    if(anInt963 > -1)
                    {
                        int i1 = (((Class30_Sub2_Sub4_Sub1) (obj)).anInt1533 * 30) / ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1534;
                        if(i1 > 30)
                            i1 = 30;
                        Class30_Sub2_Sub1.method336(5, anInt964 - 3, anInt963 - 15, 65280, i1, 0);
                        Class30_Sub2_Sub1.method336(5, anInt964 - 3, (anInt963 - 15) + i1, 0xff0000, 30 - i1, 0);
                    }
                }
                for(int j1 = 0; j1 < 4; j1++)
                    if(((Class30_Sub2_Sub4_Sub1) (obj)).anIntArray1516[j1] > anInt1161) {
                        method127(true, ((Class30_Sub2_Sub4_Sub1) (obj)), ((Class30_Sub2_Sub4_Sub1) (obj)).anInt1507 / 2);
                        if(anInt963 > -1) {
                            if(j1 == 1)
                                anInt964 -= 20;
                            if(j1 == 2) {
                                anInt963 -= 15;
                                anInt964 -= 10;
                            }
                            if(j1 == 3) {
                                anInt963 += 15;
                                anInt964 -= 10;
                            }
                            aClass30_Sub2_Sub1_Sub1Array987[((Class30_Sub2_Sub4_Sub1) (obj)).anIntArray1515[j1]].method348(anInt963 - 12, 16083, anInt964 - 12);
                            aClass30_Sub2_Sub1_Sub4_1270.method381(0, String.valueOf(((Class30_Sub2_Sub4_Sub1) (obj)).anIntArray1514[j1]), 23693, anInt964 + 4, anInt963);
                            aClass30_Sub2_Sub1_Sub4_1270.method381(0xffffff, String.valueOf(((Class30_Sub2_Sub4_Sub1) (obj)).anIntArray1514[j1]), 23693, anInt964 + 3, anInt963 - 1);
                        }
                    }
            }
    
            if(i != 0)
                method6();
            for(int k = 0; k < anInt974; k++) {
                int k1 = anIntArray976[k];
                int l1 = anIntArray977[k];
                int j2 = anIntArray979[k];
                int k2 = anIntArray978[k];
                boolean flag = true;
                while(flag) {
                    flag = false;
                    for(int l2 = 0; l2 < k; l2++)
                        if(l1 + 2 > anIntArray977[l2] - anIntArray978[l2] && l1 - k2 < anIntArray977[l2] + 2 && k1 - j2 < anIntArray976[l2] + anIntArray979[l2] && k1 + j2 > anIntArray976[l2] - anIntArray979[l2] && anIntArray977[l2] - anIntArray978[l2] < l1) {
                            l1 = anIntArray977[l2] - anIntArray978[l2];
                            flag = true;
                        }
    
                }
                anInt963 = anIntArray976[k];
                anInt964 = anIntArray977[k] = l1;
                String s = aStringArray983[k];
                if(anInt1249 == 0) {
                    int i3 = 0xffff00;
                    if(anIntArray980[k] < 6)
                        i3 = anIntArray965[anIntArray980[k]];
                    if(anIntArray980[k] == 6)
                        i3 = anInt1265 % 20 >= 10 ? 0xffff00 : 0xff0000;
                    if(anIntArray980[k] == 7)
                        i3 = anInt1265 % 20 >= 10 ? 65535 : 255;
                    if(anIntArray980[k] == 8)
                        i3 = anInt1265 % 20 >= 10 ? 0x80ff80 : 45056;
                    if(anIntArray980[k] == 9) {
                        int j3 = 150 - anIntArray982[k];
                        if(j3 < 50)
                            i3 = 0xff0000 + 1280 * j3;
                        else
                        if(j3 < 100)
                            i3 = 0xffff00 - 0x50000 * (j3 - 50);
                        else
                        if(j3 < 150)
                            i3 = 65280 + 5 * (j3 - 100);
                    }
                    if(anIntArray980[k] == 10) {
                        int k3 = 150 - anIntArray982[k];
                        if(k3 < 50)
                            i3 = 0xff0000 + 5 * k3;
                        else
                        if(k3 < 100)
                            i3 = 0xff00ff - 0x50000 * (k3 - 50);
                        else
                        if(k3 < 150)
                            i3 = (255 + 0x50000 * (k3 - 100)) - 5 * (k3 - 100);
                    }
                    if(anIntArray980[k] == 11) {
                        int l3 = 150 - anIntArray982[k];
                        if(l3 < 50)
                            i3 = 0xffffff - 0x50005 * l3;
                        else
                        if(l3 < 100)
                            i3 = 65280 + 0x50005 * (l3 - 50);
                        else
                        if(l3 < 150)
                            i3 = 0xffffff - 0x50000 * (l3 - 100);
                    }
                    if(anIntArray981[k] == 0) {
                        aClass30_Sub2_Sub1_Sub4_1272.method381(0, s, 23693, anInt964 + 1, anInt963);
                        aClass30_Sub2_Sub1_Sub4_1272.method381(i3, s, 23693, anInt964, anInt963);
                    }
                    if(anIntArray981[k] == 1) {
                        aClass30_Sub2_Sub1_Sub4_1272.method386(0, true, s, anInt963, anInt1265, anInt964 + 1);
                        aClass30_Sub2_Sub1_Sub4_1272.method386(i3, true, s, anInt963, anInt1265, anInt964);
                    }
                    if(anIntArray981[k] == 2) {
                        aClass30_Sub2_Sub1_Sub4_1272.method387(anInt963, s, anInt1265, anInt964 + 1, aByte1194, 0);
                        aClass30_Sub2_Sub1_Sub4_1272.method387(anInt963, s, anInt1265, anInt964, aByte1194, i3);
                    }
                    if(anIntArray981[k] == 3) {
                        aClass30_Sub2_Sub1_Sub4_1272.method388(150 - anIntArray982[k], s, true, anInt1265, anInt964 + 1, anInt963, 0);
                        aClass30_Sub2_Sub1_Sub4_1272.method388(150 - anIntArray982[k], s, true, anInt1265, anInt964, anInt963, i3);
                    }
                    if(anIntArray981[k] == 4) {
                        int i4 = aClass30_Sub2_Sub1_Sub4_1272.method384(s, true);
                        int k4 = ((150 - anIntArray982[k]) * (i4 + 100)) / 150;
                        Class30_Sub2_Sub1.method333(334, anInt963 - 50, false, anInt963 + 50, 0);
                        aClass30_Sub2_Sub1_Sub4_1272.method385(0, s, anInt964 + 1, 822, (anInt963 + 50) - k4);
                        aClass30_Sub2_Sub1_Sub4_1272.method385(i3, s, anInt964, 822, (anInt963 + 50) - k4);
                        Class30_Sub2_Sub1.method332(4);
                    }
                    if(anIntArray981[k] == 5) {
                        int j4 = 150 - anIntArray982[k];
                        int l4 = 0;
                        if(j4 < 25)
                            l4 = j4 - 25;
                        else
                        if(j4 > 125)
                            l4 = j4 - 125;
                        Class30_Sub2_Sub1.method333(anInt964 + 5, 0, false, 512, anInt964 - aClass30_Sub2_Sub1_Sub4_1272.anInt1497 - 1);
                        aClass30_Sub2_Sub1_Sub4_1272.method381(0, s, 23693, anInt964 + 1 + l4, anInt963);
                        aClass30_Sub2_Sub1_Sub4_1272.method381(i3, s, 23693, anInt964 + l4, anInt963);
                        Class30_Sub2_Sub1.method332(4);
                    }
                } else {
                    aClass30_Sub2_Sub1_Sub4_1272.method381(0, s, 23693, anInt964 + 1, anInt963);
                    aClass30_Sub2_Sub1_Sub4_1272.method381(0xffff00, s, 23693, anInt964, anInt963);
                }
            }
    
    		} catch(Exception E) {
    		}
        }
    All I did was made it catch the exception instead of crashing. Doesn't mess anything up to my knowledge, so there you go...

    I tried everything server side, but nothing..so here's this. Let me know if somethings screwed up.
    Reply With Quote  
     

  2. #2  
    Registered Member
    AkZu's Avatar
    Join Date
    Jan 2008
    Age
    26
    Posts
    393
    Thanks given
    249
    Thanks received
    162
    Rep Power
    343
    *I remove my posts*
    Reply With Quote  
     

  3. #3  
    Registered Member
    Auruo's Avatar
    Join Date
    Mar 2008
    Age
    29
    Posts
    749
    Thanks given
    20
    Thanks received
    15
    Rep Power
    499
    Quote Originally Posted by AkZu View Post
    It worked perfectly Thank you very much mate Now I can be into coding and not problem solving why it freezes; all works now perfectly thanks!!
    Your welcome. Took me forever to fix because I was only looking serverside =/
    Reply With Quote  
     

  4. #4  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    We should really stop adding tutorials that supposedly "fix" other user's clients. The tutorials should be Universal which means " Applies to Everything". There should also be a Tag to add like Refactored or Non-Refactored...


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Registered Member
    Auruo's Avatar
    Join Date
    Mar 2008
    Age
    29
    Posts
    749
    Thanks given
    20
    Thanks received
    15
    Rep Power
    499
    Quote Originally Posted by Stewart View Post
    We should really stop adding tutorials that supposedly "fix" other user's clients. The tutorials should be Universal which means " Applies to Everything". There should also be a Tag to add like Refactored or Non-Refactored...
    Tell you what, when that's added to the section rules I'll remove this, but until then, everyone using RichScape needs this so it'll stay here...
    Reply With Quote  
     

  6. #6  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    Quote Originally Posted by Auruo View Post
    Tell you what, when that's added to the section rules I'll remove this, but until then, everyone using RichScape needs this so it'll stay here...
    Could have posted in "Snippets" you know. Since your simply telling them to replace something instead of actually add something new to your client.


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member
    Auruo's Avatar
    Join Date
    Mar 2008
    Age
    29
    Posts
    749
    Thanks given
    20
    Thanks received
    15
    Rep Power
    499
    Quote Originally Posted by Stewart View Post
    Could have posted in "Snippets" you know. Since your simply telling them to replace something instead of actually add something new to your client.
    If mods want it moved, they can move it wherever they please. This is just where I thought it belonged, sorry if it's in the wrong section.
    Reply With Quote  
     

  8. #8  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    Never said wrong section, saying in my opinion is should be in snippets since it's a block of code. That's all


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #9  
    Registered Member
    Chachi's Avatar
    Join Date
    Sep 2008
    Posts
    1,536
    Thanks given
    49
    Thanks received
    103
    Rep Power
    602
    Good job dude!
    [/CENTER]
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Sep 2007
    Posts
    273
    Thanks given
    0
    Thanks received
    7
    Rep Power
    9
    Looking good and i will have to add this thanks
    Reply With Quote  
     

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

Tags for this Thread

View Tag Cloud

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