SRL Archive - First Scripts

Tea Stealer for Draynor


littethink

2009-01-08 00:28:33

This is my first script
i really struggled took me 3 days and still not sure if everything works
post errors plz

program L TeaStealer;
{.include SRL/SRL.scar}

const
AmountToSteal = 1000; // Amount of tea to steal
// 16 exp per tea


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'exlittethink'; //your runescape account
Players[0].Pass := 'whatever'; // your runescape password of your account
Players[0].Nick := 'exlitt'; // 2-4 letters to use for antirandoms
Players[0].Active := True; // use this character?

end;


var
x,y,i,Steals,EXPGained,Antibans,RandomCount,LoggedOut : integer;



Procedure Drop;
Begin

case Random(4) of
0:
begin
for i := 1 to 27 do
DropItem(i);
end;
1: begin
wait(Random(300));
end;

2: begin
wait(Random(300));
end;
3: begin
wait(Random(300));
end;

end;
End;

procedure Proggy;
Begin
EXPGained:= Steals * 16;
ClearDebug;
Writeln('/////////////////////////////////////////////');
Writeln('You Stole ' + IntToStr(Steals) +'/'+ IntToStr(AmountToSteal) + ' Times');
Writeln('You gained '+ IntToStr(EXPGained) +' Exp' );
Writeln('You Did '+ IntToStr(Antibans) +' Antibans' );
Writeln('You Ran away from '+ IntToStr(RandomCount) + ' Randoms' );
Writeln('You Logged Out ' + IntToStr(LoggedOut) + ' Times');
Writeln('//////////////////////////////////////////////');
End;

procedure Antiban;
begin
if not LoggedIn then loginplayer;
case Random(30) of
0:
begin
HoverSkill('Thieving', False);
Antibans:=Antibans+1;
Proggy;
end;
1:
begin
Logout;
wait(1000+Random(200));
loginplayer;
wait(100);
Antibans:=Antibans+1;
Proggy;
end;
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
LoggedOut:=LoggedOut+1;
Proggy;
end;
3:
begin
BoredHuman;
Antibans:=Antibans+1;
Proggy;
end;
end;

end;

Procedure StrayDog;
Begin
if FindColorSpiralTolerance(x, y, 7767471, msx1, msy1, msx2, msy2, 10) then
Begin
wait(300+Random(200));
Mouse(x, y, 3, 3, false);
wait(100+Random(200));
ChooseOption('way');
ChooseOption('hoo');
wait(500+Random(3000));

Proggy;
End;



End;


procedure randoms;
begin
FindTalk;
FindNormalRandoms;
StrayDog;
if (FindFight = true) then
begin
runaway('N',true,1,5000+random(1000));
RandomCount:= RandomCount+1;
Proggy;
Logout;
Proggy;
wait(500+Random(5000));
loginplayer;
runaway('S',true,1,5000+random(1000));
wait(5000+Random(2451));
end;
Proggy;
end;




Procedure FinnishScript;
Begin
ClearDebug;
Proggy;
End;

Procedure lost;
Begin
begin
if (FindSymbol(x, y, 'water source')) then
wait(500+random(1000));
Mouse(x+10+Random(10), y-15, 3, 3, true);
wait(5000+Random(3000));
end;


{ begin
if (FindSymbol(x, y, 'dummy')) then
wait(500+random(1000));
runaway('S',true,1,5000+random(1000));
wait(5000+Random(3000));
end;}
End;

Procedure ClickStall;
Begin
repeat
if not FindObjCustom(x, y, ['teal','eal','al'], [8953516,9678010,8821930], 10) then
begin
lost;
wait(1000+Random(500));
end;
FindObjCustom(x, y, ['teal','eal','al'], [8953516,9678010,8821930], 10);
wait(800+Random(234));
MMouse(x, y, 12, 13);
wait(200+Random(234));
Drop;
Antiban;
randoms;
wait(800+Random(234));
if IsUpText('teal') then
begin
Mouse(x,y,5,5,true);
Steals:= Steals + 1;
Proggy;
Wait(1000+random(750));
end;
until(Steals=AmountToSteal)
end;



Procedure Setup;
Begin
makecompass('n');
keydown(VK_UP);
wait(500+random(150)+random(150));
keyup(VK_UP);
wait(random(500));
keydown(VK_RIGHT);
wait(100+random(100));
keyup(VK_RIGHT);
wait(600+random(100));
lost;
End;



Begin
SetupSRL;
ActivateClient;
ClearDebug;
DeclarePlayers;
Setup;
repeat
if not LoggedIn then loginplayer;
wait(2000+Random(1000));
ClickStall;
Antiban;
until(Steals=AmountToSteal)
FinnishScript;
End.

randy marsh

2009-01-08 00:31:18

program L TeaStealer;
{.include SRL/SRL.scar}

const
AmountToSteal = 1000; // Amount of tea to steal
// 16 exp per tea


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'exlittethink'; //your runescape account
Players[0].Pass := 'whatever'; // your runescape password of your account
Players[0].Nick := 'exlitt'; // 2-4 letters to use for antirandoms
Players[0].Active := True; // use this character?

end;


var
x,y,i,Steals,EXPGained,Antibans,RandomCount,LoggedOut : integer;



