Results 1 to 22 of 22

Thread: Temp Stats, using for scripting and general usage.

  1. #1
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Post Temp Stats, using for scripting and general usage.

    I. About SRL Stats

    Temp Stats are the current alternative to the regular SRL stats system which has been under construction for quite some time now.

    The Stats system is a way for scripts and script users to log total time, randoms, logins, ores mined, logs chooped ect.. for each and every script there is to offer on SCAR. It's basically an online data base that tally's up a scripts run time, your time using that script, and your total SCAR auoting... as well as everyone else's. It can also be used to remotely control your players info like .Active and loc.

    II. Registering/ using your ID


    Official homepage: http://scriptmanager.freehostia.com/index.php
    Here is where you can register: http://scriptmanager.freehostia.com/register.php

    Once you have registered you can click My Profile in the upper right corner where it will give you your profile page. Here you can see various statistics based on your macroing history which include scripts you have released (near bottom), times you used each script (very bottom), and your runescape account statuses (on the right.. don't worry it only logs your username/.Loc which is only visible to you) there you can change any variables you want it the script you are using will update during runtime.

    The most important thing on this page is your UID number which will be labeled near the top (User ID 0) well not '0' but whatever it is, this number along with your login password to the main site will be what you use when filling in the setup fields in the script you are using. Just remember some scripts are updated via SVN and might reset it when you update... remember to check/update your script stats information before you run a script and ALWAYS make sure you remove that info if you are uploading a script to the public or committing a file to an SVN server.

    Here is what POMS and RCrB info fields will look like:

    SCAR Code:
    const
        YourStatsUserID     = '0';        //User UID from scriptmanager.freehostia.com
      YourStatsPass       = 'yourpasshere';        //Your pass from scriptmanager.

    III. Viewing statistics

    'My Profile' is where you can observe all your individual run times for individual scripts as well as your total randoms/ time/ user rank.

    'Users' http://scriptmanager.freehostia.com/...sb=3&mintime=0 is where you can see who has the most run time on their account.

    'Scripts' http://scriptmanager.freehostia.com/scripts.php is where you can see what all scripts are in the data base and what scripts have the highest total time, and if you click on anyone of the scripts it will open more information about that script. For example: http://scriptmanager.freehostia.com/scripts.php?sid=3 shows Total time for that script, last connection, total randoms, lots of custom vars like ess crafted ect.

    Always SCAR to connect to internet and files!

    if you want, here is a custom sig for your individual run time

    just put in your ID and put in IMG tags

    http://scriptmanager.freehostia.com/...uid=YOURIDHERE

    like this



    if you are not a scripter and are not interested in scripting then you can leave the thread now as the next part of the script is nothing you need to worry about.

    IV. Submitting scripts and using Stats in SCAR scripts

    This will explain how you implement stats into your very own script. The first thing you need to do is get a copy of the current stat functions which you can find in the SRL member news section on this thread if you do not have access to SRL members section, one reliable place you can find the info you need is POMS svn where it is usually up to date here: http://srlpoms.googlecode.com/svn/tr.../SRLStats.scar . once you have the code it is important that you move all the global variables to the be with the rest of the global variables in your script near the top. Then you can place all the functions (4 of them currently) above the functions/procedures in your script to where you can call them below where ever you need to.

    Update: Now you can simply add {.include SRL\SRL\Misc\Stats.scar} to your script below {.include SRL\SRL.scar}

    Once you have done all that you will need to submit a script at 'My profile' -> release script. There you will need to fill in all the correct information about the script as well as custom variables (if you want custom vars that is). After you have done that go to your script's page and find it's ID number make sure this is not the same as your User ID number as submitting info to the wrong script is huge penalty/pain in the ass to that script owner.

    Now that you have a registered script ID and all the functions and variables in place you will need to find where your variables need to be located:

    Examples:

    SCAR Code:
    OresMined := OresMined + 1;
    Stats_CustomVars[1] := Stats_CustomVars[1] + 1;

    SCAR Code:
    Inc(LogsChopped);
    Inc(Stats_CustomVars[7]);

    SCAR Code:
    IncEx(TotalEss, EssenceBeingCarried);
    IncEx(Stats_CustomVars[4], EssenceBeingCarried);

    for adding banking:

    SCAR Code:
    Inc(Banks);

    or

    SCAR Code:
    Banks := Banks + 1;

    Logins is automatically managed by LoginPlayer and NextPlayer and whatnot, but it doesn't record the first login for some reason so that's an easy fix, right after LoginPlayer just do this

    SCAR Code:
    if (SRL_Logs < 1) then
      SRL_Logs := 1;

    then you will need to add

    SCAR Code:
    SRLRandomsReport;
      Stats_SendReport;
      Stats_ManageAccounts;

    where it loops once a trip to send all the info to the server.

    Add a simple simple user friendly account input at the top of your script

    SCAR Code:
    const
        YourStatsUserID     = '0';        //User UID from scriptmanager.freehostia.com
      YourStatsPass       = 'yourpasshere';        //Your pass from scriptmanager.

    lastly find SetUpSRL; highlight delete it and replace it with this:

    SCAR Code:
    SetUpSRL;
      Stats_Link := 'http://scriptmanager.freehostia.com/submit.php';
      Stats_ScriptID := '0'; //SCRIPT ID # HERE!
      Stats_UserID := YourStatsUserID;
      Stats_Password := YourStatsPass;
      SRLRandomsReport;
      Stats_SendReport;
      Stats_ManageAccounts;

    Always allow it to connect to internet and files!

    If you followed all this correctly you should have working stats.

    Comments/questions/concerns?
    Last edited by Wanted; 06-25-2010 at 03:16 PM.

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Good job!
    I guessed that you were making one of these tutorials now that you had your dynamic sig.. :P

    I can't find anything to fix/edit...

  3. #3
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This should be moved, in my opinion.

    Thanks for tutorial.
    Woot woot.

  4. #4
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Ultra View Post
    This should be moved, in my opinion.

    Thanks for tutorial.
    Moved where?

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

    Default

    I made this, but hey

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

    Default

    Stickyfied.

    ~RM

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

  7. #7
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Who did the PHP? ;P Looks good
    Ce ne sont que des gueux


  8. #8
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Where is the "I lost my password"-button?

  9. #9
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    Where is the "I lost my password"-button?
    Don't think there is one

    Ask about it here http://www.villavu.com/forum/showthread.php?t=48887

  10. #10
    Join Date
    Jan 2009
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    um ima noob so i want to know whats the update button when u click profile den your accounts

  11. #11
    Join Date
    Dec 2007
    Location
    Ohio
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    RCrB Sounds awesome, sucks that it doesn't work anymore =\

  12. #12
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Floor66 View Post
    Who did the PHP? ;P Looks good
    How do you know that it looks good if you can't see the php :P. But Nielsie did.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  13. #13
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    I think he means the end result looks good.

  14. #14
    Join Date
    Mar 2007
    Posts
    478
    Mentioned
    4 Post(s)
    Quoted
    4 Post(s)

    Default

    I did something wrong,

    Line 316: [Error] (23308:1): Variable Expected in script C:\games\scarprerelease\Scripts\ss.scar
    Back from the dead.....

  15. #15
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by aran armath View Post
    I did something wrong,

    Line 316: [Error] (23308:1): Variable Expected in script C:\games\scarprerelease\Scripts\ss.scar
    Well, lines 310-320 would be nice to be included
    There used to be something meaningful here.

  16. #16
    Join Date
    Mar 2007
    Posts
    478
    Mentioned
    4 Post(s)
    Quoted
    4 Post(s)

    Default

    Code:
    procedure Setupsrl1;
    begin
    SetUpSRL;
    DeclarePlayers;
      Stats_Link := 'http://scriptmanager.freehostia.com/submit.php';
      Stats_ScriptID := '49'; //SCRIPT ID # HERE!
      Stats_UserID := YourStatsUserID;
      Stats_Password := YourStatsPass;
    end;
    I dont think that contains the problem, but I really have no clue.
    Back from the dead.....

  17. #17
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    ^ do you have

    SCAR Code:
    const
        YourStatsUserID     = '0';        //User UID from scriptmanager.freehostia.com
      YourStatsPass       = 'yourpasshere';        //Your pass from scriptmanager.

    at the beginning of your script?

  18. #18
    Join Date
    Mar 2007
    Posts
    478
    Mentioned
    4 Post(s)
    Quoted
    4 Post(s)

    Default

    const
    SmartWorld = 15; // Which World/Server do you want to use?
    SmartMembers = False; // Is it a Members World?
    SmartSigned = True; // Signed/UnSigned Client?
    SmartSuperDetail = False; // Use Super Detail?
    YourStatsUserID = ''; //User UID from scriptmanager.freehostia.com
    YourStatsPass = ''; //Your pass from scriptmanager.
    Back from the dead.....

  19. #19
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Can you say which lines are which? (Or just ACTUALLY copy lines 310-320.)

  20. #20
    Join Date
    Mar 2007
    Posts
    478
    Mentioned
    4 Post(s)
    Quoted
    4 Post(s)

    Default

    Figured it out finally. Had STATS_LINK twice in the script.
    Back from the dead.....

  21. #21
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Yeah.. I PM'd you the fixed version anyway, since I didn't see this post.

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

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
  •