SRL Archive - First Scripts

TeaStealer


HarryJames

2008-11-09 20:03:25

program New;
{.include SRL/SRL.scar}
var
x,y,i,Steals : integer;

Procedure Drop;
Begin
for i := 1 to 27 do
DropItem(i);

End;


Procedure Proggy;
Begin
ClearDebug;
Writeln('/////////////////////////////////////');
Writeln('### Stole ' + IntToStr(Steals) + ' Times ###');
Writeln('/////////////////////////////////////');
End;

Procedure ClickStall;
Begin
repeat

FindObjCustom(x, y, ['teal'], [8953516], 10); // 10 = tolerance
wait(800+Random(234));
repeat
MMouse(x, y, 12, 13);
wait(200+Random(234));
Drop;
Proggy;
wait(800+Random(234));
if IsUpText('teal') then
begin
Mouse(x,y,5,5,true);
Steals:= Steals + 1;
Wait(1000+random(750));
Proggy;
end;
wait(300+Random(234));
until(False)
until(False)
end;



Procedure Setup;
Begin
makecompass('n');
keydown(VK_UP);
wait(500+random(150)+random(150));
keyup(VK_UP);
wait(random(500));

keydown(VK_DOWN);
wait(400+random(175)+random(175));
keyup(VK_DOWN);
wait(random(250));
keydown(VK_RIGHT);
wait(600+random(100));
keyup(VK_RIGHT);
wait(random(250));
End;


Begin
SetupSRL;
Setup;
ClearDebug;
ActivateClient;
repeat
ClickStall;
Drop;
until(false)
End.

I will be adding multiplayer, exp gained (for proggy), anti randoms, anti ban, stray dog finder - lol, standards, failsafes, user input (amount of steals etc)
other suggestions? its a pretty solid script atm.
Thanks





About the dropper, i didnt use dropall; due to the fact it will only be dropping tea (so it doesnt drop things from randoms)

markuska815

2008-11-09 20:08:12

Infinite loops are a bad idea… have a user input for how many they wanna steal or something.

HarryJames

2008-11-09 20:13:04

Dammit :D
fourth thing i forgot to mention ><
Taking it half a step at a time :P

Thanks

markuska815

2008-11-09 20:14:07

No problem bud… it looks decent for a first script… obviously theres some things you need to work on and add but nice try for a first script

HarryJames

2008-11-09 20:14:53

its not finnished yet, i just wanted thoughts on what i had + it was time to goto sleep when i started lol (about 90 minutes ago)

Sandstorm

2008-11-09 21:59:18

I suggest getting a few more colors, and possibly uptext's, for the FindObjCustom. It's an array so it can hold as many colors as you want. I don't THINK there's a limit. If there is it's really high.

You can just add a Constant at the top for how many cups to steal, then instead of Until(False) do Until(TeasToSteal=Steals). I'll take a longer look at it when I'm done my movie if you'd like :).

HarryJames

2008-11-10 02:49:01

Yeah sure, i would like that.
Thanks!


Edit
My drop procedure looks abit like this one
http://www.villavu.com/forum/showthread.php?t=37862

I didnt steal and noobify it sand :D

in2it

2008-11-10 03:35:37

Nice script clever idea.. :D good for first go

Griff

2008-11-10 11:22:09

Looks great for a first script, the one thing I would sugget is trying out TPAs. they work much better for object finding.

HarryJames

2008-11-10 11:42:41

Thanks lol, got from level 13 thieveing to 20 getting it right so far :D


**********EDIT

The Script Finnished
You Stole 50/50 Times
You gained 800 exp
You Did 17 antibans
You Ran away from 0randoms


I added a space between 0 and randoms btw
its not released yet due to its not good enough

New proggy

The Script Finnished
You Stole 50/50 Times
You gained 800 exp
You Did 23 antibans
You Ran away from 0 randoms



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

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


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

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

end;


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

Procedure Drop;
Begin
for i := 1 to 27 do
DropItem(i);

End;

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

procedure randoms;
begin
findnormalrandoms;
if findfight=true then
begin
runaway('N',true,1,5000+random(1000));
RandomCount:= RandomCount+1;
end;
end;


Procedure Proggy;
Begin
ClearDebug;
Writeln('/////////////////////////////////////////////');
Writeln(' You Have Stole ' + IntToStr(Steals) + ' Times');
Writeln(' You Wanted To Steal ' + IntToStr(AmountToSteal) + ' Times');
Writeln('//////////////////////////////////////////////');
End;

Procedure FinnishScript;
Begin
EXPGained:= Steals * 16
ClearDebug;
Writeln('');
Writeln('');
Writeln('The Script Finnished');
if Steals=AmountToSteal then
Begin
Writeln('You Stole ' + IntToStr(Steals) +'/'+ IntToStr(AmountToSteal) + ' Times');
End;
Writeln('You gained '+ IntToStr(EXPGained) +' exp' );
Writeln('You Did '+ IntToStr(Antibans) +' antibans' );
Writeln('You Ran away from '+ IntToStr(RandomCount) + ' randoms' );
Writeln('');
Writeln('');
End;


Procedure ClickStall;
Begin
repeat
FindObjCustom(x, y, ['teal','eal','al'], [8953516,9678010,8821930], 10); // 10 = tolerance
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;
wait(300+Random(234));
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_DOWN);
wait(400+random(175)+random(175));
keyup(VK_DOWN);
wait(random(250));
keydown(VK_RIGHT);
wait(600+random(100));
keyup(VK_RIGHT);
wait(random(250));
End;




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


New thoughts and post a few small proggys please? some of the antirandoms wont work though
So dont use it wearing armor (i put teletab in last inven spot becuase it doesnt drop the 28th item)

HarryJames

2008-11-10 18:54:29

bump :D
nah, is anybody going to post a proggy though?
Still updating it :D

Is it worth banking tea and eventually selling back to tea seller?