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.

Joseph

Trade With Caution
  • Joined

  • Last visited

Everything posted by Joseph

  1. dont make the event public make it so that only member can read it.
  2. It could help me create other script. Which is why my lower level account prevents me from doing so.
  3. He's a guy and not a girl. Please do log the error
  4. Alek you think you could update my script in within a few mins. I want to release my beta crafter script. I meant to do it earlier but I got lazy. Please!! @Alek done do me that favor please and thank you
  5. thank you For everybody: In my main class i have static timers since most of the script require to enter how much items you want to make.. All use the same method with the same static variable. Its meant for less typing.
  6. Hello everybody, This is meant for learning purposed. Im not saying im the best, im sure i could learn more stuff. Im sure this could help others. Please note you have to have some knowledge of java because im not releasing everything. But some stuff, so there might be thing missing but if you know enough of java you could see it. i released my inventory listener. LINK Data class: Dont mind the static part, i have one whole class with separate static classes datas. I have a Main class that handles everything The my sub class GlassBlower. package scripts; import java.awt.Graphics2D; import org.osbot.rs07.api.Bank; import org.osbot.rs07.api.Inventory; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.script.Script; import core.AIOCrafter; import core.Data; import core.Data.DMode; import core.Data.GlassBlower; import dependencies.DsAPI; import dependencies.settings.DsAbstractScript; import dependencies.settings.DsNode; import dependencies.web.WebBank; public class DsGlassblower extends DsAbstractScript { private DsNode[] nodeList = new DsNode[] {new DsBank(), new Glassblow()}; private String status; private int total = 0, hoverAmount; private DsAPI dsAPI; private GlassBlower.Type type; private boolean enterAmount; private Bank bank; private Inventory inventory; //private Player myPlayer; public DsGlassblower(GlassBlower.Type type) { this.dsAPI = AIOCrafter.dsAPI; this.type = type; this.bank = sI().bank; this.inventory = sI().inventory; //this.myPlayer = sI().myPlayer(); } @Override public void handleAdded(Item item) { if (item != null){ String name = item.getName(); if (name.equalsIgnoreCase(type.toString())) { AIOCrafter.waitTimer.reset(); total++; } } } @Override public void handleRemoved(Item item) {} @Override public boolean oldScript() { return false; } @Override public void onPaint(Graphics2D g) { g.drawString("status: " +this.status, 560, 370); g.drawString("Total: " +this.total, 560, 390); } @Override public Script sI() { return AIOCrafter.script; } public void log(String name) { sI().log(name); } @Override public String Manifest() { return DMode.GLASS_BLOWER.toString(); } @Override public int onLoop() throws InterruptedException { for (DsNode DsNode: nodeList) { if (DsNode.activate()) { this.status = DsNode.status(); DsNode.run(); break; } } return 700; } private class DsBank implements DsNode { @Override public String status() { return "Banking: "; } @Override public boolean activate() throws InterruptedException { return !dsAPI.containsAll(true, Data.GLASSBLOWING_PIPE, Data.MOLTEN_GLASS); } @Override public void run() throws InterruptedException { if (!bank.isOpen()){ openBank(); }else{ if (sI().bank.depositAllExcept(Data.GLASSBLOWING_PIPE, Data.MOLTEN_GLASS)) { withdrawSupplys(); } } } private void openBank() { Entity banker = dsAPI.getWebBank().getClosestBank(); if (banker != null) { if (!banker.isVisible()) sI().camera.toEntity(banker, true); else{ banker.interact(WebBank.bankActions); dsAPI.conSleep(bank.isOpen(), 5000).sleep(); } } } private void withdrawSupplys() { if (!sI().inventory.contains(Data.GLASSBLOWING_PIPE)){ if (sI().bank.contains(Data.GLASSBLOWING_PIPE)) { sI().bank.withdraw(Data.GLASSBLOWING_PIPE, 1); dsAPI.conSleep(inventory.contains(Data.GLASSBLOWING_PIPE), 7000).sleep(); }else{ sI().log("Bank doesnt contain glassblowing pipe"); sI().stop(AIOCrafter.stop); } } else if (!sI().inventory.contains(Data.MOLTEN_GLASS)) { if (sI().bank.contains(Data.MOLTEN_GLASS)) { if (AIOCrafter.debug) { sI().bank.withdraw(Data.MOLTEN_GLASS, 10); }else{ sI().bank.withdrawAll(Data.MOLTEN_GLASS); } dsAPI.conSleep(inventory.contains(Data.MOLTEN_GLASS), 7000).sleep(); }else{ sI().log("Bank doesnt contain molten glass"); sI().stop(AIOCrafter.stop); } } }} private class Glassblow implements DsNode { @Override public String status() { return "Blowing: " +type.toString(); } @Override public boolean activate() throws InterruptedException { return true; } @Override public void run() throws InterruptedException { if (sI().bank.isOpen()) { sI().bank.close(); }else{ if (sI().tabs.open(Tab.INVENTORY)) { //add in moving item in inv if (AIOCrafter.waitTimer.getElapsed() > 3000) { selectOption(); } if (AIOCrafter.waitTimer.getElapsed() <= 3000) { mouseIsWaiting(hoverAmount, dsAPI.getWebBank().getClosestBank()); inventory.deselectItem(); } } } } private void mouseIsWaiting(int amount, Entity e) { if (sI().inventory.getAmount(Data.MOLTEN_GLASS) > amount) { if (sI().mouse.isWithinCanvas()) sI().mouse.moveOutsideScreen(); }else{ if (e != null) { if (!e.isVisible()) sI().camera.toEntity(e); else e.hover(); } } } public void selectOption() throws IllegalArgumentException, InterruptedException { if (enterAmount) { enterAmount(); } else{ if (type.getInterface(sI()) != null) { if (type.getInterface(sI()).interact("make x")) { AIOCrafter.keyboardTimer.reset(); enterAmount = true; AIOCrafter.sleep(200, 100); } }else{ if (sI().inventory.getSelectedItemName() == null) { sI().inventory.interact("use", Data.GLASSBLOWING_PIPE); dsAPI.conSleep(inventory.isItemSelected(), 7000); }else{ if (sI().inventory.getSelectedItemName().equalsIgnoreCase(Data.GLASSBLOWING_PIPE)) { sI().inventory.interact("use", Data.MOLTEN_GLASS); AIOCrafter.sleep(600, 100); }else{ sI().inventory.deselectItem(); } } } } } private int enterAmount() throws IllegalArgumentException, InterruptedException { hoverAmount = MethodProvider.random(2, 10); int number = MethodProvider.random(30, 50); if (dsAPI.isInterfaceOverChat()) { sI().keyboard.typeString(Integer.toString(number), true); enterAmount = false; AIOCrafter.sleep(1000, 100); }else{ while(AIOCrafter.keyboardTimer.getElapsed() > 3000) { enterAmount = false; break; } } return 300; } } }
  7. Joseph posted a topic in Snippets
    The class is named InventoryTrackers (with an s), the interface name is InventoryTracker (without the s, found statically in the class.) How do you use it, you must create a new thread and initialize it. You must also end the thread once the script is done. Dont for get to implement InventoryTracker. Example: public class ScriptName extends Script implements InventoryTracker { private InventoryTrackers invTracker; //create a field } Next create a new thread, and initialize the tracker within the onStart Override public void onStart() throws InterruptedException { this.invTracker = new InventoryTrackers(this, this); new Thread(invTracker).start(); } Now within your script you should have the two method overrided. Keep the condition so it doesn't affect your script once its paused or not logged in. @Override public void handleAdded(Item item) { if (!bot.getScriptExecutor().isPaused() && client.isLoggedIn()) { } } @Override public void handleRemoved(Item item) { if (!bot.getScriptExecutor().isPaused() && client.isLoggedIn()) { } } Kill the thread once the script is over. @Override public void onExit() throws InterruptedException { invTracker.stop(); } if you have any question feel free to ask. if im missing something let me know.
  8. Joseph replied to Cyberus's topic in Snippets
    nice game thanks for the contribution. i remember making one of these that shit wasn't easy.
  9. Farewell my friend, thanks for all the pushed updated to gave me
  10. #inB4TheyMistakeYouForABot
  11. ^ that would e great but i dont see it coming any time soon
  12. Done I never noticed I had request. If I have it to you already before feel lucky. I assured you guys 27 hours have fun
  13. Joseph replied to Joseph's topic in Archive
    im still looking guys
  14. Give them time they will tell us
  15. i just did it right now and it works for me. Try it again.
  16. then you have the wrong import, remove it. and try adding the other import. It should be something with rs07
  17. dude i was just lazy i ddint really want to create a new instance and have to go about using that. Rather then having it already initialize.
  18. Typically in most tutorial or snippet with in OSB. You have many of them telling you to create a script instance with in a new class. So that your allowed to use methods within the Script instance. Now i found a better and easier way of doing this. So here an example class See how within your class constructor you have Script argument that will initialize your private field Script. So whenever you want to use the bank. You'll have to use your script instance then call the bank method. Finally call the methods you want to use from the bank class. What you should do stead would be to extend Method Provider. Then within the constructor you will use the method within the Method Provider class to help you initialize all the classes it has. Example of the code above redone. public class WorldHopper extends MethodProvider{ public final static int[] P2P_WORLDS = {301, 302, 303, 304, 305, 306, 309, 310, 311, 312, 313, 314, 317, 318, 319, 320, 321, 322, 326, 327, 328, 329, 330, 333, 334, 335, 336, 338, 341, 342, 343, 344, 345, 346, 349, 350, 351, 352, 353, 354, 357, 358, 359, 360, 361, 362, 366, 367, 368, 369, 370, 373, 374, 375, 376, 377, 378}; public final static int[] F2P_WORLDS = {308, 316}; public final static int[] PVP_WORLDS = {325, 337}; public final static int[] TRIAL_WORLDS = {381, 382, 383, 384, 393, 394}; public WorldHopper(Script script) { exchangeContext(script.bot); } public void hopWorld(int...worlds) { List<Integer> worldList = new ArrayList<Integer>(); for (int world: worlds){ worldList.add(world); } if (interfaces.closeOpenInterface()) { int index = MethodProvider.random(worldList.size()); worldHopper.hop(worldList.get(index)); }else{ log("can't close open interface"); } } }
  19. wow nice data collection lol OP: good luck hope you hit the mother load.
  20. Joseph replied to Joseph's topic in Archive
    Depends on your stats. If you can pm me
  21. Joseph replied to Wizard's topic in Spam/Off Topic
    exactly that the last thing you see in the second movie lol
  22. exactly what i said

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.