Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/17/13 in all areas

  1. Nice guide. Now let me write a guide, explaining the difference between the "osbot development" section and the "spam" section. Thread moved.
    3 points
  2. Hello OSBot members. I'm making a guide how to Hack on runescape. Go To www.Runescape.com click '' START PLAY '' LOGIN ON RUNESCAPE. TELEPORT TO LUMBRIDGE ( TRADE WITH BOB ) BUY A BATTLEAXE FROM HIM ONCE U BOUGHT THE BATTLE-AXE, WEAR IT AND CLICK ON '' HACK '' DEAR PEOPLE, THIS WAS MY GUIDE TO HACK ON RUNESCAPE. I HOPE YOU ENJOYED THANKS!
    2 points
  3. Community, RuneScape has updated. Luckily, we did not have to make any changes to our client to cope with the update. However, I've noticed that many NPC ids have changed. We suggest to all script writers that they use different methods of finding an npc (using names) as it appears Jagex is constantly changing ids for whatever reason. If you find a script is no longer working, this is most likely the issue. I've also been notified that certain object ids have changed. Thanks, The OSBot Staff Team
    2 points
  4. Community, It's clear that there's an issue with grabbing the client parameters and/or injecting the dependencies. We're working to fix the issue as quickly as possible however there is no ETA. The main reason for this announcement is that there are several members going around "fixing" this problem for the other members by sending them tampered client and data files. Please be very careful of who you let "fix" your client because someone could easily give you altered code to steal your account information from your local files. This is very much against our rules and terms of service. Everyone should be reminded that we have copyright over our client and any uploading, re-distributing, or re-engineering of our client is not only severely against the rules, but also against the law in several countries. We would prefer to fix the issue on our own side and give an official release for not only our safety, but yours. The OSBot team is very serious about security and that's what sets us above the rest. Be very careful. Happy botting! The OSBot Staff Team
    2 points
  5. //BY USING THIS CODE YOU AGREE THAT NONE OF THE CODE WILL BE USED IN A MALICIOUS WAY. import java.awt.AWTException; import java.awt.Rectangle; import java.awt.Robot; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class ScreenCap { public ScreenCap() { } public void screenShot(String fileName, String destination) throws IOException, AWTException { try { Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()); BufferedImage capture = new Robot().createScreenCapture(screenRect); File outputfile = new File(destination+fileName+".png"); ImageIO.write(capture, "png", outputfile); } catch (IOException | AWTException e) { e.printStackTrace(); } } } try { sc.screenShot("MyScreenShot", "C:\\Users\\<INSERT USERNAME HERE>\\OSBot\\"); } catch (IOException | AWTException e) { e.printStackTrace(); }
    1 point
  6. Be careful, hacking on runescape could lead to permanent ban.
    1 point
  7. OMGGGGGGGGGG IT WORKED 1000000000b Bank Thank you i hacked it W0000000000000000000000000000000T
    1 point
  8. Laz really needs to fix frog queen. He claims to have fixed it in .20 but every morning I come down and find at least 2 of my bots tapped there all night -_-
    1 point
  9. Holy shit... that is a lot of copper...
    1 point
  10. Does windows take both? I didn't know that. Thanks Eric If you really wanted it to be cross platform, just use System.getProperty("file.separator")
    1 point
  11. Devs: I have made a watchdog tool kit to automatically watch for any experience gains while running any script. It has a few features, and will be expanding with any ideas which seem beneficial - With this jar, you can set up an amount of time (in advance) to count xp gains. When the xp gains are older than your chosen time, the are removed and not counted any more. The result is a (sort of) real time glance for how well the bot has done in the past x amount of time. No more 19 hour proggies with some xp/hr which means nothing. Xp varies while running scripts. (combat especially.) I hope this toolkit gets used and abused in future scripts. import java.awt.Graphics; // import my watchdog import dreamliner.XPWatchdog; import org.osbot.script.Script; import org.osbot.script.ScriptManifest; import org.osbot.script.rs2.skill.Skill; @ScriptManifest(name = "Dream's Watchdog Tester", author = "Dreamliner", version = 1.0, info = "Watchdog tester. Hope you like!") public class AIO extends Script { // create the watchdog reference XPWatchdog watchdog; Thread t; public void onStart() { log("Waiting for log in"); while (this.client.getLoginState() != 30) { try { sleep(250); } catch (InterruptedException e) { e.printStackTrace(); } } // initialize the watchdog this.watchdog = new XPWatchdog(this.client,this); // create the new watchdog thread this.t = new Thread(this.watchdog); // start the thread this.t.start(); } public int onLoop() throws InterruptedException { return 1000; } public void onPaint(Graphics g) { // pick anything you want to display. g.drawString(this.watchdog.getXpPerPrune(Skill.ATTACK) + " per 5 mins", 300, 300); } public void onExit() { log("thread interrupted"); this.t.interrupt(); } } link to the jar file -> http://goo.gl/Fy2hu link to jar tester -> http://goo.gl/HnqII Methods: public void setPruneTime(int t); // sets the amount of time (in milliseconds) to get rid of data points (> 1000ms) // default: 1000*60*5 ms (5 mins) public int getXpPerPrune(Skill s); // returns the amount of xp gained per prune time for the skill of your choice public int getAllXpPerPrune(); // returns the total amount of xp gained on the account during the prune time. a picture was requested..
    1 point
  12. I live in the United States. This is my date format.
    1 point
  13. import java.awt.AWTException; import java.awt.Image; import java.awt.MenuItem; import java.awt.PopupMenu; import java.awt.SystemTray; import java.awt.TrayIcon; import java.awt.event.ActionListener; public class Tray { private PopupMenu popup; private final TrayIcon tray; private final String scriptName; private boolean showing = false; public Tray(Image image, String scriptName) { this.tray = new TrayIcon(image, scriptName); this.scriptName = scriptName; } public void show() throws AWTException { if (SystemTray.isSupported()) { if (this.tray != null) { this.tray.setToolTip(this.scriptName); this.tray.setImageAutoSize(true); SystemTray.getSystemTray().add(this.tray); this.showing = true; } } else { throw new AWTException("System Tray is not supported!"); } } public void hide() { if(this.showing == true && this.tray != null) { SystemTray.getSystemTray().remove(tray); this.showing = false; } } public void addMenuItem(MenuItem item, ActionListener listener) { item.addActionListener(listener); this.popup.add(item); if(this.tray != null) this.tray.setPopupMenu(popup); } public void sendDisplayMessage(String message, TrayIcon.MessageType type) { if(this.showing == true) this.tray.displayMessage(this.scriptName, message, type); } } Example usage... final Tray tray = new Tray(ImageIO.read(new URL("http://i.imgur.com/HGN98TQ.gif")), "Cool Script"); tray.addMenuItem(new MenuItem("Hide"), new ActionListener() { @Override public void actionPerformed(ActionEvent e) { tray.hide(); } }); tray.show(); tray.sendDisplayMessage("Cool Script initalized!", TrayIcon.MessageType.INFO);
    1 point
  14. First up I'm not a java expert so there maybe be bad java practice in this tutorial. It would help if you could point out things I have done wrong . Also I'm pretty tired when making this so there is bound to be at lease one mistake. I hope you guys appreciate the time it took to take, crop and upload all these damn pictures. So first up your script should look something like this (But hopefully you can spell your own username correctly). http://i.imgur.com/L2i1KyH.png Now the first thing we are going to do is create a new variable of type long called lastCheck. This is going to hold the time that we last checked for an update. We also want to set this variable to the current time which we do by setting it to System.currentTimeMillis() in the onstart method. Finally we are going to create a new method, checkForUpdate() http://i.imgur.com/SWiCq10.png So we want to make the script check for an update every 10 minutes so if the last time we checked, plus 600000 milliseconds is less than the current time in milliseconds, we want to check for an update. http://i.imgur.com/aVX3O8l.png Ok so how are we actually going to check for an update? Well we are going to create a paste on the website http://pastebin.com/ . Browse to this website and click sign up (Unless you already have an account). http://i.imgur.com/1fAWFtM.png Now you should fill in the details and do what you need to do to create an account. After this is done sign in and create a new paste. http://i.imgur.com/kgAL4YJ.png Next we want to fill in the version of your script and also name it at the bottom. http://i.imgur.com/U46fjVY.png Then click on raw http://i.imgur.com/PvZTYUf.png This will open up a new page which will only contain our script version. We want to copy the URL of this page. http://i.imgur.com/e7Ft8Er.png Now we need to have this URL in a way the script can actually use it so we create a new URL object. Change the URL to your URL and import URL. http://i.imgur.com/mlUjmoi.png Add a try/catch http://i.imgur.com/TBjEaYe.png Now we want to change the exception type because we are going to be doing some other stuff aswell http://i.imgur.com/qTjLprb.png Now we need to read what is at the URL so we create a scanner that scans the URL and then we store the first line of text that the scanner gets in the variable latestVersion. Finally we close the scanner (Very important). http://i.imgur.com/zh6GsZJ.png Then we can get the version of our script and convert it into a string too so that they are both the same type. Also we print out the two versions and also an error message in the catch section which is ran if there was an error. http://i.imgur.com/CQG7Bs2.png Now let's be a cool kid and check if the two versions are the same http://i.imgur.com/njXqWTq.png So we want something to actually happen if the script is out of date right? So we right click our package and go to new --> other http://i.imgur.com/esmdthq.png Select Jframe under Windowbuilder --> Swing Designer http://i.imgur.com/KUFGJoq.png Give this beast a sensible name http://i.imgur.com/fJ3gP5a.png Click design which is at the bottom http://i.imgur.com/bpyRosQ.png Now it should look like this http://i.imgur.com/ZZamScG.png To make editing the window easy we need to set it to absolute layout. We do this by selecting absolute layout by clicking it, then clicking our window on the right. It should get highlighted in green. http://i.imgur.com/YOQrhFn.png Now we want to add a message to the window so click JTextPane and then click on the window. You can then move and resize the object much like you would in Microsoft word. http://i.imgur.com/xzKmb31.png Resize the box to however you want and then select it and press text to add a message. http://i.imgur.com/VVG1snW.png Enter your message in this box http://i.imgur.com/lDgDGjO.png Click JButton and click your window on the right to place it. You should resize it too. http://i.imgur.com/AtMmlYd.png Click text again and change the text if you want http://i.imgur.com/QyO3CIE.png Now the window looks correct we need to make it do stuff, so click source http://i.imgur.com/hPd6Q8j.png It should now look like this http://i.imgur.com/IItPLEX.png We can remove public static void main because it is only used if this was it's own stand-alone program. http://i.imgur.com/kY5uiqY.png Now we want to something to happen when we click the button so we type this and import ActionListener http://i.imgur.com/ylco7Rn.png Then add unimplimented methods http://i.imgur.com/nGrNzqu.png And it should look like this: http://i.imgur.com/bVhr3dO.png Now similarly to what we did before, we create a URI (Different to URL) and import it. The link should be one to your thread or download page. http://i.imgur.com/0J5WSLc.png Surround it with a try/catch http://i.imgur.com/Swvgb97.png Now to make the script open this webpage we need to create a desktop instance and import it like so: http://i.imgur.com/63yNrqy.png Then we can use the browse method to open the web page. Remember to add a try/catch: http://i.imgur.com/Hg26OhI.png We are nearly done! Just scroll to the top and edit this line to say DISPOSE and not EXIT. This will stop the whole client from closing when this window is closed. http://i.imgur.com/fVTu6hP.png Now we need to make our script open the window so we need to create a new global instance of it. Just place it inside the class but outside of any methods: http://i.imgur.com/dKS2oNv.png Now we want to make the window visible when an update is detected. http://i.imgur.com/U5ygNqN.png And to update the version, all you have to do is edit the version in the script here: http://i.imgur.com/y8Esc82.png and on pastebin by signing in and editing the paste.
    1 point
  15. onStart; SkillMonitor.resetSkills(); onLoop or onPaint; SkillMonitor.updateSkills(client.getSkills()); use as; SkillMonitor.xpGained(Skill.MINING) Class; import org.osbot.script.rs2.skill.Skill; import org.osbot.script.rs2.skill.Skills; import java.util.Collection; import java.util.HashMap; /** * User: Cory * Date: 26/06/13 * Time: 06:41 */ public class SkillMonitor { private static HashMap<Skill, Monitor> monitors = new HashMap<Skill, Monitor>(); public static Monitor get(Skill skill) { Monitor mon = monitors.get(skill); if(mon == null) { mon = new Monitor(); mon.skill = skill; monitors.put(skill, mon); } return mon; } public static void updateSkills(Skills skills){ for(Monitor mon : values()) { int currentXp = skills.getExperience(mon.skill); if(mon.currentXp > 0) mon.lastGainedXp = currentXp-mon.currentXp; if(mon.currentXp != currentXp && mon.startXp <= 0 && mon.currentXp >= 0) { mon.startXp = mon.currentXp; mon.startLevel = mon.currentLevel; mon.startedTraining = System.currentTimeMillis(); } mon.currentXp = currentXp; mon.currentLevel = skills.getCurrentLevel(mon.skill); mon.actualLevel = skills.getLevel(mon.skill); mon.xpToLvl = xPForLevel(mon.currentLevel+1)-mon.currentXp; } } public static int xpGained(Skill skill) { if(startXp(skill) <= 0) return 0; return currentXp(skill)-startXp(skill); } public static int lvlGained(Skill skill) { if(startXp(skill) <= 0) return 0; return currentLvl(skill)-startLvl(skill); } public static int xpToLvl(Skill skill) { return get(skill).xpToLvl; } public static int startXp(Skill skill) { return get(skill).startXp; } public static int startLvl(Skill skill) { return get(skill).startLevel; } public static int currentXp(Skill skill) { return get(skill).currentXp; } public static int currentLvl(Skill skill) { return get(skill).currentLevel; } public static int xPForLevel(int level) { int points = 0; int output = 0; for (int lvl = 1; lvl <= level; lvl++) { points += Math.floor((double)lvl + 300.0 * Math.pow(2.0, (double)lvl / 7.0)); if (lvl >= level) return output; output = (int)Math.floor(points / 4); } return 0; } public static void resetSkills() { monitors.clear(); } public static Collection<Monitor> values() { return monitors.values(); } public static class Monitor { public int startXp = -1, startLevel = 0, lastGainedXp; public int currentXp = -1, currentLevel = -1, actualLevel = -1; public long startedTraining = -1; public Skill skill = null; public int xpToLvl = 0; } }
    1 point
  16. . public int getFlag(int x, int y) { XClippingPlane clipping = client.getClippingPlanes()[client.getPlane()]; int mx = client.getMapBaseX(), my = client.getMapBaseY(); int[][] flags = clipping.getTileFlags(); return flags[x-mx][y-my]; } . public enum Flag { WALL_NORTHWEST(0x1), WALL_NORTH(0x2), WALL_NORTHEAST(0x4), WALL_EAST(0x8), WALL_SOUTHEAST(0x10), WALL_SOUTH(0x20), WALL_SOUTHWEST(0x40), WALL_WEST(0x80), OBJECT_TILE(0x100), WALL_BLOCK_NORTHWEST(0x200), WALL_BLOCK_NORTH(0x400), WALL_BLOCK_NORTHEAST(0x800), WALL_BLOCK_EAST(0x1000), WALL_BLOCK_SOUTHEAST(0x2000), WALL_BLOCK_SOUTH(0x4000), WALL_BLOCK_SOUTHWEST(0x8000), WALL_BLOCK_WEST(0x10000), OBJECT_BLOCK(0x20000), DECORATION_BLOCK(0x40000), MAP_BLOCK(0x200000), WALL_ALLOW_PROJECTILE_NORTHWEST(0x400000), WALL_ALLOW_PROJECTILE_NORTH(0x800000), WALL_ALLOW_PROJECTILE_NORTHEAST(0x1000000), WALL_ALLOW_PROJECTILE_EAST(0x2000000), WALL_ALLOW_PROJECTILE_SOUTHEAST(0x4000000), WALL_ALLOW_PROJECTILE_SOUTH(0x8000000), WALL_ALLOW_PROJECTILE_SOUTHWEST(0x10000000), WALL_ALLOW_PROJECTILE_WEST(0x20000000), OBJECT_ALLOW_PROJECTILE(0x40000000), BLOCKED(0x1280100); private int flag; Flag(int flag) { this.flag = flag; } public int getFlag() { return this.flag; } } .
    1 point
  17. Here is code to always choose a world that is available... http://pastebin.com/ZZwJszEc
    1 point
×
×
  • Create New...