PDA

View Full Version : How do i add SRL Stats to my script?



Decs
02-22-2012, 12:50 PM
Can someone please help me and tell me what i did wrong here?
i followed a tutorial to add SRL Stats to my script but it just isnt
working for me.

heres the script (with the srl stats i added myself)

program WillowCutter;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

//INFORMATION
const
Tree_Type = 'Willow';
Signed_App = True;

//SETTINGS
Bank_Pin = '0000'; //Bank Pin
RS_Memeber = False; //Members Status (True/False)
Default_World = 38; //Default World Used

//SRL-STATS
SRLStats_Username = 'Name'; //SRL Stats Username
SRLStats_Password = 'Pass'; //SRL Stats Password

//VARIABLES
Var
Willows_Chopped: Integer;
Experience_Gained: Integer;

//PLAYERS
Procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Total Players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Default Player

Players[0].Name := 'Name'; //RuneScape Username
Players[0].Pass := 'Pass'; //RuneScape Password
Players[0].Nick := 'Nick'; //First 3-4 Letters of Username
Players[0].Active := True; //Player Status
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;

//ANTI-RANDOMS
procedure AntiRandoms;
begin
FindNormalRandoms;
LampSkill := 'woodcutting';
LevelUp;
end;

//ANTI-BAN
Procedure AntiBan;
begin
if(not(LoggedIn)) then Exit;
Case Random(250) of

10:
begin
WriteLn('Performing Anti-Ban.');
HoverSkill('Woodcutting', false);
wait(1634+Random(2169));
end;

30:
begin
WriteLn('Performing Anti-Ban.');
PickUpMouse;
end;

40:
begin
WriteLn('Performing Anti-Ban.');
MakeCompass('N');
wait(100+random(433));
MakeCompass('S');
wait(50+random(124));
MakeCompass('N');
FindNormalRandoms;
end;

50:
begin
WriteLn('Performing Anti-Ban.');
ExamineInv;
end;

end;
end;

//WALKING(WILLOWS)
Procedure WalkToWillows;
Var
walkTree:TPointArray;

begin
SPS_Setup(RUNESCAPE_SURFACE,['10_9','11_9','11_8','9_8','9_9']);
walkTree := [Point(4186, 3668), Point(4184, 3645), Point(4151, 3721)];
SPS_WalkPath(walkTree);
end;

//WALKING(BANK)
Procedure WalkToBank;
Var
walkBank:TPointArray;

begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['10_9','11_9','11_8','9_8','9_9']);
walkBank := [Point(4152, 3698), Point(4202, 3685)];
SPS_WalkPath(walkBank);
end;

//BANKING
Procedure bankLogs;

begin
if(InvFull) then
begin

WriteLn('Inventory full, Banking');

OpenBankFast('db');
WriteLn('Depositing ' + Tree_Type + ' logs.');

if(PinScreen) then
WriteLn('Entering Bank PIN: ' + Bank_Pin + '.');
InPin(Bank_Pin);

if(BankScreen) then
DepositAll;
Willows_Chopped := Willows_Chopped + 28;
Experience_Gained := Experience_Gained + 1890;
WriteLn('Deposited ' + Tree_Type + ' logs.');

WriteLn('Closing Bank');
WriteLn('Willows Chopped: ' + IntToStr(Willows_Chopped));
WriteLn('Experience Gained: ' + IntToStr(Experience_Gained));

CloseBank;

if (Tree_Type = 'Willow') then
stats_IncVariable('Willow Logs Chopped', 28);

WriteLn('Finding Walk Path');
Wait(2000 + Random(1500));
WriteLn('Found Walk Path');
Wait(1000 + Random(300));
WriteLn('Walking to Willows');

end;
end;

//INVENTORY
Procedure checkFullInv;
begin
if(InvFull) then
begin
WriteLn('Inventory Full, Finding bank...');
WalkToBank;
Wait(1000 + Random(1500));
WriteLn('Bank Found, Walking to bank...');
bankLogs;
WalkToWillows;
end;
end;

//WOODCUTTING
Procedure treeChop;
var x, y: integer;
begin
if not LoggedIn then Exit;

if(InvFull) then exit;
repeat
if FindObj(x, y, 'hop', 3491141, 10) then
Mouse(x, y, 1, 1, false);
ChooseOption('hop');

repeat
wait(1200+random(450));
AntiBan;
AntiRandoms;
checkFullInv;
Until not(IsUpText('illow')or(InvFull))
until(InvFull);
end;

//SMART
begin
Smart_Server := Default_World;
Smart_Members := RS_Memeber;
Smart_SuperDetail := False;
Smart_Signed := Signed_App;
ClearDebug;

//SETUPS
SetUpSRL;
SetupSRLStats(819, SRLStats_Username, SRLStats_Password);
ActivateClient;
DeclarePlayers;
LoginPlayer;

Willows_Chopped := 0;
Experience_Gained := 0;

ClearDebug;

repeat
WalkToWillows;
treeChop;
WalkToBank;
bankLogs;
Stats_Commit;
until (Willows_Chopped >= 5000);

end.

Gala
02-24-2012, 08:37 PM
repeat
WalkToWillows;
treeChop;
WalkToBank;
bankLogs;
Stats_Commit;
until (Willows_Chopped >= 5000);

to this

repeat
WalkToWillows;
treeChop;
WalkToBank;
bankLogs;
stats_IncVariable('Willow Logs Chopped', 27);
stats_IncVariable('Woodcutting EXP (Gained)',27*willow xp);
Stats_Commit;
until (Willows_Chopped >= 5000);

You should also add the vars. You can do this on the srl stats page when you are logged in.
- Gala