- Joined
- Jan 8, 2015
- Messages
- 1,427
- Thread Author
- #1
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);
}
}
}
}
}