Code:
program new;
{.include SRL/SRL/misc/SMART.scar}
{.include srl/srl.scar}
{.include srl/srl/misc/users.scar}
var x,y,loads,RandomSleep,TotalSleep,chicks,chickdtm:integer;
procedure loaddtms; forward;
procedure setup;
begin
SRLPlayerForm(True,['sleep'],['loads to buy','minutes to sleep', 'Random sleep in minutes'],['SRL I.D','SRL Pass'],[]);
SmartSetup('world83', True, true, False);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(360, 172) = 13158) Do
Wait(100);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
setupsrl;
ScriptID := '811';
begin
if ((players[currentplayer].strings[0] = '') or (players[currentplayer].strings[1] = ''))then
begin
writeln('leeching noob');
writeln('get an I.D. and pass now');
OpenWebPage('http://www.stats.srl-forums.com/');
terminatescript;
end else
SRLID:=players[currentplayer].strings[0];
SRLPassword:=players[currentplayer].strings[1];
loaddtms;
end;
end;
Procedure MainLoop; Forward;
procedure antiban; forward;
procedure goshop;
begin
if radialwalk(65536,280,360,72,4,4) then wait(1000);
if findsymbol(x, y,'food shop')then
begin
mouse(x,y,2,2,true);
end else
if findsymbol(x, y,'bank')then
begin
mouse(x,y,2,2,true);
mainloop;
end;
antiban;
end;
Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('Our player is being attacked!')
Writeln('Lets run away!')
Begin
Status('Running away!');
WriteLn('Running....')
RunAway('W',False,1,8000+Random(3000))
WriteLn('Successfully ran away from fight!')
end;
end;
end;
// BY Starblaster
function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tolerance: Integer): Boolean;
var
a, b, c, i, x1, y1, x2, y2: Integer;
Start: Boolean;
begin
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, Tolerance)) then
begin
Start := True;
Break;
end;
end;
if(Start)then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if not(LoggedIn)then break;
a := a + 1;
if (a = 1) then
c := c + 1
else if (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end else
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end else
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end else
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance)) then
begin
MMouse(cx, cy, 3, 3);
Wait(5+Random(10));
if (IsUpTextMultiCustom(Text)) then
begin
Result := True;
Exit;
end;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
procedure loaddtms;
begin
chickDTM := DTMFromString('78DA632C626460F8C880020E2F59CCF01F480' +
'36518FE03012348CD4F0634C0884402E90620EB3301355940D61B' +
'026A3280AC1F04D4D402598FF0AB0100308F0F73');
end;
procedure useshop;
var tries:integer;
begin
repeat
if FindObjCustom2(x, y, ['ufus'], [8431572,7444678,9935011], 10)then
begin
if(IsUpText('alk'))then
begin
Mouse(x, y, 5, 5, false);
if(ChooseOption('Trade'))then
fflag(0);
end;
end else
wait(1000+random(100));
tries:=tries+1;
until (((getcolor(485, 42))=65536)or(tries>=10));
tries:=0;
end;
procedure srlstuff;
begin
reportVars[0] := ReportVars[0] + CountItems(chickdtm,'dtm',[0,0]);
reportVars[1] := ReportVars[1] + 1;
srlrandomsreport;
end;
procedure buy;
begin
if FindObjCustom2(x, y, ['hick'], [10593218, 9408948, 10856388],10) then
begin
mouse(x,y,3,3,false);
ChooseOption('X');
wait(800+random(500));
Typesend('99');
wait(600+random(300));
Mouse(486,40,2,2,True);
wait(1000+random(200));
exit;
end;
end;
procedure antiban;
var
noban: Integer;
Begin
If Not (LoggedIn) Then Exit;
noban := Random(21);
Case noban Of
0,9,17: PickUpMouse;
1,13,16: RandomRclick;
2,10,18: randomMovement;
5,11,8: ChooseOption('cancel');
6,15,21: MMouse(Random(MSX2), Random(MSY2), 0, 0);
7,14,3: HoverSkill('woodcutting', false);
end;
end;
procedure gobank;
begin
if radialwalk(65536,160,200,72,4,4) then wait(1000);
if (findsymbol(x, y,'bank'))then mouse(x,y,2,2,true);
antiban;
end;
procedure usebank;
var tries:integer;
begin
repeat
if FindObjCustom2(x, y, ['ooth'], [8161164,2898753,3032913], 10)then
begin
if(IsUpText('Use'))then
begin
Mouse(x, y, 5, 5, false);
if(ChooseOption('ckly'))then
fflag(0);
end;
end else
wait(1000+random(100));
tries:=tries+1;
writeln(inttostr(tries));
until ((BankScreen)or(tries>=5));
tries:=0;
if bankscreen then deposit(1,28,true);
loads:=loads+1;
end;
procedure getcoinage;
var
Cash: TIntegerArray;
t: Integer;
begin
if(not(LoggedIn))then Exit;
Cash := [2014952,2148340,1745606,2014437,1947358,2148854];
for t := 0 to 2 do
begin
if(FindColorSpiralTolerance(x,y,Cash[t],76,70,111,85,3))then
begin
mouse(x,y,3,3,false);
ChooseOption('X');
wait(800+random(500));
Typesend('252');
wait(600+random(300));
CloseBank;
wait(1000+random(300));
exit;
end else
writeln('out of cash');
CloseBank;
nextplayer(false);
mainloop;
end;
end;
procedure proggy;
begin
cleardebug;
writeln('progress report');
writeln('ran for '+timerunning);
writeln('banked '+inttostr(chicks)+' chickens');
writeln('banked '+inttostr(loads)+' loads');
end;
Procedure AntiRandoms;
var
i : Integer;
Begin
Status('Doing AntiRandoms');
for i := 0 to 3 do
begin
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1)
end;
end;
procedure mainloop;
begin
repeat
if not loggedin then loginplayer;
If (Not (LoggedIn)) then
Begin
writeln('Not logged in, next player!');
NextPlayer(True);
Loads:=0;
mainloop;
end;
if Loads >= players[currentplayer].integers[0] then
begin
RandomSleep:=players[currentplayer].integers[2]*60000;
TotalSleep:=players[currentplayer].integers[1]*60000;
if (players[currentplayer].Booleans[0]=false) then
begin
NextPlayer(True);
Loads:=0;
mainloop;
end;
if (players[currentplayer].Booleans[0]=true) then
begin
logout;
sleep(TotalSleep+random(RandomSleep));
Loads:=0;
mainloop;
end;
end;
goshop;
useshop;
buy;
chicks:=chicks+CountItems(chickdtm,'dtm',[0,0]);
gobank;
srlstuff;
usebank;
getcoinage;
antirandoms;
proggy;
Until(Not LoggedIn);
end;
begin
setup;
activateclient;
loginplayer;
makecompass('N');
mainloop;
end.