Brandon
2011-03-24 02:49:08
I have the following piece of code for the progress report in a herblore bot that counts how many pots the bot made per hour.. Im pretty sure that its the right formula?..
Anyway It doesnt work and I dont know why.. This is what happened:
TimeRunning: 20m 14s
Pots Made: 672
Pots Made/Hour: -1544 <— Problem.. and it keeps getting even more negative… atm its at -236 now, 10 seconds later its at -180..
What am I doing wrong?? Am I supposed to use Players worked instead? (not even near as accurate for some reason).
Thing is it works fine and counts the pots made/hr perfectly up until it hits the 18-19 minute mark and then it goes negative and just decreases in value. I tried Int64ToStr, I tried IntToStr, ToStr. None worked..
Edit: At 37minute mark, its back up to positive 17… but it makes no sense.. 17 pots/hr wth?
'Pots made/Hour: ' + ToStr(Ceil(UnfPotsDone * 60 * 60 * 1000) / GetTimeRunning))
Anyway It doesnt work and I dont know why.. This is what happened:
TimeRunning: 20m 14s
Pots Made: 672
Pots Made/Hour: -1544 <— Problem.. and it keeps getting even more negative… atm its at -236 now, 10 seconds later its at -180..
What am I doing wrong?? Am I supposed to use Players worked instead? (not even near as accurate for some reason).
Thing is it works fine and counts the pots made/hr perfectly up until it hits the 18-19 minute mark and then it goes negative and just decreases in value. I tried Int64ToStr, I tried IntToStr, ToStr. None worked..
Edit: At 37minute mark, its back up to positive 17… but it makes no sense.. 17 pots/hr wth?