Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Point;
- import java.util.Random;
- import org.osbot.rs07.api.ui.Skill;
- import org.osbot.rs07.api.ui.Tab;
- import org.osbot.rs07.script.MethodProvider;
- public class Antiban extends MethodProvider {
- private MethodProvider mp;
- private Random random;
- public void randomInputEvent()
- {
- try
- {
- int rN = this.random.nextInt(3);
- switch (rN)
- {
- case 0:
- this.mp.getCamera().movePitch(this.random.nextInt(360));
- this.mp.getCamera().moveYaw(
- 22 + this.random.nextInt(22 + this.random.nextInt(45)));
- break;
- case 1:
- this.mp.getCamera().movePitch(this.random.nextInt(360));
- break;
- case 2:
- this.mp.getMouse().move(this.random.nextInt(760), this.random.nextInt(500));
- break;
- case 3:
- moveMouseRandomly(1 + this.random.nextInt(6));
- }
- }
- catch (Exception localException) {}
- }
- public void randomInterfaceEvent(Skill currentSkill)
- {
- try
- {
- int rN = this.random.nextInt(3);
- switch (rN)
- {
- case 0:
- this.mp.getSkills().hoverSkill(currentSkill);
- break;
- case 1:
- this.mp.getTabs().open(Tab.ATTACK);
- break;
- case 2:
- this.mp.getTabs().open(Tab.FRIENDS);
- break;
- case 3:
- this.mp.getTabs().open(Tab.SKILLS);
- }
- }
- catch (Exception localException) {}
- }
- public void moveMouseRandomly(int numberOfPositions) throws InterruptedException
- {
- Point[] pointArray = new Point[numberOfPositions];
- for (int i = 0; i < pointArray.length; i++) {
- pointArray[i] = new Point(-10 + this.random.nextInt(850), -10 +
- this.random.nextInt(550));
- }
- for (int i = 0; i < pointArray.length; i++)
- {
- this.mp.getMouse().move(pointArray[i].x, pointArray[i].y);
- sleep(random(200,500));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement