Leaderboard
Popular Content
Showing content with the highest reputation on 06/29/13 in Posts
-
4 points
-
The following update contains mainly improvements with clicking accuracy. The client will now analyze each menu option to verify if it represents the object we desired to interact with. This bugfix also applies to interface interactions as well. Also a few hooks in RS2InterfaceChild were fixed. P.S. Lost and found has been verified to work on this release. Thanks, Sincerely, Laz and the OSBot Team.3 points
-
Been requested to me a few times, So figured I might give it a go in a week or so when I've finalised my year at uni. Server would be your basic spawn/pk server for a bit of fun, would try to get really decent combat etc and have a general laugh whilst botting. If this gets a decent amount of support then I will most likely give it ago. I have done a lot of work on rsps, so it should be a fun project. Let me know what you think.2 points
-
This release has menu count debugging disabled. This was enabled in our previous release as an error. This release also features a patch to the local script loader. Hopefully this fixes issues with people trying to load local scripts. Thanks, Sincerely, Laz and the OSBot Team.2 points
-
We should make a seperate thread for people to say thanks for the updates because I come to this thread to read stuff on the update but can't 'cuz all I see is people being like "thanks you are da best"2 points
-
2 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.java1 point
-
1 point
-
1 point
-
1 point
-
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
-
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
-
/** * @return The item that is edible to eat. * @author Baheer */ public Item getEdibleItem() { Item[] is = client.getInventory().getItems(); for (Item i : is) { if (i == null) continue; if (i.getDefinition() == null || i.getDefinition().getActions() == null || i.getDefinition().getActions()[0] == null) { continue; } if (i.getDefinition().getActions()[0].contains("Eat")) { return i; } } return null; }1 point
-
1 point
-
1 point
-
1 point
-
Is it normal at .15 that the action list is printed out over the whole screen all time? I can't find a way to put if of because its pretty ennoying while botting ;) kind regards H0ppy1 point
-
1 point
-
1 point
-
1 point
-
Why do people like the be smart asses online, but they turn out to be a pussy irl?1 point