Results 1 to 14 of 14

Thread: How to add SRL Stats to your script

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

    Default How to add SRL Stats to your script

    This tut has 2 sections, one for the site-end, and script end.

    Site-end:

    1) Sign up for an account at http://stats.villavu.com/

    2) Go to http://stats.villavu.com/manage/script/new

    3) Fill in script name and click Next.

    4) You will now get:
    > "You just created SCRIPTNAME. You can Manage it here.".
    In the URL for "manage", it will have a number at the end. This is your script ID.

    5) Go there and add your vars. If they aren't there (it's a bit hard to find what you want, but most common ones are there), you may suggest them at http://villavu.com/forum/showthread.php?t=61070 .

    Script-end (the fun part!):
    6) Include the Stats (after SRL):
    Simba Code:
    {$i SRL/SRL/Misc/stats.simba}

    7) Add a const for your users to fill their Stats info into:
    Simba Code:
    const
      SRLStats_Username = 'YourUsernameYouSignedUpWith';
      SRLStats_Password = 'Password';

    8) In your script setup (main program, before the loop), probably best right after SetupSRL;, you will need to add:
    Simba Code:
    SetupSRLStats(SCRIPT_ID_FROM_ABOVE, SRLStats_Username, SRLStats_Password);

    9) Calling "Stats_Commit;" will commit your stats! You should call it every progress report. Note, it will only activate every 5 minutes at most, so you will need to run your script for a few minutes to test it.
    Simba Code:
    Stats_Commit;

    10) Now the generic stats:
    Simba Code:
    stats_IncVariable('Variable Name', Count);
    Replace 'Variable name' with the variable you added on the stats.villavu page, and Count with an integer representing how much you want it increased.


    Congrats, your script now has stats. Bot it up!
    Last edited by Harry; 03-19-2011 at 09:13 PM. Reason: ;) Wizzup


    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!

  2. #2
    Join Date
    Mar 2009
    Location
    Norway
    Posts
    493
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Nice tut Will add this to my next script!

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    I don't think you want to call SetupSRL; SetupSRLStats in your main loop. (Point 8; call it main program, before the loop)



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    Sep 2007
    Location
    Australia, NSW
    Posts
    934
    Mentioned
    6 Post(s)
    Quoted
    145 Post(s)

    Default

    Thanks for this! Very easy to follow and implement into my new fletcher! I reckon this should be stickied, because it wasn't as easy as I'd like to find :P

    INACTIVE
    How-to: Make S.M.A.R.T. less laggy

    Sell me your Maple Shieldbows (u)! Up to 95gp ea!

    My Scripts:
    Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
    99 x78 | 99 x10 | 99 x2 | 99 x12


    Use the REPORT tags when posting progress reports to make life easier (:
    [REPORT]Put progress report in here![/REPORT]

    Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]

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

    Default

    Ya, I followed it very nicely, I just can't get it to upload my Variables. I want it to upload Iron Ore (Mined).

    stats_IncVariable('Iron Ore (Mined) ', 1);

    Correct?
    My Scripts:
    [HardRockin] Iron Miner (Best mining exp/hr on this site, that I have found)

  6. #6
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by HardRockers View Post
    Ya, I followed it very nicely, I just can't get it to upload my Variables. I want it to upload Iron Ore (Mined).

    stats_IncVariable('Iron Ore (Mined) ', 1);

    Correct?
    Try:
    stats_IncVariable('Iron Ore (Mined)', 1);
    Tell me if that works

    -Boom

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

    Default

    What is different about what you typed and what i typed?
    My Scripts:
    [HardRockin] Iron Miner (Best mining exp/hr on this site, that I have found)

  8. #8
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by HardRockers View Post
    What is different about what you typed and what i typed?
    Space after "...(Mined)"

    -Boom

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

    Default

    oh, well thank you. I couldn't even tell. I am running it now to see if it updates correctly.

    Edit: Working good
    Last edited by HardRockers; 12-31-2011 at 01:10 AM.
    My Scripts:
    [HardRockin] Iron Miner (Best mining exp/hr on this site, that I have found)

  10. #10
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    It takes 5 minutes of runtime for the stats up update. Are you using the stats_commit?
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


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

    Default

    Yes, It got fixed.
    My Scripts:
    [HardRockin] Iron Miner (Best mining exp/hr on this site, that I have found)

  12. #12
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    You no longer need to add:
    Simba Code:
    {$i SRL/SRL/Misc/stats.simba}
    or you will get Duplicate Idnet error. Just thought it should be noted

  13. #13
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    Thank you for the tutorial. Helped me fix the errors I had with SRL Stats.
    Last edited by Wetish; 02-09-2012 at 11:31 AM.

  14. #14
    Join Date
    Mar 2012
    Location
    Canada
    Posts
    870
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    For some reason it only adds time, but not my variable. Tried 4 time, this is the result:
    http://stats.villavu.com/script/913


    Yes I added the variable in SRL Stats but it only show up in "manage".
    Last edited by eska; 03-15-2012 at 09:14 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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