Results 1 to 11 of 11

Thread: So.. progress report?

  1. #1
    Join Date
    Jan 2012
    Posts
    75
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default So.. progress report?

    So here's what I would like, more of a walkthrough of how to make a progress report. I don't wanna just copy and paste something.. If there's a tutorial somewhere, could someone link it please? Other wise, I'd like a little 1v1 tut on how to make it. I already figured out how to get the total time. Here's what I used:
    Code:
    Writeln('Total Time: '+MsToTime(GetTimeRunning, Time_Abbrev));
    **EDIT**
    I used the method of getting the xp and the beginning of the script and the end and subtracting them to find my total. Is there a better method? Otherwise, this seems to work fine and comes out exact.
    Last edited by Mattie403; 02-19-2012 at 05:56 AM.

  2. #2
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Example:

    Simba Code:
    var
      Ores: integer;

    ...
    if MineOre then Inc(Ores);
    // Inc adds 1 to the value of an integer
    ...

    WriteLn('Ores Mined: ' + IntToStr(Ores));

    To get more detailed outputs for your progress report, collect more data and manipulate it however you please.

  3. #3
    Join Date
    Jan 2012
    Posts
    75
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Runaway View Post
    Example:

    Simba Code:
    var
      Ores: integer;

    ...
    if MineOre then Inc(Ores);
    // Inc adds 1 to the value of an integer
    ...

    WriteLn('Ores Mined: ' + IntToStr(Ores));

    To get more detailed outputs for your progress report, collect more data and manipulate it however you please.
    I'm doing herblore though.. Do they have a potion made method?

  4. #4
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Mattie403 View Post
    I'm doing herblore though.. Do they have a potion made method?
    Well, if you withdraw the same amount every load, you can do something like this:

    Simba Code:
    const
      NumPerLoad = 14;

    ...

    if MakePotions then Inc(LoadsDone);

    ...

    WriteLn('Potions Made: ' + IntToStr(LoadsDone * NumPerLoad));

  5. #5
    Join Date
    Jan 2012
    Posts
    75
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh alright.. Well now how do I get the XP/hour? If I do a simple (xp/totaltime) it comes out 0.

  6. #6
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Mattie403 View Post
    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.
    Last edited by Runaway; 02-19-2012 at 07:38 AM.

  7. #7
    Join Date
    Jan 2012
    Posts
    75
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's now coming out with a negative number.

  8. #8
    Join Date
    Jul 2009
    Location
    Australia
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    An easier way to do exp per hour would be:

    Simba Code:
    var
    StartExp: Int64;

    procedure setup;
    begin
    ToggleXPBar(True);
    StartExp := GetXPBarTotal;
    end;

    procedure proggy;
    begin
    writeln('You are getting ' + IntToStr(((GetXPBarTotal - StartExp) * 3600) / (GetTimeRunning / 1000)) + ' exp per hour');
    Writeln('You have been doing herblore for ' + TimeRunning + '');
    end;

    Hope This Helped
    ~Caotom

  9. #9
    Join Date
    Jan 2012
    Posts
    75
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you explain what that does so I know?

  10. #10
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Mattie403 View Post
    Could you explain what that does so I know?
    It does the same exact thing as my method. Instead of gathering the info while the script runs to get the TotalXp at the end, he uses the xp bar in the top right corner and gets the difference between the time started and the current time.

  11. #11
    Join Date
    Jul 2009
    Location
    Australia
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    It turns on your exp bar and saves that number (when you start the script).
    Then when you want to do the proggy it takes the current total exp minus the original saved number to get the exp earned then puts it into xp/hour.

    ~Caotom

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •