Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

[OSRS] Mousekey dropping

Joined
Jan 8, 2015
Messages
1,427
Would anyone be willing to help me out by spoonfeeding code? I did find this (credits to Github);

Java:
public void useMouseKeys() {
	for (int col = 0; col < 4; col++) {
		int mouseX = (ctx.backpack.getItemAt(col).getComponent().getCenterPoint().x + Random.nextInt(-10, 10));
		int rowOffset = Random.nextInt(-10, 10);
		int mouseY = (ctx.backpack.getItemAt(col).getComponent().getCenterPoint().y + rowOffset);
		ctx.mouse.move(mouseX, mouseY);
		for (int row = 0; row < 7; row++) {
			ctx.mouse.hop(mouseX, ctx.backpack.getItemAt(row * 4 + col).getComponent().getCenterPoint().y + rowOffset);
			this.sleep(85, 100);
			ctx.mouse.click(false);
			while (!ctx.menu.isOpen()) {
				this.sleep(85, 100);
			}
			String[] acts = ctx.menu.getItems();
			for (int a = 0; a < acts.length; a++) {
				if (acts[a].contains("Drop")) {
					this.sleep(80, 100);
					ctx.mouse.click(true);
				}
			}
		}
	}
}
 
Joined
Dec 10, 2014
Messages
3,255
Would anyone be willing to help me out by spoonfeeding code? I did find this (credits to Github);

Java:
public void useMouseKeys() {
    for (int col = 0; col < 4; col++) {
        int mouseX = (ctx.backpack.getItemAt(col).getComponent().getCenterPoint().x + Random.nextInt(-10, 10));
        int rowOffset = Random.nextInt(-10, 10);
        int mouseY = (ctx.backpack.getItemAt(col).getComponent().getCenterPoint().y + rowOffset);
        ctx.mouse.move(mouseX, mouseY);
        for (int row = 0; row < 7; row++) {
            ctx.mouse.hop(mouseX, ctx.backpack.getItemAt(row * 4 + col).getComponent().getCenterPoint().y + rowOffset);
            this.sleep(85, 100);
            ctx.mouse.click(false);
            while (!ctx.menu.isOpen()) {
                this.sleep(85, 100);
            }
            String[] acts = ctx.menu.getItems();
            for (int a = 0; a < acts.length; a++) {
                if (acts[a].contains("Drop")) {
                    this.sleep(80, 100);
                    ctx.mouse.click(true);
                }
            }
        }
    }
}
If you explain to me how mousekeys work and how to use them legit I can write the code whenever I find a spare moment.
 
Joined
Jan 8, 2015
Messages
1,427
@SlashnHax Mousekey dropping means it clicks on the first item on the top left (the actual first item) and goes down. Then to the second column and down again, etc.

Any ideas?
 
Joined
Jan 1, 2015
Messages
272
Well mousekeys like hop the mouse, this api doesn't support Mouse#hop the best i came up with was droping from different colloms, like

from 4 to 0
5 to 8
12 to 16

etc etc

and from 28 to 4
3 to 27 etc

or 4 to 28
27 to 3
 
Joined
Dec 10, 2014
Messages
3,255
Well mousekeys like hop the mouse, this api doesn't support Mouse#hop the best i came up with was droping from different colloms, like

from 4 to 0
5 to 8
12 to 16

etc etc

and from 28 to 4
3 to 27 etc
Just loop through the items and skip 4 each time?
 
Joined
Dec 10, 2014
Messages
3,255
with mousekeys you never drop the last row tho
not it doesnt work like that it hops to "Drop"
Are mousekeys something that's able to be done legit?
 
Well mousekeys like hop the mouse, this api doesn't support Mouse#hop the best i came up with was droping from different colloms, like

from 4 to 0
5 to 8
12 to 16

etc etc

and from 28 to 4
3 to 27 etc

or 4 to 28
27 to 3

Hopping can be done, but it's really not recommended at all.
 
Joined
Dec 10, 2014
Messages
3,255
@PhaseCoder I'll probably post a video this evening
 
@PhaseCoder
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

Hmmm, if I were to do it I'd feel like I'd have to send the keypresses as well just to be safe haha, mouse hopping is one thing, and that can be explained by mousekeys, but without the keypresses it could be a bit dangerous.
 
Top