Jump to content

Dreamliner's XP Watchdog


Dreamliner

Recommended Posts

Devs: I have made a watchdog tool kit to automatically watch for any experience gains while running any script. It has a few features, and will be expanding with any ideas which seem beneficial -

With this jar, you can set up an amount of time (in advance) to count xp gains. When the xp gains are older than your chosen time, the are removed and not counted any more.

The result is a (sort of) real time glance for how well the bot has done in the past x amount of time. No more 19 hour proggies with some xp/hr which means nothing. Xp varies while running scripts. (combat especially.) I hope this toolkit gets used and abused in future scripts.

import java.awt.Graphics;

// import my watchdog
import dreamliner.XPWatchdog;

import org.osbot.script.Script;
import org.osbot.script.ScriptManifest;
import org.osbot.script.rs2.skill.Skill;

@ScriptManifest(name = "Dream's Watchdog Tester", author = "Dreamliner", version = 1.0, info = "Watchdog tester. Hope you like!")
public class AIO extends Script {
	// create the watchdog reference
	XPWatchdog watchdog;
	Thread t;

	public void onStart() {
		log("Waiting for log in");
		while (this.client.getLoginState() != 30) {
			try {
				sleep(250);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		// initialize the watchdog
		this.watchdog = new XPWatchdog(this.client,this);
		// create the new watchdog thread
		this.t = new Thread(this.watchdog);
		// start the thread
		this.t.start();
	}

	public int onLoop() throws InterruptedException {
		return 1000;
	}

	public void onPaint(Graphics g) {
		// pick anything you want to display.
		g.drawString(this.watchdog.getXpPerPrune(Skill.ATTACK) + " per 5 mins",
				300, 300);
	}

	public void onExit() {
		log("thread interrupted");
		this.t.interrupt();
	}
}
link to the jar file -> http://goo.gl/Fy2hu

 

link to jar tester -> http://goo.gl/HnqII

 

Methods:

 

public void setPruneTime(int t);

// sets the amount of time (in milliseconds) to get rid of data points (> 1000ms)

// default: 1000*60*5 ms (5 mins)

 

public int getXpPerPrune(Skill s);

// returns the amount of xp gained per prune time for the skill of your choice

 

public int getAllXpPerPrune();

// returns the total amount of xp gained on the account during the prune time.

tEkcqNo.jpg

a picture was requested..

Edited by dreamliner
  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...