Results 1 to 14 of 14

Thread: Adding SRL Stats to your script

  1. #1
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default Adding SRL Stats to your script

    Adding SRL Stats to your script

    okay well this is just a draft so i will improve it later on

    first of all you need to have your script, as your reading this them im sure you will already have one.

    Go to http://stats.villavu.com/ and create a account
    once you have logged in click on "My Scripts" in the top right then "Create a New Script" half way down on the left.

    fill in all the name andclick on the link to manage the script.
    add the vars you want to use by clicking on "Add variable".

    Once this is done you can get the script ID number from the url.
    The script ID is used by the stats to uniquely identify each script.
    The script ID is the last and final digits in the URL.
    For example for http://stats.villavu.com/manage/script/114 the script ID is 114

    now that you have the script ID we can begin with adding it to the script

    now at the very start of your script you need to add a include
    {$i srl/srl/misc\stats.simba}

    then create 2 constants, this is where the user will be able to put their username and password
    Simba Code:
    const
      SRLStats_User = 'username'; // Your SRL Stats ID (If you dont have one then just leave it as it is)
      SRLStats_Password = 'pass'; // Your SRL Stats Password (If you dont have one then just leave it as it is)

    and in the main part of the script you need to add this line
    Simba Code:
    SetupSRLStats({scriptid} 114, SRLStats_User, SRLStats_Password);
    this sets all the data which is needed to add the stats to your script stats account

    then there is one last thing left to do
    add these lines to the main loop or the proggy
    Simba Code:
    SRLRandomsReport;
        Stats_Commit;

    now you have to add the vars for the stats such as "Rune Essence (Mined)". You just need to run one function when you increase the proggy var
    so for example, just change this
    Simba Code:
    incEx(EssenceMines, 27);
    to
    Simba Code:
    incEx(EssenceMined, 27);
    stats_IncVariable('Rune Essence (Mined)', 27);

    then everything else will be taken care for you

    ~shut
    Last edited by Shuttleu; 02-01-2012 at 09:24 AM.

  2. #2
    Join Date
    Mar 2009
    Location
    North
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    may i ask, and this is no offense to you or anyone at all

    What is the point in adding this to your script, what do you gain out of it?

    It always confuses me why people go into wars about how we got here, and where we go when we die.

  3. #3
    Join Date
    Sep 2006
    Location
    Texas
    Posts
    1,349
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You get too see who's using it, and how much they are using it.

    You will also be able to see what randoms its able to solve and how much logs/exp/total time etc, it has done.

    Overall able to see how popular your script is, and if people are using it.

  4. #4
    Join Date
    May 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the tutorial. I just want to ask, where is the "Stats_UserID" and password actually chosen? (ie. how do you register for one?) I remember doing it a few years ago and a thread from 2008 has a picture of a stats link on the front page of the main website, however that is no longer there. I tried both the login username and the UID listed on the profile tab of the scriptmanager site with my password, and it still gave an "incorrect user name or password" when trying to send stats with a script. Could you please clarify where exactly the stats are sent to and what the UID and password should be? Thank you.

  5. #5
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by any_one View Post
    Thanks for the tutorial. I just want to ask, where is the "Stats_UserID" and password actually chosen? (ie. how do you register for one?) I remember doing it a few years ago and a thread from 2008 has a picture of a stats link on the front page of the main website, however that is no longer there. I tried both the login username and the UID listed on the profile tab of the scriptmanager site with my password, and it still gave an "incorrect user name or password" when trying to send stats with a script. Could you please clarify where exactly the stats are sent to and what the UID and password should be? Thank you.
    you can register for a User account at http://scriptmanager.freehostia.com
    from there you can go into your profile and in the url it will say http://scriptmanager.freehostia.com/profile.php?uid=13
    the uid is your Stats_UserID
    so for me i would put Stats_UserID = 13;
    the password is the password you use to log into the script manager site

    ~shut

  6. #6
    Join Date
    May 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK I think I will try changing my password as it may not like some of the characters in it, that is exactly what I've been doing.. Thanks for your quick reply

  7. #7
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    do you still add SRL stats the same way, cuz im getting a shit load of errors in my script, no compile errors just HTTP errors

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

    Default

    Yeah this method is outdated. I'll make a current one in the morning if I remember.


    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!

  9. #9
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  10. #10
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    updated, sorry for the time it took :s

    ~shut
    Might wanna explain what the number 114 is for (script id)
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  11. #11
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,193
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    I took off the Outdated Tag in the title. Good to have you back Shut.

    ~BraK

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

  12. #12
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Yago View Post
    Might wanna explain what the number 114 is for (script id)
    He did that somewhere above.

    Once this is done you can get the script ID number from the url.
    The script ID is used by the stats to uniquely identify each script.
    The script ID is the last and final digits in the URL.
    For example for http://stats.villavu.com/manage/script/114 the script ID is 114

  13. #13
    Join Date
    Dec 2011
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I think this method is outdated again because when i try to use your method i get a syntax error. When using this.

    Simba Code:
    stats_IncVariable("Woodcutting EXP (Gained))",4725);
        stats_IncVariable("Yew Logs Chopped",27);


    But when i do it like this

    Simba Code:
    stats_IncVariable('Woodcutting EXP (Gained))',4725);
        stats_IncVariable('Yew Logs Chopped',27);

    i don't get the error. Instead my stats wont update. Wtf am i doing wrong?

  14. #14
    Join Date
    Dec 2011
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't get it -.- Can anyone post a screenshot so i can get a look of it??

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
  •