Skip to content

Instantly share code, notes, and snippets.

@phl0w
Created July 11, 2012 16:40
Show Gist options
  • Select an option

  • Save phl0w/3091613 to your computer and use it in GitHub Desktop.

Select an option

Save phl0w/3091613 to your computer and use it in GitHub Desktop.
int[] path = { 0, 4, 8, 12, 16, 20, 24, 25, 21, 17, 13, 9, 5, 1, 2, 6, 10, 14, 18, 22, 26, 27, 23, 19, 15, 11, 7, 3 };
for (int slot = 0; slot < path.length; slot++) {
Item x = Inventory.getItemAt(path[slot]);
if (Data.junk.contains(x.getId())) {
int xPos = x.getWidgetChild().getAbsoluteX() + Random.nextInt(0, 5);
int yPos = x.getWidgetChild().getAbsoluteY() + Random.nextInt(0, 5);
Mouse.hop(xPos, yPos);
Mouse.click(false);
Time.sleep(10, 25);
Mouse.hop(xPos, yPos + (path[slot] >= 24 ? 28 : 45));
Mouse.click(true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment