Created
September 29, 2012 12:00
-
-
Save phl0w/3803800 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private final int[] path = {0, 4, 8, 12, 16, 20, 24, 1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15, 19, 23, 27}; | |
| @Override | |
| public void execute() { | |
| for (int slot = 0; slot < path.length; slot++) { | |
| Item item = Inventory.getItemAt(path[slot]); | |
| if (item.getId() == Variables.primary) { | |
| if (Variables.quick) { | |
| int xPos = item.getWidgetChild().getAbsoluteX() + Random.nextInt(0, 10); | |
| int yPos = item.getWidgetChild().getAbsoluteY() + Random.nextInt(0, 10); | |
| if (path[slot] == 1 || path[slot] == 2 || path[slot] == 3) { | |
| Mouse.move(xPos, yPos); | |
| } else { | |
| Mouse.hop(xPos, yPos); | |
| } | |
| Mouse.click(true); | |
| } else { | |
| item.getWidgetChild().click(true); | |
| } | |
| } | |
| } | |
| Task.sleep(400); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment