public AntiBan AB = new AntiBan();
class AntiBan extends JFrame {
/*
@Author Umbra
@Date 5/8/2011
*/
public Timer antiBanTimer = new Timer(0);
public boolean customAB, AFK, Mouse, Camera, Tabs, LogOut, ABOn;
public int ABFreq;
public double ABFreqTime;
Timer AFKTimer = new Timer (0);
public void antiBanMethod(){
if (ABOn){
if (!antiBanTimer.isRunning() && !AFKTimer.isRunning()){
antiBan();
antiBanTimer.setEndIn((int)random(ABFreqTime * .33, ABFreqTime * 1.66));
}
}
}
public void antiBan(){
int t = 0;
if (Camera){t++;};
if (Tabs){t++;};
if (AFK){t++;};
if (Mouse){t++;};
t += 0;
switch(random(1, t)){
case 1:
if (Camera){
camera.turnTo(getMyPlayer().getLocation().randomize(5, 5), 5);
sleep(random(500, 750));
return;
}
case 2:
if (Tabs){
switch(random(1, 4)){
case 1:
game.openTab(Game.TAB_FRIENDS);
mouse.move((585+random(-35, 35)), (330+random(-90, 90)));
sleep(750, 3000);
game.openTab(Game.TAB_INVENTORY);
sleep(random(500, 750));
return;
case 2:
game.openTab(Game.TAB_CLAN);
mouse.move((585+random(-35, 35)), (330+random(-90, 90)));
sleep(750, 1500);
game.openTab(Game.TAB_INVENTORY);
sleep(random(500, 750));
return;
default:
game.openTab(game.TAB_STATS);
mouse.moveRandomly(random(1, 300));
sleep(750, 1500);
game.openTab(Game.TAB_INVENTORY);
sleep(random(500, 750));
return;
}
}
case 3:
if (AFK){
int r = random(1, 100);
if (r < 75){
AFKTimer.setEndIn(random(3000, 5000));
} else if (r >= 70 && r < 90){
AFKTimer.setEndIn(random(5000, 15000));
} else {
AFKTimer.setEndIn(random(10000, 30000));
}
return;
}
case 4:
if (Mouse){
int s = random(1, 4);
switch(s){
case 1:
mouse.moveOffScreen();
sleep(750, 1500);
return;
case 2:
mouse.moveSlightly();
sleep(500, 1000);
return;
case 3:
mouse.moveRandomly(random(1, 300));
sleep(750, 1500);
return;
default:
return;
}
}
default:
return;
}
}
public void setEnabled(boolean a, boolean b, boolean c, boolean d,
boolean e, boolean f, boolean g, boolean h,
boolean i, boolean j, boolean k, boolean l){
ABFreqSlider.setEnabled(a);
ABOnOff.setEnabled(b);
customAntiBanButton.setEnabled(c);
ABLevelOptions.setEnabled(d);
separator1.setEnabled(e);
ABFreqLabel.setEnabled(f);
AFKCheck.setEnabled(g);
mouseMoveCheck.setEnabled(h);
camMoveCheck.setEnabled(i);
logOutCheck.setEnabled(j);
openTabsCheck.setEnabled(k);
ABLevelLabel.setEnabled(l);
}
public void getSettings(){
if (!ABOnOff.isSelected()){
ABOn = true;
if (customAntiBanButton.isSelected()){
customAB = true;
ABFreq = ABFreqSlider.getValue();
AFK = AFKCheck.isSelected();
Mouse = mouseMoveCheck.isSelected();
Camera = camMoveCheck.isSelected();
Tabs = openTabsCheck.isSelected();
LogOut = logOutCheck.isSelected();
} else {
customAB = false;
if (ABLevelOptions.getSelectedItem().toString().contains("Low")) {
ABFreq = 20;
LogOut = true;
Camera = true;
Mouse = true;
} else if (ABLevelOptions.getSelectedItem().toString().contains("Medium")) {
ABFreq = 40;
Mouse = true;
LogOut = true;
Camera = true;
AFK = true;
} else if (ABLevelOptions.getSelectedItem().toString().contains("High")) {
ABFreq = 60;
LogOut = true;
Camera = true;
Tabs = true;
AFK = true;
Mouse = true;
}
}
log("AntiBan on");
ABFreqTime = ((double)(240 / ABFreq) * 15000);
antiBanTimer = new Timer ((int)random(ABFreqTime * .5, ABFreqTime * 1.5));
} else {
log("AntiBan off");
ABOn = false;
}
}
public void ABToggle(){
if ((ABOnOff.isSelected())){
setEnabled(false, true, false, false, false, false, false, false, false, false, false, false);
} else {
if (customAntiBanButton.isSelected()){
setEnabled(true, true, true, false, true, true, true, true, true, false, true, false);
} else {
setEnabled(false, true, true, true, true, false, false, false, false, false, false, true);
}
}
}
public void cantCont(){
if ((customAntiBanButton.isSelected() && !AFKCheck.isSelected() && !mouseMoveCheck.isSelected()
&& !camMoveCheck.isSelected() && !openTabsCheck.isSelected()) || ABFreqSlider.getValue() == 0){
contButton.setEnabled(false);
} else {
contButton.setEnabled(true);
}
}
public AntiBan() {
initComponents();
}
private void ABFreqSliderStateChanged(ChangeEvent e) {
cantCont();
}
private void ABOnOffStateChanged(ChangeEvent e) {
ABOnOff.setToolTipText("The AntiBan is currently: " + content());
ABOnOff.setText("Turn AntiBan " + OPcontent());
ABToggle();
cantCont();
}
private void customAntiBanButtonStateChanged(ChangeEvent e) {
ABToggle();
cantCont();
}
private void AFKCheckStateChanged(ChangeEvent e) {
cantCont();
}
private void mouseMoveCheckStateChanged(ChangeEvent e) {
cantCont();
}
private void camMoveCheckStateChanged(ChangeEvent e) {
cantCont();
}
private void logOutCheckStateChanged(ChangeEvent e) {
cantCont();
}
private void openTabsCheckStateChanged(ChangeEvent e) {
cantCont();
}
private void contButtonActionPerformed(ActionEvent e) {
getSettings();
setVisible(false);
}
String content(){
if (ABOnOff.isSelected()){
return "OFF";
} else {
return "ON";
}
}
String OPcontent(){
if (!ABOnOff.isSelected()){
return "OFF";
} else {
return "ON";
}
}
private void initComponents() {
ABFreqSlider = new JSlider();
ABOnOff = new JToggleButton();
customAntiBanButton = new JRadioButton();
ABLevelOptions = new JComboBox();
separator1 = new JSeparator();
ABFreqLabel = new JLabel();
AFKCheck = new JRadioButton();
mouseMoveCheck = new JRadioButton();
camMoveCheck = new JRadioButton();
logOutCheck = new JRadioButton();
openTabsCheck = new JRadioButton();
ABLevelLabel = new JLabel();
contButton = new JButton();
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
stopScript();
}
});
//======== this ========
setTitle("AntiBan");
Container contentPane = getContentPane();
//---- ABFreqSlider ----
ABFreqSlider.setMajorTickSpacing(40);
ABFreqSlider.setSnapToTicks(true);
ABFreqSlider.setPaintTicks(true);
ABFreqSlider.setBackground(new Color(238, 238, 238));
ABFreqSlider.setEnabled(false);
ABFreqSlider.setPaintLabels(true);
ABFreqSlider.setMinorTickSpacing(8);
ABFreqSlider.setMaximum(240);
ABFreqSlider.setValue(60);
ABFreqSlider.setToolTipText("Allows you to select the average amount of AntiBans per hour");
ABFreqSlider.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
ABFreqSliderStateChanged(e);
}
});
//---- ABOnOff ----
ABOnOff.setText("Turn AntiBan Off");
ABOnOff.setToolTipText("The AntiBan is currently: ON");
ABOnOff.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
ABOnOffStateChanged(e);
}
});
//---- customAntiBanButton ----
customAntiBanButton.setText("Custumized AntiBan");
customAntiBanButton.setToolTipText("Enables you to customize your AntiBan");
customAntiBanButton.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
customAntiBanButtonStateChanged(e);
}
});
//---- ABLevelOptions ----
ABLevelOptions.setModel(new DefaultComboBoxModel(new String[] {
"Low",
"Medium",
"High"
}));
ABLevelOptions.setSelectedIndex(2);
ABLevelOptions.setToolTipText("Selects the level of AntiBan");
//---- separator1 ----
separator1.setForeground(new Color(100, 100, 100));
//---- ABFreqLabel ----
ABFreqLabel.setText("Avg. AntiBans P/H");
ABFreqLabel.setToolTipText("Average. AntiBans per hour");
ABFreqLabel.setEnabled(false);
//---- AFKCheck ----
AFKCheck.setText("AFK's");
AFKCheck.setEnabled(false);
AFKCheck.setToolTipText("If checked, the AntiBan will perform AFK's");
AFKCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
AFKCheckStateChanged(e);
}
});
//---- mouseMoveCheck ----
mouseMoveCheck.setText("Mouse MoveMents");
mouseMoveCheck.setEnabled(false);
mouseMoveCheck.setToolTipText("If checked, the AntiBan will move the mouse");
mouseMoveCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
mouseMoveCheckStateChanged(e);
}
});
//---- camMoveCheck ----
camMoveCheck.setText("Camera Movements");
camMoveCheck.setEnabled(false);
camMoveCheck.setToolTipText("If checked, the AntiBan will move the camera");
camMoveCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
camMoveCheckStateChanged(e);
}
});
//---- logOutCheck ----
logOutCheck.setText("Log Out if Innactive");
logOutCheck.setEnabled(false);
logOutCheck.setVisible(false);
logOutCheck.setToolTipText("Currently under construction");
logOutCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
logOutCheckStateChanged(e);
}
});
//---- openTabsCheck ----
openTabsCheck.setText("Open Tabs");
openTabsCheck.setEnabled(false);
openTabsCheck.setToolTipText("If checked, the AntiBan will open your friends list tab");
openTabsCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
openTabsCheckStateChanged(e);
}
});
//---- ABLevelLabel ----
ABLevelLabel.setText("AntiBan Level");
ABLevelLabel.setToolTipText("AntiBan Level");
//---- contButton ----
contButton.setText("Continue");
contButton.setToolTipText("Starts the Script");
contButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
contButtonActionPerformed(e);
}
});
GroupLayout contentPaneLayout = new GroupLayout(contentPane);
contentPane.setLayout(contentPaneLayout);
contentPaneLayout.setHorizontalGroup(
contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addGroup(contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(102, 102, 102)
.addComponent(ABOnOff, GroupLayout.PREFERRED_SIZE, 182, GroupLayout.PREFERRED_SIZE))
.addGroup(contentPaneLayout.createSequentialGroup()
.addContainerGap()
.addGroup(contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addComponent(ABFreqLabel)
.addGap(12, 12, 12)
.addComponent(ABFreqSlider, GroupLayout.PREFERRED_SIZE, 260, GroupLayout.PREFERRED_SIZE))
.addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
.addComponent(ABLevelLabel)
.addComponent(customAntiBanButton, GroupLayout.PREFERRED_SIZE, 159, GroupLayout.PREFERRED_SIZE))
.addGroup(contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(separator1, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE))
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(27, 27, 27)
.addComponent(ABLevelOptions, GroupLayout.PREFERRED_SIZE, 140, GroupLayout.PREFERRED_SIZE)))
.addGap(96, 96, 96))))
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(20, 20, 20)
.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
.addGroup(contentPaneLayout.createSequentialGroup()
.addComponent(mouseMoveCheck)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(logOutCheck))
.addGroup(contentPaneLayout.createSequentialGroup()
.addComponent(openTabsCheck)
.addGap(18, 18, 18)
.addComponent(AFKCheck)
.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(camMoveCheck))))
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(109, 109, 109)
.addComponent(contButton, GroupLayout.PREFERRED_SIZE, 167, GroupLayout.PREFERRED_SIZE)))
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
contentPaneLayout.setVerticalGroup(
contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(ABOnOff)
.addGap(18, 18, 18)
.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(ABLevelLabel)
.addComponent(ABLevelOptions, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGroup(contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(customAntiBanButton, GroupLayout.PREFERRED_SIZE, 44, GroupLayout.PREFERRED_SIZE))
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(35, 35, 35)
.addComponent(separator1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
.addGroup(contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ABFreqSlider, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(26, 26, 26)
.addComponent(ABFreqLabel)))
.addGap(15, 15, 15)
.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(openTabsCheck)
.addComponent(AFKCheck)
.addComponent(camMoveCheck))
.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(logOutCheck)
.addComponent(mouseMoveCheck))
.addGap(18, 18, 18)
.addComponent(contButton)
.addContainerGap(12, Short.MAX_VALUE))
);
pack();
setLocationRelativeTo(getOwner());
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
// Generated using JFormDesigner Evaluation license - Joe Titus
private JSlider ABFreqSlider;
private JToggleButton ABOnOff;
private JRadioButton customAntiBanButton;
private JComboBox ABLevelOptions;
private JSeparator separator1;
private JLabel ABFreqLabel;
private JRadioButton AFKCheck;
private JRadioButton mouseMoveCheck;
private JRadioButton camMoveCheck;
private JRadioButton logOutCheck;
private JRadioButton openTabsCheck;
private JLabel ABLevelLabel;
private JButton contButton;
// JFormDesigner - End of variables declaration //GEN-END:variables
}