Class Human
java.lang.Object
privbot.behavior.Human
Thread-safe pacing for player-visible automation (script thread /
execute() only).
Typical use: ctx.human.random(...), ctx.human.afterTicks(...), etc.
Randomness is ThreadLocalRandom; blocking calls delegate to Time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddTicks(int atTick, double chance, int minAdd, int maxAdd) With probabilitychance, adds a random tick offset in[minAdd, maxAdd]toatTick.intafterTicks(int minTicks, int maxTicks) Inclusive random tick count in[minTicks, maxTicks]— add togetTickCount()for a “ready after” gate.booleanmaybeTicks(double chance, int maxTicks) With probabilitychance, sleeps one or more whole game ticks (up tomaxTicks).longrandom(long minMs, long maxMs) Uniform milliseconds in[minMs, maxMs](inclusive).booleanroll(double probability)
-
Constructor Details
-
Human
public Human()
-
-
Method Details
-
random
public long random(long minMs, long maxMs) Uniform milliseconds in[minMs, maxMs](inclusive). -
roll
public boolean roll(double probability) -
maybeTicks
public boolean maybeTicks(double chance, int maxTicks) With probabilitychance, sleeps one or more whole game ticks (up tomaxTicks). -
afterTicks
public int afterTicks(int minTicks, int maxTicks) Inclusive random tick count in[minTicks, maxTicks]— add togetTickCount()for a “ready after” gate. -
addTicks
public int addTicks(int atTick, double chance, int minAdd, int maxAdd) With probabilitychance, adds a random tick offset in[minAdd, maxAdd]toatTick.
-