Results 1 to 10 of 10

Thread: How to make a detailed progress report!

  1. #1
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How to make a detailed progress report!

    How to make a detailed progress report!
    By N1ke!


    Table of content
    • Progress report?
    • Integers
    • Strings
    • Booleans
    • Basics
    • Advanced



    Progress Report?

    A Progress report does exactly as the name says, it shows the progress
    of the script. It can be all from a very basic one to a very detailed and advanced one. Today I'm going to show you both versions and many ways
    how to make that awesome report that everyone does. As always we start
    with the basics.


    Vars

    To learn the basics i suggest knowing Integers, Strings and Booleans as they
    are the main parts of a Progress report, I explain them.

    - Integers -
    Intergers stores any number and can be set this way.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      TestVar : Integer;

    begin
      SetupSRL;
      TestVar := 15;
    end.

    As you can see, very simple.


    - Strings -

    Strings are letters, words, names or such.
    The good thing about strings are that you can Write them out in the debug box with a procedure called Writeln. Let me show you.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      TestString : String;

    begin
      SetupSRL;
      TestString := 'SRL is the best.';
      Writeln(TestString);
    end.

    You can also write it without setting up a string, like this.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      TestString : String;

    begin
      SetupSRL;
      Writeln('Hello world!');
    end.


    - Booleans -

    Booleans can only result True or False, nothing inbetween. A boolean always starts as False and it can be set like this.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      Test : Boolean;

    begin
      SetupSRL;
      Test := True;
    end.


    Basic

    I start by teaching you how to count, see this ect

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      CountItem: Integer;

    begin
      SetupSRL;
      CountItem := CountItem + 1;
      Writeln(IntToStr(CountItem));
    end.

    Here i added a new thing, IntToStr(). IntToStr() converts a Integer to a
    string so you can type it in the debug box using Writeln().
    There is also BoolToStr which converts a Boolean to String (True / false ).

    Now when you can count using integers I'm going to make it a bit
    harder, Watch.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      Ores, Exp : Integer;

    Procedure Mine;
    Begin
      Blablablabla
      Ores := Ores + 1;
      Exp := Exp + 32;
    end;

    begin
      SetupSRL;
      Repeat
        Mine;
        Writeln(IntToStr(Ores));
        Writeln(IntToStr(Exp));
      Until(False);
    end.

    As you can see i increases the integers by how many ores i get and how
    much exp ive earned, by doing this i can later on use Writeln() to print them
    out and see the progress.

    Now heres one of my Progress report that i explain.

    SCAR Code:
    Procedure ProgressReport;
    begin
      Writeln('Has been running for ' + TimeRunning);
      Writeln('Made ' + IntToStr(PlayerExp) + ' Exp');
      Writeln('Banked ' + IntToStr(Ores) + ' Ores');
    end;

    When doing this you need to know how to + two strings. You first end the
    first string by closing it with a ' then you put a + and then the thing you
    want to plus. Keep in mind that you need IntToStr if its a integer and
    BoolToStr if it's a Boolean.

    Now I've teached you the basics, From here be creative
    and don't be scared to try anything new!.


    Advanced

    At this part i suggest having some experience in (For to do) loops and
    have experience in basic progress reports. This is above beginner but
    as Basics are in here aswell it be nicer to have it here.

    I start off by showing you one of my progress reports then breaking it down.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      PlayerExp, Ores: integer;


    Procedure ProgressReport;
    begin
      Writeln(' Testing script! ');
      Writeln('');
      Writeln(' Has been running for ' + TimeRunning);
      Writeln('');
      Writeln(' | Name | Ores | Exp | Levels |');
      For i:= 0 to HowManyPlayers - 1 do
        Writeln(' ' + Players[i].Name + ' | ' + IntToStr(Players[i].Integers[0]) + ' | ' + IntToStr(Players[i].Integers[1]) + ' | ' + IntToStr(Players[i].Integers[2]));
    end;

    Here i do the For to do loop which goes around all the players in the player
    array (DeclarePlayers). Then i use the Player integers to collect how many
    ores, exp and levels gain. Then by doing For i:= 0 means that i will be the
    player it's on. Thats why we do Players[i], Becuase it changes each loop to
    one higher number which means one more player. Can be a bit tricky to
    understand at first, but try yourself.
    I made a little Testing script that maybe makes you understand a bit easier.


    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      Number: Integer;

    Procedure ForToDoExplain;
    var
      i: integer;
    begin
      Number := 5  // Change this after one run..
      For i:= 0 to Number do
        Writeln('Integer I is ' + IntToStr(i));
    end;

    begin
      SetupSRL;
      ForToDoExplain;
    end.

    Run that and change Number := after first run, that might help you
    understand. After that try messing with it a bit..

    NOTE* If you add more then one line after the For loop you need a begin
    and a end; like this.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      Number: Integer;

    Procedure ForToDoExplain;
    var
      i: integer;
    begin
      Number := 5  // Change this after one run..
      For i:= 0 to Number do
      begin  // An Begin becuase theres  more then 1 line after for loop.
        Writeln('Integer I is ' + IntToStr(i));
        Writeln('Test');
      end;  // An end becuase theres  more then 1 line after for loop.
    end;

    begin
      SetupSRL;
      ForToDoExplain;
    end.


    Now don't keep going until you completly understand the For to do statement.
    If you do you will be completly lost after this part.
    I also suggest knowing the IntToStr and BoolToStr before continuing as
    they be used in this example.

    SCAR Code:
    Procedure ProgressReport;
    var
     i : integer;
     s : string;
    begin
      Writeln('              #-[]-¤ Multi Progress Report ¤-[]-#');
      Writeln('                      By N1ke! the genius.');
      Writeln('');
      Writeln('                  Time running : ' + TimeRunning);
      Writeln('');
      For i:= 0 to HowManyPlayers - 1 do
        Writeln('  [' + BoolToStr(Players[i].Active) + ']- P #' + IntToStr(i) + ' /  Nick: ' + Players[i].Nick + ' /  Snapes/h: ' + IntToStr(Round(Players[i].Integers[0] / (GetTimeRunning / 3600000.0))) +
        ' / Cash: ' + IntToStr(Players[i].Integers[1]) + ' / Banked: ' + IntToStr(Players[i].Integers[0]));
    end;

    The following is from my snape grass picker(Members only) and the result of the proggres report is like this.

    Code:
                  #-[]-¤ Multi Progress Report ¤-[]-#
                          By N1ke! the genius.
    
                      Time running : 0 Seconds
    
      [True]- P #0 /  Nick:  /  Snapes/h: 0 / Cash: 0 / Banked: 0

    Now i don't have much more to say, Just stay creative and if you have any
    problem feel free to post them here or add my msn, N_1_c_e@hotmail.com


  2. #2
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice, it's always slightly confused me about the lines at the bottom.

    Well, time to go update my progress report xD.

    ~Sandstorm

  3. #3
    Join Date
    Jun 2007
    Location
    US of A
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You could add Writeln Padr
    ... as it's good to have if people want to make fenced proggies.

  4. #4
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Padr would be a good addition to this mini tutorial .

  5. #5
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Add xp/hour.
    Always wanted to know how to make a neat one.
    ~Eerik~

  6. #6
    Join Date
    May 2007
    Location
    in the forest
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    mayby add a good way to count how many things you collected for something that doesnt add one everytime you click (ex: wcing)

    good tut nonetheless
    At sea with the navy - not very active

  7. #7
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    This is a pretty well explained tut, N1ke!

    Rep+.

    "I start by teaching you how to count, .." xD

  8. #8
    Join Date
    Feb 2012
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice one

  9. #9
    Join Date
    Nov 2011
    Location
    Louisiana
    Posts
    881
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Stanger View Post
    Nice one
    Grave dig and farming post count...nice...

  10. #10
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by Stanger View Post
    Nice one
    Next time try too look at the date of the last post before you post (Last post was like there years ago)
    Current Project: Retired

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. progress report:(
    By macromacro123 in forum OSR Help
    Replies: 0
    Last Post: 08-25-2007, 05:41 PM
  2. How to make a cool Progress Report
    By Bigfish58 in forum Outdated Tutorials
    Replies: 6
    Last Post: 08-15-2007, 10:12 PM
  3. help with Progress Report
    By codx1 in forum OSR Help
    Replies: 10
    Last Post: 05-31-2007, 04:38 PM

Posting Permissions

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