itSchRis917
08-20-2007, 11:02 PM
So, im just tweaking my Draynor Netter right now. (Almost ready for release!) And i wrote the progress report today, however, Players[CurrentPlayer].Worked and Players[i].Worked ALWAYS return 0. No matter what. So, here's my progress report code, i dont know what you can tell from it, but im pretty sure the usage is correct.. There isnt another way to use it is there?
Procedure ProgressReport(ForceProgress: Boolean);
Var
i: Integer;
TempExp, TempLoads: Extended;
A: String;
Begin
If (GetSystemTime - Report2 >= PrintReport * 60000) or (ForceProgress) then
Begin
DoomDebug('Progress Report');
For i := 0 to (HowManyPlayers-1) do
TempLoads := TempLoads + Players[i].Extendeds[2];
For i := 0 to (HowManyPlayers-1) do
TempExp := (TempExp + (ShrimpExp * Players[i].Extendeds[0] + AnchovyEXP * Players[i].Extendeds[1]));
Writeln('<---------------------------------------------->');
Writeln('¦ Draynor Netter Ver '+VerNumber+' By Itschris917 ¦');
Writeln('<---------------------------------------------->');
Writeln(' Total Running Time : ' +TimeRunning);
Writeln(' Total Loads Done : ' +FloatToStr(TempLoads));
Writeln(' Total Exp Gained : ' +FloatToStr(TempExp));
Writeln('<---------------------------------------------->');
Writeln(' Current Player No. : ' +IntToStr(CurrentPlayer+1)+ '/' +IntToStr(HowManyPlayers));
Writeln(' Current Player Name : ' +Players[CurrentPlayer].Name);
Writeln(' Player Running Time : ' +IntToStr(Players[CurrentPlayer].Worked)+ ' Minutes');
Writeln(' Current Player Loads : ' +FloatToStr(Players[CurrentPlayer].Extendeds[2]));
If (LoggedIn) then
begin
Writeln(' Fishing Levels Gained : ' +IntToStr(GetSkillLevel('fishing')-Players[CurrentPlayer].Level[17]));
end;
Writeln(' Exp Approx Gained : ' +FloatToStr(ShrimpExp * Players[CurrentPlayer].Extendeds[0] + AnchovyEXP * Players[CurrentPlayer].Extendeds[1]));
Writeln(' Player Worked for : '+IntToStr(Players[CurrentPlayer].Worked)+' Minutes');
Writeln(' Player Currently : '+Players[CurrentPlayer].loc);
Writeln('<---------------------------------------------->');
for i := 0 to HowManyPlayers-1 do
begin
if Players[i].Active=True then A:='True' else A:='False';
writeln( (inttostr(i))+' : '+Players[i].name+ ' = '+A
+'. - Lvl: '+inttostr(Players[i].Level[17])
+'. - W: '+intToStr(Players[i].Worked)+' mins.'
+' - Shrimp: '+floatToStr(Players[i].Extendeds[0])
+' - Anchovies: '+floatToStr(Players[i].Extendeds[1])
+'. - Loads: '+floatToStr(Players[i].Extendeds[2])
+'. - Loc: '+Players[i].loc);
end;
Writeln('<---------------------------------------------->');
SRLStatsRep;
End;
Report2 := GetSystemTime;
GameTab(4);
end;
Procedure ProgressReport(ForceProgress: Boolean);
Var
i: Integer;
TempExp, TempLoads: Extended;
A: String;
Begin
If (GetSystemTime - Report2 >= PrintReport * 60000) or (ForceProgress) then
Begin
DoomDebug('Progress Report');
For i := 0 to (HowManyPlayers-1) do
TempLoads := TempLoads + Players[i].Extendeds[2];
For i := 0 to (HowManyPlayers-1) do
TempExp := (TempExp + (ShrimpExp * Players[i].Extendeds[0] + AnchovyEXP * Players[i].Extendeds[1]));
Writeln('<---------------------------------------------->');
Writeln('¦ Draynor Netter Ver '+VerNumber+' By Itschris917 ¦');
Writeln('<---------------------------------------------->');
Writeln(' Total Running Time : ' +TimeRunning);
Writeln(' Total Loads Done : ' +FloatToStr(TempLoads));
Writeln(' Total Exp Gained : ' +FloatToStr(TempExp));
Writeln('<---------------------------------------------->');
Writeln(' Current Player No. : ' +IntToStr(CurrentPlayer+1)+ '/' +IntToStr(HowManyPlayers));
Writeln(' Current Player Name : ' +Players[CurrentPlayer].Name);
Writeln(' Player Running Time : ' +IntToStr(Players[CurrentPlayer].Worked)+ ' Minutes');
Writeln(' Current Player Loads : ' +FloatToStr(Players[CurrentPlayer].Extendeds[2]));
If (LoggedIn) then
begin
Writeln(' Fishing Levels Gained : ' +IntToStr(GetSkillLevel('fishing')-Players[CurrentPlayer].Level[17]));
end;
Writeln(' Exp Approx Gained : ' +FloatToStr(ShrimpExp * Players[CurrentPlayer].Extendeds[0] + AnchovyEXP * Players[CurrentPlayer].Extendeds[1]));
Writeln(' Player Worked for : '+IntToStr(Players[CurrentPlayer].Worked)+' Minutes');
Writeln(' Player Currently : '+Players[CurrentPlayer].loc);
Writeln('<---------------------------------------------->');
for i := 0 to HowManyPlayers-1 do
begin
if Players[i].Active=True then A:='True' else A:='False';
writeln( (inttostr(i))+' : '+Players[i].name+ ' = '+A
+'. - Lvl: '+inttostr(Players[i].Level[17])
+'. - W: '+intToStr(Players[i].Worked)+' mins.'
+' - Shrimp: '+floatToStr(Players[i].Extendeds[0])
+' - Anchovies: '+floatToStr(Players[i].Extendeds[1])
+'. - Loads: '+floatToStr(Players[i].Extendeds[2])
+'. - Loc: '+Players[i].loc);
end;
Writeln('<---------------------------------------------->');
SRLStatsRep;
End;
Report2 := GetSystemTime;
GameTab(4);
end;