Thread: Scroll Bar

Results 1 to 10 of 10
  1. #1 Scroll Bar 
    Donator

    Sir Lethal's Avatar
    Join Date
    Mar 2008
    Posts
    2,286
    Thanks given
    9
    Thanks received
    74
    Rep Power
    426
    Hello,I'm using Warlocks 999 renamed base 474 - [Only registered and activated users can see links. ]

    and when ever I move the scroll bar I get dc'd I have this error in the cmd

    Code:
    Exception in thread "Thread-5" java.lang.ArithmeticException: / by zero
        at client.method65(client.java:3691)
        at client.drawGameScreen(client.java:8417)
        at client.processDrawing(client.java:9381)
        at RSApplet.run(RSApplet.java:138)
        at client.run(client.java:4916)
        at java.lang.Thread.run(Thread.java:637)
    Does anyone know how to fix this?
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Client God

    Join Date
    Aug 2009
    Posts
    3,130
    Thanks given
    3
    Thanks received
    614
    Rep Power
    896
    He said scroll removed...

    Scroll Removed(To enable it uncomment frame.getContentPane().add(scroll, BorderLayout.SOUTH); in Jframe.java)
    Reply With Quote  
     

  3. #3  
    Donator

    Sir Lethal's Avatar
    Join Date
    Mar 2008
    Posts
    2,286
    Thanks given
    9
    Thanks received
    74
    Rep Power
    426
    Quote Originally Posted by K4rn4ge View Post
    He said scroll removed...

    Scroll Removed(To enable it uncomment frame.getContentPane().add(scroll, BorderLayout.SOUTH); in Jframe.java)
    All that does is add the black chatbox to the bottom of the client.. It doesn't fix the scroll bar whats so ever trust me I tried and it still dc's me

    Btw,I'm talking about the ingame scrollbar
    [Only registered and activated users can see links. ]
    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
    Show me drawChatArea(); and drawGameScreen()


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

  5. #5  
    Client God

    Join Date
    Aug 2009
    Posts
    3,130
    Thanks given
    3
    Thanks received
    614
    Rep Power
    896
    O ok my bad good luck with figureing it out
    Reply With Quote  
     

  6. #6  
    Donator

    Sir Lethal's Avatar
    Join Date
    Mar 2008
    Posts
    2,286
    Thanks given
    9
    Thanks received
    74
    Rep Power
    426
    Spoiler for Drawchatarea:
    Code:
    private void drawChatArea() {
            aRSImageProducer_1166.initDrawingArea();
            Texture.anIntArray1472 = anIntArray1180;
            chatBack.method361(0, 0);
            if (messagePromptRaised) {
                chatTextDrawingArea.drawText(0, aString1121, 56, 260);
                chatTextDrawingArea.drawText(128, promptInput + "*", 75, 260);
            } else if (inputDialogState == 1) {
                chatTextDrawingArea.drawText(0, "Enter amount:", 56, 260);
                chatTextDrawingArea.drawText(128, amountOrNameInput + "*", 75, 260);
            } else if (inputDialogState == 2) {
                chatTextDrawingArea.drawText(0, "Enter name:", 56, 260);
                chatTextDrawingArea.drawText(128, amountOrNameInput + "*", 75, 260);
            } else if (aString844 != null) {
                chatTextDrawingArea.drawText(0, aString844, 56, 260);
                chatTextDrawingArea.drawText(128, "Click to continue", 75, 260);
            } else if (backDialogID != -1) {
                drawInterface(0, 0, RSInterface.interfaceCache[backDialogID], 0);
            } else if (dialogID != -1) {
                drawInterface(0, 0, RSInterface.interfaceCache[dialogID], 0);
            } else {
                TextDrawingArea textDrawingArea = aTextDrawingArea_1271;
                int j = 0;
    
                DrawingArea.setDrawingArea(113, 0, 486, 0);
                for (int k = 0; k < 100; k++) {
                    if (chatMessages[k] != null) {
                        int l = chatTypes[k];
                        int i1 = (109 - j * 14) + anInt1089;
                        String s1 = chatNames[k];
                        byte byte0 = 0;
    
                        if (s1 != null && s1.startsWith("@[email protected]")) {
                            s1 = s1.substring(5);
                            byte0 = 1;
                        }
                        if (s1 != null && s1.startsWith("@[email protected]")) {
                            s1 = s1.substring(5);
                            byte0 = 2;
                        }
                        if (l == 0) {
                            if (i1 > 0 && i1 < 120) {
                                textDrawingArea
                                        .method385(0, chatMessages[k], i1, 4);
                            }
                            j++;
                        }
                        if ((l == 1 || l == 2)
                                && (l == 1 || publicChatMode == 0 || publicChatMode == 1
                                        && isFriendOrSelf(s1))) {
                            if (i1 > 0 && i1 < 120) {
                                int j1 = 4;
    
                                if (byte0 == 1) {
                                    modIcons[0].method361(j1, i1 - 12);
                                    j1 += 14;
                                }
                                if (byte0 == 2) {
                                    modIcons[1].method361(j1, i1 - 12);
                                    j1 += 14;
                                }
                                textDrawingArea.method385(0, s1 + ":", i1, j1);
                                j1 += textDrawingArea.getTextWidth(s1) + 8;
                                textDrawingArea.method385(255, chatMessages[k], i1,
                                        j1);
                            }
                            j++;
                        }
                        if ((l == 3 || l == 7)
                                && splitPrivateChat == 0
                                && (l == 7 || privateChatMode == 0 || privateChatMode == 1
                                        && isFriendOrSelf(s1))) {
                            if (i1 > 0 && i1 < 120) {
                                int k1 = 4;
    
                                textDrawingArea.method385(0, "From", i1, k1);
                                k1 += textDrawingArea.getTextWidth("From ");
                                if (byte0 == 1) {
                                    modIcons[0].method361(k1, i1 - 12);
                                    k1 += 14;
                                }
                                if (byte0 == 2) {
                                    modIcons[1].method361(k1, i1 - 12);
                                    k1 += 14;
                                }
                                textDrawingArea.method385(0, s1 + ":", i1, k1);
                                k1 += textDrawingArea.getTextWidth(s1) + 8;
                                textDrawingArea.method385(0x800000,
                                        chatMessages[k], i1, k1);
                            }
                            j++;
                        }
                        if (l == 4
                                && (tradeMode == 0 || tradeMode == 1
                                        && isFriendOrSelf(s1))) {
                            if (i1 > 0 && i1 < 120) {
                                textDrawingArea.method385(0x800080, s1 + " "
                                        + chatMessages[k], i1, 4);
                            }
                            j++;
                        }
                        if (l == 5 && splitPrivateChat == 0 && privateChatMode < 2) {
                            if (i1 > 0 && i1 < 120) {
                                textDrawingArea.method385(0x800000,
                                        chatMessages[k], i1, 4);
                            }
                            j++;
                        }
                        if (l == 6 && splitPrivateChat == 0 && privateChatMode < 2) {
                            if (i1 > 0 && i1 < 120) {
                                textDrawingArea.method385(0, "To " + s1 + ":", i1,
                                        4);
                                textDrawingArea.method385(0x800000,
                                        chatMessages[k], i1, 12 + textDrawingArea
                                                .getTextWidth("To " + s1));
                            }
                            j++;
                        }
                        if (l == 8
                                && (tradeMode == 0 || tradeMode == 1
                                        && isFriendOrSelf(s1))) {
                            if (i1 > 0 && i1 < 120) {
                                textDrawingArea.method385(0x7e3200, s1 + " "
                                        + chatMessages[k], i1, 4);
                            }
                            j++;
                        }
                    }
                }
    
                DrawingArea.defaultDrawingAreaSize();
                anInt1211 = j * 14 + 7;
                if (anInt1211 < 113) {
                    anInt1211 = 113;
                }
                method30(112, anInt1211 - anInt1089 - 112, 0, 488, anInt1211);
                String s;
    
                if (myPlayer != null && myPlayer.name != null) {
                    s = myPlayer.name;
                } else {
                    s = TextClass.fixName(myUsername);
                }
                int rights = myPrivilege - 1;
                if (rights > 1)
                    rights = 1;
    
                int xOff = 0;
                if (rights >= 0) {
                    xOff = 14;
                    modIcons[rights].method361(4, 112);
                }
                textDrawingArea.method385(0, s + ":", 124, 4 + xOff);
                textDrawingArea.method385(255, inputString + "*", 123, 6
                        + textDrawingArea.getTextWidth(s + ": ") + xOff);
                DrawingArea.method339(112, 0x867756, 505, 0);
            }
            if (menuOpen && menuScreenArea == 2) {
                drawMenu();
            }
            aRSImageProducer_1166.drawGraphics(344, super.graphics, 8);
            aRSImageProducer_1165.initDrawingArea();
            Texture.anIntArray1472 = anIntArray1182;
        }


    Spoiler for Drawgamescreen:
    Code:
    private void drawGameScreen() {
            if (welcomeScreenRaised) {
                welcomeScreenRaised = false;
                backLeftIP1.drawGraphics(4, super.graphics, 0);
                backLeftIP2.drawGraphics(344, super.graphics, 0);
                backRightIP1.drawGraphics(4, super.graphics, 715);
                backRightIP2.drawGraphics(204, super.graphics, 737);
                backTopIP1.drawGraphics(0, super.graphics, 0);
                backVmidIP1.drawGraphics(4, super.graphics, 516);
                backVmidIP2.drawGraphics(204, super.graphics, 516);
                backVmidIP2_2.drawGraphics(338, super.graphics, 0);
                needDrawTabArea = true;
                inputTaken = true;
                tabAreaAltered = true;
                aBoolean1233 = true;
                if (loadingStage != 2) {
                    aRSImageProducer_1165.drawGraphics(4, super.graphics, 4);
                    aRSImageProducer_1164.drawGraphics(4, super.graphics, 545);
                }
            }
            if (loadingStage == 2)
                method146();
            if (menuOpen && menuScreenArea == 1)
                needDrawTabArea = true;
            if (invOverlayInterfaceID != -1) {
                boolean flag1 = method119(anInt945, invOverlayInterfaceID);
                if (flag1)
                    needDrawTabArea = true;
            }
            if (atInventoryInterfaceType == 2)
                needDrawTabArea = true;
            if (activeInterfaceType == 2)
                needDrawTabArea = true;
            if (needDrawTabArea) {
                drawTabArea();
                needDrawTabArea = false;
            }
            if (backDialogID == -1) {
                aClass9_1059.scrollPosition = anInt1211 - anInt1089 - 113;// here
                if (super.mouseX > 496 && super.mouseX < 560 && super.mouseY > 332)
                    method65(488, 113, super.mouseX - 7, super.mouseY - 345,
                            aClass9_1059, 0, false, anInt1211);
                int i = anInt1211 - 113 - aClass9_1059.scrollPosition;
                if (i < 0)
                    i = 0;
                if (i > anInt1211 - 113)
                    i = anInt1211 - 113;
                if (anInt1089 != i) {
                    anInt1089 = i;
                    inputTaken = true;
                }
            }
            if (backDialogID != -1) {
                boolean flag2 = method119(anInt945, backDialogID);
                if (flag2)
                    inputTaken = true;
            }
            if (atInventoryInterfaceType == 3)
                inputTaken = true;
            if (activeInterfaceType == 3)
                inputTaken = true;
            if (aString844 != null)
                inputTaken = true;
            if (menuOpen && menuScreenArea == 2)
                inputTaken = true;
            if (inputTaken) {
                drawChatArea();
                inputTaken = false;
            }
            if (loadingStage == 2) {
                drawMinimap();
                aRSImageProducer_1164.drawGraphics(4, super.graphics, 545);
            }
            if (anInt1054 != -1)
                tabAreaAltered = true;
            if (tabAreaAltered) {
                if (anInt1054 != -1 && anInt1054 == tabID) {
                    anInt1054 = -1;
                    stream.createFrame(120);
                    stream.writeWordBigEndian(tabID);
                }
                tabAreaAltered = false;
                aRSImageProducer_1125.initDrawingArea();
                backHmid1.method361(0, 0);
                if (invOverlayInterfaceID == -1) {
                    if (tabInterfaceIDs[tabID] != -1) {
                        if (tabID == 0)
                            redstone[0].method361(6, 0);
                        if (tabID == 1)
                            redstone[2].method361(44, 0);
                        if (tabID == 2)
                            redstone[2].method361(77, 0);
                        if (tabID == 3)
                            redstone[2].method361(110, 0);
                        if (tabID == 4)
                            redstone[2].method361(143, 0);
                        if (tabID == 5)
                            redstone[2].method361(176, 0);
                        if (tabID == 6)
                            redstone[1].method361(209, 0);
                    }
                    if (tabInterfaceIDs[0] != -1
                            && (anInt1054 != 0 || loopCycle % 20 < 10))
                        sideIcons[0].method361(17, 9);
                    if (tabInterfaceIDs[1] != -1
                            && (anInt1054 != 1 || loopCycle % 20 < 10))
                        sideIcons[1].method361(49, 7);
                    if (tabInterfaceIDs[2] != -1
                            && (anInt1054 != 2 || loopCycle % 20 < 10))
                        sideIcons[2].method361(83, 7);
                    if (tabInterfaceIDs[3] != -1
                            && (anInt1054 != 3 || loopCycle % 20 < 10))
                        sideIcons[3].method361(114, 5);
                    if (tabInterfaceIDs[4] != -1
                            && (anInt1054 != 4 || loopCycle % 20 < 10))
                        sideIcons[4].method361(146, 2);
                    if (tabInterfaceIDs[5] != -1
                            && (anInt1054 != 5 || loopCycle % 20 < 10))
                        sideIcons[5].method361(180, 3);
                    if (tabInterfaceIDs[6] != -1
                            && (anInt1054 != 6 || loopCycle % 20 < 10))
                        sideIcons[6].method361(214, 7);
                }
                aRSImageProducer_1125.drawGraphics(168, super.graphics, 516);
                aRSImageProducer_1124.initDrawingArea();
                backBase2.method361(0, 0);
                if (invOverlayInterfaceID == -1) {
                    if (tabInterfaceIDs[tabID] != -1) {
                        if (tabID == 7)
                            redstone[0].method361(6, 1);
                        if (tabID == 8)
                            redstone[2].method361(44, 1);
                        if (tabID == 9)
                            redstone[2].method361(77, 1);
                        if (tabID == 10)
                            redstone[2].method361(110, 1);
                        if (tabID == 11)
                            redstone[2].method361(143, 1);
                        if (tabID == 12)
                            redstone[2].method361(176, 1);
                    }
                    if (tabInterfaceIDs[7] != -1
                            && (anInt1054 != 8 || loopCycle % 20 < 10))
                        sideIcons[13].method361(14, 6);
                    if (tabInterfaceIDs[8] != -1
                            && (anInt1054 != 8 || loopCycle % 20 < 10))
                        sideIcons[7].method361(49, 9);
                    if (tabInterfaceIDs[9] != -1
                            && (anInt1054 != 9 || loopCycle % 20 < 10))
                        sideIcons[8].method361(82, 9);
                    if (tabInterfaceIDs[10] != -1
                            && (anInt1054 != 10 || loopCycle % 20 < 10))
                        sideIcons[9].method361(116, 5);
                    if (tabInterfaceIDs[11] != -1
                            && (anInt1054 != 11 || loopCycle % 20 < 10))
                        sideIcons[10].method361(148, 7);
                    if (tabInterfaceIDs[12] != -1
                            && (anInt1054 != 12 || loopCycle % 20 < 10))
                        sideIcons[11].method361(184, 5);
                    if (tabInterfaceIDs[13] != -1
                            && (anInt1054 != 13 || loopCycle % 20 < 10))
                        sideIcons[12].method361(216, 6);
                }
                aRSImageProducer_1124.drawGraphics(465, super.graphics, 516);
                aRSImageProducer_1165.initDrawingArea();
            }
            if (aBoolean1233) {
                aBoolean1233 = false;
                aRSImageProducer_1123.initDrawingArea();
                backBase1.method361(0, 0);
                aRSImageProducer_1165.initDrawingArea();
                processChatButtons();
            }
            anInt945 = 0;
        }


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

  7. #7  
    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
    Find this:
    Code:
            if (backDialogID == -1) {
                aClass9_1059.scrollPosition = anInt1211 - anInt1089 - 113;// here
                if (super.mouseX > 496 && super.mouseX < 560 && super.mouseY > 332)
                    method65(488, 113, super.mouseX - 7, super.mouseY - 345,
                            aClass9_1059, 0, false, anInt1211);
                int i = anInt1211 - 113 - aClass9_1059.scrollPosition;
                if (i < 0)
                    i = 0;
                if (i > anInt1211 - 113)
                    i = anInt1211 - 113;
                if (anInt1089 != i) {
                    anInt1089 = i;
                    inputTaken = true;
                }
            }
    Replace with this:
    Code:
      if (backDialogID == -1) {
                aClass9_1059.scrollPosition = anInt1211 - anInt1089 - 112;// here
                if (super.mouseX > 496 && super.mouseX < 560 && super.mouseY > 332)
                    method65(488, 112, super.mouseX - 7, super.mouseY - 345,
                            aClass9_1059, 0, false, anInt1211);
                int i = anInt1211 - 112 - aClass9_1059.scrollPosition;
                if (i < 0)
                    i = 0;
                if (i > anInt1211 - 112)
                    i = anInt1211 - 112;
                if (anInt1089 != i) {
                    anInt1089 = i;
                    inputTaken = true;
                }
            }
    See how that works.


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

  8. #8  
    Donator

    Sir Lethal's Avatar
    Join Date
    Mar 2008
    Posts
    2,286
    Thanks given
    9
    Thanks received
    74
    Rep Power
    426
    That makes it work thank you Stewie I'll be sure to rep you
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #9  
    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
    You're very welcome. I had the same problem whenever I started working on my chat box. ^_^


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

  10. #10  
    Donator

    Sir Lethal's Avatar
    Join Date
    Mar 2008
    Posts
    2,286
    Thanks given
    9
    Thanks received
    74
    Rep Power
    426
    Quote Originally Posted by Sir Stewie View Post
    You're very welcome. I had the same problem whenever I started working on my chat box. ^_^
    Once again,thanks man really needed that ha ha .
    I'll be sure to give credits and stuff
    [Only registered and activated users can see links. ]
    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
  •