PDA

View Full Version : Adding SRL Stats To Your script.



shaunthasheep
06-02-2007, 03:20 PM
give time for the image to load
http://img111.imageshack.us/img111/7624/srlstatsxl6.png

Buckleyindahouse
06-02-2007, 03:24 PM
OMFG, Thank you so much. I always wondered how to do this.

shaunthasheep
06-02-2007, 04:25 PM
Cool, next time try not to scatter images all around lol :)

Good tut, it'll help people a lot.

lol i wasn't on planning scattering the images all over the place, but when it came to those wide images, i didn't want to waste space.

And thanks for all the comments =)

Dan Cardin
06-02-2007, 06:58 PM
really nice tut!! nice and colourful! thats way cool!

Hugolord
06-14-2007, 11:04 AM
Thanks for this was wondering how to do this!

gamer716
06-14-2007, 11:42 AM
a question: i register SRL Stats but i forgot my ID key. How can i recover it?

Haxor
06-14-2007, 11:45 AM
ill try ask my friend if hell add srl stats for the monk killer

JAD
06-14-2007, 11:08 PM
a question: i register SRL Stats but i forgot my ID key. How can i recover it?

What I do when I forget it is click the members list, and click sort by name. Then just look for your name and look next to it for your ID.

And awesome tut! May help me a bit if I can't figure out how to register my almost released script :)

gsquare567
06-15-2007, 12:01 AM
so does this mean every time i increase one of the variables i need to cal SRLRandomsReport?

kemico2
06-15-2007, 01:05 AM
Thank you so much rs moneky i always wanted to put this in one of my scripts but i never knew how.

WhiteShadow
06-15-2007, 01:18 AM
so does this mean every time i increase one of the variables i need to cal SRLRandomsReport?

Just add SRLRandomsReport; right after your progress report.

gsquare567
06-15-2007, 04:15 AM
ok i did that, but its not working... http://www.stats.srl-forums.com/index.php?action=view_script&id=190
ReportVars[5] := ReportVars[5] + 1; // talks
and after
SRLRandomsReport; // send ReportVars to SRL
EDIT: when i try setupsrl.scar, for user ID i type gsquare567 and i get this error...
[Runtime Error] : Exception: Access violation at address 00000000. Read of address 00000000 in line 755 in script C:\Program Files\SCAR 3.06\includes\SRL\SetupSRL.scar
am i using the right user id, if not, how do i get it if i have... misplaced it?
edit again: i got this when i ran my script "Invalid Script ID"

SetupSRL;
ScriptID := '190';

WhiteShadow
06-15-2007, 04:46 AM
SRL ID # not SRL username on these forums. "p

EDIT:
I think the Rs Monkey forgot a few things.

Here this is taken from my script.


SetupSRL;
SRLID := dSRLID; //const
SRLPassword:= dSRLPASS; //const
for i:= 0 to 19 do //<---
ReportVars[i]:= 0;
ScriptID := '';
SetUpSRLReport; // <---

Hugolord
06-15-2007, 10:18 AM
hey i get this Assignment expected in script after

ScriptId :='192';
SrlRandomsReport;
ReportVars[0]= Varname1(Rocks);

