Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Agility Plugin


    Nuclear Nezz
     Share

    Recommended Posts

    DreamBot Rooftop Agility Plugin

    By Nezz

     

    What does it do?!

    It keeps track of random data from the Rooftop Agility Course that you're currently on. This includes things like:

    Laps(p/h), Experience(p/h), Level(gained), Laps Until Level, Experience Until Level, and Efficiency.

     

    What do you mean by efficiency?

    This compares your current experience per hour to the maximum experience per hour allowed by that course. Most people generally get 60-70% I think. (That's just a guess from the times I've used it)

     

    This is awesome! How do I use it?

    I would suggest starting the plugin at the beginning of the course for accurate laps/hr (it tracks based on experience, not based on hitting the last obstacle), but you can start it anywhere on the course. It will also tell you which course your on, which it finds based on your distance from each course starting point.

     

    Does it do anything other than rooftops?

    No, it does not.

     

    Where do I put it when I download it?

    Just put it in your scripts folder, same as a local script. Then go to Tools->Plugins and click Agility Plugin.

     

     

    Download link:

    https://www.dropbox.com/s/1a80iv5zbaa1q3x/agilityTracker.jar?dl=0

     

    Source:

     
    Agility.java

     

     

    package nezz.dreambot.plugin.agility;
    
    import java.awt.Color;
    import java.awt.Graphics;
    
    import org.dreambot.api.methods.skills.Skill;
    import org.dreambot.api.plugin.Plugin;
    import org.dreambot.api.plugin.PluginManifest;
    
    @PluginManifest(author = "Nezz", name = "Agility plugin", version = 0)
    public class Agility extends Plugin{
    	Course c = null;
    	private boolean started = false;
    	
    	public void onStart(){
    		double dist = Double.POSITIVE_INFINITY;
    		for(Course co : Course.values()){
    			double tempDist = getLocalPlayer().distance(co.getStartTile());
    			if(tempDist < dist){
    				dist = tempDist;
    				c = co;
    			}
    		}
    		getSkillTracker().start(Skill.AGILITY);
    		getSkillTracker().reset(Skill.AGILITY);
    		started = true;
    	}
    	
    	public int getLapsLeft(){
    		long xpToLvl = getSkills().experienceToLevel(Skill.AGILITY);
    		return (int)(xpToLvl/c.getLapExperience());
    	}
    	
    	public int getLapsPerHour(){
    		long xpPerHour = getSkillTracker().getGainedExperiencePerHour(Skill.AGILITY);
    		return (int)(xpPerHour/c.getLapExperience());
    	}
    	
    	public int getLaps(){
    		long xpGained = getSkillTracker().getGainedExperience(Skill.AGILITY);
    		return (int)(xpGained/c.getLapExperience());
    	}
    	
    	public int getEfficiency(){
    		long xpPerHour = getSkillTracker().getGainedExperiencePerHour(Skill.AGILITY);
    		return (int)((xpPerHour*100)/c.getMaxExp());
    	}
    	
    	private int drawStats(Graphics g, int y){
    		int y_ = y;
    		g.drawString("Experience(p/h): " + getSkillTracker().getGainedExperience(Skill.AGILITY) +"(" + getSkillTracker().getGainedExperiencePerHour(Skill.AGILITY) + ")", 10, y_);
    		y_+=15;
    		g.drawString("Level(gained): " + getSkills().getRealLevel(Skill.AGILITY) + "(" + getSkillTracker().getGainedLevels(Skill.AGILITY) +")", 10, y_);
    		y_+=15;
    		g.drawString("Experience to level: " + getSkills().experienceToLevel(Skill.AGILITY), 10, y_);
    		y_+=15;
    		return y_;
    	}
    	
    	private int drawLaps(Graphics g, int y_){
    		int y = y_;
    		g.drawString("Laps Left: " + getLapsLeft(), 10, y);
    		y+=15;
    		g.drawString("Laps(p/h): " + getLaps() + "(" + getLapsPerHour() + ")", 10, y);
    		y+=15;
    		g.drawString("Efficiency: " + getEfficiency(), 10, y);
    		y+=15;
    		return y;
    	}
    	
    	public void onPaint(Graphics g){
    		if(started){
    			g.setColor(Color.lightGray);
    			int y = 50;
    			g.drawString(c.getRoofName(), 10, 50);
    			y+=15;
    			y = drawStats(g, y);
    			y = drawLaps(g, y);
    			
    		}
    	}
    	
    }
    

     

     

    Course.java

     

     

    package nezz.dreambot.plugin.agility;
    
    import org.dreambot.api.methods.map.Tile;
    
    public enum Course {
    	Draynor("Draynor", 120, 9800, new Tile(3104,3279,0)),
    	AlKharid("Al Kharid", 180, 10100, new Tile(3273,3195,0)),
    	Varrock("Varrock", 238,13200,new Tile(3221,3414,0)),
    	Canifis("Canifis", 240, 19600, new Tile(3507,3488,0)),
    	Falador("Falador", 440, 26800, new Tile(3036,3341,0)),
    	Seers("Seers", 570, 46600, new Tile(2729,3488,0)),
    	Pollnivneach("Pollnivneach", 890, 52600, new Tile(3351,2961,0)),
    	Relleka("Relleka", 780, 54800, new Tile(2625,3677,0)),
    	Ardougne("Ardougne", 793, 62300, new Tile(2673,3298,0));
    	
    	private String roofName;
    	private int lapExp, maxExp;
    	private Tile startTile;
    	Course(String roofName, int lapExp, int maxExp, Tile startTile){
    		this.roofName = roofName;
    		this.lapExp = lapExp;
    		this.maxExp = maxExp;
    		this.startTile = startTile;
    	}
    	
    	public String getRoofName(){
    		return roofName;
    	}
    	public int getLapExperience(){
    		return lapExp;
    	}
    	public int getMaxExp(){
    		return maxExp;
    	}
    	public Tile getStartTile(){
    		return startTile;
    	}
    	
    }
    

     

     

    Link to comment
    Share on other sites

    • 3 months later...
    • 3 months later...
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.