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
to
Simba Code:
incEx(EssenceMined, 27);
stats_IncVariable('Rune Essence (Mined)', 27);
then everything else will be taken care for you
~shut