-This Script Will Buy Oranges For 20 gp And Sell Them For 800gp (300k+/ Per Hour)
Includes
-Little Money (30k Will Run For 12+ Hours ) To Start And No Requirements!!!
-Auto Updater
-Flawless
-AntiBan
~Thanks~
Rev
-This Is P2P Only Sorry For Not Posting That
Not Sure If The Script Currently Works. I Was Having Trouble Talking To The Barman. So Anyone Can Continue As I Will Not Be Updating (If I Do It Wont Be For A While Because I Have Exams)
-Will Be Finishing Tomorrow!
//Thanks To TragiKs For Helping
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.Script;
import org.rsbot.script.methods.Inventory;
import org.rsbot.script.methods.Bank;
import org.rsbot.script.wrappers.RSNPC;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSTile;
import org.rsbot.script.wrappers.RSComponent;
import org.rsbot.script.wrappers.RSInterface;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
@ScriptManifest(authors = { "Rev" }, keywords = { "Orange Buyer" }, name = "Orange Buyer", version = 1.1, description = "Buy's Oranges At Tree Gnome Village")
public class OrangeBuyer extends Script {
//int
private int orange = 2108;
private int Barman = 849;
private int coins = 995;
private RSTile[] toBar = { new RSTile(2449, 3486), new RSTile(2464, 3495), new RSTile(2479, 3488) };
//updates the script
public boolean updateScript() {
URLConnection url;
BufferedReader in;
BufferedWriter out = null;
try {
url = new URL("letstalktechshow.com/powerbot/OrangeVer.txt")
.openConnection();
in = new BufferedReader(new InputStreamReader(url.getInputStream()));
if (Double.parseDouble(in.readLine()) > getVersion()) {
if (JOptionPane.showConfirmDialog(null,
"Update found. Do you want to update?") == 0) {
JOptionPane
.showMessageDialog(null,
"Please choose GESnipe.java in your scripts folder and hit Open");
JFileChooser fc = new JFileChooser();
if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
url = new URL(
"letstalktechshow.com/powerbot/OrangeBuyer.java")
.openConnection();
in = new BufferedReader(new InputStreamReader(url
.getInputStream()));
out = new BufferedWriter(new FileWriter(fc
.getSelectedFile().getPath()));
String inp;
while ((inp = in.readLine()) != null) {
out.write(inp);
out.newLine();
out.flush();
}
log("Script successfully downloaded. Please recompile and reload your scripts!");
return false;
} else
log("Update canceled");
} else
log("Update canceled");
} else if (in != null)
in.close();
if (out != null)
out.close();
} catch (IOException e) {
log("Problem getting version :/");
return false;
}
return true;
}
private double getVersion(){
return 1.1;
}
//OnStart
public boolean onStart(){
mouse.setSpeed(random(4, 7));
log("Script Starting");
return true;
}
public int loop(){
if (inventory.isFull()) {
RSObject booth = objects.getNearest(Bank.BANK_BOOTHS);
if (booth == null || !booth.isOnScreen()) {
if (shouldWalk()) {
walking.walkPathMM(walking.reversePath(toBar));
//antiban();
}
} else if (!bank.isOpen()) {
bank.open();
} else {
bank.depositAllExcept(coins);
sleep(random(200, 600));
}
} else {
RSNPC barman = npcs.getNearest(Barman);
if (barman == null || !barman.isOnScreen()) {
if (shouldWalk()) {
walking.walkPathMM(toBar);
if(random(1, 12) == 3) {
antiBan();
}
}
} else if (barman.isOnScreen() && !getMyPlayer().isMoving()) {
if (barman.doAction("Talk-to")) {
sleep(random(1000,1700));
talkBarman();
}
}
}
return random(100, 200);
}
private boolean shouldWalk() {
if (game.getEnergy() >= random(55,62) && walking.isRunEnabled() == false) {
walking.setRun(true);
sleep(1000);
}
return (walking.getDestination() == null || calc.distanceTo(walking.getDestination()) < 7);
}
private void talkBarman() {
if (interfaces.get(137).getComponent(0).containsText("Click here to continue")) {
interfaces.clickContinue(); {
sleep(random(450, 600));
}
}
else if (interfaces.get(137).getComponent(0).containsText("Can I buy some ingredients?")){
interfaces.getComponent(137, 0).doClick(true); {
sleep(random(450, 600));
}
} if (interfaces.get(137).getComponent(0).containsText("Click here to continue")) {
interfaces.clickContinue(); {
sleep(random(450, 600));
}
} else {
if (interfaces.get(137).getComponent(0).containsText("Click here to continue")) {
interfaces.clickContinue(); {
sleep(random(1000, 1500));
}
} else if (interfaces.get(137).getComponent(0).containsText("An orange")){
interfaces.getComponent(137, 0).doClick(true);
sleep(random(450, 600));
}else if (interfaces.get(137).getComponent(0).containsText("Click here to continue")) {
interfaces.clickContinue(); {
sleep(random(450, 600));
}
} else if (interfaces.get(137).getComponent(0).containsText("Click here to continue")) {
interfaces.clickContinue(); {
sleep(random(450, 600));
}
}
}
}
private void antiBan() {
int r = random(0, 34);
switch(r) {
case 3:
mouse.moveSlightly();
sleep(random(400,700));
break;
case 7:
game.openTab(game.TAB_STATS);
sleep(random(6000, 7000));
game.openTab(game.TAB_INVENTORY);
break;
case 13:
mouse.moveOffScreen();
sleep(random(8000, 9000));
break;
case 14:
camera.moveRandomly(random(750,875));
sleep(random(1000, 2000));
break;
case 16:
game.openTab(game.TAB_MAGIC);
sleep(random(7000, 8000));
game.openTab(game.TAB_INVENTORY);
break;
case 17:
sleep(random(3000, 4000));
break;
case 18:
mouse.moveOffScreen();
sleep(random(6000, 9000));
break;
}
}
public void onFinish(){
log("Thanks For Using Rev's Orange Buyer");
}
}
v 1.2 (soon) GUI Finish Talking Bug, Add Paint v 1.1 Added Auto Updater, Anti-Ban v 1 Release










Back to top
