E: EDIT LOL OPPS. Thought you wanted profit/hour, not just profit… oh well…
Here is a progress report for one of my scripts
Procedure ProgressReport;
Var
StoneRate: Integer;
Begin
SRLRandomsReport;
//Stats_Commit;
Sec:= (1+((Getsystemtime-StartTime)/1000));
StoneRate:=(3600*(TStones))/(Sec);
Writeln(' ');
Writeln('[REPORT]');
Writeln ('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
Writeln ('| --> YUGAY '+Version+ + PadL('<-- |', 15) );
Writeln ('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');
Writeln('|' + PadR( (' Worked for '+ TimeRunning) , 39) + '|');
Writeln('|' + PadR( (' Created '+IntToStr(TStones) +' Gatstones'), 39) + '|');
Writeln('|' + PadR( (' Gained '+FloatToStr(TStones * 43.5) +' Experience'), 39) + '|');
Writeln('|' + PadR( (' Created ' + IntToStr(StoneRate) + ' Stones/Hour'), 39) + '|');
Writeln('|' + PadR( (' Gained '+GroupDigits(Round(XPRate), ',') +' Experience/Hour'), 39) + '|');
Writeln ('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');
Writeln('[/REPORT]');
End;
So lets say your script alches (example).
After each alch put something like
Profit:= Profit+28;
(Assuming you make 28 profit per alch)
In the very start of your script (like after SetupSRL or Login), put
StartTime:= GetSystemTime;
(And declare StarTime as in integer at the top of your script).
Then have
Sec:= (1+((Getsystemtime-StartTime)/1000));
ProfitHR:=(3600*(Profit))/(Sec);
And also declare ProfitHR and Profit as integers at the top of your script.
So then doing
Writeln('Gained '+GroupDigits(Round(ProfitHR), ',') +' Profit/Hour');
Will spit out your profit/hr.