can anyone help me? :(

WhiteShadow
06-16-2007, 06:26 AM
hey i get this Assignment expected in script after

ScriptId :='192';
SrlRandomsReport;
ReportVars[0]= Varname1(Rocks);

can anyone help me? :(

It should be


ReportVars[0]:= ReportVars[0] + AnIntegerVariable;

shaunthasheep
06-17-2007, 03:02 PM
ReportVars[0] := ReportVars[0] + CountItemBmpMaskTol(OreMask, 15);

i stole this oremask from Wizzups VEM lol.
hopefully he won't mind

OreMask := BitmapFromString(11, 11, 'z78DA73730301033070436' +
'2238B60024C35B84CC0A5923C13F0BB937813F0EB22DE04CC 5022' +
'CF04CADD404CC890EA0BFCE2F85D4E4C6A212FF470998FCC0 600F' +
'B599CC1');

Lalaji
06-17-2007, 03:20 PM
Great tut but i think one of the like dosent open for me.

Timer
06-18-2007, 02:46 PM
Can Some One Please Add In The Thing That Updates Srl Stats For Me Every Time It Does Procedure ReportProgress;?

P.S. This Is Just Some Of My Script You Might Need To Use To Add Stats &
The Thing To Report To SRL Stats Is
CoalMined

Procedure ReportProgress;
Begin;
ClearReport;
AddToReport('Progress Report')
AddToReport('Auto CoalMiner')
AddToReport('By: Timer150')
AddToReport('')
AddToReport('Averaged Coal/Exp')
AddToReport('Mined ' + inttostr(CoalMined) + ' Coal')
AddToReport('Exp Gained ' + inttostr(CoalMined*50))
End;

Procedure AttackCheck;
Begin
If(Findcolor(x,y,Blood,201,113,327,220))Then
RunFarAway;
end;

Procedure Drop_Coal(Color:Integer);
var
x, y, Drop:Integer;
begin
Drop:= DTMFromString('78DA63B4636260E064644006FFFFFF07D33 05' +
'1465BA01A5E5435300057E30A542344408D07500D0F01BBF4 8854' +
'C346408D19A69B31D480FCCE875F0D00B9181450');
while(FindColor(x,y,Color,548,168,761,496))do
begin
Mouse(x+5,y,1,1,false);
Wait(900);
if(FindDtm(Drop,x,y,548,168,761,496))then
begin
Mouse(x,y,1,1,true)
Wait(450);
end;
end;
FreeDtm(Drop);
end;

Var Z:integer;

Procedure MineOre;
Begin;
Repeat;
Mine_Coal;
Attackcheck;
Z:=z+1;
CoalMined:=CoalMined+1;
ReportProgress;
Until(Z=Ore);
End;

Procedure DoItAll;
Begin;
MineOre;
Speak('Droping')
Say('Feel Free To Take ^.^')
Drop_Coal(Coal2);
End;

Begin;
SetupTimersInclude;
ReportProgress;
Setup;
Setup2;
SetupSRL;
ScriptID := '199';
Repeat;
DoItAll;
Until(CoalMined>OreToMine);
End.

Timer
06-18-2007, 02:48 PM
Any 1 Here?

crossback7
06-18-2007, 03:13 PM
Don't double post, suprisingly it'll probably take more than two minutes for someone to answer.

And try doing it for yourself first. You didn't even make an attempt at it in your above script. If you can't do it, then you should ask for some help.

shaunthasheep
06-18-2007, 03:29 PM
what about this?

Procedure ReportProgress;
Begin;
ClearReport;
AddToReport('Progress Report')
AddToReport('Auto CoalMiner')
AddToReport('By: Timer150')
AddToReport('')
AddToReport('Averaged Coal/Exp')
AddToReport('Mined ' + inttostr(CoalMined) + ' Coal')
AddToReport('Exp Gained ' + inttostr(CoalMined*50))
SrlRandomsReport;
End;

Procedure AttackCheck;
Begin
If(Findcolor(x,y,Blood,201,113,327,220))Then
RunFarAway;
end;

Procedure Drop_Coal(Color:Integer);
var
x, y, Drop:Integer;
begin
Drop:= DTMFromString('78DA63B4636260E064644006FFFFFF07D33 05' +
'1465BA01A5E5435300057E30A542344408D07500D0F01BBF4 8854' +
'C346408D19A69B31D480FCCE875F0D00B9181450');
while(FindColor(x,y,Color,548,168,761,496))do
begin
Mouse(x+5,y,1,1,false);
Wait(900);
if(FindDtm(Drop,x,y,548,168,761,496))then
begin
Mouse(x,y,1,1,true)
Wait(450);
end;
end;
FreeDtm(Drop);
end;

Var Z:integer;

Procedure MineOre;
Begin;
Repeat;
Mine_Coal;
Attackcheck;
Z:=z+1;
CoalMined:=CoalMined+1;
ReportVars[0] := ReportVars[0] + 1;
ReportProgress;
Until(Z=Ore);
End;

Procedure DoItAll;
Begin;
MineOre;
Speak('Droping')
Say('Feel Free To Take ^.^')
Drop_Coal(Coal2);
End;

Begin;
SetupTimersInclude;
ReportProgress;
Setup;
Setup2;
SetupSRL;
ScriptID := '199';
Repeat;
DoItAll;
Until(CoalMined>OreToMine);
End.

n3ss3s
06-19-2007, 01:23 PM
Hugolord, everytime you do something like that with vars, you need to have := there instead of only = because, the ":" is the assigner or whats it called :D


Timer, what do you mean by that?

Timer
06-20-2007, 04:06 PM
Thanks Rs Monkey

the scar noob
06-20-2007, 05:50 PM
Just add SRLRandomsReport; right after your progress report.
is this the answer you were looking for?

EDIT: so non-srl membs also can do that?

Bourdou!
08-19-2007, 08:13 PM
Does it record the time spent running automatically?

Pitbull
02-21-2008, 02:01 PM
Failed when compiling
Line 67: [Error] (12379:13): Unknown identifier 'SRLVersionNumber' in script C:\Users\Bert\AppData\Local\VirtualStore\Program Files\SCAR 3.14\includes\SRL\SetUpSRL.scar

This is the error i get when I try to run SetUpSrl.scar, anyone know how to fix this ? I am using Vista, I'll also attach my script in which I think I included ScriptID and stuff right.

program PBautotalker;
{.include SRL/SRL.scar}

var
frmDesign : TForm;
ForumNameLabel : TLabel;
ColorLabel : TLabel;
EffectLabel : TLabel;
Message1Label : TLabel;
Message2Label : TLabel;
ForumNameEdit : TEdit;
ColorEdit : TEdit;
Edit2 : TEdit;
EffectEdit : TEdit;
Message1Edit : TEdit;
Message2Edit : TEdit;
StartButton : TButton;

ForumName, Color, Effect, Message1, Message2 : String;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

procedure ClickButton(sender: TObject);
begin
Writeln('Thnx for using PBautotalker!');
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;

end;

Procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 98;
frmDesign.Width := 401;
frmDesign.Height := 277;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.ShowHint := True;
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
ForumNameLabel := TLabel.Create(frmDesign);
ForumNameLabel.Parent := frmDesign;
ForumNameLabel.Left := 32;
ForumNameLabel.Top := 32;
ForumNameLabel.Width := 57;
ForumNameLabel.Height := 13;
ForumNameLabel.Hint := 'Fill out your SRL-forum username here';
ForumNameLabel.Caption := 'ForumName';
ForumNameLabel.ParentShowHint := False;
ForumNameLabel.ShowHint := False;
ColorLabel := TLabel.Create(frmDesign);
ColorLabel.Parent := frmDesign;
ColorLabel.Left := 32;
ColorLabel.Top := 64;
ColorLabel.Width := 65;
ColorLabel.Height := 13;
ColorLabel.Hint := 'For the possible color'#39's check my thread';
ColorLabel.Caption := 'Color';
ColorLabel.ParentShowHint := False;
ColorLabel.ShowHint := False;
EffectLabel := TLabel.Create(frmDesign);
EffectLabel.Parent := frmDesign;
EffectLabel.Left := 32;
EffectLabel.Top := 96;
EffectLabel.Width := 65;
EffectLabel.Height := 13;
EffectLabel.Hint := 'For the possible effect'#39's check my thread';
EffectLabel.Caption := 'Effect';
EffectLabel.ParentShowHint := False;
EffectLabel.ShowHint := False;
Message1Label := TLabel.Create(frmDesign);
Message1Label.Parent := frmDesign;
Message1Label.Left := 32;
Message1Label.Top := 128;
Message1Label.Width := 85;
Message1Label.Height := 13;
Message1Label.Hint := 'Fill out message 1 here';
Message1Label.Caption := 'Message1';
Message1Label.ParentShowHint := False;
Message1Label.ShowHint := False;
Message2Label := TLabel.Create(frmDesign);
Message2Label.Parent := frmDesign;
Message2Label.Left := 32;
Message2Label.Top := 160;
Message2Label.Width := 85;
Message2Label.Height := 13;
Message2Label.Hint := 'Fill out message 2 here';
Message2Label.Caption := 'Message2';
Message2Label.ParentShowHint := False;
Message2Label.ShowHint := False;
ForumNameEdit := TEdit.Create(frmDesign);
ForumNameEdit.Parent := frmDesign;
ForumNameEdit.Left := 128;
ForumNameEdit.Top := 32;
ForumNameEdit.Width := 225;
ForumNameEdit.Height := 21;
ForumNameEdit.Hint := 'Enter your SRL forum'#39's name here';
ForumNameEdit.ParentShowHint := False;
ForumNameEdit.ShowHint := True;
ForumNameEdit.TabOrder := 8;
ColorEdit := TEdit.Create(frmDesign);
ColorEdit.Parent := frmDesign;
ColorEdit.Left := 128;
ColorEdit.Top := 64;
ColorEdit.Width := 121;
ColorEdit.Height := 21;
ColorEdit.Hint := 'For the possible color'#39's check my thread';
ColorEdit.TabOrder := 9;
Edit2 := TEdit.Create(frmDesign);
Edit2.Parent := frmDesign;
Edit2.Left := 144;
Edit2.Top := 104;
Edit2.Width := 1;
Edit2.Height := 21;
Edit2.TabOrder := 10;
Edit2.Text := 'Edit2';
EffectEdit := TEdit.Create(frmDesign);
EffectEdit.Parent := frmDesign;
EffectEdit.Left := 128;
EffectEdit.Top := 96;
EffectEdit.Width := 121;
EffectEdit.Height := 21;
EffectEdit.Hint := 'For the possible effect'#39's check my thread';
EffectEdit.TabOrder := 11;
Message1Edit := TEdit.Create(frmDesign);
Message1Edit.Parent := frmDesign;
Message1Edit.Left := 128;
Message1Edit.Top := 128;
Message1Edit.Width := 225;
Message1Edit.Height := 21;
Message1Edit.Hint := 'Fill out message 1 here';
Message1Edit.TabOrder := 12;
Message2Edit := TEdit.Create(frmDesign);
Message2Edit.Parent := frmDesign;
Message2Edit.Left := 128;
Message2Edit.Top := 160;
Message2Edit.Width := 225;
Message2Edit.Height := 21;
Message2Edit.Hint := 'Fill out message 2 here';
Message2Edit.TabOrder := 13;
StartButton := TButton.Create(frmDesign);
StartButton.Parent := frmDesign;
StartButton.Left := 264;
StartButton.Top := 64;
StartButton.Width := 89;
StartButton.Height := 49;
StartButton.Hint := 'Start the script ! :)';
StartButton.Caption := 'START';
StartButton.TabOrder := 15;
StartButton.OnClick := @ClickButton;
end;

procedure Talk;
begin

Color := ColorEdit.text;
Effect := EffectEdit.text;
Message1 := Message1Edit.text;
Message2 := Message2Edit.text;



if(IsFKeyDown(1))then
begin
repeat
wait(1450 + Random(850))
TypeSend(Color + ':' + Effect + ':' + Message1);
Talks:=Talks+1;
ReportVars[0] := ReportVars[0] + 1;
until (IsFKeyDown(2))
end;

if(IsFKeyDown(3))then
begin
repeat
wait(1350 + Random(950))
TypeSend(Color + ':' + Effect + ':' + Message2);
Talks:=Talks+1;
ReportVars[0] := ReportVars[0] + 1;
until (IsFKeyDown(4))
end;
end;

procedure Proggy;
begin

ForumName := ForumNameEdit.text;

ClearDebug;
Writeln('<><~><><~><><~><><~><><~><><~><><~><><~><><~><><~>');
Writeln('<~> ');
Writeln('<->--PBautotalker was used by ' + ForumName + ' ');
Writeln('<->--PBautotalker sent ' + IntToStr(Talks) + ' messages' + ' ');
Writeln('<->--PBautotalker ran for ' + TimeRunning + ' ');
Writeln('<~> ');
Writeln('<><~><><~><><~><><~><><~><><~><><~><><~><><~><><~>');

end;

Procedure Sig;
begin
wait(750 + random(250));

Writeln(' ');
Writeln(' +, ,, ');
Writeln(' :*: *, ');
Writeln(' ,*, +:* ');
Writeln(' ,#:, *,W,+ ');
Writeln(' .@W,, WW. ');
Writeln(' +W@ . * +WW: ');
Writeln(' :WW# , , .WW, ');
Writeln(' ,WW* + ,WW. ');
Writeln(' .WW+ , *:,,,,,,,,,,,,,.::::::+ , ,WW** ');
Writeln(' #WW. ,,+#@WWWWWWWWWWWW*WWWWWWWWWWW@+, ,WWW, ');
Writeln(' ,WW.,: WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW+:+,#W+ ');
Writeln(' *+WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW. ');
Writeln(' +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW, ');
Writeln(' WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW. ');
Writeln(' #WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW@: ');
Writeln(' ,#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW* : ');
Writeln(' ,@WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW, . ');
Writeln(' *,,:WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW:, , ');
Writeln(' :, W@WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW , ');
Writeln(' . :WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW: , ');
Writeln(' + ,@WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW . ');
Writeln(' ,WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW: : ');
Writeln(' ,WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#WW . ');
Writeln(' + #W,WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW+@# , ');
Writeln(' : .@,WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW@:, , ');
Writeln(' * *:WWWWWWWWWWW,WWWWWWWWWWWWWWWWWWW, : ');
Writeln(' , ,#WWWWWWWWWWW:WWWWWWWWWWWWWWWWWWW , ');
Writeln(' , +WWWWWWWWWWWW+WWWWWWWWWWWWWWWWWWWW , ');
Writeln(' .WWWWWWWWWWWWW#WWWWWWW,WWWWWWWWWWWW@ ');
Writeln(' ,#WWWWWWWWWW@WWWWWWWW##WWWWWWWWWWW*, , ');
Writeln(' ,**,:@WWWWWWWW.WWWWWWW*WWWWWWWWW*, .W,, * ');
Writeln(' ,@WW,.W@*+#@@:W:@WWWWWWW+ @+*:+@WW* WWW. . ');
Writeln(' * ,+WW:,,WWWW ,,WWWWWWWWWWW@,#. *WWW,,:WW@, . ');
Writeln(' *,,WWWW#, #*, ,:WWWWWWWWWWWWWW@ ,,:., *WWWW. . ');
Writeln(' + ,WWWWWW:, , WWWWWWWWWWWWWWWW,, , +WWWWWW. . ');
Writeln(' + ,WWWWWWWW: @WWWWWWWWWWWWWWWWW:,*WWWWWWWW: : ');
Writeln(' : ,WWWWWW:W@,@WWWWWWWWWWWWWWWWWWW*:#,WWWWWW: : ');
Writeln(' : ,@WWWWW# ,WWWWWWWWWWWWWWWWWWWWWW.,+WWWWW* + ');
Writeln(' + *WWWWW,+W.WWWWWWWWWWWWWWWWWW*##,WWWWW, # ');
Writeln(' * ,@WWW+,.#WWWWWWWWWWWWWWWWWWW,,,#WW*. ');
Writeln(' ,. WWWWWWW@###@WWWWWWWW, ,, , ');
Writeln(' :, WWWW@,,.+#@WW@#@WWWW, ');
Writeln(' , ,+ , #WWW,*,,,.:. ,WW@ , ');
Writeln(' :, +W+, ,WW,, , , ,WW. ,+ ');
Writeln(' ., :WW: #WW: ** ,*,#W@. ,+ ');
Writeln(' , .WW# ,+WWW*:.., ,,,:#WW@, , ');
Writeln(' . ,@W, WWWWWWWW, WWWWWWWW:, , ');
Writeln(' ,,,WW, +WWWWWWWW@, #WWWWWWWW*, . ');
Writeln(' , .WW,,WWWWWWWWW #WWWWWWWW ');
Writeln(' ,,. :WWWWWWWW *WWWWWWW# ');
Writeln(' . ,WWWWWWW* ,#WWWWWW, . ');
Writeln(' +WWWW#, ,@WWW# , ');
Writeln(' , , @W*, ,*. ');
Writeln(' , ,,,,,, ');
Writeln(' , , ,:W ,@@., ');
Writeln(' :#., ,.* ,* ');
Writeln(' +, ,, , ');
Writeln(' . , . ,,, .* ., , : ');
Writeln(' :, , :,. ');
Writeln(' ');
Writeln(' ');

end;

begin
SafeInitForm;
SafeShowFormModal;
ActivateClient;
SetupSRL;
ScriptID := '661';
repeat
Talk;
until (IsFKeyDown(5))
SrlRandomsReport;
Proggy;
Sig;
end.

I hope any1 has an answer.

Daniel.Blaze
02-21-2008, 02:35 PM
The procedure SRLRandomsReport; sends the stats to the server. Just put that into your script progress report.

Pitbull
02-25-2008, 11:38 AM
The procedure SRLRandomsReport; sends the stats to the server. Just put that into your script progress report.

If that was directed to me, thnx, because that was part of the problem. I fixed it however and finally got my stat's to work.

[ontopic] It's great that people like you write tut's for the less experienced among us. Keep doing good work like this ! This certainly helped me and I'm sure it helped other people to. So thnx ! :spot:

Good luck botting,

PB.

0wn 4 skill
08-22-2008, 02:06 PM
Thanx, this helped me add stats to my script :D

welcome
09-04-2008, 05:46 AM
Does this automatically report randoms such as old men and their boxes?

Griff
09-07-2008, 01:15 AM
thanks a lot man, this is an awesome tut! Pics were good, but a lil everywhere :P

zereoth
09-08-2008, 04:41 PM
Simple and elegant tutorial, will use it in my falador smelter if i ever find the time to finish it :S

Tniffoc
09-21-2008, 05:08 PM
I doubt that you can do this but it's worth asking. Can you change the number/name of report vars after you have registered the script?

Thanks in advance,
Tniffoc

boomerswims
09-21-2008, 05:12 PM
=/ i don't get it. - what does it do?

Tniffoc
09-21-2008, 05:18 PM
=/ i don't get it. - what does it do?
SRL Stats records what the script does for everybody using it so that you can see what it can and can't do and you can put the stats in your sig so that people can see your script is good!