1
Stealth Client / [debug] Statistics
« on: December 09, 2017, 01:40:53 AM »
Hello to everyone.
I'm having a problem with creating statistics. I just cannot figure out and implement proper way to get PER HOUR stats. Check the stuf I got, maybe you can think of something.
The stats I get are totally wrong and insane.
I'm having a problem with creating statistics. I just cannot figure out and implement proper way to get PER HOUR stats. Check the stuf I got, maybe you can think of something.
Code: [Select]
Procedure Statistics_Global_innit;
begin
Ore_Iron := 0;
Ore_OldCopper := 0;
Ore_Copper := 0;
Ore_Bronze := 0;
Ore_Rose := 0;
Ore_Shadow := 0;
Ore_Silver := 0;
Ore_Golden := 0;
Ore_Verite := 0;
Ore_Valorite := 0;
Ore_Marble := 0;
Ore_Ice := 0;
Ore_BloodRock := 0;
Ore_Mytheril := 0;
Ore_Amethyst := 0;
Ore_Dwarven := 0;
Ore_Steel := 0;
Ore_SunStone := 0;
Ore_BlackRock := 0;
Ore_Fire := 0;
Ore_Wizzard := 0;
Ore_DaemonSteel := 0;
Ore_Crusader := 0;
Ore_Reactive := 0;
Ore_Sapphire := 0;
Ore_MoonRock := 0;
end;
Procedure Statistics_Global_Update;
begin
if GetColor(finditem) = $0000 then Ore_Iron := (Ore_Iron + GetQuantity(finditem));
if GetColor(finditem) = $0487 then Ore_OldCopper := (Ore_OldCopper + GetQuantity(finditem));
if GetColor(finditem) = $096D then Ore_Copper := (Ore_Copper + GetQuantity(finditem));
if GetColor(finditem) = $0972 then Ore_Bronze := (Ore_Bronze + GetQuantity(finditem));
if GetColor(finditem) = $0B84 then Ore_Rose := (Ore_Rose + GetQuantity(finditem));
if GetColor(finditem) = $0496 then Ore_Shadow := (Ore_Shadow + GetQuantity(finditem));
if GetColor(finditem) = $0497 then Ore_Silver := (Ore_Silver + GetQuantity(finditem));
if GetColor(finditem) = $0494 then Ore_Golden := (Ore_Golden + GetQuantity(finditem));
if GetColor(finditem) = $089F then Ore_Verite := (Ore_Verite + GetQuantity(finditem));
if GetColor(finditem) = $08AB then Ore_Valorite := (Ore_Valorite + GetQuantity(finditem));
if GetColor(finditem) = $0B91 then Ore_Marble := (Ore_Marble + GetQuantity(finditem));
if GetColor(finditem) = $047F then Ore_Ice := (Ore_Ice + GetQuantity(finditem));
if GetColor(finditem) = $04C2 then Ore_BloodRock := (Ore_BloodRock + GetQuantity(finditem));
if GetColor(finditem) = $052D then Ore_Mytheril := (Ore_Mytheril + GetQuantity(finditem));
if GetColor(finditem) = $0705 then Ore_Amethyst := (Ore_Amethyst + GetQuantity(finditem));
if GetColor(finditem) = $0794 then Ore_Dwarven := (Ore_Dwarven + GetQuantity(finditem));
if GetColor(finditem) = $07A1 then Ore_Steel := (Ore_Steel + GetQuantity(finditem));
if GetColor(finditem) = $0A0A then Ore_SunStone := (Ore_SunStone + GetQuantity(finditem));
if GetColor(finditem) = $047E then Ore_BlackRock := (Ore_BlackRock + GetQuantity(finditem));
if GetColor(finditem) = $09EF then Ore_Fire := (Ore_Fire + GetQuantity(finditem));
if GetColor(finditem) = $09AD then Ore_Wizzard := (Ore_Wizzard + GetQuantity(finditem));
if GetColor(finditem) = $0493 then Ore_DaemonSteel := (Ore_DaemonSteel + GetQuantity(finditem));
if GetColor(finditem) = $0A2E then Ore_Crusader := (Ore_Crusader + GetQuantity(finditem));
if GetColor(finditem) = $07A5 then Ore_Reactive := (Ore_Reactive + GetQuantity(finditem));
if GetColor(finditem) = $07AB then Ore_Sapphire := (Ore_Sapphire + GetQuantity(finditem));
if GetColor(finditem) = $0B80 then Ore_MoonRock := (Ore_MoonRock + GetQuantity(finditem));
end;
Procedure Statistics_Global_Write;
begin
If Ore_Iron <> 0 then AddToSystemJournal('Iron ' + IntToStr(Ore_Iron) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Iron * 360)));
If Ore_OldCopper <> 0 then AddToSystemJournal('Old Copper ' + IntToStr(Ore_OldCopper) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_OldCopper * 3600)));
If Ore_Copper <> 0 then AddToSystemJournal('Copper ' + IntToStr(Ore_Copper) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Copper * 360)));
If Ore_Bronze <> 0 then AddToSystemJournal('Bronze ' + IntToStr(Ore_Bronze) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Bronze * 360)));
If Ore_Rose <> 0 then AddToSystemJournal('Rose ' + IntToStr(Ore_Rose) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Rose * 360)));
If Ore_Shadow <> 0 then AddToSystemJournal('Shadow ' + IntToStr(Ore_Shadow) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Shadow * 360)));
If Ore_Silver <> 0 then AddToSystemJournal('Silver ' + IntToStr(Ore_Silver) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Silver * 360)));
If Ore_Golden <> 0 then AddToSystemJournal('Golden ' + IntToStr(Ore_Golden) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Golden * 360)));
If Ore_Verite <> 0 then AddToSystemJournal('Verite ' + IntToStr(Ore_Verite) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Verite * 360)));
If Ore_Valorite <> 0 then AddToSystemJournal('Valorite ' + IntToStr(Ore_Valorite) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Valorite * 360)));
If Ore_Marble <> 0 then AddToSystemJournal('Marble ' + IntToStr(Ore_Marble) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Marble * 360)));
If Ore_Ice <> 0 then AddToSystemJournal('Ice ' + IntToStr(Ore_Ice) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Ice * 360)));
If Ore_BloodRock <> 0 then AddToSystemJournal('Blood Rock ' + IntToStr(Ore_BloodRock) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_BloodRock * 360)));
If Ore_Mytheril <> 0 then AddToSystemJournal('Mytheril ' + IntToStr(Ore_Mytheril) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Mytheril * 360)));
If Ore_Amethyst <> 0 then AddToSystemJournal('Amethyst ' + IntToStr(Ore_Amethyst) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Amethyst * 360)));
If Ore_Dwarven <> 0 then AddToSystemJournal('Dwarven ' + IntToStr(Ore_Dwarven) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Dwarven * 360)));
If Ore_Steel <> 0 then AddToSystemJournal('Steel ' + IntToStr(Ore_Steel) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Steel * 360)));
If Ore_SunStone <> 0 then AddToSystemJournal('Sun Stone ' + IntToStr(Ore_SunStone) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_SunStone * 360)));
If Ore_BlackRock <> 0 then AddToSystemJournal('Black Rock ' + IntToStr(Ore_BlackRock) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_BlackRock * 360)));
If Ore_Fire <> 0 then AddToSystemJournal('Fire ' + IntToStr(Ore_Fire) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Fire * 360)));
If Ore_Wizzard <> 0 then AddToSystemJournal('Wizzard ' + IntToStr(Ore_Wizzard) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Wizzard * 360)));
If Ore_DaemonSteel <> 0 then AddToSystemJournal('Daemon Steel ' + IntToStr(Ore_DaemonSteel) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_DaemonSteel * 360)));
If Ore_Crusader <> 0 then AddToSystemJournal('Crusader ' + IntToStr(Ore_Crusader) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Crusader * 360)));
If Ore_Reactive <> 0 then AddToSystemJournal('Reactive ' + IntToStr(Ore_Reactive) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Reactive * 360)));
If Ore_Sapphire <> 0 then AddToSystemJournal('Sapphire ' + IntToStr(Ore_Sapphire) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Sapphire * 360)));
If Ore_MoonRock <> 0 then AddToSystemJournal('MoonRock ' + IntToStr(Ore_MoonRock) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_MoonRock * 360)));
AddToSystemJournal('-----------------------------------------');
end;
The stats I get are totally wrong and insane.
Code: [Select]
12:39:25:074 [-]: Iron 118 // Per Hour 9502
12:39:25:078 [-]: Old Copper 8 // Per Hour 14015
12:39:25:083 [-]: Copper 7 // Per Hour 160179
12:39:25:087 [-]: Bronze 7 // Per Hour 160179
12:39:25:091 [-]: Rose 12 // Per Hour 93438
12:39:25:095 [-]: Shadow 14 // Per Hour 80089
12:39:25:099 [-]: Silver 56 // Per Hour 20022
12:39:25:102 [-]: Valorite 17 // Per Hour 65956
12:39:25:107 [-]: Marble 3 // Per Hour 373752
12:39:25:110 [-]: Ice 7 // Per Hour 160179
12:39:25:113 [-]: Blood Rock 10 // Per Hour 112125
12:39:25:117 [-]: Amethyst 6 // Per Hour 186876
12:39:25:120 [-]: Steel 4 // Per Hour 280314
12:39:25:123 [-]: Sun Stone 6 // Per Hour 186876
12:39:25:127 [-]: Black Rock 4 // Per Hour 280314
12:39:25:129 [-]: Daemon Steel 2 // Per Hour 560628
12:39:25:132 [-]: Crusader 4 // Per Hour 280314
12:39:25:136 [-]: Reactive 1 // Per Hour 1121257
12:39:25:141 [-]: MoonRock 2 // Per Hour 560628
12:39:25:144 [-]: -----------------------------------------