Jump to content

Joseph

Trade With Caution
  • Posts

    4692
  • Joined

  • Last visited

  • Feedback

    91.3%

Everything posted by Joseph

  1. Joseph

    Skill tracker

    so im releasing my skill tracker on account of a request. Plus i personally dont like osbot experience tracker. IM pretty sure they have most of these methods in there, probably hidden. @Alek feel free to use if you decide to update the experience class. updated: to support EnumMap Add this into the on start of the script. (The class that extends Script) Skilltracker skillTracker = new SkillTracker(this); SkillTracker.java package com.divine.tracker; import java.util.ArrayList; import java.util.EnumMap; import java.util.Iterator; import java.util.List; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; public class SkillTracker { private final EnumMap<Skill, Tracker> mapTracker; private Script ctx; public SkillTracker(Script ctx) { this.ctx = ctx; this.mapTracker = new EnumMap<Skill, Tracker>(Skill.class); } public EnumMap<Skill, Tracker> getTrackerMap() { return this.mapTracker; } public long getTotalXpGained() { long amount = 0; for (Skill skill: getGainedSkills()) { amount += getGainedXP(skill); } return amount; } public List<Skill> getGainedSkills() { Iterator<Skill> skill = mapTracker.keySet().iterator(); List<Skill> list = new ArrayList<>(); while (skill.hasNext()) { if (hasGainedXP(skill.next())) { list.add(skill.next()); } } return list; } private boolean hasGainedXP(Skill skill) { return getGainedXP(skill) > 0; } public void track(Skill...skills) { for (Skill skill: (skills.length == 0) ? Skill.values(): skills) { mapTracker.put(skill, new Tracker(skill)); } } public Tracker get(Skill skill) { Tracker tracker = mapTracker.get(skill); if (tracker == null) throw new UnsupportedOperationException("You're not tracking this skill!"); return tracker; } public long getElapsed(Skill skill) { return System.currentTimeMillis() - get(skill).startedTrackingAt; } public int getGainedLevels(Skill skill) { return ctx.skills.getStatic(skill) - get(skill).getStartLevel(); } public int getGainedXP(Skill skill) { return ctx.skills.getExperience(skill) - get(skill).getStartExp(); } public int getGainedXPPerHour(Skill skill) { return (int) actionsPerHour(getGainedXP(skill), get(skill).getStartedTrackingAt()); } public int percentToLevel(Skill skill) { int currentLevel = ctx.skills.getStatic(skill); int expBetween = expBetween(currentLevel, currentLevel+1); int expIntoLevel = ctx.skills.getExperience(skill) - getExpForLevel(currentLevel); return (int) (((double) expIntoLevel / (double) expBetween) * 100D); } public long getTimeToLevel(Skill skill) { if (getGainedXP(skill) <= 0) return 0; return (long) ((expToLevel(skill) * 3600000.0D) / (double) getGainedXPPerHour(skill)); } public long getTimeToLevel(Skill skill, int target) { if (getGainedXP(skill) <= 0) return 0; return (long) ((expToLevel(skill, target) * 3600000.0D) / (double) getGainedXPPerHour(skill)); } /* * Private methods */ private int expToLevel(Skill skill) { return ctx.skills.experienceToLevel(skill); } private int expToLevel(Skill skill, int target) { return getExpForLevel(target) - ctx.skills.getExperience(skill); } private int expBetween(int value1, int value2) { return getExpForLevel(Math.max(value1, value2)) - getExpForLevel(Math.min(value1, value2)); } private double actionsPerHour(long actions, long startTime) { return (3600000D / (System.currentTimeMillis() - startTime) * actions); } private int getExpForLevel(int level) { return ctx.skills.getExperienceForLevel(level); } private class Tracker { private final int startExp, startLevel; private final long startedTrackingAt; private Tracker(final Skill track) { this.startExp = ctx.skills.getExperience(track); this.startLevel = ctx.skills.getStatic(track); this.startedTrackingAt = System.currentTimeMillis(); } public int getStartExp() { return startExp; } public int getStartLevel() { return startLevel; } public long getStartedTrackingAt() { return startedTrackingAt; } } }
  2. Looks fine with me. Don't use id's use name. try debugging it using logs. Or even better try out the logic of your script. See if you can get the dropping to work first.
  3. or just force left click with w.interact();
  4. Use widgets. On the client go to the setting. Enable widget debugger. Simply just interact with the widget
  5. Joseph

    Download for MMU

    Collect path, creates area, and polygon areas. and it's all visual. I'm going to add a new feature to collecting path on my script. Ya man its no map, it's all hands on and visuals
  6. Joseph

    Download for MMU

    so it does what my script does. Divine utilityOn the sdn under others
  7. I'm talking about the functionality of the class sucks. It's lacking methods in my opinion.
  8. The skill tracker still sucks. At least in my own class. I have a method that returns an array list of skills that gained experience. Which is what he's looking for.
  9. What apa said above. We get the error in the console. We get to figure how to solve the problem clue
  10. our tracker class sucks for something like that.
  11. If we know of some widget where would we report them at? Here
  12. Joseph

    Auto log-in

    lol there is like three lines. Ofc it's safe.
  13. Joseph

    Auto log-in

    I got bored of having to sign in. Including since i just brought other account. i decided to make a script that will log me in. Then the script will end and leave you signed in. Enjoy http://uppit.com/71ez86cug74d/Sign_us_in.jar
  14. check out mine on the sdn. Under Others, named Divine Utility
  15. it will deselect by clicking on the inventory tab. Rather then on the item itself
  16. Resize able mode as a random looks great. Will it remove and go back to standard mode for us.
  17. I doubt it works with local scripts. I tried once but didn't really work for me. I sure it meant for the sdn
  18. You out the mirror jar in the data folder. Launch osb of the client jar. It will give you the option of mirror or standard on the osbot launcher
  19. I mean limit some of its feature and release it free on the sdn. The rule says there won't be any free aio skills. So compare your script with a premium. If you script latest enough feature from the other premium miner. I think it will be open to release it free
  20. Envy you? I don't even know you. Welcome to the club
×
×
  • Create New...