https://tribot.org/forums/index.php?...nter/?p=251640
Thanks.
Printable View
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.
http://stackoverflow.com/questions/6...s-android-java
java Code: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);
}
Would return hours, minutes, seconds
Okay I've got
int TTL = ((XPToLevel/XPPerHour) * 3600);
How can I convert this to HH:MM:SS format easily/nicely? :-)
Math is math, regardless of which programming language you use. Just steal...erm Borrow someones fancy Proggy function from here, TONS of them, And just take the math part from them :P
idt i have any on-hand atm cause i never use xp/hr proggys for my private scripts.. :c
Thanks did something similar to this and got it.
How would I make a counter that counts how many logs have been cut and updates as I cut?Code:int XPGained = CURRENT_XP - START_XP;
int XPPerHour = (int) (XPGained * (3600000 / TimeRunning));
String XPPerHourSt = AddCommahs(Integer.toString(XPPerHour));
So I can have Logs Cut and Logs Cut Per Hour?
I've got
Now what LOL?Code:private int logscut = 0;
private int invcount = Inventory.getCount(new String[] {"Oak logs"});
This is from my superheater
Simba Code:WriteLn(PadR('[Magic : ' + FloatToStr(Round((BarsMade*XpPerBar* 3600) / (GetTimeRunning / 1000))) + ' Mage XP/Hr', 50) + ']');
this gets magix xp per hour
This gets just logs chopped per hourCode:int XPPerHour = (LogsChopped *XpPerChop* 3600) / (GetTimeRunning / 1000)
This gets total logs choppedCode:int Chops = (LogsChopped * 3600) / (GetTimeRunning / 1000)
Edit:made more relevant example.Code:int LogsChopped = LogsChopped
Edit2: error in code.
(removed)...
http://speedcap.net/sharing/files/da...acaf89375d.png
http://speedcap.net/sharing/files/42...7d439030d0.png
Api maybe a little different but it's all there.