Code:
{
***07Scape Tea Stealer made by Prometheus | Heavily edited by LaPanthere***
======Be sure to bank your armor======
}
program TeaStealer;
{$DEFINE SMART8} //Remove the 8 if you dont have SMART8
{$i srl-osr/srl.simba}
{$i srl-osr/srl/misc/trade.simba}
var
x, y: Integer;
XPGain, TeasStolen, TotalTime: Integer;
XPPerHour, TeasPerHour, RealEXP, Minutes: Integer;
BasePlayerLevel, CurrentPlayerLevel, DifferencePlayerLevel, i: Integer;
LatestAnti: String;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //last 4 letters of name
Players[0].Active := True;
End;
Procedure TradingCheck;
begin
If SomeoneTrades then
HandleTrade;
end;
Procedure RandomAnti;
begin
FindNormalRandoms;
FindNonInventoryRandoms;
FindTalk;
end;
{* Failsafe thanks to YoHoJo *}
Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
Writeln(Reason);
TerminateScript;
End;
{* Antiban thanks to LaPanthere *}
procedure AntiBan;
begin;
TradingCheck;
RandomAnti;
case Random(50) of
0: //
begin
Writeln('AntiBan: Taking a break for 60 seconds')
RandomMovement;
wait(RandomRange(54000, 66000))
RandomMovement;
LatestAnti := 'Break for ~60s';
end;
1: //
begin
Writeln('AntiBan: Taking a break for 20 seconds')
RandomMovement;
wait (RandomRange(16000, 24000))
RandomMovement;
LatestAnti := 'Break for ~20s';
end;
2: //
begin
Writeln('AntiBan: Checking Thieving XP')
HoverSkill(skill_Thieving, false);
wait(1000 + random(3900));
LatestAnti := 'Checked Thieving XP';
end;
3: //
begin
Writeln('AntiBan: Checking random skill')
HoverSkill('random', false);
wait(1000 + random(3500));
LatestAnti := 'Checked random skill';
end;
4: //
begin
Writeln('AntiBan: Waiting a random amount of time - between 1 and 3 seconds.')
wait(1000 + random(3000));
LatestAnti := 'Waiting for 1-3s';
end;
5: //
begin
Writeln('AntiBan: Acting like a bored Human.')
BoredHuman;
LatestAnti := 'Acting bored human';
end;
6: //
begin
Writeln('AntiBan: Simulated the dropping of your mouse')
PickUpMouse;
wait(1000 + random(4000));
LatestAnti := 'Mouse Dropped';
end;
7: //
begin
Writeln('AntiBan: Randomly moving mouse')
RandomMovement;
LatestAnti := 'Random Mouse Movement';
end;
8: //
begin
Writeln('AntiBan: Randomly adjusting angle')
RandomAngle(1);
LatestAnti := 'Adjusted Camera Angle';
end;
9: //
begin
Writeln('AntiBan: Randomly moved and reset compass position')
CompassMovement(random(500), random(1700), true);
wait(1000 + random(4000));
LatestAnti := 'Compass movement';
end;
10: //
begin
Writeln('AntiBan: Randomly examined an item in the inventory')
If not (InvCount = 0) Then
ExamineInv;
wait(1000 + random(4000));
LatestAnti := 'Examined item in inventory';
end;
11: //
begin
Writeln('AntiBan: Randomly changed Tab')
RandomTab(True);
wait(1000 + random(2000));
LatestAnti := 'Changed active tab';
end;
12: //
begin
Writeln('AntiBan: Randomly hovered over online friend')
HoverOnlineFriend;
LatestAnti := 'Hover online friend';
end;
13: //
begin
Writeln('AntiBan: Randomly moved off client')
MMouseOffClient('rand');
wait(1000 + random(5000));
LatestAnti := 'Moved off client';
end;
14: //
begin
Writeln('AntiBan: Randomly Moving Player')
case Random(3) of
0: RunAway('n', False, 1, randomrange(3000, 10000));
1: RunAway('s', False, 1, randomrange(3000, 10000));
2: RunAway('e', False, 1, randomrange(3000, 10000));
3: RunAway('w', False, 1, randomrange(3000, 10000));
end; //end case
LatestAnti := 'Moved player';
end;
15..18: //
begin
Writeln('AntiBan: Randomly moved camera')
MakeCompass(randomRange(120, 190));
wait(1000 + random(5000));
LatestAnti := 'Moved camera';
end;
Else
Begin
Writeln('AntiBan: None')
LatestAnti := 'No antiban method has been performed';
end;
end; //end case
end; //end procedure
function CanvasColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.36);
if not (FindColorsTolerance(arP, 7441307, MSX1, MSY1, MSX2, MSY2, 7)) then
begin
Writeln('Failed to find the color, no result. Are you at the tea stall?');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
//FailSafe('Failed to find the color');
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
//Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color. Are you at the tea stall?');
//FailSafe('Failed to find the color');
end;
Procedure StartingOff;
begin
If not LoggedIn then
LoginPlayer;
WriteLn('MAKE SURE YOU BANKED YOUR VALUABLES, LIKE YOUR ARMOR');
Wait(randomRange(300, 500));
MakeCompass(randomRange(120, 190));
SetAngle(SRL_ANGLE_HIGH);
end;
Procedure Stealing;
Var
obX, obY: Integer;
Begin
wait(RandomRange(1300, 2000));
obX := MSCX;
obY := MSCY;
If (FindObjTPA(obX, obY, CanvasColor, 5, 1, 15, 80, 1, ['teal', 'rom']))
Then
Begin
GetMousePos(obX, obY);
Case Random(2) Of
0: Mouse(obX, obY, RandomRange(10, 15), RandomRange(10, 15), True);
1: //
Begin
Mouse(obX, obY, RandomRange(10, 15), RandomRange(10, 15), False);
wait(100 + random(300));
WaitOption('teal', 500);
LevelUp;
End;
End;
AntiBan;
Inc(TeasStolen);
RealEXP := 0 + XPGain;
XPGain := RealEXP + 16
Exit;
End
Else
Begin
WriteLn('Failed to find a teacup, antiban triggered, restarting stealing process');
AntiBan;
Stealing;
End;
End;
Procedure Dropping;
Var
x, y: Integer;
Begin
Repeat
Wait(150)
until InvCount = + 1;
Wait(RandomRange(250, 300));
Case Random(2) of
0: DropAll;
1: //
Begin
DropAll;
GetMousePos(x, y);
MMouse(Random(MSX2), Random(MSY2), 0, 0);
End;
End;
Wait(RandomRange(70, 100));
End;
Procedure Proggy;
begin
TotalTime := (GetTimeRunning/1000);
Minutes := TotalTime/60;
XPPerHour := 3600*(XPGain)/(TotalTime);
TeasPerHour := 3600*(TeasStolen)/(TotalTime);
If (i = 5) or (i = 0) Then
Begin
CurrentPlayerLevel := GetSkillLevel(skill_Thieving);
i := 1;
End
Else
Begin
i := + 1;
End;
DifferencePlayerLevel := CurrentPlayerLevel - BasePlayerLevel;
If (DifferencePlayerLevel < 0) Then
DifferencePlayerLevel := 0;
ClearDebug;
WriteLn('You stole: ' + IntToStr(TeasStolen) + ' teas');
WriteLn('You are getting: ' + IntToStr(TeasPerHour) + ' teas an hour!');
WriteLn('You have gotten: ' + IntToStr(XpGain) + ' thieving experience');
WriteLn('You are getting: ' + IntToStr(XPPerHour) + ' thieving experience per hour');
WriteLn('');
WriteLn('Your thieving level is ' + IntToStr(CurrentPlayerLevel));
WriteLn('You have gained ' + IntToStr(DifferencePlayerLevel) + ' level(s)');
WriteLn('');
WriteLn('Running for: ' + IntToStr(TotalTime) + ' seconds');
WriteLn('That is: ' + IntToStr(Minutes) + ' minute(s)');
WriteLn('');
WriteLn('Latest Antiban: ' + LatestAnti);
end;
begin
DeclarePlayers;
SetupSRL;
ClearDebug;
ActivateClient;
MouseSpeed := RandomRange(10, 15);
repeat
StartingOff;
BasePlayerLevel := GetSkillLevel(skill_Thieving);
repeat
Stealing;
RandomAnti;
Dropping;
RandomAnti;
Proggy;
RandomAnti;
until not LoggedIn;
until false;
end.