Total
2012-04-11 04:30:28
So I'm having troubles with my progress report calculations. After a certain amount of time they turn into wild numbers that are obviously incorrect. Here are some examples.
Proggy :
Code for proggy(I set NatsMade to 0 when I start the script):
Will post more proggies/examples if needed, but I think this will work for now.
Proggy :
//////TotalNats V1//////
Nats crafted: 7306(5053 Nats/Hour)
Exp gained: 33267 exp(23008 Exp/Hour)
Profit earned: 800007 gp(-271842 GP/Hour) <--- See? negative gp/hr
Essence used: 3653 essence
Pouches repaired: 6
Running for: 01:26:45
///////////////////////////
Code for proggy(I set NatsMade to 0 when I start the script):
procedure Proggy;
begin
Seconds := (GetTimeRunning/1000);
EssUsed := (NatsMade / 2);
EssLoss := (EssUsed * EssPrice);
XPGained := (GetXPBarTotal - StartExp);
XPPerhour :=(3600*(XPGained))/(Seconds);
NatsProfit := (NatsMade * NatsPrice);
TotalProfit := (NatsProfit - EssLoss);
ProfitPerHour := (3600*(TotalProfit))/(Seconds);
NatsPerHour := (3600*(NatsMade))/(Seconds);
ClearDebug;
Writeln('//////TotalNats V' + ToStr(Version) + '//////');
Writeln('Nats crafted: ' + ToStr(NatsMade) + '(' + ToStr(NatsPerHour) + ' Nats/Hour)');
Writeln('Exp gained: ' + ToStr(XPGained) + ' exp' + '(' + ToStr(XPPerHour) + ' Exp/Hour)');
Writeln('Profit earned: ' + ToStr(TotalProfit) + ' gp' + '(' + ToStr(ProfitPerHour) + ' GP/Hour)');
Writeln('Essence used: ' + ToStr(EssUsed) + ' essence');
Writeln('Pouches repaired: ' + ToStr(Repaired));
Writeln('Running for: ' + MsToTime(GetTimeRunning, Time_Bare));
Writeln('///////////////////////////');
end;
Will post more proggies/examples if needed, but I think this will work for now.