import impsoft.bots.ColorBot;
import impsoft.scripting.ibot.clusters.EdgeRGBCluster;
import impsoft.scripting.ibot.clusters.EdgeRGBCluster2;
import impsoft.scripting.ibot.interfaces.AutoPaint;
import impsoft.scripting.ibot.interfaces.ChatListener;
import impsoft.scripting.ibot.builtin.ocr.NPCChat;
import impsoft.scripting.ibot.structs.AryanTile;
import impsoft.scripting.ibot.objects.AryanPath;
import impsoft.scripting.ibot.gameinterfs.StoreInterface;
import impsoft.scripting.ibot.structs.RGB;
import impsoft.scripting.types.ColorScript;
import impsoft.utils.general.Timer;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import impsoft.bots.*;
import impsoft.handlers.*;
import impsoft.scripting.ibot.builtin.tabs.InventoryTab;
import impsoft.painting.*;
import impsoft.scripting.ibot.builtin.tabs.MagicTab;
import impsoft.scripting.ibot.clusters.*;
import impsoft.scripting.ibot.gameinterfs.*;
import impsoft.scripting.ibot.interfaces.*;
import impsoft.scripting.ibot.itemrec.*;
import impsoft.scripting.ibot.objects.*;
import impsoft.scripting.ibot.objects.ocr.*;
import impsoft.scripting.ibot.structs.*;
import impsoft.scripting.input.objects.*;
import impsoft.scripting.types.*;
import impsoft.utils.general.*;
import impsoft.utils.ibot.*;
import impsoft.values.constant.*;
import impsoft.values.variable.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class privatealch extends ColorScript implements AutoPaint
{
public privatealch(ColorBot c)
{
super (c);
}
//declare varriables
public static String author = "Sander";
public static double version = 0.01;
public static String description = "alchs everything";
public static String status = "";
public static int alched = 0;
public static int antib = 0;
private final Timer timeran = new Timer(0);
//declare rectangles
Rectangle alchButton0 = new Rectangle(568,361,10, 10);
Rectangle alchButton1 = new Rectangle(573,360,10, 10);
Rectangle alchButton2 = new Rectangle(572,358,10, 10);
Rectangle alchButton3 = new Rectangle(566,363,10, 10);
Rectangle alchButton4 = new Rectangle(574,360,10, 10);
Rectangle alchButton5 = new Rectangle(570,359,10, 10);
Rectangle magicstat = new Rectangle(560,398,10, 10);
public void paint(Graphics g)
{
final StringBuilder b = new StringBuilder();
final long runtime = timeran.timePassed();
final long TotalSec = runtime / 1000;
final long TotalMin = TotalSec / 60;
final long TotalHour = TotalMin / 60;
final int second = (int) TotalSec % 60;
final int minute = (int) TotalMin % 60;
final int hour = (int) TotalHour % 60;
if (hour < 10)
b.append("0");
b.append(hour);
b.append(" : ");
if (minute < 10)
b.append("0");
b.append(minute);
b.append(" : ");
if (second < 10)
b.append("0");
b.append(second);
g.setColor(Color.red);
g.drawString("Ran for: " + b, 15, 20);
g.drawString("Current status: " + status, 15, 35);
g.drawString("Current antib: " + antib, 15, 50);
g.drawString("Total alched: " + alched, 15, 65);
if(status=="Anti Ban") { g.setColor(Color.green); }
g.fillRoundRect(15, 90, 120, 30, 10, 10);
g.setColor(Color.black);
g.drawString("Anti ban", 20, 110);
g.drawRoundRect(15, 90, 120, 30, 10, 10);
g.setColor(Color.red);
if(status=="alching") { g.setColor(Color.green); }
g.fillRoundRect(15, 130, 120, 30, 10, 10);
g.setColor(Color.black);
g.drawString("Alching", 20, 150);
g.drawRoundRect(15, 130, 120, 30, 10, 10);
g.setColor(Color.red);
if(status=="starting up script...") { g.setColor(Color.green); }
g.fillRoundRect(15, 170, 120, 30, 10, 10);
g.setColor(Color.black);
g.drawString("starting up script...", 20, 190);
g.drawRoundRect(15, 170, 120, 30, 10, 10);
}
public void randomTab() throws InterruptedException {
impsoft.scripting.ibot.builtin.tabs.TabSkelton[] tabs = {
theTabs.Attack, theTabs.Controls, theTabs.Equipment,
theTabs.Friends, theTabs.Ignore, theTabs.Logout, theTabs.Music, theTabs.Options, theTabs.Prayer, theTabs.Quest,
theTabs.Statistics, theTabs.Inventory };
int a = random(0, 12);
int b = random(0, 11);
if (b <= 1) {
tabs[a].click();
} else {
tabs[a].setSelected();
}
sleep(random(3000,5000));
}
public void CheckTabs() throws InterruptedException
{
sleep(random(250,500));
if (!theTabs.Magic.isSelected())
{
log("Magic Tab Is NOT Selected!");
theTabs.Magic.setSelected();
sleep(random(200, 400));
if(theTabs.Magic.isSpellSelected())
{
theTabs.Magic.cancelSpell();
}
sleep(random(200, 400));
}
}
public void antiban() throws InterruptedException
{
status="Anti Ban";
int i = random(1, 4);
if(i==1) {
info("Antiban: random Compass");
antib=random(5,30);
theCompass.randomRotate();
}
if(i==2) {
antib=random(5,30);
info("Antiban: randomTab and random Compass");
randomTab();
theCompass.randomRotate();
}
if(i==3) {
info("Antiban: Stat check and random Compass");
theTabs.Statistics.click();
mouseMove(magicstat);
theCompass.randomRotate();
antib=random(5,30);
sleep(random(5000, 6000));
}
}
public void randalch() throws InterruptedException
{
status="alching";
CheckTabs();
int RandomAlchemy = RandomGenerator.random(1, 7);
if(RandomAlchemy == 1) { alch1(); }
else
if(RandomAlchemy == 2) { alch2(); }
else
if(RandomAlchemy == 3) { alch3(); }
else
if(RandomAlchemy == 4) { alch4(); }
else
if(RandomAlchemy == 5) { alch5(); }
else
if(RandomAlchemy == 6) { alch6(); }
sleep(1000);
}
public void alch1() throws InterruptedException
{
while (getAnimation() != -1)
{
sleep(random(1, 100));
}
log("random alch 1");
mouseClickLeft(alchButton0);
sleep(random(90, 190));
mouseClickLeft(alchButton0);
}
public void alch2() throws InterruptedException
{
while (getAnimation() != -1)
{
sleep(random(1, 100));
}
log("random alch 2");
mouseClickLeft(alchButton1);
sleep(random(90, 190));
mouseClickLeft(alchButton1);
}
public void alch3() throws InterruptedException
{
while (getAnimation() != -1)
{
sleep(random(1, 100));
}
log("random alch 3");
mouseClickLeft(alchButton2);
sleep(random(90, 190));
mouseClickLeft(alchButton2);
}
public void alch4() throws InterruptedException
{
while (getAnimation() != -1)
{
sleep(random(1, 100));
}
log("random alch 4");
mouseClickLeft(alchButton3);
sleep(random(90, 190));
mouseClickLeft(alchButton3);
}
public void alch5() throws InterruptedException
{
while (getAnimation() != -1)
{
sleep(random(1, 100));
}
log("random alch 5");
mouseClickLeft(alchButton4);
sleep(random(90, 190));
mouseClickLeft(alchButton4);
}
public void alch6() throws InterruptedException
{
while (getAnimation() != -1)
{
sleep(random(1, 100));
}
log("random alch 6");
mouseClickLeft(alchButton5);
sleep(random(90, 190));
mouseClickLeft(alchButton5);
}
public void script() throws InterruptedException
{
log("Starting up script...");
status = "starting up script...";
stopRandom("NotMoving");
while(true)
{
if(antib>35)
{
antiban();
}
randalch();
alched+=1;
antib+=1;
}
}
}