YoHoJo
2013-09-11 22:03:30
2013-09-11 22:03:30
2013-09-11 22:13:10
2013-09-11 22:52:31
private String getDurationString(int seconds) {
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
seconds = seconds % 60;
return twoDigitString(hours) + " : " + twoDigitString(minutes) + " : " + twoDigitString(seconds);
}
private String twoDigitString(int number) {
if (number == 0) {
return "00";
}
if (number / 10 == 0) {
return "0" + number;
}
return String.valueOf(number);
}2013-09-12 00:08:51
2013-09-12 01:59:35
2013-09-12 02:08:42
From: Nebula
time to level = ((xp till level up)/(xp per hour)) *3600
that would give you time in seconds. basically ((xp till level up)/(xp per hour)) would equal the time in hours, which you would convert to seconds by multiplying by 3600 cause theres 3600 seconds in an hour.
int XPGained = CURRENT_XP - START_XP;
int XPPerHour = (int) (XPGained * (3600000 / TimeRunning));
String XPPerHourSt = AddCommahs(Integer.toString(XPPerHour));private int logscut = 0;
private int invcount = Inventory.getCount(new String[] {"Oak logs"});2013-09-12 04:14:17
From: YoHoJo
Thanks did something similar to this and got it.int XPGained = CURRENT_XP - START_XP;
int XPPerHour = (int) (XPGained * (3600000 / TimeRunning));
String XPPerHourSt = AddCommahs(Integer.toString(XPPerHour));
How would I make a counter that counts how many logs have been cut and updates as I cut?
So I can have Logs Cut and Logs Cut Per Hour?
I've gotprivate int logscut = 0;
private int invcount = Inventory.getCount(new String[] {"Oak logs"});
Now what LOL?
WriteLn(PadR('[Magic : ' + FloatToStr(Round((BarsMade*XpPerBar* 3600) / (GetTimeRunning / 1000))) + ' Mage XP/Hr', 50) + ']');
int XPPerHour = (LogsChopped *XpPerChop* 3600) / (GetTimeRunning / 1000)int Chops = (LogsChopped * 3600) / (GetTimeRunning / 1000)int LogsChopped = LogsChopped 2013-09-20 05:36:55
From: YoHoJo
https://tribot.org/forums/index.php?/topic/20233-progress-report-help-ttl-counter/?p=251640
Thanks.

