Results 1 to 16 of 16

Thread: Progress Report: Explained

  1. #1
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default Progress Report: Explained

    Alright, I'm going to explain how to make a progress report, while explaining what everything does to the best of my knowledge.
    Contents
    1. What is a progress report?
    2. How do I make a progress report?
    3. Explaining further.
    4. Conclusion

    What is a Progress report?
    Glad you asked! A progress report is used to show how/what your script is doing, or how it is preforming. This is useful for many things, especially to see how your script stacks up against others.
    How do I make a progress report?
    Well, let's start off with this. It's good practice to have the fewest global variables you can, which is why many people keep progress report variables in the global variables, which is where they HAVE to be.

    This is what I have for my Clay mining script:
    Simba Code:
    var
       Ores:Integer;
    It tracks the amount of ores, I add this, at the end of the bank, so after it deposits the ore, it adds to the ore count.
    Simba Code:
    Ores := Ores + 28
    Now, to get the progress report to show, you do something like this.
    Simba Code:
    procedure Progress;
    var
      OrePH,XPPH,GPPH:Integer;

    begin
      OrePH := Round((Ore * 3600) / (GetTimeRunning / 1000));
      XPPH := Round(((Ore * 5) * 3600) / (GetTimeRunning / 1000));
      GPPH := Round(((Ore * 150) * 3600) / (GetTimeRunning / 1000));
      ClearDebug;
      Writeln('***********Power Clay**********');
      Writeln('*         ~By NKN~               ');
      Writeln('*Ore Mined: ' + IntToStr(Ore) + ' (' + IntToStr(OrePH) + ' P/H)');
      Writeln('*XP earned: ' + IntToStr(Ore * 5)+ ' (' + IntToStr(XPPH) + ' P/H)');
      Writeln('*GP Made: ' + IntToStr(Ore * 275)+ ' (' + IntToStr(GPPH) + ' P/H)');
      Writeln('*Total Time: ' + TimeRunning);
      Writeln('********************************');
    end;

    Explaining Further
    Simba Code:
    var
      OrePH,XPPH,GPPH:Integer;
    These stand for Ore Per Hour, Experience per hour, and GP per hour respectively. I declare these as local variables, because everything they need is inside that procedure.
    Simba Code:
    begin
      OrePH := Round((Ore * 3600) / (GetTimeRunning / 1000));
      XPPH := Round(((Ore * 5//Ore * 5 because 5 Experience a ore.) * 3600) / (GetTimeRunning / 1000));
      GPPH := Round(((Ore * 150// Ore * 150 because that was the price clay was around) * 3600) / (GetTimeRunning / 1000));
      ClearDebug;
    You should know what begin does.

    Now, for the next three lines, that tells how much per hour.
    It uses that formula to calculate how much per hour.
    ClearDebug; just clears the debug box, so it's not cluttered.
    Simba Code:
    Writeln('***********Power Clay**********');
      Writeln('*         ~By NKN~               ');
      Writeln('*Ore Mined: ' + IntToStr(Ore) + ' (' + IntToStr(OrePH) + ' P/H)');
      Writeln('*XP earned: ' + IntToStr(Ore * 5)+ ' (' + IntToStr(XPPH) + ' P/H)');
      Writeln('*GP Made: ' + IntToStr(Ore * 275)+ ' (' + IntToStr(GPPH) + ' P/H)');
      Writeln('*Total Time: ' + TimeRunning);
      Writeln('********************************');
    end;
    The * symbols are not needed, I use them in my scripts to make it better looking.
    Alright, the IntToStr turns an Integer(A number) into a string(letters). You can use the + button to add more thins like I did. Totaltime is easy, just add TimeRunning like so. The bottom Println is there once again to make it look better.


    Conclusion
    I hope you find this guide the least bit useful, and can incorporate it into your scripting! Good luck,
    ~NKN

  2. #2
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Great tutorial. Good job.

  3. #3
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Thanks. Appreciate it.

  4. #4
    Join Date
    Apr 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great Tut, Clear and easy to understand.
    Completed Scripts [2]:
    PowerWillowsby Edge
    AllInOneChopper by Edgee

  5. #5
    Join Date
    Dec 2011
    Location
    Belgium
    Posts
    623
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    nice tutorial mate!

    Made by P1ng

  6. #6
    Join Date
    Jan 2012
    Location
    In A Farm
    Posts
    3,301
    Mentioned
    30 Post(s)
    Quoted
    444 Post(s)

    Default

    Really great tutorial to understand. Keep this good work up.

  7. #7
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Thanks!

    What else should I write a tutorial on?

  8. #8
    Join Date
    Jan 2012
    Posts
    522
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just read it, and it's pretty good

  9. #9
    Join Date
    Nov 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks, this is very clear and easy to understand, just one thing though. I see you have written for the Ore/PH, XP/PH, and GP/PH to be multiplied by 3600. What is this value?

    Sorry if its a nooby question.

  10. #10
    Join Date
    Apr 2012
    Posts
    3,356
    Mentioned
    34 Post(s)
    Quoted
    218 Post(s)

    Default

    3600 is the number of seconds in an hour.

    60 seconds in a minute means 60 minutes X 60 seconds gives you 3600 seconds.

    Hope that helped!

  11. #11
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    If you are looking into expanding this, you should definitely tell how to use SRL's built in proggy. I use it in my miner and it's very convenient.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  12. #12
    Join Date
    Nov 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by -Benny View Post
    3600 is the number of seconds in an hour.

    60 seconds in a minute means 60 minutes X 60 seconds gives you 3600 seconds.

    Hope that helped!
    Tyvm it sure did help me

  13. #13
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If you are writing a progress report tut at least include padl, padr, padz.
    Just to make them fancy :P.

  14. #14
    Join Date
    Mar 2013
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Great Guide, just added this to my script with no problems. Thanks!

  15. #15
    Join Date
    Aug 2017
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Any idea how to track combat experience? Not as simple as tracking items :/

  16. #16
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by hash1mate View Post
    Any idea how to track combat experience? Not as simple as tracking items :/
    Here is a snippet of the way I track combat xp.

    Simba Code:
    WriteLn('## HP exp: ' +IntToStr(Round((((getXPBarAmount - StartTotalExp) / 5.33) * 1.33))));
    WriteLn('## Strength exp: ' +IntToStr(Round((((getXPBarAmount - StartTotalExp) / 5.33) * 4))));

    Firstly, StartTotalExp is declared as a global integer variable and is assigned a value when the script starts (the current value of our xp bar near the mini map).

    I then put the above functions in a progress report block, which I add to my main loop in some scripts, or call it as a function in others.

    Whenever you attack, you receive 5.33 xp per damage. So if you hit a 20, you would receive approximately 106 experience on the xp bar. Now we know that 4 of this is for your desired combat stat, and 1.33 is for your hitpoints, so what I have done is:

    1. Find the total experienced gained this session.
    2. Divided that experience by 5.33 to find out how much damage we have done.
    3. Multiplied that by 1.33 or 4, to represent our combat exp and our hp exp gains.

    Hope this helps

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
  •