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.

SolaceCoding

Trade With Caution
  • Joined

  • Last visited

Everything posted by SolaceCoding

  1. Oh my goodness i can't wait<3
  2. What the title says preferably something to do with OSBot and Java xD or just java.
  3. SolaceCoding replied to Aloha's topic in Archive
    I'll be happy to help.
  4. SolaceCoding replied to SolaceCoding's topic in Archive
    I was training range and i forgot to bank because i had them equipped and i noticed when i equipped my pickaxe i had them still i was like *facepalm*
  5. SolaceCoding replied to SolaceCoding's topic in Archive
    I didn't see it on p****bot-.- Fuck sake, This is the first time i have script in my life, I used to program RSPS but then i came here and learnt to script but meh.
  6. SolaceCoding replied to SolaceCoding's topic in Archive
    There is an API called Twinkle, nuff said.
  7. SolaceCoding replied to SolaceCoding's topic in Archive
    In that case i'd need all the random npc id's...
  8. SolaceCoding posted a topic in Archive
    I implemented it , I'm so happy this i think is unique and will make my future scripts a lot more liked by the community?
  9. My java skills are pretty good, so if you give me time I'll work on a pest control bot.
  10. Tom released one?
  11. Well basically I am really bored and want to make a script but idk what to make any suggestions If my account can get to the place I'll do it.
  12. Do you think it would be good to implement a notification system into each of my scripts and it sends you one everytime you level up or your out of food? xD
  13. Nice one lads, keep up the great work.
  14. Leave my MouseTrail alone she never hurt you HMPH-.-
  15. SolaceCoding replied to Maxi's topic in Releases
    He used dat mouse trail xD
  16. Yeah, It's fine man:)
  17. You's are welcome:P
  18. For all of you's that make scripts using States, thought this may come in handy, import java.awt.Color;import java.awt.Graphics;import java.awt.Point;import org.osbot.script.Script;import org.osbot.script.rs2.model.NPC;@SuppressWarnings("rawtypes")public abstract class StateBasedScript<T extends Enum> extends Script { /** * MouseTrail paint; */ public MouseTrail trail = new MouseTrail(); /** * Gets the current Script state * * @return - the script state */ public abstract T getState(); /** * Handles the current script states * * @param state * @return Script State */ public abstract int handleState(T state); public abstract void onStart(); @Override public int onLoop() { T state = getState(); return handleState(state); } /** * Get a message from the chatbox. */ public abstract void onMessage(String message) throws InterruptedException; @Override public void onPaint(Graphics g) { trail.add(client.getMousePosition()); trail.draw(g); render(g); } /** * Render images and texts on the screen * * @param g */ public abstract void render(Graphics g); /** * NPC Filter * * @author 'MobbyGFX * @param <T> */ interface Filter<T> { public boolean accept(T element); } /** * Get the closest npc from filter * @param f - filter * @return npc */ public NPC closestNPC(Filter<NPC> f) { NPC npc = null; for (NPC n : client.getLocalNPCs()) if (n != null) if (((npc == null || distance(n) < distance(npc)) && f .accept(n))) npc = n; return npc; } /** * @author 'MobbyGFX * Paints a mousetrail on the screen. */ public static class MouseTrail { private final static int SIZE = 50; private final static double ALPHA_STEP = (255.0 / SIZE); private static Point[] points; private static int index; public MouseTrail() { points = new Point[SIZE]; index = 0; } public void add(final Point p) { points[index++] = p; index %= SIZE; } public void draw(final Graphics g) { double alpha = 0; for (int i = index; i != (index == 0 ? SIZE - 1 : index - 1); i = (i + 1) % SIZE) { if (points[i] != null && points[(i + 1) % SIZE] != null) { Color rainbow = Color.getHSBColor((float) (alpha / 255), 1, 1); g.setColor(new Color(rainbow.getRed(), rainbow.getGreen(), rainbow.getBlue(), (int) alpha)); g.drawLine(points[i].x, points[i].y, points[(i + 1) % SIZE].x, points[(i + 1) % SIZE].y); alpha += ALPHA_STEP; } } } }} import java.awt.Graphics;import org.osbot.script.ScriptManifest;import org.osbot.script.rs2.model.NPC;import org.osbot.script.rs2.model.Player;import org.osbot.script.rs2.ui.Tab;@ScriptManifest(author = "MobbyGFX", info = "", name = "UltimateBarbFisher", version = 1.0D)public class UltimateBarbFisher extends StateBasedScript<UltimateBarbFisher.State> { public long runtime; public State state; public NPC npc; public Filter<NPC> fishSpot = new Filter<NPC>() { public boolean accept(NPC npc) { return npc.getId() == 328 && npc.getName().equalsIgnoreCase("fishing spot"); } }; public int[] tools = { 309, 314 }; private int fishCaught; public enum State { IDLE, FISHING, DROPPING, RECOVER, WHILE_FISH; } public void onStart() { log("Welcome to UltimateBarbFisher by 'MobbyGFX"); setFishCaught(0); runtime = System.currentTimeMillis(); } public State getState() { Player player = client.getMyPlayer(); if (client.getInventory().isFull()) { return State.DROPPING; } else if (!client.getInventory().isFull()) { if (player.getAnimation() == -1) return State.FISHING; return State.WHILE_FISH; } return State.RECOVER; } public int handleState(State state) { switch (state) { case DROPPING: if (client.getInventory().isFull() && !client.getMyPlayer().isAnimating()) { try { if (currentTab() != Tab.INVENTORY) { openTab(Tab.INVENTORY); } client.getInventory().dropAllExcept(tools); } catch (InterruptedException e) { e.printStackTrace(); } } break; case FISHING: npc = closestNPC(fishSpot); if (npc.getModel() != null) { try { if (!client.getMyPlayer().isAnimating()) { if (selectEntityOption(npc, "Lure")) { sleep(10000); } } } catch (InterruptedException e) { e.printStackTrace(); } } break; case WHILE_FISH: if (random(10) == 5) { switch (random(0, 3)) { case 0: try { moveMouseOutsideScreen(); } catch (InterruptedException e) { e.printStackTrace(); } break; case 1: try { client.moveCameraToEntity(npc); } catch (InterruptedException e) { e.printStackTrace(); } break; case 2: log("antiban case 2"); break; case 3: log("antiban case 3"); break; } } break; case RECOVER: break; case IDLE: break; } return 0; } public void render(Graphics g) { long timeRan = runtime - System.currentTimeMillis(); g.drawString("State: " + getState(), 50, 50); g.drawString("Fish Caught: " + getFishCaught(), 50, 62); g.drawString("Time Running: " + timeRan / 36000D, 50, 74); } public void onMessage(String message) throws InterruptedException { if (message.equals("you catch a salmon")) { setFishCaught(getFishCaught() + 1); } else if (message.equalsIgnoreCase("You catch a fucking trout")) { setFishCaught(getFishCaught() + 1); } } public int getFishCaught() { return fishCaught; } public void setFishCaught(int fishCaught) { this.fishCaught = fishCaught; }} Example script.
  19. Thanks bro:P
  20. Hello, My name is Corey, i am 16 years old, and i like to program java and make scripts for amazing bots like dis:P<3

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.