Jump to content

Pegasus

Lifetime Sponsor
  • Posts

    424
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Pegasus

  1. package org; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Plugin; import java.util.Comparator; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; public class Test extends Plugin { public String treeToCut = "Tree"; private Predicate<RS2Object> suitableObj = n -> n.getName().equals(treeToCut) && getMap().canReach(n) && getMap().distance(n) < 4; private java.util.List<RS2Object> treeObjs; @Override public int onLoop() throws InterruptedException { log("onLoop: "); List<RS2Object> allObjs = getObjects().getAll(); log("getObjects().getAll().size(): " + allObjs.size()); int count = 0; for(RS2Object obj : allObjs){ if (obj.getName().equals(treeToCut) && getMap().distance(obj) < 4) { log("AAA " + obj.getX() + " " + obj.getY()); count++; } } log("count: " + count); treeObjs = getObjects().getAll().stream().filter(suitableObj).collect(Collectors.toList()); if (!treeObjs.isEmpty()) { log("treeObjs.size(): " + treeObjs.size()); treeObjs.sort(Comparator.<RS2Object>comparingInt(a -> getMap().distance(a)).thenComparingInt(b -> getMap().distance(b))); log("sort treeObjs.size(): " + treeObjs.size()); treeObjs.forEach(obj -> log(obj.getX() + " " + obj.getY())); } else { log("treeObjs.isEmpty()"); } return 2000; } } onLoop: getObjects().getAll().size(): 8618 AAA 3163 3454 AAA 3163 3454 AAA 3163 3454 AAA 3163 3454 count: 4 treeObjs.size(): 4 sort treeObjs.size(): 4 3163 3454 3163 3454 3163 3454 3163 3454 Why? What is the meaning and different of these "duplicate" objects? Thanks
  2. you use your own private scripts or use free public scripts to bot this account?
  3. great java 8 tutorial! what is the meaning of : ((collectAmmo = ~collectAmmo & 1) == 1) ?
  4. Yes, it is because I want to observe how people do services. However, I am afraid no one will hire you to do services if you stream your services.
  5. I guess you can hardcode more than one position lists and then randomly use it with webpath().
  6. Pegasus

    50fm acc(s)

    do you want service?
  7. you may needto spend 1000 hours ingame to get a quest cape
  8. Does osrs detect operating system Time zone and compared to ip location? If operating system Time zone and ip location is not related , will it increases ban rate?
  9. Pegasus

    Skill tracker

    Ah.. there is startAll() method in the API already
  10. Could you use getNpcs().closest() with realDistance set to true?
  11. the wait between ug pass, to regicide is very long especially when you say need it done asap!
  12. Pegasus

    Skill tracker

    It took me more than 10 minutes to debug this bro. I think it is a useful debug for new scripters.
  13. Pegasus

    Skill tracker

    Great code! there is a minor mistake in getGainedSkills() public List<Skill> getGainedSkills() { Iterator<Skill> skill = mapTracker.keySet().iterator(); List<Skill> list = new ArrayList<>(); while (skill.hasNext()) { Skill s = skill.next(); if (hasGainedXP(s)) { list.add(s); } } return list; }
  14. Update 2018/7/14: Version002.006 - Add: Check if firemaking level is enough before running. - Add: Burn Yew logs and Magic logs. - Fix: experienceTracker on paint
  15. This script is still usable but you must babysit.
  16. People show their face in a hacking forum? seriously?
  17. Could you make script stops and move mouse outside client but stays login when run of of items?
  18. Machine Learning is in itself a huge learning. You need to be familiar with software engineering, math and data science. Probability and Statistics Algorithms Python Data Modeling...
  19. Experience Till level 99 is 9436639 Need to spend 7m for supply and at least 20 hours if you make wine from 86 to 99 level. you can earn 3.5m but need to spend 40 hours if you cook shark.
×
×
  • Create New...