Jump to content

Reid

Members
  • Posts

    804
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Reid

  1. Planks all types of logs in Varrock [EAST]. Features Smart NPC Detection. Will log out when out of Coins or Logs Unbreakable (Will always fix itself). World hopping if teleported to bot watch world. Simple, informative paint and UI. How To Run Start in Varrock East bank with logs and coins in your inventory.How To Get This script is pending acceptance into the SDN. Update Log v1.00 - Public ReleaseProgress Reports
  2. I'm sure somebody will find this useful. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; /** * GrandExchange Price Class * * @author Reid * */ public class GrandExchange { private static final String BASE = "https://api.rsbuddy.com/grandExchange?a=guidePrice&i="; /** * Default Constructor * */ public GrandExchange() { } /** * Gets the overall price of an item. * * @param itemID * @return itemPrice * @throws IOException */ public int getOverallPrice(final int itemID) throws IOException { return parse(itemID,"overall"); } /** * Gets the buying price of an item. * * @param itemID * @return itemPrice * @throws IOException */ public int getBuyingPrice(final int itemID) throws IOException { return parse(itemID,"buying"); } /** * Gets the selling price of an item. * * @param itemID * @return itemPrice * @throws IOException */ public int getSellingPrice(final int itemID) throws IOException { return parse(itemID,"selling"); } /** * Retrieves the price of an item. * * @param itemID * @return itemPrice * @throws IOException */ private int parse(final int itemID, String choice) throws IOException { final URL url = new URL(BASE + itemID); BufferedReader file = new BufferedReader(new InputStreamReader(url.openStream())); String line; String price = null; while ((line = file.readLine()) != null) { if (line.contains("{")) { price = (line).trim(); } } if (choice.equals("buying")){ price = price.substring(price.indexOf(",") + 10, nthOccurrence(price, ',', 1)).trim(); } else if(choice.equals("selling")) { price = price.substring(nthOccurrence(price, ',', 2) + 11 , price.indexOf("sellingQuantity") - 2).trim(); } else { price = price.substring(price.indexOf(":") + 1, price.indexOf(",")).trim(); } file.close(); return Integer.parseInt(price); } private int nthOccurrence(String str, char c, int n) { int pos = str.indexOf(c, 0); while (n-- > 0 && pos != -1) pos = str.indexOf(c, pos + 1); return pos; } }
  3. Currently working on a weather application for fun and experience. Feel free to use as well as give me some feedback package com.reiddacosta.rweather; import java.io.IOException; import com.reiddacosta.rweather.api.Weather; /** * rWeather v1.0 * * @author Reid DaCosta * */ public class rWeather { public static void main(String[] args) throws IOException { System.out.println(new Weather().getTemperature()); } } package com.reiddacosta.rweather.api; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; /** * Weather Class * * @author Reid DaCosta * */ public class Weather { private static final String BASE = "https://api.forecast.io/forecast/477268b98a0bc386f1e6e624777a6077/"; private String userLatitude; private String userLongitude; private int userTemperature; private Location location; /** * Default Constructor * * @throws IOException */ public Weather() throws IOException { location = new Location(); this.userLatitude = location.getLatitude(); this.userLongitude = location.getLongitude(); userTemperature = (int) toCelsius(getUserTeperature()); } /** * Returns the temperature for the user based on their location. * * @return userTemperature */ public int getTemperature() { return userTemperature; } /** * Sets the temperature for the user. * * @param userTemperature */ public void setTemperature(int userTemperature){ this.userTemperature = userTemperature; } /** * Returns the temperature based on the users location. * * @return userTeperature * @throws IOException */ private String getUserTeperature() throws IOException { final URL url = new URL(BASE + userLatitude + "," + userLongitude); BufferedReader file = new BufferedReader(new InputStreamReader(url.openStream())); String line, almost; String userTeperature = null; while ((line = file.readLine()) != null) { if (line.contains("apparentTemperature")) { userTeperature = (line); } } file.close(); almost = userTeperature.substring(userTeperature.indexOf("apparentTemperature"),userTeperature.indexOf("dewPoint")); return almost.substring(almost.indexOf(":") + 1, almost.indexOf(",")); } /** * Returns the temperature in Celsius. * * @param fahTemp * @return tempCelsius */ private double toCelsius(String fahTemp) { return (int) (Double.parseDouble(fahTemp) - 32) * 5 / 9; } } package com.reiddacosta.rweather.api; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; /** * Location Class * * @author Reid DaCosta * */ public class Location { private static final String BASE = "http://whatsmylatlng.com"; private String userLocation; private String userLatitude; private String userLongitude; /** * Default Constructor * * @throws IOException */ public Location() throws IOException { this.userLocation = getuserLocation(); this.userLatitude = userLocation.substring(0, userLocation.indexOf(",")); this.userLongitude = userLocation.substring(userLocation.indexOf(",") + 1, userLocation.length()); } /** * Returns the Latitude of the user. * * @return userLatitude */ public String getLatitude() { return userLatitude.trim(); } /** * Sets the Latitude of the user. * * @param userLatitude */ public void setLatitude(String userLatitude) { this.userLatitude = userLatitude; } /** * Returns the Longitude of the user. * * @return userLongitude */ public String getLongitude() { return userLongitude.trim(); } /** * Sets the Longitude of the user. * * @param userLongitude */ public void setLongitude(String userLongitude){ this.userLongitude = userLongitude; } /** * Returns the Latitude & Longitude of the user. * * @return userLocation * @throws IOException */ private String getuserLocation() throws IOException { final URL url = new URL(BASE); BufferedReader file = new BufferedReader(new InputStreamReader(url.openStream())); String line; String userLocation = null; while ((line = file.readLine()) != null) { if (line.contains("geo.initialize")) { userLocation = (line); } } file.close(); return userLocation.substring(userLocation.indexOf("(") + 1,userLocation.indexOf(")")); } }
  4. I'm retarded and can't find the method that returns the Vertices of an object? How would i do this exactly? getModel().getVerticesCount() NVM FOUND IT /CLOSE THREAD PLS
  5. Sweet and yeah that'd be awesome man
  6. Kinda a niche group of people but anyone here listen to tech house/techno? if so you should listen to my promo mix (ima dj) https://www.mixcloud.com/reiddac/tcrc-mix/ lemme know what you think
  7. Looking for 2 180x180 script icons! ps. i have u on Skype but ur not on?
  8. http://oldschool85.runescape.com/j1 http://oldschool86.runescape.com/j1
  9. Sweet, was just confirming because i have a feature implemented in all my scripts to hop from these worlds was just making sure they are still a thing :p
  10. Does jagex still have these?
  11. Yeah, i dont understand why the made it such an obscure price? Maybe make it like 0.99 or something
  12. Reid

    Molly's Thiever

    Can i have a trial please? @Molly
  13. Hello OSBot, I am currently writing my AIO Thieving script and was wondering for master farmers what are the good seeds (to keep) and bad seeds to drop? Reid
  14. Good luck with this script bro. Curious - Whats the XP PH?
  15. Idk why i can't respond to the upload request thread or PM you, but i fixed the error that was causing the compile error. should be able to compile now!

  16. do { sleep(10); } while(myPlayer().isAnimating()); not the best way of doing it but it should work
×
×
  • Create New...