Jump to content

Chris

Scripter II
  • Posts

    8355
  • Joined

  • Last visited

  • Days Won

    14
  • Feedback

    100%

Everything posted by Chris

  1. Chris

    Ahmet

    good bye https://osbot.org/forum/profile/303237-nevergiveup82/ https://osbot.org/forum/profile/297884-ahmet82/
  2. Correction. If you can show proof of the recent wealth then we can allow it. Otherwise he is only liable for the account value refund. Can you provide what you trained on the account? or was it just worth 120m 07?
  3. Yes it includes the wealth on the account + original price.
  4. I've notified @montie of the dispute. Since he confessed to recovering and in the evidence shown it was clear what his intentions were, he will be responsible for a full refund of all that you lost. He has 24 hours to do so.
  5. Learned how to use Jaunt & JSoup
  6. import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.io.IOException; import java.util.*; public class HiScores { public static HashMap<String, Stats> find(String searchPhrase){ HashMap<String, Stats> statsHashMap = new HashMap<>(); try { //Jsoup closes the connection by its own, after the request is done Document document = Jsoup .connect("https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal.ws?user1=" + searchPhrase.replaceAll(" ", "%20")) .userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36") .timeout(3000) .get(); //Select the first table. Element table = document.select("table").get(0); //Grab our rows of td from Element table Elements rows = table.select("td"); //Iterator to remove unnecessary data Iterator<Element> elementIterator = rows.iterator(); //List holds our skill type names List<String> typesAvailable = new ArrayList<>(); while (elementIterator.hasNext()){ Element node = elementIterator.next(); String attributesString = node.attributes().toString(); String text = node.text(); //Remove unneeded elements if (attributesString.contains(" valign=\"top\"") || attributesString.contains(" align=\"left\"") || attributesString.contains(" width=") || attributesString.contains(" colspan=") || text.getBytes().length == 0 || Character.isLetter(text.charAt(0))){ //Add our skill names to the map if (attributesString.contains(" align=\"left\"") && !attributesString.contains(" valign=\"top\"")){ System.out.println("Text available: " + text); System.out.println("Type added: " + text); typesAvailable.add(text); statsHashMap.put(text, new Stats(0, 0, 0)); } System.out.println("Removed: " + node.attributes()); elementIterator.remove(); } } System.out.println("\n" + "Personal scores for: " + searchPhrase); String type, rank, level, xp; //Loop through our elements and submit innertext to statsHashMap for (int i = 0, j = 0; i < rows.size() && j < typesAvailable.size(); i += 3, j++) { //Get type from typesAvailable type = typesAvailable.get(j); //Remove commas from our innertext data rank = rows.get(i).text().replaceAll(",", ""); level = rows.get(i + 1).text().replaceAll(",", ""); xp = rows.get(i + 2).text().replaceAll(",", ""); //Debug System.out.println("Type: " + type); System.out.println("Rank: " + rank); System.out.println("Level: " + level); System.out.println("Xp: " + xp + "\n"); //Add to our stats hashmap statsHashMap.put(type, new Stats(Integer.parseInt(rank), Integer.parseInt(level), Integer.parseInt(xp))); } } catch (IOException e) { e.printStackTrace(); } return statsHashMap; } public static class Stats { private int rank; private int level; private int exp; public Stats(int rank, int level, int exp) { this.rank = rank; this.level = level; this.exp = exp; } public int getRank() { return this.rank; } public int getLevel() { return this.level; } public int getExp() { return this.exp; } } //This uses Jaunt API but does not work inside OSbot scripts! Still was fun to learn because the API can fill forms and such /*public static HashMap<String, Stats> find(String searchPhrase){ HashMap<String, Stats> statsHashMap = new HashMap<>(); try { /* API: http://jaunt-api.com/javadocs/index.html Source: http://jaunt-api.com/ Usage: Import Source as JAR Warning: Ignores Overall statistics //Jaunt useragent connection and user submit UserAgent userAgent = new UserAgent(); userAgent.setCacheEnabled(false); userAgent.visit("https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal.ws"); userAgent.doc.apply(searchPhrase); userAgent.doc.submit("Search"); //Find table data elements and populate list Elements table = userAgent.doc.findEach("<td align=\"right\">"); List<Element> elementsList = table.toList(); List<String> typesAvailable = new ArrayList<>(); Iterator<Element> elementIterator = elementsList.iterator(); userAgent.close(); //Remove unneeded elements from our List<Element> elementsList while (elementIterator.hasNext()){ Element element = elementIterator.next(); String innerText = element.innerText(); String innerHTML = element.innerHTML(); if (innerText.getBytes().length == 0 || Character.isLetter(innerText.charAt(0))){ //Grab available types if any (e.g Attack) if (innerHTML.contains("src=")){ //Format: <img class="miniimg" src="https://www.runescape.com/img/rsp777/hiscores/skill_icon_attack1.gif"> String tableName = innerHTML.substring(innerHTML.indexOf("icon_") + 5, innerHTML.indexOf("1")); System.out.println("Added type: " + tableName); typesAvailable.add((tableName.substring(0, 1).toUpperCase() + tableName.substring(1))); } System.out.println("Removed: " + innerText); elementIterator.remove(); } } System.out.println("\n" + "Personal scores for: " + searchPhrase); String type, rank, level, xp; //Loop through our elements and submit innertext to statsHashMap for (int i = 0, j = 0; i < elementsList.size() && j < typesAvailable.size(); i += 3, j++) { //Get type from typesAvailable type = typesAvailable.get(j); //Remove commas from our innertext data rank = elementsList.get(i).innerText().replaceAll(",", ""); level = elementsList.get(i + 1).innerText().replaceAll(",", ""); xp = elementsList.get(i + 2).innerText().replaceAll(",", ""); //Debug System.out.println("Type: " + type); System.out.println("Rank: " + rank); System.out.println("Level: " + level); System.out.println("Xp: " + xp + "\n"); //Add to our stats hashmap statsHashMap.put(type, new Stats(Integer.parseInt(rank), Integer.parseInt(level), Integer.parseInt(xp))); } System.out.println("Skills map size: " + statsHashMap.size()); } catch (JauntException | IOException e) { e.printStackTrace(); } return statsHashMap; } */ }
  7. Alek already does this when scripts do not compile on the SDN but he gets very busy. You can PM @Maldesto and he can handle it by SDN removal.
  8. We tried everything. People still spam 'x bot broken' 'client fix when' 'eta plez?' Nobody reads
  9. Thursdays update seems to have broken interactions. Please be patient on a client fix! ~Chris Not looking into adding this type of feature at this time. Sorry
  10. Thursdays update seems to have broken interactions. Please be patient on a client fix! ~Chris
  11. OSBot may have an interruption of service because of the game update. This happens every Thursday since 2013, business as usual.
  12. OSBot may have an interruption of service because of the game update. This happens every Thursday since 2013, business as usual.
  13. You have to initializeABCLModule() in the onStart before you can access that antiban.
  14. This is what I have come up with two_ore_spawn area private Area two_ore_spawn = new Area(3175, 3366, 3175, 3368); private boolean newRock; //If we stopped animating OR newRock is TRUE if (!myPlayer().isAnimating() || newRock){ //Object filter for: hasOre AND inside the specified area RS2Object rock = getObjects().closest(obj -> Rock.IRON.hasOre(obj) && two_ore_spawn.contains(obj.getPosition())); //If rock type exists && we clicked it if (rock != null && rock.interact("Mine")){ //Set newRock to FALSE if we have just clicked it! newRock = false; log("Clicked on: " + rock.getName() + " " + rock.getPosition()); //Sleep until condition evaluates to true for 5 seconds and looping the condition every 1.5 seconds if (new ConditionalSleep(5000, 1500) { @Override public boolean condition() throws InterruptedException { return !rock.exists(); } }.sleep()){ log("Conditional sleep evaluated to true!"); //If the conditional sleep evaluated true then we set newRock to TRUE newRock = true; } } } Explv's Snippet Data import org.osbot.rs07.api.model.Entity; public enum Rock { CLAY(new short[]{6705}), COPPER(new short[]{4645, 4510}), TIN(new short[]{53}), IRON(new short[]{2576}), SILVER(new short[]{74}), COAL(new short[]{10508}), GOLD(new short[]{8885}), MITHRIL(new short[]{-22239}), ADAMANTITE(new short[]{21662}), RUNITE(new short[]{-31437}); private short[] colours; Rock(final short[] colours) { this.colours = colours; } public boolean hasOre(final Entity rockEntity) { if (rockEntity.getDefinition() == null) { return false; } short[] colours = rockEntity.getDefinition().getModifiedModelColors(); if (colours == null) { return false; } for (short rockColour : this.colours) { for (short entityColour : colours) { if (rockColour == entityColour) { return true; } } } return false; } }
  15. Lend me a account and I can post an open source snippet for everyone
  16. use the original runescape client. check the mirror mode section to see if it is working/updated.
×
×
  • Create New...