-
Posts
1664 -
Joined
-
Last visited
-
Days Won
4 -
Feedback
100%
Everything posted by Bobrocket
-
When I get on my PC, I'll post my interact method so you can get a feel for it EDIT Here it is. It's not the best example, it uses while loops (which you shouldn't typically use), and obviously you need external vars (biasDeviation and contextMenuDeviation) for tihs to work. public boolean interactWith(NPC e, String action) throws InterruptedException { if (e == null) { return false; } if (getMenuAPI().isOpen()) { getMouse().click(false); sleep(sleepDeviateRand(5, 15)); } //e.hover(); while (!getMouse().isOnCursor(e)) { e.hover(); /*sleep(sleepDeviateRand(1, 2));*/ } //hover String tooltip = getMenuAPI().getTooltip().toLowerCase(); String estimatedToolTip = (action + " " + e.getName()).toLowerCase(); if ((getFirstAction(e).equals(action) && getMouse().getOnCursorCount() == 1) || tooltip.startsWith(estimatedToolTip)) { getMouse().click(false); log("Left clicked!"); return true; } while (!getMenuAPI().isOpen()) { getMouse().click(true); sleep(sleepDeviateRand(5, 15)); } //open interface sleep(sleepDeviateRand(5, 15)); List<Option> options = getMenuAPI().getMenu(); int rectIndex = -1; for (int i = 0; i < options.size(); i++) { Option o = options.get(i); String s = o.action; if (s.equals(action)) { rectIndex = i; break; } } if (rectIndex == -1) { return false; } Rectangle optionRect = getMenuAPI().getOptionRectangle(rectIndex); int height = optionRect.height; int startX = optionRect.x; int startY = optionRect.y; int width = optionRect.width; int endX = startX + width; int endY = startY + height; int perc = 0; if (contextMenuDeviation > 10) { //We want to get the correct context values if (and only if) we have a suitable context menu dev. value (otherwise we just go for the entire object) float percentage = width / 100; //Keep as much precision as possible percentage *= contextMenuDeviation; perc = (int) percentage; } int centreX = (startX + (width / 2)); if (biasDeviation) { Point p = getMouse().getPosition(); int mouseX = (int) p.getX(); if (mouseX > centreX) { //Right side of the context menu startX = centreX; if (perc > 0) { endX = (startX + (perc / 2)); //We do (perc / 2) because in the calculation we account for the entire width } } else { //Left side of the context menu endX = centreX; if (perc > 0) { startX = (centreX - (perc / 2)); } } } else { startX += (perc / 2); endX -= (perc / 2); } //2px bounds incase the bounding boxes are fucked int randX = getRandom(startX + 1, endX - 1); int randY = getRandom(startY + 1, endY - 1); Area mouseArea = createArea(new Point(randX, randY), 2); //Create a 3x3 box while (!mouseArea.contains((int) getMouse().getPosition().getX(), (int) getMouse().getPosition().getY())) { getMouse().move(randX, randY); sleep(sleepDeviateRand(5, 15)); } //move to option sleep(sleepDeviateRand(5, 15)); while (getMenuAPI().isOpen()) { getMouse().click(false); sleep(sleepDeviateRand(5, 15)); } //click sleep(sleepDeviateRand(25, 45)); return true; }
-
If you had the source for that, it would be running off of the OSBot 1 API which is old. There are good tutorials, snippets etc in the appropriate sections. Good luck!
-
I feel like my identity has been stolen :'( Good job though! As Apaec said, look into player height (remember that player height also fluctuates normally so add 3 to the player height at all times to negate that)
-
Are you null checking? Item i = getInventory().getItem("Tuna"); if (i != null /* other checks */) { //execute }
-
Holy fucking shit that's deep
-
public static boolean iBusy() throws InterruptedException { for (int i = 0; i < 4; i++) { if (myPlayer().isAnimating()) return true; sleep(420); } return false; } Gotta work on writing less code for the same objective fam
-
Pass a Script instance to your class like so: public class myCoolClass { private Script script; public myCoolClass(Script src) { script = src; } public void myCoolMethod() { Item[] items = script.getInventory().getItems(); } }
-
Paid scripts are paid because the scripter wants to monetise it basically. Can be for any reason. Paid scripts can be safer since less people use them, but not always.
-
http://vocaroo.com/i/s0jcMgRxbOAA
-
I think you should settle for 30fps on 900p b-b-but muh eyes cant see the difference
-
The oil will cost you like $500 if you want the premium shit bro
-
How to speed your computer up drastically(run 10-15 bots at once)
Bobrocket replied to Massacre's topic in Spam/Off Topic
!!NOTE FOR 64 BIT OPERATING SYSTEMS!! Do not just delete system32, also delete SYSWOW64! -
Think this will be the same with speeding up verification?
-
Skrill seems to just be really fucking slow in general. Sent my documents in like a week ago to get verified, no response
-
In the high 50s, no other stats. No registered email etc etc, email login, no bans, and no membership. Just curious to see what it would be worth :p
-
it's a floater
-
Art is interpretive, you just don't understand
-
High quality PSD available on demand.
-
This is the snippets section, and while I respect your work, you should try and post snippets that people can expand on at their own leisure Having all of your code makes a good example, although then it's more of a tutorial than a snippet
-
Just saying, people aren't going to have the same GUI options so you want to have an easier way to read/write: import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; public class Save { private PrintWriter pw; String localDir = System.getProperty("user.home") + File.separator + "OSBot" + File.separator + "data" + File.separator; public Save(String localName) { try { pw = new PrintWriter(localDir + localName); } catch (FileNotFoundException e) { e.printStackTrace(); } } public boolean writeString(String s) { pw.println(s); return true; } public boolean writeObject(Object o) { pw.println(String.valueOf(o)); return true; } public boolean writeBoolean(boolean b) { return writeObject(b); } public boolean writeInt(int i) { return writeObject(i); } } import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.Charset; public class Load { private BufferedReader br; private InputStream fis; private InputStreamReader isr; private boolean finished = false; String localDir = System.getProperty("user.home") + File.separator + "OSBot" + File.separator + "data" + File.separator; public Load(String localName) { try { fis = new FileInputStream(localDir + localName); isr = new InputStreamReader(fis, Charset.forName("UTF-8")); br = new BufferedReader(isr); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public String readString() throws IOException { String line = null; if (!finished) { line = br.readLine(); if (line == null) finished = true; } else { if (br != null) { br.close(); fis.close(); isr.close(); br = null; } } return line; } public boolean readBoolean() throws IOException { return Boolean.valueOf(readString()); } public int readInt() throws IOException { return Integer.valueOf(readString()); } } Then you can just do: Save s = new Save("settings.ini"); s.writeString("Checkbox 1"); // Load l = new Load("settings.ini"); String checkbox = l.readString(); //Checkbox 1
-
Looks like your installation of java is corrupt. Go into Control panel -> programs, and uninstall it. Then reinstall it, and make sure it says you have successfully installed java
-
In CMD, can you run the command "java -version"?
-
Look for Java Platform SE binary under your list of apps then.
-
old enough to pee aka 16
-
You need to install java.