Class MouseSettings
- java.lang.Object
-
- org.dreambot.api.methods.input.mouse.MouseSettings
-
public class MouseSettings extends java.lang.Object
Do not worry about this class too much. This class specifies the settings for the mouse controller.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MouseSettings.Hand
-
Constructor Summary
Constructors Constructor Description MouseSettings(Instance instance)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAccelerationDeviation()
int
getAccelerationRate()
java.lang.String
getAction()
Gets the action of the targetint
getAngleDeviationRate()
java.awt.Rectangle
getBounds()
Gets the Rectangle of the boundsint
getCalcsPerSecond()
double
getDecayDistanceExponent()
double
getDecelDecayRate()
int
getDecelRadiusDeviation()
int
getMaxDecelDistance()
int
getMaxdTheta()
int
getMaxMagnitude()
int
getMeanDecelRadius()
int
getMinDecelMagnitude()
int
getMinMagnitude()
static MouseTiming
getMouseTiming()
Returns the client's mouse timing generator, used to determine the time in milliseconds between pressing down and releasing the mouse buttonsjava.lang.String
getObject()
Gets the object of the targetMouseSettings.Hand
getPreferredHand()
Gets preferred handjava.awt.Rectangle
getRectDest()
static int
getSpeed()
Returns the client's current speed, between 1 and 100.boolean
isClick()
Gets whether should clickboolean
isDrag()
Gets whether it should dragboolean
isLeftClick()
Returns whether it's left clickboolean
isMultiThread()
Whether or not it is multithreadedboolean
isOvershoot()
Gets whether it should overshootboolean
isRightClick()
Gets whether it's right clickboolean
isUseMiddleMouseInInteracts()
boolean
isWalking()
double
r()
void
reset()
Resets mouse settingsstatic void
resetMouseTimings()
Resets mouse timings to their client defaultMouseSettings
resetSpeed()
MouseSettings
setAction(java.lang.String action)
Sets the actionMouseSettings
setBounds(java.awt.Rectangle bounds)
Sets bounds the mouse cannot leave during eventsMouseSettings
setClick(boolean click)
Sets clickMouseSettings
setDrag(boolean drag)
Sets dragMouseSettings
setLeftClick(boolean leftClick)
Sets whether it's left clickstatic void
setMouseTiming(MouseTiming mouseTiming)
void
setMultiThread(boolean multiThread)
Sets multithreaded true or falseMouseSettings
setObject(java.lang.String object)
Sets the objectMouseSettings
setOvershoot(boolean overshoot)
Sets overshootvoid
setPreferredHand(MouseSettings.Hand preferredHand)
Sets preferred hand (Left/Right)MouseSettings
setRectDest(java.awt.Rectangle rectDest)
MouseSettings
setRightClick(boolean rightClick)
Sets right clickstatic void
setSpeed(int accel)
MouseSettings
setTarget(java.lang.String action, java.lang.String object)
Sets the targetvoid
setUseMiddleMouseInInteracts(boolean useMiddleMouseInInteracts)
MouseSettings
setWalking(boolean walk)
-
-
-
Constructor Detail
-
MouseSettings
public MouseSettings(Instance instance)
-
-
Method Detail
-
resetMouseTimings
public static void resetMouseTimings()
Resets mouse timings to their client default
-
getMouseTiming
public static MouseTiming getMouseTiming()
Returns the client's mouse timing generator, used to determine the time in milliseconds between pressing down and releasing the mouse buttons- Returns:
- The current mouse timing generator
-
setMouseTiming
public static void setMouseTiming(MouseTiming mouseTiming)
- Parameters:
mouseTiming
- Sets the client's mouse timing generator
-
getSpeed
public static int getSpeed()
Returns the client's current speed, between 1 and 100.- Returns:
- Mouse speed, 1 (slowest) to 100 (hopping)
-
setSpeed
public static void setSpeed(int accel)
-
resetSpeed
public MouseSettings resetSpeed()
-
getRectDest
public java.awt.Rectangle getRectDest()
-
setRectDest
public MouseSettings setRectDest(java.awt.Rectangle rectDest)
-
r
public double r()
-
getMaxdTheta
public int getMaxdTheta()
-
getDecelRadiusDeviation
public int getDecelRadiusDeviation()
-
getDecayDistanceExponent
public double getDecayDistanceExponent()
-
getMinMagnitude
public int getMinMagnitude()
-
getAccelerationDeviation
public int getAccelerationDeviation()
-
getMinDecelMagnitude
public int getMinDecelMagnitude()
-
getMaxDecelDistance
public int getMaxDecelDistance()
-
getAccelerationRate
public int getAccelerationRate()
-
getMaxMagnitude
public int getMaxMagnitude()
-
getDecelDecayRate
public double getDecelDecayRate()
-
getAngleDeviationRate
public int getAngleDeviationRate()
-
getMeanDecelRadius
public int getMeanDecelRadius()
-
getCalcsPerSecond
public int getCalcsPerSecond()
-
isWalking
public boolean isWalking()
-
setWalking
public MouseSettings setWalking(boolean walk)
-
setTarget
public MouseSettings setTarget(java.lang.String action, java.lang.String object)
Sets the target- Parameters:
action
- Action to set as targetobject
- Object to set as target
-
getAction
public java.lang.String getAction()
Gets the action of the target- Returns:
- Action
-
setAction
public MouseSettings setAction(java.lang.String action)
Sets the action- Parameters:
action
- Action to set as target
-
getObject
public java.lang.String getObject()
Gets the object of the target- Returns:
- object name
-
setObject
public MouseSettings setObject(java.lang.String object)
Sets the object- Parameters:
object
- Object to set
-
isMultiThread
public boolean isMultiThread()
Whether or not it is multithreaded- Returns:
- True or false
-
setMultiThread
public void setMultiThread(boolean multiThread)
Sets multithreaded true or false- Parameters:
multiThread
- True or False
-
isLeftClick
public boolean isLeftClick()
Returns whether it's left click- Returns:
- True or False
-
setLeftClick
public MouseSettings setLeftClick(boolean leftClick)
Sets whether it's left click- Parameters:
leftClick
- True or False
-
isRightClick
public boolean isRightClick()
Gets whether it's right click- Returns:
- True or False
-
setRightClick
public MouseSettings setRightClick(boolean rightClick)
Sets right click- Parameters:
rightClick
- True or False
-
isClick
public boolean isClick()
Gets whether should click- Returns:
- True or False
-
setClick
public MouseSettings setClick(boolean click)
Sets click- Parameters:
click
- True or False
-
isOvershoot
public boolean isOvershoot()
Gets whether it should overshoot- Returns:
- True or False
-
setOvershoot
public MouseSettings setOvershoot(boolean overshoot)
Sets overshoot- Parameters:
overshoot
- True or False
-
isDrag
public boolean isDrag()
Gets whether it should drag- Returns:
- True or False
-
setDrag
public MouseSettings setDrag(boolean drag)
Sets drag- Parameters:
drag
- True or False
-
getBounds
public java.awt.Rectangle getBounds()
Gets the Rectangle of the bounds- Returns:
- Rectangle of bounds
-
setBounds
public MouseSettings setBounds(java.awt.Rectangle bounds)
Sets bounds the mouse cannot leave during events- Parameters:
bounds
-
-
reset
public void reset()
Resets mouse settings
-
getPreferredHand
public MouseSettings.Hand getPreferredHand()
Gets preferred hand- Returns:
- Hand (Left/Right)
-
setPreferredHand
public void setPreferredHand(MouseSettings.Hand preferredHand)
Sets preferred hand (Left/Right)- Parameters:
preferredHand
- (Hand.LEFT, Hand.RIGHT)
-
isUseMiddleMouseInInteracts
public boolean isUseMiddleMouseInInteracts()
-
setUseMiddleMouseInInteracts
public void setUseMiddleMouseInInteracts(boolean useMiddleMouseInInteracts)
-
-