Guest User

Untitled

a guest
Jan 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.61 KB | None | 0 0
  1. package nz.totalnub.totalfletcher.strategies;
  2.  
  3. import com.rsbuddy.script.methods.Players;
  4. import nz.totalnub.totalfletcher.totalFletcher;
  5. import nz.totalnub.totalfletcher.abstracts.Strategy;
  6.  
  7. import com.rsbuddy.script.methods.Game;
  8. import com.rsbuddy.script.methods.Mouse;
  9. import com.rsbuddy.script.methods.Camera;
  10.  
  11. public class Antiban extends Strategy {
  12.  
  13. public Antiban(totalFletcher parent) {
  14. super(parent);
  15. }
  16.  
  17. private int anti;
  18. private boolean ms = false;
  19.  
  20. @Override
  21. public boolean isValid() {
  22. if (!totalFletcher.override){
  23. return true;
  24. }
  25. return false;
  26. }
  27.  
  28. @Override
  29. public void execute() {
  30. if(Players.getLocal().getAnimation() != -1) {
  31. anti = random(1, 20);
  32. switch(anti) {
  33. case 1: //check fletching
  34. if (random(0, 100) <= totalFletcher.antiBanPercent) {
  35. Game.openTab(Game.TAB_STATS);
  36. Mouse.move(642 + random(-30, 29), 363 + random(-13, 13));
  37. sleep(random(1000, 1500));
  38. }
  39. break;
  40. case 2: //check woodcutting
  41. if (random(0, 100) <= totalFletcher.antiBanPercent) {
  42. Game.openTab(Game.TAB_STATS);
  43. Mouse.move(704 + random(-30, 29), 363 + random(-13, 13));
  44. sleep(random(1000, 1500));
  45. }
  46. break;
  47. case 3: //check magic
  48. if (random(0, 100) <= totalFletcher.antiBanPercent && totalFletcher.alch) {
  49. Game.openTab(Game.TAB_STATS);
  50. Mouse.move(580 + random(-30, 29), 363 + random(-13, 13));
  51. sleep(random(1000, 1500));
  52. }
  53. break;
  54. case 4: //move mouse
  55. ms = false;
  56. if (random(0, 100) <= totalFletcher.antiBanPercent){
  57. Mouse.moveRandomly(100);
  58. sleep(100,200);
  59. if (random(1,20) < 5) {
  60. ms = true;
  61. Mouse.moveSlightly();
  62. }
  63. }
  64. break;
  65. case 5: //tilt camera
  66. if (random(0, 100) <= totalFletcher.antiBanPercent){
  67. Camera.setPitch(random(0,180));
  68. }
  69. break;
  70. case 6: //rotate camera
  71. if (random(0, 100) <= totalFletcher.antiBanPercent){
  72. Camera.setCompassAngle(random(0,360));
  73. }
  74. break;
  75. case 7: //tilt + rotate
  76. if (random(0, 100) <= totalFletcher.antiBanPercent){
  77. Camera.moveRandomly(random(5,15));
  78. }
  79. break;
  80. case 8: //click compass
  81. if (random(0, 100) <= totalFletcher.antiBanPercent){
  82. Camera.clickCompass();
  83. }
  84. break;
  85. case 9: //move mouse off screen
  86. if (random(0, 100) <= totalFletcher.antiBanPercent){
  87. Mouse.moveOffScreen();
  88. }
  89. break;
  90. }
  91. }
  92. }
  93.  
  94. @Override
  95. public String getStatus() {
  96. if (anti == 1) { //fletching
  97. return "[Antiban] Checking Fletching XP";
  98. }
  99. if (anti == 2) { //woodcutting
  100. return "[Antiban] Checking Woodcutting XP";
  101. }
  102. if (anti == 3) { //magic
  103. return "[Antiban] Checking Magic XP";
  104. }
  105. if (anti == 4) { //move mouse
  106. if (ms) {
  107. return "[Antiban] Moving Mouse And Then Again Just Slightly";
  108. } else {
  109. return "[Antiban] Moving Mouse";
  110. }
  111. }
  112. if (anti == 5) { //tilt camera
  113. return "[Antiban] Tilting Camera";
  114. }
  115. if (anti == 6) { //rotate camera
  116. return "[Antiban] Rotating Camera";
  117. }
  118. if (anti == 7) { //tilt + rotate
  119. return "[Antiban] Tilting + Rotating Camera";
  120. }
  121. if (anti == 8) { //click compass
  122. return "[Antiban] Clicking Compass";
  123. }
  124. if (anti == 9) { //move mouse off screen
  125. return "[Antiban] Moving the Mouse off Screen";
  126. }
  127. return "[Antiban] No Antiban";
  128. }
  129.  
  130. }
Add Comment
Please, Sign In to add comment