Package net.eternalclient.api.utilities
Class ReactionGenerator
- java.lang.Object
-
- net.eternalclient.api.utilities.ReactionGenerator
-
public class ReactionGenerator extends java.lang.ObjectThis class generates reaction times based on different distributions and provides static methods to retrieve reaction times for different scenarios.
-
-
Constructor Summary
Constructors Constructor Description ReactionGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetAFK()Returns the AFK (Away From Keyboard) time in milliseconds based on the next reaction time.static intgetLowPredictable()Returns a low predictable value for reaction time based on the given parameters.static intgetNormal()Returns a randomly generated reaction time within the normal distribution range.static intgetPredictable()Returns a predictable reaction time based on the given inputs.static intnextReactionTime(double mu, double sigma, double lambda, double p, double minimum, double maximum)Generates the next reaction time based on an exGaussian distribution with given parameters, or a uniform distribution if a random number is less than the given probability.
-
-
-
Method Detail
-
nextReactionTime
public static int nextReactionTime(double mu, double sigma, double lambda, double p, double minimum, double maximum)Generates the next reaction time based on an exGaussian distribution with given parameters, or a uniform distribution if a random number is less than the given probability.- Parameters:
mu- the mean of the exGaussian distributionsigma- the standard deviation of the exGaussian distributionlambda- the parameter controlling the exponential decay of the exGaussian distributionp- the probability of selecting from the uniform distributionminimum- the minimum value of the reaction timemaximum- the maximum value of the reaction time- Returns:
- the next generated reaction time
-
getLowPredictable
public static int getLowPredictable()
Returns a low predictable value for reaction time based on the given parameters.- Returns:
- the low predictable value for reaction time
-
getPredictable
public static int getPredictable()
Returns a predictable reaction time based on the given inputs.- Returns:
- the predictable reaction time
-
getNormal
public static int getNormal()
Returns a randomly generated reaction time within the normal distribution range.- Returns:
- a randomly generated reaction time within the normal distribution range
-
getAFK
public static int getAFK()
Returns the AFK (Away From Keyboard) time in milliseconds based on the next reaction time.- Returns:
- the AFK time in milliseconds
-
-