Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.tnt_block_unkown.tntmod.modules.list;
- import java.awt.Robot;
- import java.awt.event.InputEvent;
- import org.lwjgl.input.Keyboard;
- import de.tnt_block_unkown.tntmod.modules.Module;
- import de.tnt_block_unkown.tntmod.modules.ModuleType;
- public class AutoClicker extends Module {
- private Robot r;
- // Der delay zwischen den Clicks in Milisenkunden :D
- public static int delay;
- public static int button = InputEvent.BUTTON1_MASK;
- public AutoClicker() {
- super("autoclicker", "AutoClicker", Keyboard.CHAR_NONE, ModuleType.AUTO);
- setup();
- }
- @Override
- public void onUpdate() {
- clickMouse(button);
- }
- public void setup() {
- try {
- r = new Robot();
- } catch (Exception e) {
- }
- delay = 300;
- }
- public void clickMouse(int button) {
- try {
- r.mousePress(button);
- r.delay(250);
- r.mouseRelease(button);
- r.delay(delay);
- } catch (Exception e) {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement