Results 1 to 6 of 6

Thread: Progress report?

  1. #1
    Join Date
    Jan 2013
    Posts
    167
    Mentioned
    1 Post(s)
    Quoted
    33 Post(s)

    Default Progress report?

    Is it possible for someone to help/make me a progress report that said how many logs and how much xp ive got when i stop the script?(and maybe even say how many levels i've got aswell?)
    Thanks
    heres the script it would be used for
    JWillowChopper.simba

  2. #2
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Wink

    Made this for you...

    Simba Code:
    Procedure WoodcuttingProgressReport;
    var
      Totalxp, XPhour, LogsHour: Integer;
    Begin
    If Not(LoggedIn) Then
        Exit;
    ClearDebug;
      Totalxp := (GetXPBarTotal - InitialXP);
      XPhour := Round((Totalxp)/(GetTimeRunning/3600000.0));
      LogsHour := Round((LogLoad*28)/(GetTimeRunning/3600000.0));
    Writeln('*****************************************************************************');
      Writeln('Time Running: ' + TimeRunning);
      Writeln('Est. Logs Total: ' + IntToStr(LogLoad*28));
      Writeln('Est. Total Experience: ' + IntToStr(Totalxp));
      Writeln('Est. Experience/Hour: ' + IntToStr(XPhour));
      Writeln('Est. Logs/Hour: ' + IntToStr(LogsHour));
      Writeln('*****************************************************************************');

    Call on it everytime you finished chopping a whole inventory and also Inc(LogLoad) <<Declare as global Int variable everytime you finished chopping a whole inventory.

  3. #3
    Join Date
    Jan 2013
    Posts
    167
    Mentioned
    1 Post(s)
    Quoted
    33 Post(s)

    Default

    Quote Originally Posted by Runehack123 View Post
    Made this for you...

    Simba Code:
    Procedure WoodcuttingProgressReport;
    var
      Totalxp, XPhour, LogsHour: Integer;
    Begin
    If Not(LoggedIn) Then
        Exit;
    ClearDebug;
      Totalxp := (GetXPBarTotal - InitialXP);
      XPhour := Round((Totalxp)/(GetTimeRunning/3600000.0));
      LogsHour := Round((LogLoad*28)/(GetTimeRunning/3600000.0));
    Writeln('*****************************************************************************');
      Writeln('Time Running: ' + TimeRunning);
      Writeln('Est. Logs Total: ' + IntToStr(LogLoad*28));
      Writeln('Est. Total Experience: ' + IntToStr(Totalxp));
      Writeln('Est. Experience/Hour: ' + IntToStr(XPhour));
      Writeln('Est. Logs/Hour: ' + IntToStr(LogsHour));
      Writeln('*****************************************************************************');

    Call on it everytime you finished chopping a whole inventory and also Inc(LogLoad) <<Declare as global Int variable everytime you finished chopping a whole inventory.
    Thank you so much

  4. #4
    Join Date
    Jan 2013
    Posts
    167
    Mentioned
    1 Post(s)
    Quoted
    33 Post(s)

    Default

    Quote Originally Posted by Runehack123 View Post
    Made this for you...

    Simba Code:
    Procedure WoodcuttingProgressReport;
    var
      Totalxp, XPhour, LogsHour: Integer;
    Begin
    If Not(LoggedIn) Then
        Exit;
    ClearDebug;
      Totalxp := (GetXPBarTotal - InitialXP);
      XPhour := Round((Totalxp)/(GetTimeRunning/3600000.0));
      LogsHour := Round((LogLoad*28)/(GetTimeRunning/3600000.0));
    Writeln('*****************************************************************************');
      Writeln('Time Running: ' + TimeRunning);
      Writeln('Est. Logs Total: ' + IntToStr(LogLoad*28));
      Writeln('Est. Total Experience: ' + IntToStr(Totalxp));
      Writeln('Est. Experience/Hour: ' + IntToStr(XPhour));
      Writeln('Est. Logs/Hour: ' + IntToStr(LogsHour));
      Writeln('*****************************************************************************');

    Call on it everytime you finished chopping a whole inventory and also Inc(LogLoad) <<Declare as global Int variable everytime you finished chopping a whole inventory.
    Thanks so much and also how do i declare it as a global int variable? (Im kinda new to this)

  5. #5
    Join Date
    Jul 2012
    Posts
    279
    Mentioned
    5 Post(s)
    Quoted
    46 Post(s)

    Default

    Declaring a global variable is the same as declaring a local variable, except "outside" the usual functions. Let's say your first function is called ILoveNarwhals, it'd look like:

    Simba Code:
    var
      x, y : Integer   //There are global variables
    function ILoveNarwhals : Boolean;
    var
      t : Integer //Local variables
    begin
      Result := IHaveABrain;   //Only someone without a brain could not love narwhals.
    end;

  6. #6
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Default

    @Hexless just declare them at the top of your script after your $define includes so you've got them all together.
    Global variable: Can be used for ALL functions/procedures of your script.
    Local variable: Can be used only for the function/procedure it is declared in.

    Now you might think that global variables are the easier option - but avoid them if you can!
    http://c2.com/cgi/wiki?GlobalVariablesAreBad
    Just remember,
    Local variable > Global variable

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
  •