Package org.dreambot.api.methods.input
Class MouseKeys
- java.lang.Object
-
- org.dreambot.api.methods.input.MouseKeys
-
public class MouseKeys extends java.lang.Object
Created by Chris on 1/25/2015.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
clickAndSkipItem()
Clicks 5, sleeps, pushes 8 then 2 twicestatic boolean
dropAllItems()
static boolean
dropAllItemsExcept(int[] excludedItems)
static boolean
dropAllItemsExceptInSlots(int[] excludedItems, int[] slots)
static boolean
dropAllItemsInSlots(int[] slots)
static boolean
dropAllSpecificItems(int[] items)
static boolean
dropAllSpecificItemsInSlots(int[] items, int[] slots)
static boolean
dropColumn(int column, Filter<Item> dropFilter)
Drops all the items in a given column that match the given filterstatic boolean
dropItem(Item item, Filter<Item> dropFilter)
Checks the item against the given filter, if the item is null or dropFilter doesn't match, it skips it otherwise calls mouseKeyCombostatic boolean
dropItems(Filter<Item> dropFilter)
Drops all items in all rows that match the dropFilterstatic int
getJumpDistance()
Gets the mouse jump distance in pixelsstatic boolean
initialColumnMouseCheck(int column, Filter<Item> dropFilter)
Moves mouse to the top item in the column and right clicks, returns if menu is visiblestatic boolean
mouseKeyCombo()
Pushes 5, sleeps, pushes 2, sleepsstatic boolean
pushEight()
Jumps up by the jump distancestatic boolean
pushFive()
Left clicks and then right clicks with no delay betweenstatic boolean
pushFour()
Jumps left by the jump distancestatic boolean
pushNine()
Jumps up and right by the jump distancestatic boolean
pushOne()
Jumps down and to the left by the jump distancestatic boolean
pushSeven()
Jumps up and left by the jump distancestatic boolean
pushSix()
Jumps right by the jump distancestatic boolean
pushThree()
Jumps down and right by the jump distancestatic boolean
pushTwo()
Jumps down by the jump distancestatic boolean
setKeySleeps(int min, int max)
Sets the min and max values for the sleep between key presses Will throw exceptions if you give negative values or if min is greater than or equal to maxstatic void
setYJumpDistance(int jump)
Sets the jump distance in pixelsstatic boolean
skipItem()
if menu is visible, clicks and skips next item, otherwise pushes 2static boolean
tabCheck()
Checks if the inventory tab is open, if it isn't it opens it
-
-
-
Method Detail
-
setYJumpDistance
public static void setYJumpDistance(int jump)
Sets the jump distance in pixels- Parameters:
jump
- pixel distance to mouse jump
-
getJumpDistance
public static int getJumpDistance()
Gets the mouse jump distance in pixels- Returns:
-
setKeySleeps
public static boolean setKeySleeps(int min, int max)
Sets the min and max values for the sleep between key presses Will throw exceptions if you give negative values or if min is greater than or equal to max- Parameters:
min
- min time to sleep (in ms)max
- max time to sleep (in ms)- Returns:
- true if successfully sets sleep
-
dropAllItems
public static boolean dropAllItems()
-
dropAllItemsExcept
public static boolean dropAllItemsExcept(int[] excludedItems)
-
dropAllSpecificItems
public static boolean dropAllSpecificItems(int[] items)
-
dropAllItemsInSlots
public static boolean dropAllItemsInSlots(int[] slots)
-
dropAllItemsExceptInSlots
public static boolean dropAllItemsExceptInSlots(int[] excludedItems, int[] slots)
-
dropAllSpecificItemsInSlots
public static boolean dropAllSpecificItemsInSlots(int[] items, int[] slots)
-
dropItems
public static boolean dropItems(Filter<Item> dropFilter)
Drops all items in all rows that match the dropFilter- Parameters:
dropFilter
- dropFilter- Returns:
- true if there are no items that match the dropFilter after running this method
-
dropColumn
public static boolean dropColumn(int column, Filter<Item> dropFilter)
Drops all the items in a given column that match the given filter- Parameters:
column
- column 0-3 (inclusive)dropFilter
- dropFilter- Returns:
- True if there are no items that match dropFilter after running this method (note it does check items in other columns in this check)
-
initialColumnMouseCheck
public static boolean initialColumnMouseCheck(int column, Filter<Item> dropFilter)
Moves mouse to the top item in the column and right clicks, returns if menu is visible- Parameters:
column
- columns 0-3 (inclusive)dropFilter
- dropFilter- Returns:
- True if menu is visible, else False
-
dropItem
public static boolean dropItem(Item item, Filter<Item> dropFilter)
Checks the item against the given filter, if the item is null or dropFilter doesn't match, it skips it otherwise calls mouseKeyCombo- Parameters:
item
- Item to dropdropFilter
- dropFilter- Returns:
- True if successfully calls mouseKeyCombo or skips
-
tabCheck
public static boolean tabCheck()
Checks if the inventory tab is open, if it isn't it opens it- Returns:
- result of getTabs.isOpen(inventory)
-
skipItem
public static boolean skipItem()
if menu is visible, clicks and skips next item, otherwise pushes 2- Returns:
- result of clickAndSkipItem if menu is visible, else result of pushTwo
-
clickAndSkipItem
public static boolean clickAndSkipItem()
Clicks 5, sleeps, pushes 8 then 2 twice- Returns:
- true if all calls complete successfully, else false
-
mouseKeyCombo
public static boolean mouseKeyCombo()
Pushes 5, sleeps, pushes 2, sleeps- Returns:
- result of pushing 5 and pushing 2
-
pushOne
public static boolean pushOne()
Jumps down and to the left by the jump distance- Returns:
- result of mouse.hop
-
pushTwo
public static boolean pushTwo()
Jumps down by the jump distance- Returns:
- result of mouse.hop
-
pushThree
public static boolean pushThree()
Jumps down and right by the jump distance- Returns:
- result of mouse.hop
-
pushFour
public static boolean pushFour()
Jumps left by the jump distance- Returns:
- result of mouse.hop
-
pushFive
public static boolean pushFive()
Left clicks and then right clicks with no delay between- Returns:
- result of both clicks
-
pushSix
public static boolean pushSix()
Jumps right by the jump distance- Returns:
- result of mouse.hop
-
pushSeven
public static boolean pushSeven()
Jumps up and left by the jump distance- Returns:
- result of mouse.hop
-
pushEight
public static boolean pushEight()
Jumps up by the jump distance- Returns:
- result of mouse.hop
-
pushNine
public static boolean pushNine()
Jumps up and right by the jump distance- Returns:
- result of mouse.hop
-
-