
Originally Posted by
Mattie403
Oh alright.. Well now how do I get the XP/hour? If I do a simple (xp/totaltime) it comes out 0.
Ok, using the same example:
Simba Code:
var
StartTime, TotalXp, PotsMade: integer;
const
NumPerLoad = 14;
XpPerPot = 50;
MarkTime(StartTime);
// Place this at the beginning of your script
...
if MakePotions then Inc(LoadsDone);
...
PotsMade := LoadsDone * NumPerLoad;
TotalXp := PotsMade * XpPerPot;
WriteLn('Potions Made: ' + IntToStr(PotsMade));
WriteLn('Xp / hr: ' + IntToStr((TotalXp * (1000 * 60 * 60)) / TimeFromMark(StartTime)));
// When you multiply TotalXp by an hour and divide by the time running, you're essentially multiplying the
// TotalXp by a fraction of how many hours the script has run. Note that TimeFromMark grabs a number in
// milliseconds, so you have to multiply TotalXp by an hour in milliseconds.