Blumblebee
2010-03-12 16:40:46
Simple script, I use it while I'm scripting to get some quick thieving levels. There is not many failsafes, I will update the script with some later on but for now it's worked quite well for me.
program TeaStealer;
{$i SRL/SRL/misc/SMART.scar}
{$i SRL/SRL.scar}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := True;
end;
Procedure AntiBan();
var
I, ii: integer;
x, y: Integer;
skills: tStringArray;
begin
skills := ['thieving', 'attack', 'defence', 'cooking', 'strength',
'woodcutting', 'firemaking']; // you can edit with your own
I := randomRange(0, 40);
try
case I of
0..10, 25..39: SleepAndMoveMouse(randomRange(500, 5000));
11: RandomRClick();
12..16: HoverSkill(skills[random(7)], false);
17..20:
begin
ii := randomRange(1, 28);
if existsItem(ii) then
begin
MMouseItem(ii);
if random(10) = 1 then
begin
getMousePos(x, y);
Mouse(x, y, 0, 0, false);
chooseOption('xamine');
Exit;
end;
end;
end;
18..24:
begin
ii := randomRange(tab_Combat, tab_Logout);
GameTab(ii);
Exit;
end;
end;
except
writeLn('caught exception in AntiBan()');
end;
end;
function FindStall(var x, y: Integer): Boolean;
var
aTPA: t2DPointArray;
TPA: tPointArray;
tp: tPoint;
begin
FindColorsTolerance(TPA, 12571100, MSx1, MSy1, MSx2, MSy2, 11);
if Length(TPA) <= 0 then Exit;
aTPA := TPAtoATPAEx(TPA, 20, 20);
sortATPASize(aTPA, true);
tp := MiddleTPA(aTPA[0]);
x := tp.x;
y := tp.y;
result := true;
Exit;
end;
Function TheiveStall(): Boolean;
var
x, y: Integer;
fx, fy: Integer;
t: LongInt;
rand: array of byte;
begin
if FindStall(fx, fy) then
begin
getMousePos(x, y);
if not inRange(x, fx-25, fx+25) or not inRange(y, fy-25, fy+25) then
MMouse(fx, fy, 10, 15);
t := getSystemTime();
while not isUpText('Steal') do
begin
wait(randomRange(500, 640));
if getSystemTime()-t > 2000 then Exit;
end;
getMousePos(x, y);
if random(3) = 1 then
rand := [1, 5]
else
rand := [0, 0];
Mouse(x, y, randomRange(rand[0], rand[1]), randomRange(rand[0], rand[1]), random(4) <> 1);
wait(randomRange(150, 300));
chooseOption('rom');
Result := True;
end;
t := getSystemTime();
while isUpText('Steal') do
begin
wait(randomRange(500, 1000));
if getSystemTime()-t > 5000 then Exit;
end;
if Random(3) = 1 then AntiBan();
end;
begin
SMART_Members := True;
SMART_Signed := True;
SMART_SuperDetail := False;
setupSRL;
DeclarePlayers();
while not LoggedIn() do LogInPlayer();
wait(randomRange(200, 750));
setAngle(true);
repeat
while not InvFull() do
TheiveStall();
DropAll();
until IsFKeyDown(6);
end.