Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

TheGreatests

Java Lifetime Sponsor
  • Joined

  • Last visited

Everything posted by TheGreatests

  1. Basically making myself a method to validate the banker being on screen. I deleted that, now the big problem couldnt you also do if(Banker !=null { NotThere = false; return sA....blah blah && NotThere = true; Anyways, im having issues with a null pointer check on the webEvent.execute(); method... you ever use it to run to banks? What I did instead of the event walker - @SuppressWarnings("unused") public class Bank extends Node { Data data = new Data(); NPC banker = sA.npcs.closest(395); public Bank(Script sA) { super(sA); // TODO Auto-generated constructor stub } private void MoveToZone(Area zone) throws InterruptedException { sA.walking.webWalk(zone.getRandomPosition()); } public boolean validate() throws InterruptedException{ //// Checking if inventory is full, and if so, is our player in the bank or not return sA.inventory.isFull() && !data.EBank.contains(sA.players.myPosition()); } public boolean execute() throws InterruptedException { sA.settings.setRunning(true); MoveToZone(Banks.EDGEVILLE);
  2. Banking works very good, just having issues with the bank node. Lines 26 which is the return in the validation boolean. Ahh null checker on Banker! How? Lovely now, im getting a null pointer on webWalk event.. Should I store the variable with a int, and then call it !(banker != null)
  3. Hello All, figure I would share my fisher to the public. Some strange reason I am lagging out, and the nodes dont seem to execute at all. I had it picking salmon but after full inventory it laggs out. Loot Node: package GreatestFisher; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.script.Script; import Scripts.Node; import data.Data; public class Loot extends Node { public void getTypeAndLog(GroundItem items){ caller.log = ("[Debug] ground type: " + items.getName() + ("picking up...")); } Data d = new Data(); FishNLoot caller = new FishNLoot(); GroundItem item = sA.groundItems.closest(331); GroundItem item2 = sA.groundItems.closest(335); public Loot(Script sA) { super(sA); // TODO Auto-generated constructor stub } public boolean validate() throws InterruptedException{ //item.interact("Take"); return item !=null && !sA.inventory.isFull() && d.FishingSpot.contains(sA.players.myPosition()) ; } public boolean execute() throws InterruptedException { caller.log = "Looting!"; if(item !=null && item.isOnScreen()){ caller.log = "We are picking up " +item.getName(); item.interact("Take"); } else{ sA.camera.toEntity(item); } if(item2 !=null && item2.isOnScreen()){ caller.log = "We are picking up " +item.getName(); item2.interact("Take"); getTypeAndLog(item); } else{ sA.camera.toEntity(item2); } return false; } } FishNLoot main : package GreatestFisher; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.lang.Thread.State; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.osbot.rs07.api.Inventory; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import Scripts.Node; import data.Data; @ScriptManifest(author = "Elvitos Fisher", info = "Fishes+Loots", name = "Fishing and Loot", version = .1, logo = "Loots while fishing") public class FishNLoot extends Script{ public static Data data; //private SettingsGUI gui; public long OresTransfeered; public long startTime; public String status; public String log; private Inventory inv; private long elapsed; private boolean isRunning = false; private List<Node> nodes = new ArrayList<Node>(); public void onStart() { //createGUI(); isRunning = true; Collections.addAll(nodes, new Loot(this), new Fish(this), new Banking(this), new Bank(this)); //new ClayMine(this) If you want to add the mining clay //various checks to see if show the gui yet Thread runTimeThread = new Thread() { @[member=Override] public void run() { try { RunTime(); } catch (Exception e) { log(e.getMessage()); } } }; runTimeThread.start(); } public int onLoop() throws InterruptedException{ for (Node n : nodes){ if(n.validate()){ status = n.status(); if(n.execute()) { return random(200,400); } } } return random(250,400); } @SuppressWarnings("unused") private void createGUI() { // TODO Auto-generated method stub //code for the GUI } @SuppressWarnings("unused") private State getState() { return null; } @[member=Override] public void onExit() { isRunning = false; log("Thanks for running the script!"); } public final String formatTime(final long ms){ long s = ms / 1000, m = s / 60, h = m / 60; s %= 60; m %= 60; h %= 24; return String.format("%02d:%02d:%02d", h, m, s); } private void RunTime() throws InterruptedException { long startTime = System.currentTimeMillis(); while(isRunning) { elapsed = (System.currentTimeMillis() - startTime); sleep(1000); } } private String GetRunTime() { long hours = (elapsed / (1000 * 60 * 60)) % 24; long minutes = (elapsed / (1000 * 60)) % 60; long seconds = (elapsed / 1000) % 60; return String.format("%02d:%02d:%02d", hours, minutes, seconds); } @[member=Override] public void onPaint(Graphics2D g) { int x = getMouse().getPosition().x; int y = getMouse().getPosition().y; g.drawLine(0, y, 765, y); g.drawLine(x, 0, x, 503); DrawUpdate(g); } private void DrawUpdate(Graphics2D g) { g.setColor(new Color(0, 0, 0, 80)); g.fillRect(4, 280, 512, 58); g.setColor(Color.white); g.setFont(new Font("Consolas", Font.PLAIN, 12)); //g.drawString("Mule trader script by Elvito!", 10, 40); g.drawString("Status " + status, 10, 55); g.drawString("log " + log, 20, 371); @SuppressWarnings("unused") final long runTime = System.currentTimeMillis() - startTime; g.setColor(Color.GREEN); g.drawString("RunTime: " + GetRunTime(), 16, 325); OresTransfeered =+ inv.getAmount(435); g.drawString("Ores traded " + OresTransfeered, 561, 449); } } fish node: package GreatestFisher; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.lang.Thread.State; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.osbot.rs07.api.Inventory; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import Scripts.Node; import data.Data; @ScriptManifest(author = "Elvitos Fisher", info = "Fishes+Loots", name = "Fishing and Loot", version = .1, logo = "Loots while fishing") public class FishNLoot extends Script{ public static Data data; //private SettingsGUI gui; public long OresTransfeered; public long startTime; public String status; public String log; private Inventory inv; private long elapsed; private boolean isRunning = false; private List<Node> nodes = new ArrayList<Node>(); public void onStart() { //createGUI(); isRunning = true; Collections.addAll(nodes, new Loot(this), new Fish(this), new Banking(this), new Bank(this)); //new ClayMine(this) If you want to add the mining clay //various checks to see if show the gui yet Thread runTimeThread = new Thread() { @[member=Override] public void run() { try { RunTime(); } catch (Exception e) { log(e.getMessage()); } } }; runTimeThread.start(); } public int onLoop() throws InterruptedException{ for (Node n : nodes){ if(n.validate()){ status = n.status(); if(n.execute()) { return random(200,400); } } } return random(250,400); } @SuppressWarnings("unused") private void createGUI() { // TODO Auto-generated method stub //code for the GUI } @SuppressWarnings("unused") private State getState() { return null; } @[member=Override] public void onExit() { isRunning = false; log("Thanks for running the script!"); } public final String formatTime(final long ms){ long s = ms / 1000, m = s / 60, h = m / 60; s %= 60; m %= 60; h %= 24; return String.format("%02d:%02d:%02d", h, m, s); } private void RunTime() throws InterruptedException { long startTime = System.currentTimeMillis(); while(isRunning) { elapsed = (System.currentTimeMillis() - startTime); sleep(1000); } } private String GetRunTime() { long hours = (elapsed / (1000 * 60 * 60)) % 24; long minutes = (elapsed / (1000 * 60)) % 60; long seconds = (elapsed / 1000) % 60; return String.format("%02d:%02d:%02d", hours, minutes, seconds); } @[member=Override] public void onPaint(Graphics2D g) { int x = getMouse().getPosition().x; int y = getMouse().getPosition().y; g.drawLine(0, y, 765, y); g.drawLine(x, 0, x, 503); DrawUpdate(g); } private void DrawUpdate(Graphics2D g) { g.setColor(new Color(0, 0, 0, 80)); g.fillRect(4, 280, 512, 58); g.setColor(Color.white); g.setFont(new Font("Consolas", Font.PLAIN, 12)); //g.drawString("Mule trader script by Elvito!", 10, 40); g.drawString("Status " + status, 10, 55); g.drawString("log " + log, 20, 371); @SuppressWarnings("unused") final long runTime = System.currentTimeMillis() - startTime; g.setColor(Color.GREEN); g.drawString("RunTime: " + GetRunTime(), 16, 325); OresTransfeered =+ inv.getAmount(435); g.drawString("Ores traded " + OresTransfeered, 561, 449); } } Banking Node: package GreatestFisher; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import Scripts.Node; import data.Data; public class Banking extends Node { FishNLoot caller = new FishNLoot(); NPC banker = sA.npcs.closest(395); Data supply = new Data(); public Banking(Script sA) { super(sA); // TODO Auto-generated constructor stub } public boolean validate() throws InterruptedException{ return banker!=null && banker.isOnScreen(); } public boolean execute() throws InterruptedException{ if(sA.bank.isOpen()){ sA.bank.depositAllExcept(supply.F_equipment); } else{ } sA.bank.open(); caller.log ="Banking"; return false; } } Bank node: package GreatestFisher; import org.osbot.rs07.api.Players; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.event.WebWalkEvent; import org.osbot.rs07.script.Script; import Scripts.Node; import data.Data; import nodes.Wait; @SuppressWarnings("unused") public class Bank extends Node { private Data data; NPC banker = sA.npcs.closest(395); public Bank(Script sA) { super(sA); // TODO Auto-generated constructor stub } public boolean validate() throws InterruptedException{ //// Checking if inventory is full, and if so, is our player in the bank or not return sA.inventory.isFull() && !data.EBank.contains(sA.players.myPosition()) && !banker.isOnScreen(); } public boolean execute() throws InterruptedException { sA.settings.setRunning(true); WebWalkEvent webEvent = new WebWalkEvent(Banks.EDGEVILLE); webEvent.execute(); return false; } } Node class: package Scripts; import org.osbot.rs07.script.Script; public abstract class Node { public Script sA; public Node(Script sA){ this.sA = sA; } public String status(){ return ""; } public abstract boolean validate() throws InterruptedException; public abstract boolean execute() throws InterruptedException; } Any help at all would be amazing. Im lagging out soon as inventory is full. I used Dunks Path maker for the area. When I exported the jar, i included my Data constant class, and my Node.java class also.
  4. So what "public void interactCustom(Entity entity, String action){ if(entity.isVisible()) entity.interact(action); else getCamera().toEntity(entity); }" Is basically doing is clicking it no matter what. I am assuming or could you maybe go into more depth of each parameter and its purpose. This method passes a string called action to it using entity. So its basically clicking it right?
  5. Are you using proxies, if so which ones may I ask?
  6. if you wanna teamviewer i'll help you out bro, or give me the script and i'll work on it.
  7. Well what I am looking to do is calculate that if surrounding players is more then 3, to either hop or move to the next rock... int Tomuch = 3; the thing is, I cant do <=, or >= for (Player player : getPlayers().getAll()) { ///////Calculating players around if(player.equals(Tomuch)){ //hop //walktootherrock } } Could I use this?? for (Player player : getPlayers().getAll()) { ///////Calculating players around if(player.getIndex() <=2){ //do something } }
  8. Try this int barsToBuy; barsToBuy = getInventory().getAmount("Coins") / 100); Honestly bro, I am pretty new to this all over again. im trying to figure out how to calculate all players around me and if the players are more then 3, to hop worlds.
  9. yup I did, doesnt buy stuff from aubury
  10. You're using getamount wrong.
  11. Everytime I start her up shes lagging me out. I guess I can make myself one. hopefully its not 2 hard
  12. Well, tyvm MR.Abuse!
  13. Just wondering if anyone has implemented this in their script. Would like to use for my miner
  14. yup, I got it . Now onto determining how to calculate players around me... lol anyone help me out with that one. Im in the blind with this af!
  15. How would I code a path, so it walks a path in the walking. method
  16. Ive tried alot of things so I decided to try just walking the path. here is my set up, exactly like how it was posted in the tutorials however. I am getting a erro private Position[] path = { new Position(3183, 3431, 0), new Position(3177, 3429, 0), new Position(3171, 3426, 0), new Position(3172, 3416, 0), new Position(3171, 3404, 0), new Position(3173, 3395, 0), new Position(3177, 3388, 0), new Position(3179, 3381, 0), new Position(3182, 3375, 0) }; Then using getWalking().walkPath(path); But its wanting me to change it to .walk, and then when I change it to walk. it wants me to do other stupid shit. any help?
  17. ArrayList<Position> path = new ArrayList<Position>(); path.add(new Position(3253,3420,0)); path.add(new Position(3253,3426,0)); path.add(new Position(3246,3429,0)); path.add(new Position(3240,3429,0)); path.add(new Position(3234,3430,0)); path.add(new Position(3227,3429,0)); path.add(new Position(3222,3429,0)); path.add(new Position(3215,3429,0)); path.add(new Position(3208,3429,0)); path.add(new Position(3201,3428,0)); path.add(new Position(3194,3429,0)); path.add(new Position(3186,3429,0)); path.add(new Position(3182,3434,0)); Is giving me a error, multiple markers at this line.. I remember back when another api was around I used a similar path adding system like this. How do you add a path to just a list and then execute that path. Web walking is messing up my path badly. Ive been trying to add a alternative separate path but I dont exactly remember how I did it before. NVM -_- theres a fucking tutorial for walking paths and my brain dead ass completely missed it.
  18. im getting abunch of errors.
  19. Do a while loop in there, or a if loop. Example if(BarsToBuy=(int) (getInventory().get... !=null{ get item }
  20. Sounds good!, i'll let you know. I'll have a look into it again. Just got back after a few weeks and am already going overboard lol. Anyways, would you happen to know where I could exchange the BTC I have for the credits needed for sponsorship. I have the cash in BTC, however you guys dont accept this payment.. This payment personally I think is the best payment as its nearly right in your hands.
  21. Thank you very much, i am gonna be buying lifetime sponsorship shortly, and then really pushing some work into it. I use to script back in 2012-13, and lost nearly everything ive learned. Was the first to publish a tab-maker on the TriMuch's API.
  22. I posted in this post, only thing available is the way to buy it which I know how to and still doesnt seem to work
  23. Could do this, as this is what I do when I call methods from a different class public class main extends Script { Classname m = new classname(); onstart(){ You can call it in the onstart class by doing this m.(whatever method you are gonna use from the other class) } or you could call it on your onloop, or instead your switches. }
  24. Just wondering if anyone had any code/ ways to buy items from the GE, and also sell them

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.