Just joined this community so i decided to release my middle mouse movement
files used : Client.java, RSApplet.java
step 1 :
open up Client.java and add this method
Code:
void mouseWheelDragged(int i, int j) {
if (!mouseWheelDown)
return;
this.anInt1186 += i * 3;
this.anInt1187 += (j << 1);
}
you are done with client.java so you can close it
step 2 : open up RSApplet.java
search for
Code:
public final void mousePressed(MouseEvent e) {
above that add :
Code:
public boolean mouseWheelDown;
in the method mousePressed after :
Code:
clickTime = System.currentTimeMillis();
add this
Code:
if (type == 2) {
mouseWheelDown = true;
mouseWheelX = x;
mouseWheelY = y;
return;
}
for people who doenst have 'type'
Code:
int type = e.getButton();
step 3 : still in RSApplet.java replace mousedragged method with this one:
Code:
public int mouseWheelX;
public int mouseWheelY;
public final void mouseDragged(MouseEvent e) {
int x = e.getX();
int y = e.getY();
if(gameFrame != null) {
Insets insets = gameFrame.getInsets();
x -= insets.left;//4
y -= insets.top;//22
}
if (mouseWheelDown) {
y = mouseWheelX - e.getX();
int k = mouseWheelY - e.getY();
mouseWheelDragged(y, -k);
mouseWheelX = e.getX();
mouseWheelY = e.getY();
return;
}
idleTime = 0;
mouseX = x;
mouseY = y;
clickType = DRAG;
}
underneath that add
Code:
void mouseWheelDragged(int param1, int param2) {
}
step 4 : the final step in the method :
Code:
public final void mouseReleased(MouseEvent e) {
under
Code:
clickType = RELEASED;
add
Code:
mouseWheelDown = false;
hope this worked out.
any questions? leave a comment bellow