Procedure Drop;
Begin

case Random(4) of
0:
begin
for i := 1 to 27 do
DropItem(i);
end;
1: begin
wait(Random(300));
end;

2: begin
wait(Random(300));
end;
3: begin
wait(Random(300));
end;

end;
End;

procedure Proggy;
Begin
EXPGained:= Steals * 16;
ClearDebug;
Writeln('/////////////////////////////////////////////');
Writeln('You Stole ' + IntToStr(Steals) +'/'+ IntToStr(AmountToSteal) + ' Times');
Writeln('You gained '+ IntToStr(EXPGained) +' Exp' );
Writeln('You Did '+ IntToStr(Antibans) +' Antibans' );
Writeln('You Ran away from '+ IntToStr(RandomCount) + ' Randoms' );
Writeln('You Logged Out ' + IntToStr(LoggedOut) + ' Times');
Writeln('//////////////////////////////////////////////');
End;

procedure Antiban;
begin
if not LoggedIn then loginplayer;
case Random(30) of
0:
begin
HoverSkill('Thieving', False);
Antibans:=Antibans+1;
Proggy;
end;
1:
begin
Logout;
wait(1000+Random(200));
loginplayer;
wait(100);
Antibans:=Antibans+1;
Proggy;
end;
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
LoggedOut:=LoggedOut+1;
Proggy;
end;
3:
begin
BoredHuman;
Antibans:=Antibans+1;
Proggy;
end;
end;

end;

Procedure StrayDog;
Begin
if FindColorSpiralTolerance(x, y, 7767471, msx1, msy1, msx2, msy2, 10) then
Begin
wait(300+Random(200));
Mouse(x, y, 3, 3, false);
wait(100+Random(200));
ChooseOption('way');
ChooseOption('hoo');
wait(500+Random(3000));

Proggy;
End;



End;


procedure randoms;
begin
FindTalk;
FindNormalRandoms;
StrayDog;
if (FindFight = true) then
begin
runaway('N',true,1,5000+random(1000));
RandomCount:= RandomCount+1;
Proggy;
Logout;
Proggy;
wait(500+Random(5000));
loginplayer;
runaway('S',true,1,5000+random(1000));
wait(5000+Random(2451));
end;
Proggy;
end;




Procedure FinnishScript;
Begin
ClearDebug;
Proggy;
End;

Procedure lost;
Begin
begin
if (FindSymbol(x, y, 'water source')) then
wait(500+random(1000));
Mouse(x+10+Random(10), y-15, 3, 3, true);
wait(5000+Random(3000));
end;


{ begin
if (FindSymbol(x, y, 'dummy')) then
wait(500+random(1000));
runaway('S',true,1,5000+random(1000));
wait(5000+Random(3000));
end;}
End;

Procedure ClickStall;
Begin
repeat
if not FindObjCustom(x, y, ['teal','eal','al'], [8953516,9678010,8821930], 10) then
begin
lost;
wait(1000+Random(500));
end;
FindObjCustom(x, y, ['teal','eal','al'], [8953516,9678010,8821930], 10);
wait(800+Random(234));
MMouse(x, y, 12, 13);
wait(200+Random(234));
Drop;
Antiban;
randoms;
wait(800+Random(234));
if IsUpText('teal') then
begin
Mouse(x,y,5,5,true);
Steals:= Steals + 1;
Proggy;
Wait(1000+random(750));
end;
until(Steals=AmountToSteal)
end;



Procedure Setup;
Begin
makecompass('n');
keydown(VK_UP);
wait(500+random(150)+random(150));
keyup(VK_UP);
wait(random(500));
keydown(VK_RIGHT);
wait(100+random(100));
keyup(VK_RIGHT);
wait(600+random(100));
lost;
End;



Begin
SetupSRL;
ActivateClient;
ClearDebug;
DeclarePlayers;
Setup;
repeat
if not LoggedIn then loginplayer;
wait(2000+Random(1000));
ClickStall;
Antiban;
until(Steals=AmountToSteal)
FinnishScript;
End.

littethink

2009-01-08 00:36:07

huh?

randy marsh

2009-01-08 00:38:24

use code tags !

Hobbit

2009-01-08 00:41:15

Please put SCAR tags around the script next time, makes it a lot easier for us to read.

....

littethink

2009-01-08 00:43:46

Im sincerely sorry
wht do u guys think about it
though

ian.

2009-01-10 11:08:20

you spelled 'finish' wrong btw :P

anyways, to the script

your drop proc is messed up..

it will only drop if it gets 0, and it's 1/4 chance that it will get 0..

and also, your antiban. You should get more antiban things, and also randomize the numbers.. (1,4,5; 7,16,24; 8,15,0; something like that..)

the stray dog proc could get you lost..

you don't need the FinishScript; proc.. just call the proggy in the ML..

(sorry if I seem like I'm trying to flame.. just telling you about stuff that could be fixed up :))

keep it up!

(glad to see you thought about the fact that you could get lost ^^)

Smarter Child

2009-01-10 12:03:08

Yeah you didn't need Procedure StrayDog; but it's still a neat first script.

program L TeaStealer;
No spaces between L and TeaStealer.