Results 1 to 17 of 17

Thread: Using SRL Stats

  1. #1
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Using SRL Stats

    Ok, well since alot of people had trouble using SRL Stat's, I thought I would post this here to help you guys out . (hy71194 )

    Contents:
    • Setting up your own SRLId
    • Setting up Your Script Stats on SRL
    • Understanding SRLId and SRLPassword
    • Using Script Stats in your script


    Setting up your own SRLId

    To start off using SRL Stats, you must first make your own ID. To make a new id, go here. You will have to answer a confirmation letter through your email address so you can recover your SRL Id password if you loose it. Note that your SRL Stats Id (SRLId) is not the same as your username on SRL Forums!. Now, with your SRLId setup, you can add your SRLId (not your username, the number they give you) and your SRLPassword (the password for your SRLId) into certain scripts that support SRL Stats. This may be in declare players or in the constants at the top. If the script has SRL Stats, there must be a place for you to put your SRL Id and password.



    Setting up Your Script Stats on SRL

    Ok, now to learn how to set up a Script Stats page. This is not hard since SRL has so professionally added a template for you to fillout. Go here to register a script. You need to insert variables that apply to your script only, such as rocks mined. All of the random variables are included for you. After filling in this template, SRL will give you a script id. Hold on to this number! you will need it!


    Understanding SRLId and SRLPassword

    Now, one of the biggest things that I had trouble with in the beginning of trying to learn SRL Stats was "why doesn't the SRL Stats register!", even after I did everythign right? Well the answer is(are you ready?): you must have a SRLId and a SRLPassword stated in your script before any stats can be sent. Therefore, if you dont enter any id or password, your script stats simply wont be sent!. Now SRLId and SRLPassword are variables, therefore you cannot add them to the constants. SO, there are two ways you can tell the script the SRL ID and Pass.

    1. Make a constant with a similar name at the beginning of the script(like so)

    SCAR Code:
    YourSRLId = '';
       YourSRLPassword ='';

    note that these are not the same as SRLid and SRLPassword because they have your infront. Now add this at the beginning of the mainloop.

    SCAR Code:
    SRLId := YourSRLId;
      SRLPassword:= YourSRLPassword;

    And now the second option.

    2. Simply add this to DeclarePlayers (or whatever your procedure is named to declare your players)

    SCAR Code:
    SRLId:= '';
      SRLPassword:= '';

    either way, SRLid and SRLpassword will be set.


    Using Script Stats in your script

    Ok now, to the best part adding srl stats to your script. Now remember that Script Id I was telling you to keep? THIS IS WERE YOU NEED IT. At the beginning of your script, possible right after SetupSRL say

    SCAR Code:
    ScriptId:= '(ScriptIDHERE)';

    so SCAR will know where to send the stats. Now every custom variable you set has a number. The first variable would be zero, the second would be 1 etc. Now these vars are called SRLReportVars. So, lets say you put "Rocks Mined" as your first var (check here for an example of this). Now, everytime I mined a rock, I would put.

    SCAR Code:
    SRLReportVars[0]:= 1;{Report var 0 because it was the first var and it equals 1 because
                                  we mined one rock}

    SendSRLReport;

    every time you call SendSRLReport your variables get set back to zero!. Also, note that this does not depend on the number already in script stats.


    SO DO NOT SAY
    SCAR Code:
    ReportVars[0]:= ReportVars[0] + 1;

    THIS IS WRONG!

    Last but not least, Call SRLRandomsReport in your progress report and you should be set!

    Join the fastest growing merchanting clan on the the net!

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Nice.

    But why is ReportVars[0]:= ReportVars[0] + 1; wrong? I use it on my script and it works fine

    Edit: Hah, good joke on the top I am very good with stats


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by pwnaz0r View Post
    SO DO NOT SAY
    SCAR Code:
    ReportVars[0]:= ReportVars[0] + 1;

    THIS IS WRONG!
    Not neccesarily. If what happens if you mine two ores before SendSRLReport is called? And it doesn't really matter because 0 + 1 = 1 ... No harm done.

    Oh and make your font a bit bigger.

    EDIT: NVM mind about the font.
    Also, its either SendSRLReport or SRLRandomsReport.

  4. #4
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Ah nice TUT, i was about to request this in your thing

  5. #5
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Not neccesarily. If what happens if you mine two ores before SendSRLReport is called? And it doesn't really matter because 0 + 1 = 1 ... No harm done.

    Oh and make your font a bit bigger.

    EDIT: NVM mind about the font.
    Also, its either SendSRLReport or SRLRandomsReport.
    yeah sorry, messed up in SendSRLRandomsReport. I had sendsrlreport though

    Also, about the 0 + 1 = 1, thats not the point. Its the concept of understanding that the script doesnt count on the stats from the SRL Stats page to send them.

    EX. if you say ReportVars[0]:= 1 and the RocksMined are alread 3453, the RocksMined will not change to 1.

    Join the fastest growing merchanting clan on the the net!

  6. #6
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by pwnaz0r View Post
    EX. if you say ReportVars[0]:= 1 and the RocksMined are alread 3453, the RocksMined will not change to 1.
    Yea I know. What I mean is if your mining for example and ReportVars[0] already has a value in it (for example if you incremented your reportvars but hadn't called SendSrlReport yet), that value would be set to one. Whereas if you made it ReportVars[0] := ReportVars[0] + 1, it would keep incrementing until you SendSRLReport.

  7. #7
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Yea I know. What I mean is if your mining for example and ReportVars[0] already has a value in it (for example if you incremented your reportvars but hadn't called SendSrlReport yet), that value would be set to one. Whereas if you made it ReportVars[0] := ReportVars[0] + 1, it would keep incrementing until you SendSRLReport.
    EXACTLY WHAT I WAS TRYING TO SAY!!!

    And you should not say SRLRandomsReport; after EVERYTIME YOU MINE. It will DOS SRL's Stats server with how much it sends it.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  8. #8
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thats why i said, Call SRLRandomsReport every time you do the proggy

    Join the fastest growing merchanting clan on the the net!

  9. #9
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by pwnaz0r View Post
    thats why i said, Call SRLRandomsReport every time you do the proggy
    Thats why ReportVars[0] := 1 will not work. (Unless you have the proggie procedure called after everytime you mine but that causes the same problem as Hy71195 mentioned). ReportVars[0] := ReportVars[0] + 1 would be better as it works in every situation.

  10. #10
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No you call SendSRLReport after everytime you add a report var, and SRLRandomsReport everytime you do a proggy, the proggy should not be after every rock mine if thats what you mean.

    Join the fastest growing merchanting clan on the the net!

  11. #11
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    You realise that SRLRandomsReport is the same as SendSRLReport except SRLRandomsReport adds the number of randoms encountered into your report box. Anyway... I personally like ReportVars[0] := ReportVars[0] + 1 better but as long as you don't go creative (like me) and make it send the report based on a timer instead of the position in the main loop it should be ok.

  12. #12
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    whatever....

    Join the fastest growing merchanting clan on the the net!

  13. #13
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is worth to gravedig!
    Hehe, it was easier than i thought, Big thx pwnaz0r(lol i didn't knew how to use stats in scripts before... until i found this tut)
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  14. #14
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hah, I guess its not really a gravedig, I meant for everyone to know how to use them. Your welcome.

    Join the fastest growing merchanting clan on the the net!

  15. #15
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    rated 5 stars, needed this for my script thank you.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  16. #16
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Yeah, I register my script but dont get any ScriptID
    Jus' Lurkin'

  17. #17
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ty!!
    ~ Metagen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Srl Stats?
    By Pierre14 in forum News and General
    Replies: 2
    Last Post: 03-17-2008, 10:57 AM

Posting Permissions

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