Results 1 to 21 of 21

Thread: Making a Progress Report

  1. #1
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Making a Progress Report

    Making a Progress Report Tutorial

    by : WhiteShadow

    Difficulty: pfft, easy. :]

    Progress reports are reports that are debugged in Scar's Debug. It shows your autoing progress.

    They should display....
    1. Shows how long script has been running
    2. How much you've gained, a value of some sort Ex. ('You've mined 10 loads!')


    Alright, so how do you show a certain value in your report? I will be using mining examples since they are most common these days.

    Set a Global Variable that stores the value.

    Example:

    Code:
    program Miner;
    {.include SRL/SRL.Scar}
    
    var//Global Variable SetUp
      Loadz : Integer;//Change Loadz to any var name you want
    
    const
    Now how does that "Loadz" add more instead of just 0? Whatever your doing, mining, fishing, w/e, after that thing is done, Ex. (A load of ore or fish dropped, a load banked)
    Inside that procedure you do Loadz:= Loadz + 1

    Examples :
    Code:
    procedure DropOre;
    begin
      DropAll;//Dropped a full load of iron!
      Loadz := Loadz + 1;//Loads done would be added 1
    end;
    Code:
    procedure BankAll;
    begin
      repeat 
        OpenBank;//Repeats till finds bank screen opened
      until(BankScreen)
        Deposit2(1, 28);//Deposits All A load deposited
        Loadz:= Loadz + 1;//Ah, Loadz Done plus another
    end;
    Code:
    procedure Killer;//Just more Examples
    begin
      if(FinObj(x, y, 'Attack', Monster, 10))then//Finds Monster
        Mouse(x, y, 1, 1, true);//if finds, clicks
        repeat 
          Wait(100);//repeats wait till not find status bar
        until(not(FindColorSpiral(x, y, GreenStatusColor, x1, y1, x2, y2)))//No time for coords
        Killed:= Killed + 1//Kills Plus + 1
    end;
    Now how do I make it get displayed as a string so it can appear in the debug?

    Code:
    procedure Report;//Starts procedure off
    begin
      Writeln('[]-------------------------------------------[]');//Do any style you want 
      Writeln('Worked For : ' + ScriptTime2(2))//Displays how long it worked for
      Writeln('Mined/Dropped '+ IntToStr(Loadz) + ' Loads');
      Writeln('[]--------------------------------------------[]');
    end;
    Ok I will explain. ScriptTime2(2) displays how long script worked for as a string. You can use other functions or options, look in SRL includes for more options.Or just use my way.

    IntToStr(Loadz) it retuns your Global Variable as a string instead of a stored variable integer.

    Integer to String.

    When you need to add more text use "+" ore your going to get some kind of comma error.


    Well thats about it. I have a headache, blah. Sorry for any mistakes, this computer doesn't even have SCAR right now so.

    Hope you guys learned something!

    ~WhiteShadow

  2. #2
    Join Date
    Oct 2006
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Pretty good tut, makes sense to me. Im going to try it when I get home...
    Can't believe no one posted for such a good tutorial.

  3. #3
    Join Date
    Jun 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Nice.

    This is good, I tried it, and it works. Thanks a lot.

  4. #4
    Join Date
    Jun 2006
    Posts
    366
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am gonna try that for my auto monk fighter...Soon to be in the free scripts section

  5. #5
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh sweet dude! thanks, have been looking for a tut so i can learn to make proggies. thanks for making this.

  6. #6
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    thanks very much, good tut, helped me out alot

  7. #7
    Join Date
    Mar 2007
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    good tut, fairly basic but gets to the point, * thumps up*

  8. #8
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    err is there another TUT on how to create a bit more complicated one.......nice TUT btw easy to understand
    Sleeping...

  9. #9
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Aha! So that's how you make the script say how long it has been running for!

    Thanks
    Interested in C# and Electrical Engineering? This might interest you.

  10. #10
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks
    +rep
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  11. #11
    Join Date
    Mar 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this sounds good because u can do a lot of math with it and figure things out..(ex. 30 loads x 28 slots= how many you have x price = $$ rollin' in $$

  12. #12
    Join Date
    Oct 2006
    Posts
    585
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sweet.. tyvm for posting this

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  13. #13
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I just want to ask, sry this is a bit off-topic but, how could you do a chopped log counter when chopping oak?
    Example:
    You login
    Welcome to Runescape.
    You swing your axe at the tree.
    You get some logs.
    If you'd use InChatMulti 2 times, would it count the same text 2 times or would it see that the chat has stayed the same?

    Or will you just have to count them when you drop them?

  14. #14
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I usually just prefer using

    i:= CountItemDTM(logdtm); .

    NumberOfTreesChopped:= NumberOfTreesChopped + i;

    Writeln('Totally chopped'+IntTOStr(NumberOfTreesChopped) + ' trees.');

    Something like that.

  15. #15
    Join Date
    Mar 2007
    Posts
    276
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice Tut, Used The Debug Progress report in my script, Till i get my own style of one. TY!


    Someone: 'Who the hell is TooManySitUps?'

    Boreas: 'Switch the first and last letter of my name, what do you get?'

    Someone: 'Um, SoreAb?'

    Boreas: 'And how do you get that?'

    Someone: 'From Too Many Sit Ups!! Haha, Boreas you are so clever!'

    Boreas: 'Ya he's like my evil twin that takes over when I'm being really sarcastic, or playing devil's advocate.'

  16. #16
    Join Date
    Jun 2007
    Location
    Kentucky, United States of America
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice Tut. It was very helpful.

  17. #17
    Join Date
    Jun 2007
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks Alot! Helped me get started

  18. #18
    Join Date
    Jun 2007
    Location
    England
    Posts
    262
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good tut, helped me when I struggled.

  19. #19
    Join Date
    Aug 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    helped alot but i used it and i think repeat is messing it up because when i try starting the script it says '.' is expected after the end so it never gts to the report any suggestions

  20. #20
    Join Date
    Jul 2007
    Posts
    98
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice tutorial,

    was wondering, I'm making a Autotyper, and i want to have a progress report on that to kinda but i want it to say "Messages sent: *number*" how do i make that?

    ~~Skalla~~

    EDIT: Nvm, Got it, just that time shows 275 hours instead of 0 hours
    Currently Learning the Basics of Scar

  21. #21
    Join Date
    Dec 2011
    Location
    Lubbock, Tx
    Posts
    115
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey I am having trouble getting the Exp/Hr to compile.

    Simba Code:
    procedure ProgressReport;
       Var
         ExpPHr:Integer;
    begin
      Exp := 35;
      ExpPHr := ((Count*exp)/TimeRunning);
      ClearDebug;
        WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
        WriteLn('~~~~~~~~~~~~~ HardRockin Iron Miner ~~~~~~~~~~~~~~');
        WriteLn('Time Running: '+ TimeRunning);
        WriteLn('Mining EXP: '+ FloatToStr(Count * Exp) + ' ');
        WriteLn('Iron Ore Mined : ' +ToStr(Count)+ ' ');
        WriteLn('Mining EXP/HR : ' +ToStr(ExpPHr)+ ' ');
        WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
        WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      FindNormalRandoms;
    end;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help making progress report..
    By orange in forum OSR Help
    Replies: 5
    Last Post: 08-21-2008, 04:22 PM
  2. Help with Progress Report
    By Richard in forum OSR Help
    Replies: 4
    Last Post: 01-04-2008, 06:48 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
  •