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:
or
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?