mirror of
https://github.com/2006-Scape/Parabot-Randoms.git
synced 2026-07-08 00:38:51 +00:00
[TASK] Renamed KEYS to keys
This commit is contained in:
@@ -13,7 +13,7 @@ import java.util.Random;
|
|||||||
*/
|
*/
|
||||||
public class LogoutDisabler implements org.parabot.environment.randoms.Random {
|
public class LogoutDisabler implements org.parabot.environment.randoms.Random {
|
||||||
|
|
||||||
private final int[] KEYS = { KeyEvent.VK_UP, KeyEvent.VK_DOWN, KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
|
private final int[] keys = { KeyEvent.VK_UP, KeyEvent.VK_DOWN, KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
|
||||||
private final Random random = new Random();
|
private final Random random = new Random();
|
||||||
private long ms = System.currentTimeMillis();
|
private long ms = System.currentTimeMillis();
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ public class LogoutDisabler implements org.parabot.environment.randoms.Random {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
int keyCode = KEYS[random.nextInt(KEYS.length)];
|
int keyCode = keys[random.nextInt(keys.length)];
|
||||||
Keyboard.getInstance().pressKey(keyCode);
|
Keyboard.getInstance().pressKey(keyCode);
|
||||||
Time.sleep(random.nextInt((20 - 5) + 1) + 5);
|
Time.sleep(random.nextInt((20 - 5) + 1) + 5);
|
||||||
Keyboard.getInstance().releaseKey(keyCode);
|
Keyboard.getInstance().releaseKey(keyCode);
|
||||||
|
|||||||
Reference in New Issue
Block a user