PDA

View Full Version : Adding SRL Stats to your script



Shuttleu
11-04-2010, 12:30 AM
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
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
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

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
incEx(EssenceMines, 27);
to
incEx(EssenceMined, 27);
stats_IncVariable('Rune Essence (Mined)', 27);

then everything else will be taken care for you

~shut

Failpailirl
11-04-2010, 11:35 AM
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?

Overtime
11-04-2010, 01:15 PM
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.

any_one
11-11-2010, 10:37 AM
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.

Shuttleu
11-11-2010, 11:21 AM
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

any_one
11-11-2010, 01:12 PM
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 :)

Feroc1ty
03-19-2011, 03:26 AM
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

Harry
03-19-2011, 04:07 AM
Yeah this method is outdated. I'll make a current one in the morning if I remember.

Shuttleu
05-07-2011, 10:29 PM
updated, sorry for the time it took :s

~shut

Yago
05-08-2011, 01:09 AM
updated, sorry for the time it took :s

~shut

Might wanna explain what the number 114 is for (script id)

BraK
05-26-2011, 07:03 AM
I took off the Outdated Tag in the title. Good to have you back Shut.

~BraK

masterBB
05-26-2011, 07:48 AM
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

Drax
02-01-2012, 12:18 AM
I think this method is outdated again because when i try to use your method i get a syntax error. When using this.

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


But when i do it like this

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?

yentaokia
03-23-2012, 01:06 PM
I don't get it -.- Can anyone post a screenshot so i can get a look of it??