Yes.
I'm thinking about rewriting this...but that won't happen until after lape's release.
Printable View
A little bug is if the monster drops 2 items. It will only pick up the top item, it will pick up the 2nd drop (usually a charm) after it kills the NEXT roach. It always kills it intime though before the charm disappears.
Awesome script though :) LOVE IT :)
P.S. also add an option for only picking up charms and not mith ore ect? :D
Thanks a ton.
EDIT: I think it is cause when I am standing ontop of the double loot it picks up one and then doesnt see the other.
Hi!
I love this script and I really want to use it but it wont never run over ~1/1,5 hour.
I'm f2p and I use swordfishes. Tested debugging enabled and disabled. When i log back in runescape my character is on bank or walking has failed. I turned off world hopping because it slows down my xp. I hope this helped you to help me :)
I want to bot when I'm idle. Thanks!
http://aijaa.com/0096110218610.jpg
sometimes it fails climb up rope and when i check my account is dead
Great script man!
I just have one problem, it always logs out after an hour or less for some reason.
If you do plan on you should add a loot grabber like this http://villavu.com/forum/showthread.php?t=76643 although im most likely going to attempt to add it in myself :P
Hey,
Awesome script, only one problem.
Doesnt pick up crimson charms, is there any way to fix?
Good script overall first I finally got working with simba I like the bot format if somehow a repository could be added sort of like MSI has if you open the defaults
will post proggies
mormom the find crevice is a little buggy a few times i've gotten logged cause it can't find it and after it climbs out it when its out of food it will just sit there till it logs out but other than that it works great keep up the good scripting
Bookmarked think i'll try this script out sometime.
R U lds 2?
Is this broken for anyone?
Ranging is not working. The script can't find the bank in Edgeville bank. It fights one or two cockroaches and then runs up the rope to the bank despite having one of the supported foods remaining in inventory.
The only thing wrong with the script is the food colors, banking colors, and for some reason this version has the old rope-climbing. My pc is currently packed away, so I can't upload any fixes for a while.
got through a couple of pages and couldn't find my answer so sorry if this has already been answered,
but is there a way to only make it pick up charms/rare loot table/runes/ores? It keeps eating my swordies to pick up other players vials....
Thanks.
This script (banking wise) is currently broken because Jagex changed the bankers, If you know how to use ACA to get a good colour + hue and sat mods you could easily edit it, I may put a "fixed" version up if I use this again.
xp/h ?
can you make it so it picks up the charms effiges ores runes shit like that . . .
any of that help idk i found in a old script i hadjava Code:Manifest(authors = { "JustRS" }, name = "JustRoaches", description = "Kills Cockroach Soldiers, Loots Items, Banks for Food.", version = 2.1, website = "http://www.powerbot.org/community/topic/686539-justroaches-30k-40k-xphr-charms-cash/")
public class JustRoaches extends ActiveScript implements PaintListener, MouseListener {
public int PICKUP_ITEMS[] = {
10266, //Clue Scroll
7282, //Clue Scroll (medium)
5316, //Magic Seed
5304, //Torstol Seed
5300, //Snapdragon Seed
5321, //Watermelon Seed
563, //Law Rune
560, //Death Rune
565, //Blood Rune
554, //Fire Rune
1333, //Rune Scimitar
1185, //Rune Sq Shield
450, //Adamantite Ore
448, //Mithril Ore
1631, //Uncut Dragonstone
12163, //Blue Charm
12160, //Crimson Charm
12159, //Green Charm
12158, //Gold Charm
24154, //Spin Ticket
// 995, //Coins
985 //Tooth Half of Key
};
// Do not edit past this point
int EAT_PERCENT;
int FOOD_ID;
int WITHDRAW_AMT;
String ATTACK_STYLE = "Attack";
public long StartTime;
public int StartXPAttack;
public int StartXPStrength;
public int StartXPDefense;
public int StartXPRange;
public int StartXPConstitution;
public int FoodEaten = 0;
public int BankWithdraws = 0;
public int BlueCharms = 0;
public int CrimsonCharms = 0;
public int GreenCharms = 0;
public int GoldCharms = 0;
public int MithOre = 0;
public int AdamOre = 0;
public int LawRunes = 0;
public int DeathRunes = 0;
public int BloodRunes = 0;
public int FireRunes = 0;
public int RuneScimitar = 0;
public int RuneShield = 0;
public int WatermelonSeed = 0;
public int TorstolSeed = 0;
public int SnapdragonSeed = 0;
public int MagicSeed = 0;
public int UncutDragonstone = 0;
public int SpinTickets = 0;
public int Coins = 0;
public int PrBlueCharms;
public int PrCrimsonCharms;
public int PrGreenCharms;
public int PrGoldCharms;
public int PrMithOre;
public int PrAdamOre;
public int PrLawRunes;
public int PrDeathRunes;
public int PrBloodRunes;
public int PrFireRunes;
public int PrRuneScimitar;
public int PrRuneShield;
public int PrWatermelonSeed;
public int PrTorstolSeed;
public int PrSnapdragonSeed;
public int PrMagicSeed;
public int PrUncutDragonstone;
public int PrSpinTickets;
public int PrCoins;
public int TotalPriceLooted;
public int TotalPriceLootedInK;
public boolean TabLoot = false;
public boolean TabCombat = true;
Rectangle RecTabCombat = new Rectangle(8, 346, 110, 28);
Rectangle RecTabLoot = new Rectangle(119, 346, 100, 28);
Point p;
boolean guiRunning = true;
public int ROACHES = 7160;
public int ROPE_ID = 29729;
public int CREVICE_ID = 29728;
public int BANK_ID = 42217;
private final Tile[] ToBank = { new Tile(3080, 3463, 0),
new Tile(3080, 3470, 0), new Tile(3080, 3477, 0),
new Tile(3083, 3486, 0), new Tile(3093, 3491, 0) };
private final Tile[] ToCrevice = { new Tile(3093, 3491, 0),
new Tile(3083, 3486, 0), new Tile(3080, 3477, 0),
new Tile(3080, 3470, 0), new Tile(3080, 3463, 0) };
public String Status = "Script Started";
private final Color color3 = new Color(255, 255, 255);
private final Font body = new Font("Verdana", 0, 10);
private final Font title = new Font("Verdana", 1, 10);
private final Image img = getImage("http://img829.imageshack.us/img829/8426/justroachesv21.jpg");
protected void setup() {
log.info("_____________JustRoaches V2.1_____________");
log.info("Loading GE Prices...");
try {
PrMithOre = getPrice(447);
PrAdamOre = getPrice(449);
PrLawRunes = getPrice(563);
PrBloodRunes = getPrice(565);
PrDeathRunes = getPrice(560);
PrFireRunes = getPrice(554);
PrRuneScimitar = getPrice(1333);
PrRuneShield = getPrice(1185);
PrTorstolSeed = getPrice(5304);
PrSnapdragonSeed = getPrice(5300);
PrWatermelonSeed = getPrice(5321);
PrUncutDragonstone = getPrice(1631);
} catch (IOException e) {
e.printStackTrace();
}
log.info("Launching GUI");
guiBuild();
StartXPAttack = Skills.getExperience(Skills.ATTACK);
StartXPStrength = Skills.getExperience(Skills.STRENGTH);
StartXPDefense = Skills.getExperience(Skills.DEFENSE);
StartXPRange = Skills.getExperience(Skills.RANGE);
StartXPConstitution = Skills.getExperience(Skills.CONSTITUTION);
if (Tabs.getCurrent() != Tabs.INVENTORY) {
Tabs.INVENTORY.open();
}
Camera.setPitch(true);
StartTime = System.currentTimeMillis();
provide(new WalkToCrevice());
provide(new Loot());
provide(new EatFood());
provide(new ClimbRope());
provide(new AttackRoaches());
provide(new WalkToBank());
provide(new BankItems());
}
public void guiBuild() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
final JustRoachesGUI GUI = new JustRoachesGUI();
GUI.setVisible(true);
final guiBuild GUIBUILD = new guiBuild();
final Strategy GUIBUILD_STRATEGY = new Strategy(GUIBUILD, GUIBUILD);
provide(GUIBUILD_STRATEGY);
guiRunning = true;
}
});
}
private class guiBuild extends Strategy implements Task, Condition {
public void run() {
while(guiRunning) Time.sleep(100);
}
public boolean validate() {
return guiRunning;
}
}
private class Loot extends Strategy implements Task {
@Override
public boolean validate() {
return !guiRunning && NeedToLoot()
&& Players.getLocal().getLocation().getX() >= 3100;
}
@Override
public void run() {
for(int l : PICKUP_ITEMS) {
GroundItem g = GroundItems.getNearest(l);
if (g != null) {
Status = "Looting Items";
if (!g.isOnScreen() && g.getLocation().getY() >= 4274) {
Walking.walk(g);
sleep(500,800);
} else {
g.interact("Take", g.getGroundItem().getName());
if (Calculations.distanceTo(g.getLocation()) > 2) {
sleep(1300,1500);
}
sleep(1300,1500);
if (g.getId() == 12163) { BlueCharms = BlueCharms+1; }
if (g.getId() == 12160) { CrimsonCharms = CrimsonCharms+1; }
if (g.getId() == 12159) { GreenCharms = GreenCharms+1; }
if (g.getId() == 12158) { GoldCharms = GoldCharms+1; }
if (g.getId() == 1333) { RuneScimitar = RuneScimitar+1; }
if (g.getId() == 1185) { RuneShield = RuneShield+1; }
if (g.getId() == 448) { MithOre = MithOre+(g.getGroundItem().getStackSize()); }
if (g.getId() == 450) { AdamOre = AdamOre+(g.getGroundItem().getStackSize()); }
if (g.getId() == 563) { LawRunes = LawRunes+(g.getGroundItem().getStackSize()); }
if (g.getId() == 560) { DeathRunes = DeathRunes+(g.getGroundItem().getStackSize()); }
if (g.getId() == 565) { BloodRunes = BloodRunes+(g.getGroundItem().getStackSize()); }
if (g.getId() == 554) { FireRunes = FireRunes+(g.getGroundItem().getStackSize()); }
if (g.getId() == 5304) { TorstolSeed = TorstolSeed+1; }
if (g.getId() == 5300) { SnapdragonSeed = SnapdragonSeed+1; }
if (g.getId() == 5321) { WatermelonSeed = WatermelonSeed+1; }
if (g.getId() == 5316) { MagicSeed = MagicSeed+(g.getGroundItem().getStackSize()); }
if (g.getId() == 1631) { UncutDragonstone = UncutDragonstone+1; }
if (g.getId() == 995) { Coins = Coins+(g.getGroundItem().getStackSize()); }
}
}
}
}
}
private class AttackRoaches extends Strategy implements Task {
@Override
public boolean validate() {
return !guiRunning && Players.getLocal().getLocation().getX() >= 3100
&& !NeedToEat()
&& !NeedToLoot()
&& !FullInventory();
}
@Override
public void run() {
if (GetRoaches()==null && !NeedToLoot()) {
AntiBan();
}
if (GetRoaches().getLocation().getY() >= 4274 && !NeedToLoot()) {
if(GetRoaches().isOnScreen()) {
if(!Players.getLocal().isInCombat() && Players.getLocal().getInteracting()==null) {
GetRoaches().click(true);
Status = "Fighting Cockroach";
sleep(500,700);
} else {
AntiBan();
}
} else {
while (!GetRoaches().isOnScreen()) {
Walking.walk(GetRoaches().getLocation());
sleep(300,500);
}
}
}
}
}
private class EatFood extends Strategy implements Task {
@Override
public boolean validate() {
return !guiRunning && HaveFood()
&& NeedToEat()
|| FullInventory();
}
@Override
public void run() {
if(!Tabs.getCurrent().equals(Tabs.INVENTORY)) {
Tabs.INVENTORY.open();
}
for(Item i : Inventory.getItems()){
if(i.getId() == FOOD_ID && validate() && Players.getLocal().getAnimation()==-1){
i.getWidgetChild().click(true);
Status = "Eating Food";
sleep(900,1000);
FoodEaten = FoodEaten+1;
}
}
}
}
private class ClimbRope extends Strategy implements Task {
@Override
public boolean validate() {
return !guiRunning && !HaveFood()
&& Players.getLocal().getLocation().getX() >= 3100
&& NeedToEat()
&& !NeedToLoot();
}
@Override
public void run() {
if (GetRope().isOnScreen()) {
Status = "Climbing Rope";
sleep(100,300);
GetRope().interact("Climb");
sleep(800,1000);
} else {
Walking.walk(GetRope());
sleep(300,500);
}
}
}
private class WalkToBank extends Strategy implements Task {
@Override
public boolean validate() {
return !guiRunning && !HaveFood()
&& !Bank.isOpen()
&& Players.getLocal().getLocation().getX() <= 3100;
}
@Override
public void run() {
Status = "Walking to Bank";
if (GetBank().isOnScreen() && Calculations.distanceTo(GetBank().getLocation()) <= 6) {
sleep(500, 700);
GetBank().interact("Bank");
sleep(800, 1000);
} else {
Walking.newTilePath(ToBank).traverse();
}
}
}
private class WalkToCrevice extends Strategy implements Task {
@Override
public boolean validate() {
return !guiRunning && HaveFood()
&& Players.getLocal().getLocation().getX() <= 3100;
}
@Override
public void run() {
Status = "Walking to Crevice";
if (GetCrevice().isOnScreen() && Calculations.distanceTo(GetCrevice()) <= 5) {
Status = "Entering Crevice";
sleep(500, 700);
GetCrevice().interact("Enter");
} else {
Walking.newTilePath(ToCrevice).traverse();
}
}
}
private class BankItems extends Strategy implements Task {
@Override
public boolean validate() {
return !guiRunning && Bank.isOpen()
&& !HaveFood()
&& Players.getLocal().getLocation().getX() <= 3100;
}
@Override
public void run() {
Status = "Banking";
sleep(500, 700);
for(Item t:Inventory.getItems()){
if(t.getId() != FOOD_ID && Inventory.getCount() != 0){
Bank.depositInventory();
sleep(500,700);
}
}
if (WITHDRAW_AMT==5) {
sleep(500, 750);
Bank.withdraw(FOOD_ID, 5);
sleep(500, 750);
}
if (WITHDRAW_AMT==10) {
sleep(500, 750);
Bank.withdraw(FOOD_ID, 10);
sleep(500, 750);
}
if (WITHDRAW_AMT==15) {
sleep(500, 750);;
Bank.withdraw(FOOD_ID, 15);
sleep(500, 750);
}
if (WITHDRAW_AMT==20) {
sleep(500, 750);
Bank.withdraw(FOOD_ID, 20);
sleep(500, 750);;
}
sleep(500, 750);
Bank.close();
BankWithdraws++;
}
}
public static void sleep(int min, int max){
Time.sleep(Random.nextInt(min, max));
}
public boolean FullInventory(){
if (Inventory.getCount() == 28) {
return true;
}
return false;
}
public NPC GetRoaches() {
return NPCs.getNearest(ROACHES);
}
private SceneObject GetRope() {
return SceneEntities.getNearest(ROPE_ID);
}
private SceneObject GetBank() {
return SceneEntities.getNearest(BANK_ID);
}
private SceneObject GetCrevice() {
return SceneEntities.getNearest(CREVICE_ID);
}
public boolean HaveFood() {
if (Inventory.getCount(FOOD_ID) >= 1) {
return true;
}
return false;
}
public boolean NeedToEat(){
if (Integer.parseInt(Widgets.get(748, 8).getText()) <= (Skills.getLevel(Skills.CONSTITUTION))*EAT_PERCENT) {
return true;
}
return false;
}
public boolean NeedToLoot() {
for(int l : PICKUP_ITEMS) {
GroundItem g = GroundItems.getNearest(l);
if (g != null) {
return true;
}
}
return false;
}
public int getPrice(int id) throws IOException {
String price;
URL url = new URL("http://services.runescape.com/m=itemdb_rs/viewitem.ws?obj=" + id);
URLConnection con = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
if (line.contains("<td>")) {
price = line.substring(line.indexOf(">") + 1, line.indexOf("/") - 1);
try {
return Integer.parseInt(price);
} catch (NumberFormatException e) {
return 0;
}
}
}
return 0;
}
private void AntiBan() {
if (Players.getLocal().getInteracting()!=null) {
switch (Random.nextInt(0, 50)) {
case 10:
Status = "Moving the Mouse";
Mouse.move(Random.nextInt(0, 700), Random.nextInt(0, 500));
break;
case 20:
Status = "Moving the Camera Angle";
Camera.setAngle(Random.nextInt(320, 20));
break;
case 30:
Status = "Moving the Camera Angle";
Camera.setAngle(Random.nextInt(20, 320));
break;
case 40:
Status = "Moving the Mouse";
Mouse.move(Random.nextInt(0, 700), Random.nextInt(0, 500));
break;
}
}
}
private Image getImage(String url) {
try {
return ImageIO.read(new URL(url));
} catch (IOException e) {
return null;
}
}
public void onRepaint(Graphics g1) {
TotalPriceLooted =
(PrMithOre*MithOre) +
(PrAdamOre*AdamOre) +
(PrLawRunes*LawRunes) +
(PrBloodRunes*BloodRunes) +
(PrDeathRunes*DeathRunes) +
(PrFireRunes*FireRunes) +
(PrRuneScimitar*RuneScimitar) +
(PrRuneShield*RuneShield) +
(PrTorstolSeed*TorstolSeed) +
(PrSnapdragonSeed*SnapdragonSeed) +
(PrWatermelonSeed*WatermelonSeed) +
(PrUncutDragonstone*UncutDragonstone) +
(Coins);
TotalPriceLootedInK = (TotalPriceLooted/1000);
int CashPrHr = (int) (Math.floor((TotalPriceLooted * 3000000D) / (System.currentTimeMillis() - StartTime))/1000);
long RunTime = System.currentTimeMillis() - StartTime;
int GainedXPConstitution = (Skills.getExperience(Skills.CONSTITUTION) - StartXPConstitution);
int GainedXPAttack = (Skills.getExperience(Skills.ATTACK) - StartXPAttack);
int GainedXPStrength = (Skills.getExperience(Skills.STRENGTH) - StartXPStrength);
int GainedXPDefense = (Skills.getExperience(Skills.DEFENSE) - StartXPDefense);
int GainedXPRange = (Skills.getExperience(Skills.RANGE) - StartXPRange);
int XPUntilConstitution = (Skills.getExperienceRequired(Skills.getLevel(Skills.CONSTITUTION)+1) - Skills.getExperience(Skills.CONSTITUTION));
int XPUntilAttack = (Skills.getExperienceRequired(Skills.getLevel(Skills.ATTACK)+1) - Skills.getExperience(Skills.ATTACK));
int XPUntilStrength = (Skills.getExperienceRequired(Skills.getLevel(Skills.STRENGTH)+1) - Skills.getExperience(Skills.STRENGTH));
int XPUntilDefense = (Skills.getExperienceRequired(Skills.getLevel(Skills.DEFENSE)+1) - Skills.getExperience(Skills.DEFENSE));
int XPUntilRange = (Skills.getExperienceRequired(Skills.getLevel(Skills.RANGE)+1) - Skills.getExperience(Skills.RANGE));
int CurLvlConstitution = Skills.getLevel(Skills.CONSTITUTION);
int CurLvlAttack = Skills.getLevel(Skills.ATTACK);
int CurLvlStrength = Skills.getLevel(Skills.STRENGTH);
int CurLvlDefense = Skills.getLevel(Skills.DEFENSE);
int CurLvlRange = Skills.getLevel(Skills.RANGE);
int PerHrConstitution = (int) Math.floor((GainedXPConstitution * 3600000D) / (System.currentTimeMillis() - StartTime));
int PerHrAttack = (int) Math.floor((GainedXPAttack * 3600000D) / (System.currentTimeMillis() - StartTime));
int PerHrStrength = (int) Math.floor((GainedXPStrength * 3000000D) / (System.currentTimeMillis() - StartTime));
int PerHrDefense = (int) Math.floor((GainedXPDefense * 3600000D) / (System.currentTimeMillis() - StartTime));
int PerHrRange = (int) Math.floor((GainedXPRange * 3000000D) / (System.currentTimeMillis() - StartTime));
int PercentToConstitution = Skills.getExperienceRequired(CurLvlConstitution+1) / XPUntilConstitution;
int PercentToAttack = Skills.getExperienceRequired(CurLvlAttack+1) / XPUntilAttack;
int PercentToStrength = Skills.getExperienceRequired(CurLvlStrength+1) / XPUntilStrength;
int PercentToDefense = Skills.getExperienceRequired(CurLvlDefense+1) / XPUntilDefense;
int PercentToRange = Skills.getExperienceRequired(CurLvlRange+1) / XPUntilRange;
Graphics2D g = (Graphics2D)g1;
// Draw Paint
g.drawImage(img, 6, 344, null);
// Draw Tabs
if (TabCombat==true)
g.setColor(new Color(0,0,0));
else
g.setColor(new Color(0,0,0,150));
g.fillRect(8, 346, 110, 28);
if (TabLoot==true)
g.setColor(new Color(0,0,0));
else
g.setColor(new Color(0,0,0,150));
g.fillRect(119, 346, 100, 28);
g.setColor(new Color(255,255,255));
g.setFont(title);
g.drawString("Combat Stats", 22, 363);
g.drawString("Loot Stats", 140, 363);
// TAB Combat
if (TabCombat==true) {
g.setColor(new Color(0,0,0));
g.fillRect(18, 418, 252, 5);
g.fillRect(18, 463, 252, 5);
g.setColor(color3);
g.setFont(body);
g.drawString(PerHrConstitution + "xp/hr", 18, 402);
g.drawString("Gained: " + GainedXPConstitution + "xp | " + PercentToConstitution + "% TNL ("+ (CurLvlConstitution+1) + ") " + XPUntilConstitution + "xp", 18, 414);
g.setColor(new Color(255,255,255));
g.fillRect(19, 419, ((250*PercentToConstitution)/100), 3);
g.setColor(color3);
if (ATTACK_STYLE=="Attack") {
g.drawString(PerHrAttack + "xp/hr", 18, 447);
g.drawString("Gained: " + GainedXPAttack + "xp | " + PercentToAttack + "% TNL ("+ (CurLvlAttack+1) + ") " + XPUntilAttack + "xp", 18, 459);
g.setColor(new Color(220,220,0));
g.fillRect(19, 464, ((250*PercentToAttack)/100), 3);
g.setColor(color3);
}
if (ATTACK_STYLE=="Strength") {
g.drawString(PerHrStrength + "xp/hr", 18, 447);
g.drawString("Gained: " + GainedXPStrength + "xp | " + PercentToStrength + "% TNL ("+ (CurLvlStrength+1) + ") " + XPUntilStrength + "xp", 18, 459);
g.setColor(new Color(220,20,20));
g.fillRect(19, 464, ((250*PercentToStrength)/100), 3);
g.setColor(color3);
}
if (ATTACK_STYLE=="Defense") {
g.drawString(PerHrDefense + "xp/hr", 18, 447);
g.drawString("Gained: " + GainedXPDefense + "xp | " + PercentToDefense + "% TNL ("+ (CurLvlDefense+1) + ") " + XPUntilDefense + "xp", 18, 459);
g.setColor(new Color(0,220,220));
g.fillRect(19, 464, ((250*PercentToDefense)/100), 3);
g.setColor(color3);
}
if (ATTACK_STYLE=="Range") {
g.drawString(PerHrRange + "xp/hr", 18, 447);
g.drawString("Gained: " + GainedXPRange + "xp | " + PercentToRange + "% TNL ("+ (CurLvlRange+1) + ") " + XPUntilRange + "xp", 18, 459);
g.setColor(new Color(0,110,30));
g.fillRect(19, 464, ((250*PercentToRange)/100), 3);
g.setColor(color3);
}
g.drawString(Time.format(RunTime), 350, 390);
g.drawString(""+FoodEaten, 365, 404);
g.drawString(""+BankWithdraws, 394, 418);
g.drawString(TotalPriceLootedInK+"k ("+CashPrHr+"k/hr) "+TotalPriceLooted+"gp", 328, 432);
g.drawString(Status, 290, 460);
g.setFont(title);
g.drawString("Constitution: " + CurLvlConstitution, 14, 390);
if (ATTACK_STYLE=="Attack") {
g.drawString("Attack: " + CurLvlAttack, 14, 436);
}
if (ATTACK_STYLE=="Strength") {
g.drawString("Strength: " + CurLvlStrength, 14, 436);
}
if (ATTACK_STYLE=="Defense") {
g.drawString("Defence: " + CurLvlDefense, 14, 436);
}
if (ATTACK_STYLE=="Range") {
g.drawString("Range: " + CurLvlRange, 14, 436);
}
g.drawString("RunTime:", 290, 390);
g.drawString("Food Eaten:", 290, 404);
g.drawString("Bank Withdraws:", 290, 418);
g.drawString("Cash:", 290, 432);
g.drawString("Script Status", 290, 446);
}
// TAB Stats
if (TabLoot==true) {
g.setFont(body);
g.drawString(BlueCharms + " Blue Charms", 18, 393);
g.drawString(CrimsonCharms + " Crimson Charms", 18, 407);
g.drawString(GreenCharms + " Green Charms", 18, 421);
g.drawString(GoldCharms + " Gold Charms", 18, 435);
g.drawString(RuneShield + " Rune Shields", 18, 449);
g.drawString(RuneScimitar + " Rune Scimitars", 18, 463);
g.drawString(MithOre + " Mithril Ore", 180, 393);
g.drawString(AdamOre + " Adamanite Ore", 180, 407);
g.drawString(LawRunes + " Law Runes", 180, 421);
g.drawString(DeathRunes + " Death Runes", 180, 435);
g.drawString(BloodRunes + " Blood Runes", 180, 449);
g.drawString(FireRunes + " Fire Runes", 180, 463);
g.drawString(TorstolSeed + " Torstol Seeds", 320, 393);
g.drawString(SnapdragonSeed + " Snapdragon Seeds", 320, 407);
g.drawString(WatermelonSeed + " Watermelon Seeds", 320, 421);
g.drawString(MagicSeed + " Magic Seeds", 320, 435);
g.drawString(UncutDragonstone + " Uncut Dragonstone", 320, 449);
g.drawString(Coins + " Coins", 320, 463);
}
// Draw mouse
if (System.currentTimeMillis() - Mouse.getPressTime() < 300)
g.setColor(new Color(255,255,255));
else
g.setColor(new Color(255,255,255,80));
g.drawLine(Mouse.getLocation().x - 7, Mouse.getLocation().y + 1, Mouse.getLocation().x + 7, Mouse.getLocation().y + 1);
g.drawLine(Mouse.getLocation().x + 1, Mouse.getLocation().y - 7,Mouse.getLocation().x + 1, Mouse.getLocation().y + 7);
g.drawLine(Mouse.getLocation().x - 7, Mouse.getLocation().y - 1, Mouse.getLocation().x + 7, Mouse.getLocation().y - 1);
g.drawLine(Mouse.getLocation().x - 1, Mouse.getLocation().y - 7,Mouse.getLocation().x - 1, Mouse.getLocation().y + 7);
g.setColor(new Color(0,0,0));
g.drawLine(Mouse.getLocation().x - 7, Mouse.getLocation().y, Mouse.getLocation().x + 7, Mouse.getLocation().y);
g.drawLine(Mouse.getLocation().x, Mouse.getLocation().y - 7,Mouse.getLocation().x, Mouse.getLocation().y + 7);
g.fillOval(Mouse.getLocation().x - 2, Mouse.getLocation().y - 2, 4, 4);
}
@Override
public void mouseClicked(MouseEvent e) {
p = e.getPoint();
if (RecTabCombat.contains(p) && !TabCombat) {
TabCombat = true;
TabLoot = false;
}
if (RecTabLoot.contains(p) && !TabLoot) {
TabLoot = true;
TabCombat = false;
}
}
@Override
public void mousePressed(MouseEvent e) {}
@Override
public void mouseReleased(MouseEvent e) {}
@Override
public void mouseEntered(MouseEvent e) {}
@Override
public void mouseExited(MouseEvent e) {}
//GUI credit to SeyreZ
@SuppressWarnings("serial")
public class JustRoachesGUI extends JFrame {
public JustRoachesGUI() {
initComponents();
}
private void okButtonActionPerformed(ActionEvent e) {
String f = foodid.getSelectedItem().toString();
if (f.equals("Lobster")) {
FOOD_ID = 379;
} else if (f.equals("Monkfish")) {
FOOD_ID = 7946;
} else if (f.equals("Shark")) {
FOOD_ID = 385;
} else if (f.equals("Rocktail")) {
FOOD_ID = 15272;
} else if (f.equals("Tuna")) {
FOOD_ID = 361;
} else if (f.equals("Swordfish")) {
FOOD_ID = 373;
} else if (f.equals("Bass")) {
FOOD_ID = 365;
} else if (f.equals("Manta Ray")) {
FOOD_ID = 391;
}
String a = combatStyle.getSelectedItem().toString();
if (a.equals("Attack")) {
ATTACK_STYLE = "Attack";
} else if (a.equals("Strength")) {
ATTACK_STYLE = "Strength";
} else if (a.equals("Defense")) {
ATTACK_STYLE = "Defense";
} else if (a.equals("Range")) {
ATTACK_STYLE = "Range";
}
String w = withdraw.getSelectedItem().toString();
if (w=="5") {
WITHDRAW_AMT = 5;
} else if (w=="10") {
WITHDRAW_AMT = 10;
} else if (w=="15") {
WITHDRAW_AMT = 15;
} else if (w=="20") {
WITHDRAW_AMT = 20;
}
String h = eatpercent.getSelectedItem().toString();
if (h=="85") {
EAT_PERCENT = (int) 8.5;
} else if (h=="80") {
EAT_PERCENT = 8;
} else if (h=="75") {
EAT_PERCENT = (int) 7.5;
} else if (h=="70") {
EAT_PERCENT = 7;
} else if (h=="65") {
EAT_PERCENT = (int) 6.5;
} else if (h=="60") {
EAT_PERCENT = 6;
} else if (h=="55") {
EAT_PERCENT = (int) 5.5;
} else if (h=="50") {
EAT_PERCENT = 5;
} else if (h=="45") {
EAT_PERCENT = (int) 4.5;
} else if (h=="40") {
EAT_PERCENT = 4;
}
log.info("Starting Script");
setVisible(false);
guiRunning = false;
dispose();
}
private void initComponents() {
dialogPane = new JPanel();
contentPanel = new JPanel();
tabs = new JTabbedPane();
settingspanel = new JPanel();
combatStyle = new JComboBox();
label2 = new JLabel();
label3 = new JLabel();
foodid = new JComboBox();
label4 = new JLabel();
withdraw = new JComboBox();
label5 = new JLabel();
eatpercent = new JComboBox();
label6 = new JLabel();
lootpanel = new JPanel();
label1 = new JLabel();
buttonBar = new JPanel();
okButton = new JButton();
setResizable(false);
Container contentPane = getContentPane();
contentPane.setLayout(new BorderLayout());
{
dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));
dialogPane.setLayout(new BorderLayout());
{
contentPanel.setLayout(null);
{
tabs.setFont(tabs.getFont().deriveFont(tabs.getFont().getStyle() | Font.BOLD));
{
settingspanel.setBackground(Color.white);
settingspanel.setLayout(null);
combatStyle.setModel(new DefaultComboBoxModel(new String[] {
"Attack",
"Strength",
"Defense",
"Range"
}));
settingspanel.add(combatStyle);
combatStyle.setBounds(185, 15, 120, combatStyle.getPreferredSize().height);
label2.setText("Combat Style");
settingspanel.add(label2);
label2.setBounds(15, 15, 180, 20);
label3.setText("Food to Eat");
settingspanel.add(label3);
label3.setBounds(15, 55, 180, 20);
foodid.setModel(new DefaultComboBoxModel(new String[] {
"Lobster",
"Swordfish",
"Shark",
"Monkfish",
"Rocktail",
"Manta Ray",
"Tuna",
"Bass"
}));
settingspanel.add(foodid);
foodid.setBounds(185, 55, 120, 20);
label4.setText("Withdraw Amount");
settingspanel.add(label4);
label4.setBounds(15, 95, 180, 20);
withdraw.setModel(new DefaultComboBoxModel(new String[] {
"5",
"10",
"15",
"20"
}));
settingspanel.add(withdraw);
withdraw.setBounds(240, 95, 65, 20);
label5.setText("Eat at Health%");
settingspanel.add(label5);
label5.setBounds(15, 135, 180, 20);
eatpercent.setModel(new DefaultComboBoxModel(new String[] {
"85",
"80",
"75",
"70",
"65",
"60",
"55",
"50",
"45",
"40"
}));
settingspanel.add(eatpercent);
eatpercent.setBounds(240, 135, 65, 20);
label6.setText("60% is best");
label6.setFont(label6.getFont().deriveFont(label6.getFont().getStyle() | Font.ITALIC, label6.getFont().getSize() - 1f));
settingspanel.add(label6);
label6.setBounds(175, 135, 65, 20);
{
Dimension preferredSize = new Dimension();
for(int i = 0; i < settingspanel.getComponentCount(); i++) {
Rectangle bounds = settingspanel.getComponent(i).getBounds();
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
}
Insets insets = settingspanel.getInsets();
preferredSize.width += insets.right;
preferredSize.height += insets.bottom;
settingspanel.setMinimumSize(preferredSize);
settingspanel.setPreferredSize(preferredSize);
}
}
tabs.addTab("Settings", settingspanel);
{
lootpanel.setBackground(Color.white);
lootpanel.setLayout(null);
{
Dimension preferredSize = new Dimension();
for(int i = 0; i < lootpanel.getComponentCount(); i++) {
Rectangle bounds = lootpanel.getComponent(i).getBounds();
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
}
Insets insets = lootpanel.getInsets();
preferredSize.width += insets.right;
preferredSize.height += insets.bottom;
lootpanel.setMinimumSize(preferredSize);
lootpanel.setPreferredSize(preferredSize);
}
}
tabs.addTab("Loot Options", lootpanel);
}
contentPanel.add(tabs);
tabs.setBounds(0, 35, 320, 205);
label1.setText("JustRoaches GUI");
label1.setFont(new Font("Verdana", Font.BOLD, 26));
contentPanel.add(label1);
label1.setBounds(new Rectangle(new Point(40, -5), label1.getPreferredSize()));
{
Dimension preferredSize = new Dimension();
for(int i = 0; i < contentPanel.getComponentCount(); i++) {
Rectangle bounds = contentPanel.getComponent(i).getBounds();
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
}
Insets insets = contentPanel.getInsets();
preferredSize.width += insets.right;
preferredSize.height += insets.bottom;
contentPanel.setMinimumSize(preferredSize);
contentPanel.setPreferredSize(preferredSize);
}
}
dialogPane.add(contentPanel, BorderLayout.CENTER);
{
buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0));
buttonBar.setLayout(new GridBagLayout());
((GridBagLayout)buttonBar.getLayout()).columnWidths = new int[] {0, 80};
((GridBagLayout)buttonBar.getLayout()).columnWeights = new double[] {1.0, 0.0};
okButton.setText("Start Script");
okButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
okButtonActionPerformed(e);
}
});
buttonBar.add(okButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
new Insets(0, 0, 0, 0), 0, 0));
}
dialogPane.add(buttonBar, BorderLayout.SOUTH);
}
contentPane.add(dialogPane, BorderLayout.CENTER);
pack();
setLocationRelativeTo(getOwner());
}
private JPanel dialogPane;
private JPanel contentPanel;
private JTabbedPane tabs;
private JPanel settingspanel;
private JComboBox combatStyle;
private JLabel label2;
private JLabel label3;
private JComboBox foodid;
private JLabel label4;
private JComboBox withdraw;
private JLabel label5;
private JComboBox eatpercent;
private JLabel label6;
private JPanel lootpanel;
private JLabel label1;
private JPanel buttonBar;
private JButton okButton;
}
}
sorry if it was jsut a spamm or anytthing its one of the powerbot scripts so idk if it could hlep you with the double item picking up and shit buti tried? :)
You should make it go down another floor, there are more roaches and less bots :)
I got the banking to work, but something weird happens after that. Take a look:
Edit: now I'm stuck atQuote:
[0:00:40]: Player ready, starting loop
[0:00:40]: Current Loc: Bank
[0:01:24]: Found Banker at: (130, 144)
[0:01:31]: Attempt[1]: Banking
[0:01:31]: ___________________________________
[0:01:31]: / \
[0:01:31]: || Mormonman's Roached v0.6 ||
[0:01:31]: || - Running: 00:01:31 ||
[0:01:31]: || - Players: 1 ||
[0:01:31]: || - Active: 1 ||
[0:01:31]: || - Total Kills: 0 ||
[0:01:31]: || - Total Pickups: 0 ||
[0:01:31]: || Time until switch: 00:16:28 ||
[0:01:31]: || Current Player: 0 ||
[0:01:31]: ||___________________________________||
[0:01:31]: || ||
[0:01:31]: || * Player[0]: True ||
[0:01:31]: || - Time: 00:00:55 ||
[0:01:31]: || - Kills: 0 ||
[0:01:31]: || - Pickups: 0 ||
[0:01:31]: || - Banks: 0 ||
[0:01:31]: || - Eats: 0 ||
[0:01:31]: || - Loc: Bank ||
[0:01:31]: \___________________________________/
[0:01:31]: Attempt[2]: Banking
[0:01:31]: Antiban - Random Mouse
[0:01:31]: Attempt[3]: Banking
[0:01:31]: Attempt[4]: Banking
[0:01:31]: Attempt[5]: Banking
[0:01:31]: Attempt[6]: Banking
[0:01:31]: Attempt[7]: Banking
[0:01:31]: Antiban - Random Mouse
[0:01:32]: Attempt[8]: Banking
[0:01:32]: Attempt[9]: Banking
[0:01:32]: Attempt[10]: Banking
[0:01:35]: ___________________________________
[0:01:35]: / \
[0:01:35]: || Mormonman's Roached v0.6 ||
[0:01:35]: || - Running: 00:01:35 ||
[0:01:35]: || - Players: 1 ||
[0:01:35]: || - Active: 0 ||
[0:01:35]: || - Total Kills: 0 ||
[0:01:35]: || - Total Pickups: 0 ||
[0:01:35]: || Time until switch: 00:00:00 ||
[0:01:35]: || Current Player: 0 ||
[0:01:35]: ||___________________________________||
[0:01:35]: || ||
[0:01:35]: || * Player[0]: False ||
[0:01:35]: || - Time: 00:00:59 ||
[0:01:35]: || - Kills: 0 ||
[0:01:35]: || - Pickups: 0 ||
[0:01:35]: || - Banks: 0 ||
[0:01:35]: || - Eats: 0 ||
[0:01:35]: || - Loc: Bank ||
[0:01:35]: \___________________________________/
[0:01:35]: Successfully executed.
Quote:
[0:00:49]: Next switch in: 17m 19s
[0:00:49]: Player ready, starting loop
[0:00:49]: Current Loc: Bank
buggy most times... u can get attacked by 2 roaches
could somebody fix this up, the charm rate is brilliant here
it works
thanks :D
It wont go down hole for me =S
yesterday it went down but now it doesnt.....
yo i was wondering if there was a way for it to not pick up any items at all. I set it to False for item pickup but it still does it. i'm in f2p and i dont want it to eat just for crappy drops. oh and i told it to join world 38 but it picks whatever world it wants
I was using this, and I'm going to describe what happened as best as possible:
If I started in the bank, it had no clue what to do, and would just log me out.
If I started at the roaches, it'd kill one roach, then (I had debug on) SMART would keep "looking" at the roach (Large pink box with a smaller green box would go around a roach and follow it around. It'd never click, though.)
In the debug box of Simba, it'd say Found Roach at: (coordinates, I didn't c/p it because it happened last night.) It'd never fight, though. I'd just stand there after killing the first roach. I tried disabling SMART, attacking a roach, and re-enabling SMART, but it still wouldn't catch on. There was nothing useful in the debug box because it wouldn't self-terminate. It'd just keep looking at the damn roach.
Also, something somewhat more minor, SMART ran very laggily when I used this script, even with the FPS bar as high as possible. Not sure what that's about, but I think it could have something to do with the incessant looking at the roach. The boxes would blink, I'm assuming because they were redrawn every frame.
I hope this was helpful.
From what I saw and read, though, this script looks pretty fucking awesome. Nice work.
Also, I was wondering if it's possible your script uses a different version of SRL than my Simba has updated to which is causing some of my problems. I'm on the latest versions as of June 29th, and I notice your script was written some time before now.
Computer is all setup, time to fix some colors for this script :) Oh and some small logic for the item picking up.
will test out when you release,cant wait need me some crim charms!
Alright, so the script runs smoothly with 1 exception that I've noticed. I'm not sure if it's just me or what.
It doesn't seem to recognize any food.
I'm f2p and can't get shark, and when I tried swordfish or lobster, it doesn't recognize either food. I'm not sure if it is a change by jagex or a small error in the code. or it could just be my stupidity.
I know about 0 about coding and I'm a leecher in all honesty. But if there is something I'm missing that is causing this banking error, I'd love to know
I'm using V0.6
Ok, update finally rolled out. I haven't changed the food yet, but if people still have lots of issues I will do that next update.
its a little buggy on click the soilders and picking up items...its kinda slow bout clicking them or its kinda off.... but other then that its good script =)
would be nice to do less runnign around and more killing =)
Add option on how many food it withdraws ....also maybe add sharks =)
keeps shutting down as its walking to the hole there is a breife moment were game is loading then it
[0:00:23]: ___________________________________
[0:00:23]: / \
[0:00:23]: || Mormonman's Roached v0.8 ||
[0:00:23]: || - Running: 00:00:23 ||
[0:00:23]: || - Players: 1 ||
[0:00:23]: || - Active: 0 ||
[0:00:23]: || - Total Kills: 0 ||
[0:00:23]: || - Total Pickups: 0 ||
[0:00:23]: || Time until switch: 00:00:00 ||
[0:00:23]: || Current Player: 0 ||
[0:00:23]: ||___________________________________||
[0:00:23]: || ||
[0:00:23]: || * Player[0]: False ||
[0:00:23]: || - Time: 00:00:22 ||
[0:00:24]: || - Kills: 0 ||
[0:00:24]: || - Pickups: 0 ||
[0:00:24]: || - Banks: 0 ||
[0:00:24]: || - Eats: 0 ||
[0:00:24]: || - Loc: Bank ||
[0:00:24]: \___________________________________/
[0:00:24]: Exception in Script: The bitmap[4] does not exist
The following bitmaps were not freed: [5]