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.

Rawrstin

Members
  • Joined

  • Last visited

  1. Alright, coolio! Thanks Khal~
  2. Thanks much! ^.^ You're the man, so just to get this straight.. Listener looks for bot 'onClick', while the Adapter handles the humans 'onClick'?
  3. if (mouse.getListener().mouseClicked()) { } not quite sure what I'm doing wrong here..
  4. Thanks a million!
  5. Hey y'all, Is there a way to detect if your character is underground? Trying to figure out the best way to detect if I'm near... Hill Giants. Would my getZ() == -1? Thanks in advance!
  6. Rawrstin replied to Rawrstin's topic in Archive
    Thanks guys, I feel like it's coming along nicely! I'm looking for some good training locations exp wise to add to the script.
  7. Rawrstin posted a topic in Archive
    rawrKiller Hey y'all, This is my current project: rawrKiller. I'm super lazy when it comes to playing the game, and enjoy learning how to code; which brings me to this pretty little thing.. Automated.. everything. What my ultimate goal is with this is to span through the entire world of RS! Which is where the community, aka - you guys, help me out and request locations to add to the script! Big shout-outs to Czar Big shout-outs to Explv ^ Both very helpful in learning from them and their snippets; kudos! Currently I have all the combat locations supported within Lumbridge! Planning on working my way out as my testing account progresses in level. Download will become available soon. Locations Supported SO FAR : LUMBRIDGE - - Chickens [ All Pens ] - Cows [ All Pens ] - Goblins [ Goblin Hut, by the Mill ] - Frogs & Rats [ Swamp ] PLEASE POST SUGGESTIONS, OR PM ME! The Idea Behind the Script - "The inventory does it all." IF INVENTORY CONTAINS : - Food > Have ANY food in your inventory (and bank), and the script will eat that food! - Feathers > Greatly reduces exp, but will pick-up feathers if there are some in inventory. - Coins > If you have coins in your inventory, it will do banking for more food! Otherwise it will just stop if the inventory no longer has food, or if there's 3 wearable items.. it will switch to suicide mode. EXTRA : - *BONUS* Suicide Mode > Have 3 wearable items on your character (wear it). - Random Event Solver > If random event appears.. built in solver will dismiss the NPC! - zzzAFKantiBan > Custom, human-like antiBan features: randomly afks, randomly extended afks, randomly checks stats, and more! Here is a current example of what this thing does.. Smart Combat - auto detects most efficient target to kill / be killed. Auto-equips gear on Suicide Mode : Uses efficient webWalker to get back after dying: ...MORE TO COME!
  8. Rawrstin replied to Rawrstin's topic in Scripting Help
    o.o Thank you!
  9. Rawrstin replied to Rawrstin's topic in Scripting Help
    I have updated the OP Post code.. I think that should work.. testing now! (Could still use help, lol)
  10. Rawrstin replied to Rawrstin's topic in Scripting Help
    Updated OP Like this? // Suicide Mode if (getChatbox().getMessages(null).contains("Oh dear,")) { }
  11. Rawrstin posted a topic in Scripting Help
    Hey again y'all, Update: would this work properly? public void onMessage(String message) throws InterruptedException { if (message.contains("Oh dear,")) { dead = true; } } I'm still new to understanding the API easily, so sorry for the beginner question.. Thanks in advance!
  12. Your posts are so helpful in learning, man.. makes scripting almost too easy! Thanks a million for this great tool.
  13. I truly appreciate the help, Explv! That makes sense entirely, and I totally overlooked that. I started from scratch, implementing your suggestions and guess what.. it's working now! I can't thank you enough.
  14. I have modified the original post with the updated information you requested. As you can see hopefully, the client loads properly... I test another script out for a while, then attempt to run mine after the previous had ended.. but nothing appears in the log.
  15. Hi everyone, I'm in need of some help here. This is my first attempt at making a script for OSBot, so be patient with me, please! I have attempted to develop a simple cow killing script, but have run into some slight troubles.. I don't have any errors when compiling the script, and it will boot up the client just fine and load it actually.. but when I attempt to simply "Run" the script, it will simply immediately stop and not allow me to run another script, unless I restart the client.. of course. If you could be so kind as to take a peak at my bittersweet looking code, and help a desperate guy out?! http://pastebin.com/aa1enxJW For those unwilling to view the link : import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; @ScriptManifest(name = "Rawr.Killer", info = "I take pride in what I do greatly; kill things.", version = 1.0, author = "Rawrstin", logo = "") public class main extends Script { //Declaring variables for paint / debugging. private String status = " "; private long startTime; private long runTime = System.currentTimeMillis() - startTime; @Override public void onStart() { status = "Loading..."; startTime = System.currentTimeMillis(); for (Skill skill : new Skill[]{ Skill.ATTACK, Skill.STRENGTH, Skill.DEFENCE, Skill.HITPOINTS, Skill.RANGED, Skill.MAGIC }) { getExperienceTracker().start(skill); } } // Will implement in the future. @SuppressWarnings("unused") private int getPrice(int id){ try { URL url = new URL("http://api.rsbuddy.com/grandExchange?a=guidePrice&i=" + id); URLConnection con = url.openConnection(); con.setUseCaches(true); BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream())); String[] data = br.readLine().replace("{", "").replace("}", "").split(","); return Integer.parseInt(data[0].split(":")[1]); } catch(Exception e){ log(e); } return -1; } private String targetName = "Cow"; private NPC target = npcs.closest(new Filter<NPC>() { public boolean match(NPC n) { return n.getName().equalsIgnoreCase(targetName) && n.getCurrentHealth() != 0 && n.isAttackable() != false && map.canReach(n) != false; } }); private enum State { SEARCH, ATTACK, WAIT }; private State getState() { if (target != null) { if (!target.isOnScreen()) { status = "Searching for target."; return State.SEARCH; } else { if (myPlayer().getInteracting() != null) { status = "Attacking the target."; return State.ATTACK; } else { status = "Killing the target."; return State.WAIT; } } } else { status = new String("Waiting for Spawn."); return State.WAIT; } } @Override public int onLoop() throws InterruptedException { switch (getState()) { case SEARCH : camera.toEntity(target); break; case ATTACK : target.interact("Attack"); sleep(random(99, 999)); break; case WAIT : sleep(random(99, 999)); break; default: return random(99, 999); } return random(99, 999); } public String formatTime(long ms){ long s = ms / 1000, m = s / 60, h = m / 60, d = h / 24; s %= 60; m %= 60; h %= 24; return d > 0 ? String.format("%02d:%02d:%02d:%02d", d, h, m, s) : h > 0 ? String.format("%02d:%02d:%02d", h, m, s) : String.format("%02d:%02d", m, s); } public double percentToNextLevel(Skill skill){ int curLvl = getSkills().getStatic(skill), curXP = getSkills().getExperience(skill), xpCurLvl = getSkills().getExperienceForLevel(curLvl), xpNextLvl = getSkills().getExperienceForLevel(curLvl + 1); return (((curXP - xpCurLvl) * 100) / (xpNextLvl - xpCurLvl)); } @Override public void onPaint(Graphics2D g) { //Mouse cross-hair g.setColor(Color.ORANGE); Point mP = getMouse().getPosition(); g.drawLine(mP.x, 0, mP.x, 500); g.drawLine(0, mP.y, 800, mP.y); //Debugging information g.setColor(Color.WHITE); g.drawString("Currently : " + status, 350, 330); g.drawString("Time Elapsed : " + formatTime(runTime), 10, 330); int attack, strength, defence, ranged, magic; attack = getExperienceTracker().getGainedXP(Skill.ATTACK); strength = getExperienceTracker().getGainedXP(Skill.STRENGTH); defence = getExperienceTracker().getGainedXP(Skill.DEFENCE); ranged = getExperienceTracker().getGainedXP(Skill.RANGED); magic = getExperienceTracker().getGainedXP(Skill.MAGIC); if (attack > strength && attack > defence && attack > ranged && attack > magic) { g.drawString("Attack Level : " + getSkills().getStatic(Skill.ATTACK) + " ( +" + getExperienceTracker().getGainedLevels(Skill.ATTACK) + " )", 10, 310); g.drawString("Exp Gained : " + getExperienceTracker().getGainedXP(Skill.ATTACK) + " ( " + getExperienceTracker().getGainedXPPerHour(Skill.ATTACK) + " \\ hr )", 10, 290); int nextLevel = getSkills().getStatic(Skill.ATTACK) + 1; g.drawString(getSkills().experienceToLevel(Skill.ATTACK) + " Exp ( " + percentToNextLevel(Skill.ATTACK) + "% ) until " + nextLevel, 10, 270); } else if (strength > attack && strength > defence && strength > ranged && strength > magic) { g.drawString("Strength Level : " + getSkills().getStatic(Skill.STRENGTH) + " ( +" + getExperienceTracker().getGainedLevels(Skill.STRENGTH) + " )", 10, 310); g.drawString("Exp Gained : " + getExperienceTracker().getGainedXP(Skill.STRENGTH) + " ( " + getExperienceTracker().getGainedXPPerHour(Skill.STRENGTH) + " \\ hr )", 10, 290); int nextLevel = getSkills().getStatic(Skill.STRENGTH) + 1; g.drawString(getSkills().experienceToLevel(Skill.STRENGTH) + " Exp ( " + percentToNextLevel(Skill.STRENGTH) + "% ) until " + nextLevel, 10, 270); } else if (defence > strength && defence > attack && defence > ranged && defence > magic) { g.drawString("Defence Level : " + getSkills().getStatic(Skill.DEFENCE) + " ( +" + getExperienceTracker().getGainedLevels(Skill.DEFENCE) + " )", 10, 310); g.drawString("Exp Gained : " + getExperienceTracker().getGainedXP(Skill.DEFENCE) + " ( " + getExperienceTracker().getGainedXPPerHour(Skill.DEFENCE) + " \\ hr )", 10, 290); int nextLevel = getSkills().getStatic(Skill.DEFENCE) + 1; g.drawString(getSkills().experienceToLevel(Skill.DEFENCE) + " Exp ( " + percentToNextLevel(Skill.DEFENCE) + "% ) until " + nextLevel, 10, 270); } else if (ranged > strength && ranged > defence && ranged > attack && ranged > magic) { g.drawString("Ranged Level : " + getSkills().getStatic(Skill.RANGED) + " ( +" + getExperienceTracker().getGainedLevels(Skill.RANGED) + " )", 10, 310); g.drawString("Exp Gained : " + getExperienceTracker().getGainedXP(Skill.RANGED) + " ( " + getExperienceTracker().getGainedXPPerHour(Skill.RANGED) + " \\ hr )", 10, 290); int nextLevel = getSkills().getStatic(Skill.RANGED) + 1; g.drawString(getSkills().experienceToLevel(Skill.RANGED) + " Exp ( " + percentToNextLevel(Skill.RANGED) + "% ) until " + nextLevel, 10, 270); } else if (magic > strength && magic > defence && magic > ranged && magic > attack) { g.drawString("Magic Level : " + getSkills().getStatic(Skill.MAGIC) + " ( +" + getExperienceTracker().getGainedLevels(Skill.MAGIC) + " )", 10, 310); g.drawString("Exp Gained : " + getExperienceTracker().getGainedXP(Skill.ATTACK) + " ( " + getExperienceTracker().getGainedXPPerHour(Skill.MAGIC) + " \\ hr )", 10, 290); int nextLevel = getSkills().getStatic(Skill.MAGIC) + 1; g.drawString(getSkills().experienceToLevel(Skill.MAGIC) + " Exp ( " + percentToNextLevel(Skill.MAGIC) + "% ) until " + nextLevel, 10, 270); } } @Override public void onExit() { log("Time ran : " + formatTime(runTime)); } } Thanks in advance. UPDATE: Logger info upon request : [DEBUG][05/16 02:52:31 PM]: OSBot is now ready! [INFO][05/16 02:52:32 PM]: Loaded 2 RS accounts! [INFO][05/16 02:52:33 PM]: Welcome to OSBot 2.4.59! [INFO][05/16 02:53:17 PM]: Updated injection hooks for client revision : 114! [DEBUG][Bot #1][05/16 02:53:17 PM]: Initializing stealth injection bot... [INFO][Bot #1][05/16 02:53:18 PM]: Downloading latest RS2 old-school client parameters... [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected bot reference into client! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected world accessors! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected 31 class and 308 field accessors! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected canvas! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected 4 model update calls! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected 12 definition calls! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected 14 definition transformation calls! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected random.dat patch for bot #1 [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected 3 tooltip callbacks! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected 5 config callbacks! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected 5 head message callbacks! [DEBUG][Bot #1][05/16 02:53:19 PM]: Injected 5 chatbox message callbacks! [DEBUG][Bot #1][05/16 02:53:20 PM]: Injected 29 draw skip points! [DEBUG][Bot #1][05/16 02:53:21 PM]: Injected 2 hit splat callbacks! [DEBUG][Bot #1][05/16 02:53:21 PM]: Injected 2 equipment callbacks! [DEBUG][Bot #1][05/16 02:53:21 PM]: Injected 1 login return code callbacks! [DEBUG][Bot #1][05/16 02:53:21 PM]: Injected 14 analysis callbacks! [DEBUG][Bot #1][05/16 02:53:21 PM]: Loading RS world : 367 [INFO][Bot #1][05/16 02:53:22 PM]: Initializing 37 API modules... [INFO][05/16 02:53:22 PM]: Started bot #1 [DEBUG][05/16 02:55:23 PM]: Loading script id : 784 [DEBUG][05/16 02:55:23 PM]: Loaded script! [DEBUG][05/16 02:55:23 PM]: Launching script... [INFO][Bot #1][05/16 02:55:24 PM]: Loaded 4 built-in random solvers! [INFO][Bot #1][05/16 02:55:24 PM]: Gold Simple Fighter Started [INFO][05/16 02:55:33 PM]: Started script : Gold Simple Fighter [INFO][Bot #1][05/16 04:55:42 PM]: Terminating script Gold Simple Fighter... [INFO][Bot #1][05/16 04:55:43 PM]: Thanks for running Gold Simple Fighter, feel free to post Proggies! [INFO][Bot #1][05/16 04:55:43 PM]: Script Gold Simple Fighter has exited! [DEBUG][05/16 05:59:57 PM]: Loading script id : 784 [DEBUG][05/16 05:59:58 PM]: Loaded script! [DEBUG][05/16 05:59:58 PM]: Launching script... [INFO][Bot #1][05/16 05:59:58 PM]: Loaded 4 built-in random solvers! [INFO][Bot #1][05/16 05:59:59 PM]: Gold Simple Fighter Started [INFO][05/16 06:00:10 PM]: Started script : Gold Simple Fighter [INFO][Bot #1][05/16 06:26:13 PM]: Terminating script Gold Simple Fighter... [INFO][Bot #1][05/16 06:26:13 PM]: Thanks for running Gold Simple Fighter, feel free to post Proggies! [INFO][Bot #1][05/16 06:26:13 PM]: Script Gold Simple Fighter has exited!

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.