import com.speljohan.rsbot.script.Random;
import com.speljohan.rsbot.script.Skills;
import com.speljohan.rsbot.script.wrappers.RSPlayer;
import com.speljohan.rsbot.bot.Bot;
import com.speljohan.rsbot.logging.Log;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class AllAntiBan extends Random {
int currenttab;
Point mousePos;
int randomInt;
int GambleInt,rambleInt;
long lastCheck = -1, lastcheck1 = -1,lastCheck2,lastCheck3 = System.currentTimeMillis();
long timer = System.currentTimeMillis();
int checkTime,checkTime1 = random(240000,480000);
public String[] thingsToSayIdle = new String[] {
""};
int attack,defence,strength,range,prayer,magic,cooking,woodcutting,fletching,fishing,firemaking,crafting,
smithing,mining,herblore,agility,thieving,slayer,farming,runecraft,hunter,construction,summoning;
int new1,new2,new3,new4,new5,new6,new7,new8,new9,new10,new11,new12,new13,new14,new15,new16,new17,new18,new19,new20,
new21,new22,new23;
int index1 = Skills.getStatIndex("attack");
int index2 = Skills.getStatIndex("defence");
int index3 = Skills.getStatIndex("strength");
int index4 = Skills.getStatIndex("range");
int index5 = Skills.getStatIndex("prayer");
int index6 = Skills.getStatIndex("magic");
int index7 = Skills.getStatIndex("cooking");
int index8 = Skills.getStatIndex("woodcutting");
int index9 = Skills.getStatIndex("fletching");
int index10 = Skills.getStatIndex("fishing");
int index11 = Skills.getStatIndex("firemaking");
int index12 = Skills.getStatIndex("crafting");
int index13 = Skills.getStatIndex("smithing");
int index14 = Skills.getStatIndex("mining");
int index15 = Skills.getStatIndex("herblore");
int index16 = Skills.getStatIndex("agility");
int index17 = Skills.getStatIndex("thieving");
int index18 = Skills.getStatIndex("slayer");
int index19 = Skills.getStatIndex("farming");
int index20 = Skills.getStatIndex("runecraft");
int index21 = Skills.getStatIndex("hunter");
int index22 = Skills.getStatIndex("construction");
int index23 = Skills.getStatIndex("summoning");
public String getName() {
return "AllAntiBan";
}
public double getVersion() {
return 2.0;
}
public String getAuthor() {
return "WarXperiment";
}
public boolean onStart(String[] args) { //First thing run, when a Script is started (holds an array called "args" which contain the arguments put in by user in Script Selector
return true; //return true = Start Script; return false = Don't Start Script
}
private boolean timer(int seconds) {
return System.currentTimeMillis() * 1000 < seconds;
}
public Log getLog() {
if(LOG != null)
LOG = null;
return super.getLog();
}
public boolean activateCondition() {
antiban();
check();
return false;
}
public void turnCamera() {
char[] LR = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
char[] UD = new char[] { KeyEvent.VK_DOWN, KeyEvent.VK_UP };
char[] LRUD = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT,
KeyEvent.VK_UP, KeyEvent.VK_UP };
int random2 = random(0,2);
int random1 = random(0,2);
int random4 = random(0,4);
if(random(0,3) == 0) {
Bot.getInputManager().pressKey(LR[random1]);
try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
Bot.getInputManager().pressKey(UD[random2]);
try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
Bot.getInputManager().releaseKey(UD[random2]);
try { Thread.sleep(random(100, 400)); } catch (Exception e) {}
Bot.getInputManager().releaseKey(LR[random1]);
} else {
Bot.getInputManager().pressKey(LRUD[random4]);
if(random4>1) {
try { Thread.sleep(random(300, 600)); } catch (Exception e) {}
} else {
try { Thread.sleep(random(500, 900)); } catch (Exception e) {}
}
Bot.getInputManager().releaseKey(LRUD[random4]);
}
}
public int loop() {
return -1;
}
public void check() {
long currentTime = System.currentTimeMillis();
long minutes = (currentTime-lastcheck1)/(60000);
if(lastCheck == -1) {
attack = skills.getCurrentSkillExp(index1);
defence = skills.getCurrentSkillExp(index2);
strength = skills.getCurrentSkillExp(index3);
range = skills.getCurrentSkillExp(index4);
prayer = skills.getCurrentSkillExp(index5);
magic = skills.getCurrentSkillExp(index6);
cooking = skills.getCurrentSkillExp(index7);
woodcutting = skills.getCurrentSkillExp(index8);
fletching = skills.getCurrentSkillExp(index9);
fishing = skills.getCurrentSkillExp(index10);
firemaking = skills.getCurrentSkillExp(index11);
crafting = skills.getCurrentSkillExp(index12);
smithing = skills.getCurrentSkillExp(index13);
mining = skills.getCurrentSkillExp(index14);
herblore = skills.getCurrentSkillExp(index15);
agility = skills.getCurrentSkillExp(index16);
thieving = skills.getCurrentSkillExp(index17);
slayer = skills.getCurrentSkillExp(index18);
farming = skills.getCurrentSkillExp(index19);
runecraft = skills.getCurrentSkillExp(index20);
hunter = skills.getCurrentSkillExp(index21);
construction = skills.getCurrentSkillExp(index22);
summoning = skills.getCurrentSkillExp(index23);
lastCheck = 1;
}
if((currentTime-lastcheck1)/(60000) >=1) {
lastcheck1 = System.currentTimeMillis();
lastCheck = -1;
}
}
void antiban() {
GambleInt = random(1, 25);
if(!bank.getInterface().isValid()) {
if (GambleInt == 1) {
turnCamera();
wait(random(300,500));
}
if (GambleInt == 2) {
int xA = random(0, 750);
int yA = random(0, 500);
mousePos = getMouseLocation();
moveMouse(xA, yA);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(100,200));
turnCamera();
wait(random(300,500));
}
if (GambleInt == 3) {
if (getCurrentTab() != TAB_INVENTORY) {
currenttab = getCurrentTab();
openTab(TAB_INVENTORY);
wait(random(300,500));
turnCamera();
wait(random(300,500));
}
}
if (GambleInt == 4) {
mousePos = getMouseLocation();
RSPlayer p = getNearestPlayerByLevel(1,130);
if (p != null) {
moveMouse(p.getScreenLocation(),5,5);
wait(random(300,500));
clickMouse(false);
wait(random(1000,1500));
moveMouse(mousePos,7,7);
wait(random(100,200));
}
}
if (GambleInt == 5) {
turnCamera();
wait(random(300,500));
int xA = random(0, 750);
int yA = random(0, 500);
mousePos = getMouseLocation();
moveMouse(xA, yA);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(100,200));
}
if (GambleInt == 6){
turnCamera();
wait(random(300,500));
}
if (GambleInt == 7) {
mousePos = getMouseLocation();
currenttab = getCurrentTab();
openTab(random(0, 13));
wait(random(300,500));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(100,200));
}
if (GambleInt == 8) {
mousePos = getMouseLocation();
moveMouse(random(0,450), random(0,450));
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(100,200));
}
if ((System.currentTimeMillis() - lastCheck2) >= checkTime) {
lastCheck2 = System.currentTimeMillis();
checkTime = random(300000, 600000);
turnCamera();
wait(random(300,500));
mousePos = getMouseLocation();
currenttab = getCurrentTab();
openTab(random(0, 13));
wait(random(300,500));
turnCamera();
wait(random(300,500));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(100,200));
}
}
}
void antiban1() {
if ((System.currentTimeMillis() - lastCheck3) >= checkTime1) {
lastCheck3 = System.currentTimeMillis();
checkTime1 = random(240000, 480000);
mousePos = getMouseLocation();
currenttab = getCurrentTab();
new1 = skills.getCurrentSkillExp(index1);
new2 = skills.getCurrentSkillExp(index2);
new3 = skills.getCurrentSkillExp(index3);
new4 = skills.getCurrentSkillExp(index4);
new5 = skills.getCurrentSkillExp(index5);
new6 = skills.getCurrentSkillExp(index6);
new7 = skills.getCurrentSkillExp(index7);
new8 = skills.getCurrentSkillExp(index8);
new9 = skills.getCurrentSkillExp(index9);
new10 = skills.getCurrentSkillExp(index10);
new11 = skills.getCurrentSkillExp(index11);
new12 = skills.getCurrentSkillExp(index12);
new13 = skills.getCurrentSkillExp(index13);
new14 = skills.getCurrentSkillExp(index14);
new15 = skills.getCurrentSkillExp(index15);
new16 = skills.getCurrentSkillExp(index16);
new17 = skills.getCurrentSkillExp(index17);
new18 = skills.getCurrentSkillExp(index18);
new19 = skills.getCurrentSkillExp(index19);
new20 = skills.getCurrentSkillExp(index20);
new21 = skills.getCurrentSkillExp(index21);
new22 = skills.getCurrentSkillExp(index22);
new23 = skills.getCurrentSkillExp(index23);
if(attack != new1) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training attack");
moveMouse(random(557,598),random(229,252));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(defence != new2) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training defence");
moveMouse(random(557,600),random(294,318));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(strength != new3) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training strength");
moveMouse(random(557,600),random(263,287));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(range != new4) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training range");
moveMouse(random(557,600),random(327,350));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(prayer != new5) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training prayer");
moveMouse(random(557,600),random(357,381));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(magic != new6) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training magic");
moveMouse(random(557,600),random(356,380));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(cooking != new7) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training cooking");
moveMouse(random(664,708),random(325,351));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(woodcutting != new8) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training woodcutting");
moveMouse(random(664,709),random(355,382));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(fletching != new9) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training fletching");
moveMouse(random(610,655),random(357,381));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(fishing != new10) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training fishing");
moveMouse(random(665,709),random(294,317));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(firemaking != new11) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training firemaking");
moveMouse(random(664,709),random(357,380));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));;
}if(crafting != new12) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training crafting");
moveMouse(random(610,656),random(357,380));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(smithing != new13) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training smithing");
moveMouse(random(664,709),random(262,286));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(100,200));
}if(mining != new14) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training mining");
moveMouse(random(664,709),random(229,252));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(herblore != new15) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training herblore");
moveMouse(random(611,654),random(292,317));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(agility != new16) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training agility");
moveMouse(random(610,654),random(260,286));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(thieving != new17) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training thieving");
moveMouse(random(608,653),random(325,351));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(slayer != new18) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training slayer");
moveMouse(random(609,654),random(387,412));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(farming != new19) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training farming");
moveMouse(random(663,709),random(388,413));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(runecraft != new20) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training runecraft");
moveMouse(random(554,600),random(389,411));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(hunter != new21) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training hunter");
moveMouse(random(718,729),random(411,433));
wait(random(100,200));
clickMouse(true);
wait(random(100,200));
moveMouse(random(612,654),random(420,444));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(construction != new22) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training construction");
moveMouse(random(718,729),random(411,433));
wait(random(100,200));
clickMouse(true);
wait(random(100,200));
moveMouse(random(557,600),random(420,444));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}if(summoning != new23) {
if(getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
log("We are training summoning");
moveMouse(random(718,729),random(411,433));
wait(random(100,200));
clickMouse(true);
wait(random(100,200));
moveMouse(random(718,729),random(421,446));
wait(random(1000,2000));
openTab(currenttab);
wait(random(300,500));
moveMouse(mousePos,7,7);
wait(random(300,500));
}
}
}
}