Jump to content

Welcome to DreamBot!

Download for Free

Supercharge Your Bots

Run unlimited bots today using DreamBot's Covert Mode and
stay more protected.

Upgrade Now
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
BottingHub.com Advertisment
Download the DreamBot client today!
Sign in to follow this  
Nuclear Nezz

Experience Tracker Plugin

Recommended Posts

DreamBot Experience Tracker

By Nezz

 

What does it do!?

It just tracks experience gained. If a script is running it will not reset the currently tracked experience. It'll show:
Experience Gained, Experience Per Hour, and Experience Until Level

 

Man, you're so cool!

I'm just a normal human bean.

 

Download:

https://www.dropbox.com/s/uko8kp2k56l0sne/xpTracker.jar?dl=0

 

But how do I use it!?

Put it in your local scripts folder.

Go to (in client) Tools->Plugins and click XP Tracker

 

Source:

XPTracker.java

package nezz.dreambot.plugin.xptracker;

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 = "XP Tracker", version = 0)
public class XPTracker extends Plugin{

	
	
	@Override
	public void onStart(){
		boolean scriptRunning = getClient().getInstance().getScriptManager().isRunning();
		for(Skill s : Skill.values()){
			getSkillTracker().start(s, !scriptRunning);
		}
	}
	
	private String formatNumber(Integer number){
		String[] suffix = new String[] { "K", "M", "B" };
        int size = (number.intValue() != 0) ? (int) Math.log10(number) : 0;
        if (size >= 3) {
            while (size % 3 != 0) {
                size = size - 1;
            }
        }
        return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d)
                + suffix[(size / 3) - 1]
                : +number + "";
	}
	
	@Override
	public void onPaint(Graphics g){
		int baseY = 35;
		for(Skill s : Skill.values()){
			if(getSkillTracker().getGainedExperience(s) > 0){
				long gainedXP = getSkillTracker().getGainedExperience(s);
				long xpTilLvl = getSkills().experienceToLevel(s);
				long xpPerHour = getSkillTracker().getGainedExperiencePerHour(s);
				int gainedLvl = getSkillTracker().getGainedLevels(s);
				int curLevel = getSkills().getRealLevel(s);
				g.drawString(s.getName() + " " + curLevel + "(" + gainedLvl + ") : " + formatNumber((int)gainedXP) + "(" + formatNumber((int)xpPerHour)+")" + " :: " + formatNumber((int)xpTilLvl),5,baseY);
				baseY+=15;
			}
		}
	}
}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...