Jump to content

FearMe

Members
  • Posts

    652
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by FearMe

  1. GOSH I CERTAINLY DO HOPE I WIN THIS GIVEAWAY
  2. hey babe wanna give me a working item selection method? thx <3

  3. But then you can just check if its at (-1, -1) and don't render it when it is, so you don't get the image on the top left :P
  4. FearMe

    I'm late but omedetou! :3

  5. int mX = client.getMousePosition().x; int mY = client.getMousePosition().y; Do both those not just return -1 if the mouse is outside the screen?
  6. sAIO Fletcher gave me a really good idea how to make a fletching script, you can look at my fletcher script source code too, it works great as far as I'm aware.
  7. Totally forgot that some items have a " ' " in the name, plus sign works fine though.
  8. This is more for stuff like calculating money gained per hour, nothing big. If i recall correctly there's a full-fletched library on like the 2nd or 3rd page of this subforum.
  9. Have fun. /** * @author FearMe * @param name the exact item name * @return the price(not 100% accurate) * @throws IOException */ private int getPrice(String name) throws IOException { if (name.length() <= 3) return 0; URL url = new URL("http://forums.zybez.net/runescape-2007-prices/api/item/" + name.replace("+", "%2B").replace(' ', '+').replace("'", "%27")); URLConnection con = url.openConnection(); con.addRequestProperty("User-Agent", "Mozilla/5.0"); BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); String line = ""; String inputLine; while ((inputLine = in.readLine()) != null) line += inputLine; in.close(); if (!line.contains("average\":\"")) return 0; line = line.substring(line.indexOf("average\":\"") + "average\":\"".length()); line = line.substring(0, line.indexOf("\"")); return (int) Math.round(Double.parseDouble(line)); }
  10. I know how to do it, just didn't bother putting it in :P
  11. Please note that Java is not my main programming language so excuse me if I did anything inefficiently or wrong. Just chuck this class in your script class, call it on #onStart() like this; private XPCheck x; public void onStart() { x = new XPCheck(Skill.MAGIC, Skill.SMITHING); x.start(300); } Also, make sure to call XPCheck.cancel() in your #onExit(), or it will keep checking, even when you end the script manually.
  12. What I did was check for the closest NPC by name, and if the rock you're currently mined changed to an NPC(it changes to an NPC when it's smoking, at least it's like this way with Ents), switch to another rock(can use closestObject... because it doesn't return the smoking rock/ent).
  13. Don´t play garen, he's worthless.
×
×
  • Create New...