its literally this...
import java.awt.*;
import java.text.DecimalFormat;
import java.util.concurrent.TimeUnit;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
@ScriptManifest(name = "KaramjaFisher", author = "Scriptation", version = 1.0, info = "Fishes & Banks", logo = "")
public class Main extends Script{
public String status;
private long timeBegan;
private long timeRan;
@Override
public void onStart() {
timeBegan = System.currentTimeMillis();
log("Starting!");
}
@Override
public void onExit() {
log("Ending");
}
@Override
public int onLoop() throws InterruptedException {
return 100;
}
private String ft(long duration)
{
String res = "";
long days = TimeUnit.MILLISECONDS.toDays(duration);
long hours = TimeUnit.MILLISECONDS.toHours(duration)
- TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration));
long minutes = TimeUnit.MILLISECONDS.toMinutes(duration)
- TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS
.toHours(duration));
long seconds = TimeUnit.MILLISECONDS.toSeconds(duration)
- TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS
.toMinutes(duration));
if (days == 0) {
res = (hours + ":" + minutes + ":" + seconds);
} else {
res = (days + ":" + hours + ":" + minutes + ":" + seconds);
}
return res;
}
@Override
public void onPaint(Graphics2D g) {
timeRan = System.currentTimeMillis() - this.timeBegan;
Graphics2D gr = g;
g.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF));
g.setColor(new Color(255, 255, 255));
g.setFont(new Font("Arial", 0, 13));
g.drawString(status, 200, 200);
g.drawString("Time running: " + ft(timeRan), 553, 225);
}
}