Results 1 to 7 of 7

Thread: [Q] I need help creating a Progress Report.

  1. #1
    Join Date
    Jul 2012
    Location
    England
    Posts
    144
    Mentioned
    1 Post(s)
    Quoted
    28 Post(s)

    Default [Q] I need help creating a Progress Report.

    Hi Guys,

    I want to create a progress report that generates the time running, amount done and xp per hour.

    I know how the calculations for xp per hour would work. But I don't know how to calculate the time running using Simba.

    Example:
    ----------------------------------
    Time running: 1 hour 47 minutes
    Logs fletched: 1507
    Xp per hour: 25351
    ----------------------------------

    Calculation for xp/h
    (((1507*35)/ 107)*60)

    All help is appreciated,

    Msemtex

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Example taken from a script

    Simba Code:
    procedure Proggy;
    var
      TimeRun, SnapeGP, SnapeGPH, SnapeH: Int64;

    begin
      ClearDebug;    
      TimeRun := (GetTimeRunning / 1000);

      SnapeGP   := Snapes * SnapePrice
      SnapeGPH := Round(((SnapeGP * 3600) / TimeRun));
      SnapeH    := Round((Snapes * 3600) / TimeRun);

      Writeln('Time Running: ' + TimeRunning);
      Writeln('You have grabbed ' + IntToStr(Snapes) + ' Snape grass' + ' (' + IntToStr(SnapeH) + '/H)' );
      Writeln('You have earnt ' + IntToStr(SnapeGP) + ' profit' + ' (' + IntToStr(SnapeGPH) + ' GP/H)');

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    For time running you can do
    Simba Code:
    WriteLn('Total Time: ' + MsToTime(GetTimeRunning, 2));

    That would write
    Total Time: 1 hr 1 min 1 sec

    You can look at the different options at http://docs.villavu.com/srl-5/timing.html#mstotime

  4. #4
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    For time running you can do
    Simba Code:
    WriteLn('Total Time: ' + MsToTime(GetTimeRunning, 2));

    That would write
    Total Time: 1 hr 1 min 1 sec

    You can look at the different options at http://docs.villavu.com/srl-5/timing.html#mstotime
    or simple Writeln(TimeRunning)

    Creds to DannyRS for this wonderful sig!

  5. #5
    Join Date
    Jul 2012
    Location
    England
    Posts
    144
    Mentioned
    1 Post(s)
    Quoted
    28 Post(s)

    Default

    Thanks very much for the responses! I will test it out now.

  6. #6
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    or simple Writeln(TimeRunning)
    This way you can change how it appears though

  7. #7
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

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
  •