Leaderboard
Popular Content
Showing content with the highest reputation on 06/11/13 in all areas
-
Hi everyone, I'm posting this thread to give you all a heads up why Laz, Zach and I have not been around for the past 3 days. OSBot will continue with the same dedication, all three of us had to attend IRL duties (family, studies, etc..). Usually this never happens on the same days, but this time it did. Kati held our force strong! Sincerely, OSBot.org4 points
-
3 points
-
Divine's GUI Paint System What is this paint system, and how can it benefit me?: This is an open source class which you can implement into any script for extremely quick + clean paint. It is not paint, but can be used instead or along with paint. It is a seperate window which displays whatever information you wish to display!How easy is it?: Notice how few lines create and draw the entire window: Media: Does it consume a lot of memory?: Very low memory usage, much smaller than drawing paint on the client screen.Instructions for use: Add the new .java file into your project (GUIPaint.java). Code with few easy methods. Make sure to include the compiled .class inside the script jar, or along with the other script classes. Code Syntax: This code goes in onPaint(Graphics g) inside YOUR script. Always start with this line: GUIPaint.buildFrame("GUI WINDOW TITLE"); Then, you MUST define a category. When you want to set a new category, after the last cell in the previous category, use the same code again. GUIPaint.setCategory("Category Name"); Next, add as many cells as you wish! If you go too high, specify in GUIPaint.buildFrame(name, MAX_CELLS) to increase the maximum amount of cells. The default is 20. Also, addCell supports value types of String, doubles, booleans, longs, and integers. GUIPaint.addCell("NAME OF ITEM (WITHOUT COLON)", "VALUE"); Always End with RefreshPaint(): GUIPaint.RefreshPaint(); To have the Window CLOSE on script exit, add GUIHandler.CloseGUI() inside your onExit(): public void onExit() { GUIPaint.CloseGUI(); } A good example of a full implementation, displaying static text: public void onPaint(Graphics g) { GUIPaint.buildFrame("Clay Miner"); GUIPaint.setCategory("Time"); GUIPaint.addCell("Time Running", "00:00:00"); GUIPaint.setCategory("Clay"); GUIPaint.addCell("Clay", 0); GUIPaint.addCell("Clay / Hour", 0); GUIPaint.setCategory("Experience"); GUIPaint.addCell("Experience", 0); GUIPaint.addCell("Experience / Hour", 0); GUIPaint.RefreshPaint(); } public void onExit() { GUIPaint.CloseGUI(); } Download the GUIPaint class HERE: http://uppit.com/vrkhkxohfryb/GUIPaint.java2 points
-
2 points
-
Today I finally got around to finishing up the world hopping system. This was also a nice moment to bring the random management system in to action. For anyone interested in the random management system in action code wise for the world hopping system, here you go: package org.osbot.script.rs2.ui; import org.osbot.engine.Bot; import org.osbot.script.mouse.RectangleDestination; import org.osbot.script.rs2.randoms.RandomBehaviourHook; import org.osbot.script.rs2.randoms.RandomManager; import org.osbot.utility.Gaussian; import java.awt.*; import java.util.ArrayList; import java.util.Map; /** * Created with IntelliJ IDEA. * User: Maxime * Date: 26-05-13 * Time: 19:24 * To change this template use File | Settings | File Templates. */ public class WorldHopper { private final Bot bot; private boolean isHopping = false; private int nextWorld = -1; public WorldHopper(Bot bot) { this.bot = bot; } /** * Logs you out and changes hops to the world specified. This method does not take in to account full worlds yet, * so hopping to a full world will fail. * @param world Worlds range from 301 to 378 but remember that the worlds * 307, 315, 323, 324, 331, 332, 347, 348, 355, 356, 363, 364, 371, 372 * do not exist. */ public void hopWorld(int world) throws InterruptedException { nextWorld = world; isHopping = true; bot.getScript().randomManager.registerHook(hook); while (bot.getClient().getLoginState() != 10) { if (bot.getScript().logoutTab.logOut()) { Thread.sleep(500 + Gaussian.random(300, 300)); } } } private static enum State { GO_TO_SELECTION, WORLD_SELECTION, UNHOOK; } private RandomBehaviourHook hook = new RandomBehaviourHook(RandomManager.LOGIN_SCRIPT) { private State state = null; @Override public String getName() { return "World Hopping"; } public void scan() { if (!isHopping || bot.getClient().getLoginState() != 10 || nextWorld == -1) { state = State.UNHOOK; return; } if (bot.getClient().getColorPicker().isColorAt(54, 294, Color.BLACK)) { state = State.WORLD_SELECTION; return; } else { if (bot.getClient().getCurrentWorld() == nextWorld) { state = State.UNHOOK; } else { state = State.GO_TO_SELECTION; } } } /** * The main loop logic. This will continue until shouldActivate() returns true or * -1 is returned. * * @return The time to sleep until the next loop. * @throws InterruptedException */ @Override public int onLoop() throws InterruptedException { scan(); switch (state) { case GO_TO_SELECTION: bot.getClient().moveMouseTo(new RectangleDestination(new Rectangle(12, 466, 86, 26)), false, true, false); return 600 + gRandom(200, 200); case WORLD_SELECTION: Rectangle dest = getWorldMouseDestination(nextWorld); bot.getClient().moveMouseTo(new RectangleDestination(dest), false, true, false); return 600 + gRandom(200, 200); case UNHOOK: nextWorld = -1; isHopping = false; bot.getRandomManager().unregisterHook(RandomManager.LOGIN_SCRIPT); return -1; default: return 500 + gRandom(500, 500); } } @Override public void onExit() { isHopping = false; nextWorld = -1; } }; /** * Calculates the rectangle of the destination to click a world. * @param world The specified world in the range of 301 - 378 * @return The rectangle used for the mouse destination */ private Rectangle getWorldMouseDestination(int world) { ****** } ***** static { ***** } } Furthermore I started on a breaking system. You will be able to set your break settings per saved account profile, which will then be used if you enable it. Expect both updates to be released tonight or tomorrow, Sincerely, OSBot.org1 point
-
Hi everyone, I have just updated the hooks and if you restart your bots everything should be back to normal again. However, we can't guarantee this is the case as I have not had the time to check and test each and every hook, although my script is running again for the last 5 minutes with no problems. Also all debugs are verified, so as far as I can tell we're all set until their next update. As usual, we are the first again . Steps for you: 1. Close your bot 2. Start your bot 3. Repeat if it doesn't work the first time (usually will) If you find any problems with any of the hooks, please report so in the bugs section. Happy botting, OSBot.org1 point
-
1 point
-
Its not about that. I personally use windows xp and it wont save my account details, and now the scripts wont work if i dont use an account. While my friend on windows 7, it saves everything nicely and all runs smoothly. Create account, i fill the boxes, save and everything is deleted.1 point
-
You're all wrong about pid lol. Pid is 100% based around IP. Not anything about logging in before anyone, not about pressing follow to find it. In runescape 2007, go to google and type in "My IP". There should be 4 sets of numbers. For example, 129.41.80.3 If the third number *80* is divisible by 8, and if the last number *3* is really low, then you have a great pid. The IP address I linked here is magnificent, hence why a lot of people use VPN's to stake to get new IP addresses. This is such BS. If you've ever staked, you know this isn't right. All this is is Ping, the delay in which your mouse clicks react with the server. Let's say you're a staker. You stake someone called *Fanman1* on your first day of staking. He gets the first hit so he don't stake him anymore. The next day, you stake him again. He still has first hit. You don't stake him anymore etc. PID IS NOT BASED AROUND YOU LOGGING IN AND OUT OF THE SERVER. PID IS BASED AROUND IP 100%. How do I know this? Go test it out. Go to the duel arena with a friend, and stake him 50 times in a row and log out and in each time you stake. The person who got the first hit the first time, WILL HAVE FIRST HIT ALL THE OTHER TIMES, TOO. Again, right clicking someone and pressing FOLLOW is your PING, not your PID. This is also BS. You don't need a good angle. You don't need to right click. You don't need to wait till 1. All you have to do is have a better IP than your opponent. There's no reason to wait till 1 because all you're doing is spam clicking anyway and the server already recognizes your clicks. If anything, use a delay, like cutting a gem before the stake begins. This will delay your characters movements and hide where you really are in the game. Let's say you're on one end of the arena, and your opponent is on the other side. Before the stake begins, you take your chisel and start cutting the gem. Left click on your minimap towards your opponent. The delay is so great, that by the time the stake actually begins and your character says "Fight", you instantly pop out right next to them because of the delay and take your opponent by surprise. If you don't get first hit, don't worry. Just make sure movement is on. You want to utilize the forfeit box to the best of your ability. Running around it can lure your opponent and have them stop attacking you for a second or two. Within those seconds, you can get the first hit back because basically the fight just restarted since both of your attack animations are ready to begin again. EDIT o god i responded months after this was posted. o well. at least people won't read bad guides about pid anymore :[ EDIT AGAIN Actually, you don't want to face your opponent. Idk why, but if you don't have a delay "Like cutting the gem", then never face your opponent, and never run towards them. The server will process your request faster for some reason than the person who's running at you and already facing you. No idea why though.1 point
-
1 point