Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package nz.totalnub.totalfletcher.strategies;
- import com.rsbuddy.script.methods.Players;
- import nz.totalnub.totalfletcher.totalFletcher;
- import nz.totalnub.totalfletcher.abstracts.Strategy;
- import com.rsbuddy.script.methods.Game;
- import com.rsbuddy.script.methods.Mouse;
- import com.rsbuddy.script.methods.Camera;
- public class Antiban extends Strategy {
- public Antiban(totalFletcher parent) {
- super(parent);
- }
- private int anti;
- private boolean ms = false;
- @Override
- public boolean isValid() {
- if (!totalFletcher.override){
- return true;
- }
- return false;
- }
- @Override
- public void execute() {
- if(Players.getLocal().getAnimation() != -1) {
- anti = random(1, 20);
- switch(anti) {
- case 1: //check fletching
- if (random(0, 100) <= totalFletcher.antiBanPercent) {
- Game.openTab(Game.TAB_STATS);
- Mouse.move(642 + random(-30, 29), 363 + random(-13, 13));
- sleep(random(1000, 1500));
- }
- break;
- case 2: //check woodcutting
- if (random(0, 100) <= totalFletcher.antiBanPercent) {
- Game.openTab(Game.TAB_STATS);
- Mouse.move(704 + random(-30, 29), 363 + random(-13, 13));
- sleep(random(1000, 1500));
- }
- break;
- case 3: //check magic
- if (random(0, 100) <= totalFletcher.antiBanPercent && totalFletcher.alch) {
- Game.openTab(Game.TAB_STATS);
- Mouse.move(580 + random(-30, 29), 363 + random(-13, 13));
- sleep(random(1000, 1500));
- }
- break;
- case 4: //move mouse
- ms = false;
- if (random(0, 100) <= totalFletcher.antiBanPercent){
- Mouse.moveRandomly(100);
- sleep(100,200);
- if (random(1,20) < 5) {
- ms = true;
- Mouse.moveSlightly();
- }
- }
- break;
- case 5: //tilt camera
- if (random(0, 100) <= totalFletcher.antiBanPercent){
- Camera.setPitch(random(0,180));
- }
- break;
- case 6: //rotate camera
- if (random(0, 100) <= totalFletcher.antiBanPercent){
- Camera.setCompassAngle(random(0,360));
- }
- break;
- case 7: //tilt + rotate
- if (random(0, 100) <= totalFletcher.antiBanPercent){
- Camera.moveRandomly(random(5,15));
- }
- break;
- case 8: //click compass
- if (random(0, 100) <= totalFletcher.antiBanPercent){
- Camera.clickCompass();
- }
- break;
- case 9: //move mouse off screen
- if (random(0, 100) <= totalFletcher.antiBanPercent){
- Mouse.moveOffScreen();
- }
- break;
- }
- }
- }
- @Override
- public String getStatus() {
- if (anti == 1) { //fletching
- return "[Antiban] Checking Fletching XP";
- }
- if (anti == 2) { //woodcutting
- return "[Antiban] Checking Woodcutting XP";
- }
- if (anti == 3) { //magic
- return "[Antiban] Checking Magic XP";
- }
- if (anti == 4) { //move mouse
- if (ms) {
- return "[Antiban] Moving Mouse And Then Again Just Slightly";
- } else {
- return "[Antiban] Moving Mouse";
- }
- }
- if (anti == 5) { //tilt camera
- return "[Antiban] Tilting Camera";
- }
- if (anti == 6) { //rotate camera
- return "[Antiban] Rotating Camera";
- }
- if (anti == 7) { //tilt + rotate
- return "[Antiban] Tilting + Rotating Camera";
- }
- if (anti == 8) { //click compass
- return "[Antiban] Clicking Compass";
- }
- if (anti == 9) { //move mouse off screen
- return "[Antiban] Moving the Mouse off Screen";
- }
- return "[Antiban] No Antiban";
- }
- }
Add Comment
Please, Sign In to add comment