Thread: Fix mouse clicking in java 9

Page 6 of 6 FirstFirst ... 456
Results 51 to 59 of 59
  1. #51  
    Misthalin where it all began.
    Manatee's Avatar
    Join Date
    Dec 2019
    Posts
    52
    Thanks given
    1
    Thanks received
    11
    Rep Power
    12
    hi i was wondering if someone could help me out with this I know am new to this, but tried to follow this. but somethings i really could not find. I have to state I currently use the dawntained (released version on rune-server) [Only registered and activated users can see links. ] current un-edited RSApplet.java

    this is what i could not find nor something that looked similare
    Code:
     
    if (type == 2) {
    			mouseWheelDown = true;
    			mouseWheelX = i;
    			mouseWheelY = j;
    			return;
    		}
    here is the new code. Also where can I find the letter (SwingUtilities.isRightMouseButton(e)) in this case the e that my client uses so i can change that.
    Code:
            public final void mousePressed(MouseEvent mouseevent)
            {
                    int i = mouseevent.getX();
                    int j = mouseevent.getY();
                    if (gameFrame != null)
                    {
                            i -= 4; //4
                            j -= 22; //22
                    }
                    idleTime = 0;
                    clickX = i;
                    clickY = j;
                    clickTime = System.currentTimeMillis();
                    
                	if(SwingUtilities.isRightMouseButton(e)) {                {
                            clickMode1 = 2;
                            clickMode2 = 2;
    
                	} else if(SwingUtilities.isLeftMouseButton(e)){
                    {
                            clickMode1 = 1;
                            clickMode2 = 1;
                    }
            }
    old code.

    Code:
                    if (mouseevent.isMetaDown())
                    {
                            clickMode1 = 2;
                            clickMode2 = 2;
                    }
                    else
                    {
                            clickMode1 = 1;
                            clickMode2 = 1;
                    }
            }
    Quote Originally Posted by Corey View Post
    Already helped him fix on another thread.
    can you please help me out with this?
    Reply With Quote  
     

  2. #52  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,187
    Thanks given
    1,124
    Thanks received
    834
    Discord
    View profile
    Rep Power
    1514
    Anyone collected data on java versions in the scene recently ?
    Reply With Quote  
     

  3. #53  
    Registered Member
    Join Date
    Nov 2020
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Discord
    View profile
    Rep Power
    0
    Quote Originally Posted by StanDev View Post
    Java 9 introduced a few bugs in the ancient client engine most people use, the most noticeable one is right mouse clicking.

    Go to the class where you handle your mouse clicking, usually in RSApplet.java.

    Search for this:
    Code:
     
    if (type == 2) {
    			mouseWheelDown = true;
    			mouseWheelX = i;
    			mouseWheelY = j;
    			return;
    		}
    replace the if statement with:
    Code:
    if (SwingUtilities.isMiddleMouseButton(e)) {
    Note that the argument of the method (e) is the MouseEvent object reference, this might be named differently in your client.

    Then search for:
    Code:
    		if (mouseevent.isMetaDown()) {
    			clickMode1 = 2;
    			clickMode2 = 2;
    		}
    Replace the first if statement with:
    Code:
    	if(SwingUtilities.isRightMouseButton(e)) {
    Then also in the following else block:
    Code:
    	} else {
    			clickMode1 = 1;
    			clickMode2 = 1;
    		}
    replace the else line with:
    Code:
    	} else if(SwingUtilities.isLeftMouseButton(e)){
    As pointed out by Jire, it is better to do it this way:
    friend, can you copy the entire script from the button? please, i tried anyway, looked at all the comments from page 1 to page 19 and i can't solve this problem with the right button, please man, or try to send me by email: [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #54  
    Super Donator

    StanDev's Avatar
    Join Date
    Apr 2014
    Posts
    658
    Thanks given
    73
    Thanks received
    248
    Discord
    View profile
    Rep Power
    566
    Quote Originally Posted by Caio Estevan View Post
    friend, can you copy the entire script from the button? please, i tried anyway, looked at all the comments from page 1 to page 19 and i can't solve this problem with the right button, please man, or try to send me by email: [Only registered and activated users can see links. ]
    Add me on discord friend, and I will fix for u sir.
    StanDev#0990
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #55  
    Registered Member
    Join Date
    Nov 2020
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Discord
    View profile
    Rep Power
    0
    Thanks so much! Right clicking is fixed :-D
    Reply With Quote  
     

  6. #56  
    Registered Member
    Join Date
    Jan 2021
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Thank you so much I got it finally fixed
    Reply With Quote  
     

  7. #57  
    Registered Member
    Join Date
    Nov 2019
    Posts
    21
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    Thanks!
    Reply With Quote  
     

  8. #58  
    Registered Member
    Join Date
    Feb 2021
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    could do this as well...

    if (type == 2) {
    mouseWheelDown = true;
    mouseWheelX = x;
    mouseWheelY = y;
    return;
    }
    if (type == 3) {
    clickType = RIGHT;
    clickMode1 = 2;
    clickMode2 = 2;
    } else if (type == 1) {
    clickType = LEFT;
    clickMode1 = 1;
    clickMode2 = 1;
    }
    }
    Reply With Quote  
     

  9. #59  
    Registered Member XI magicka IX's Avatar
    Join Date
    Aug 2013
    Posts
    52
    Thanks given
    17
    Thanks received
    2
    Rep Power
    11
    sorry for gravedigging but still having issues




    how my code looks


    if (type == 2) {
    mouseWheelDown = true;
    mouseWheelX = x;
    mouseWheelY = y;
    return;
    }
    if (type == 3) {
    clickType = RIGHT;
    clickMode1 = 2;
    clickMode2 = 2;
    } else if (type == 1) {
    clickType = LEFT;
    clickMode1 = 1;
    clickMode2 = 1;
    Reply With Quote  
     

Page 6 of 6 FirstFirst ... 456

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. [667/7**] How to fix right click bug in PvP
    By Zach in forum Tutorials
    Replies: 5
    Last Post: 06-30-2014, 05:06 PM
  2. Fix another bug in pickuping! + Video
    By Pkitten in forum Tutorials
    Replies: 59
    Last Post: 05-27-2008, 12:17 PM
  3. PKScapeX is recruiting a MySQL in Java developer
    By Stanyer in forum RS2 Server
    Replies: 7
    Last Post: 01-09-2008, 02:22 AM
  4. How to Make objects give you in item when you click in them!
    By black-pure-4-lyfe in forum Tutorials
    Replies: 3
    Last Post: 08-28-2007, 09:35 AM
  5. Fixing Logout Glitch in WhiteScape
    By Santa Noobie in forum Tutorials
    Replies: 2
    Last Post: 05-29-2007, 10:58 PM
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
  •