Simba Code:
program SafeCrackerPublic;
{$DEFINE SMART8}
{$i srl\srl.simba}
///////////////////Safe Cracker By Ilya\\\\\\\\\\\\\\\\\\\\\\\
/////////Start Script on the South side of the safes\\\\\\\\\\
/////////////Have food in first spot in the bank\\\\\\\\\\\\\\
////////////////////~35k Thieving XP/HR\\\\\\\\\\\\\\\\\\\\\\\
////////////////////////~130k GP/HR\\\\\\\\\\\\\\\\\\\\\\\\\\\
//If you are using a steathscope, have it in
//the second bank spot. Plenty of food in first.
//If not using, comment out of line 235.
var
f, g : Integer;
Gems, GemsPH : Integer;
x, y : Integer;
XP, Safe : Integer;
XPPH : Integer;
SafeDTM : Integer;
Ax, Ay, Bx, By : Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Active := True;
Wait(1500);
end;
end;
Function WaitSafe(SW:Integer):Boolean; //All Credit to WT-Fakawi
//Thanks Alot.
var
OBCM, NBCM: String;
TimeOut, StartInv, Cracks, Fails, InvPlus, FTWait, curXP, newXP:Integer;
begin
FFlag(0);
TimeOut := GetSystemTime;
OBCM:= GetBlackChatMessage;
if Pos('too full', OBCM) <> 0 then
begin
Result:= False;
Exit;
end;
if Pos('start', OBCM) <> 0 then
begin
StartInv := InvCount;
curXP := GetXPBarTotal;
repeat
InvPlus := InvCount;
newXP := GetXPBarTotal;
if newXP > curXP then // if succeeded but neither coins nor gem! New behaviour :)
begin
Result := True;
Inc(Cracks); // quick exit
Exit;
end;
If InvPlus = (StartInv + 1) then // if succeeded by new object in inv.
begin
Result := True;
Inc(Cracks);
Exit; // quick exit
End;
NBCM := GetBlackChatMessage;
Wait(100);
if OBCM <> NBCM then
begin
if Pos('coins', NBCM) <> 0 then
begin
Result:= True;
Inc(Cracks);
Exit;
end;
if Pos('slip', NBCM) <> 0 then
begin
Result:= False;
Inc(Fails);
Exit;
end;
end;
until GetSystemTime - TimeOut > SW;
end;
end;
Procedure MakeProggy;
Begin
Gems := InvCount;
wait(100);
XPPH := Round(((XP) * 3600) / (GetTimeRunning / 1000));
GemsPH := Round(((Gems) * 3600) / (GetTimeRunning / 1000));
ClearDebug;
Writeln('================ SafeCracker ================');
Writeln(' [+] By Ilya [+] ');
Writeln(' ===============');
Writeln('////////Time Running: '+ TimeRunning+' ');
// Writeln('///////////Gems Stolen: '+IntToStr(Gems)+' (' + IntToStr(GemsPH) + ' P/H)');
end;
procedure Hungry;
var
c, T, i, x, y: Integer;
begin
if (HPPercent < RandomRange(50,600)) and LoggedIn then
begin
if not InvEmpty then
for c := 0 to 2 do
for i := 1 to 28 do
if ExistsItem(i) then
begin
MMouseItem(i);
GetMousePos(x, y);
if WaitUptext('Eat', 100) then
begin
Mouse(x, y, 0, 0, false);
if WaitOption('Eat', 100) then
begin
Writeln('Eating.')
t := GetSystemTime;
while ExistsItem(i) and ((GetSystemTime - t) < 2000) do
wait(20);
end;
Exit;
end;
end;
end;
end;
Procedure CheckFriends; //An Antiban Procedure by BMWxi
//All Credit goes to BMWxi
Var
NCx, NCy, ONx, ONy :Integer;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) or (InvFull) then Exit;
gametab(tab_friends); //Goes to friends tab
If FindColorTolerance(NCx, NCy, 16683035, 546, 246, 722, 451, 5) Then // Checks if they have changed names,
begin // if they have, It hovers to find their new name.
MMouse(NCx, NCy, 5, 5);
Wait(RandomRange(1000, 2000));
end;
If FindColorTolerance(ONx, ONy, 6619135, 546, 246, 722, 451, 5) Then //Checks to see if friends are online
begin //hovers the names of online friends
MMouse(ONx, ONy, 5, 5);
Wait(RandomRange(1000, 2000));
end else
begin
Wait(RandomRange(500, 1000)); //I added this so It doesn't spam-exit when you have no friends :)
end;
FTab(tab_Inv); //Returns to inventory
end;
procedure Antiban; //Not sure who originally wrote it
begin //I modified it a little
//Credit to SRL Community
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
FindNormalRandoms;
case Random(210) of
1: CheckFriends;
2: PickUpMouse;
3: Wait(5000+random(2000));
4: BoredHuman;
5: ExamineInv;
6: HoverSkill(skill_thieving,false);
7: SetAngle(SRL_ANGLE_HIGH);
end;
end;
function FindBanker : Boolean;
begin
FindObjCustom(f, g, ['merald'], [3977918, 3636075, 9805740, 2903609], 5);
Mouse(f, g, 1, 1, false );
ChooseOption('Bank');
Result := True;
Wait(RandomRange(1277, 1761));
end ;
procedure Eat;
begin
ClickNorth(SRL_ANGLE_NONE);
SetAngle(0);
Wait(RandomRange(4000, 5500));
MouseBox (573, 88, 575, 90, mouse_Left); //to banker
Wait(RandomRange(8277, 9761));
Repeat
FindBanker;
until BankScreen;
if BankScreen then Deposit(2, 28, True);
Wait(RandomRange(1277, 1761));
Withdraw(0, 0, 5);
MouseBox (700, 89, 702, 90, mouse_Left); //to safe
Wait(RandomRange(8277, 9761));
repeat Hungry until (HPPercent > 590);
end;
Procedure Bank;
begin
ClickNorth(SRL_ANGLE_NONE);
SetAngle(0);
MouseBox (573, 88, 575, 90, mouse_Left); //to banker
Wait(RandomRange(8277, 9761));
Repeat
FindBanker;
until BankScreen;
if BankScreen then
begin
DepositAll;
Withdraw(1, 0, 1); //Withdraws Steathoscope
//comment out if not using
Gems := gems + 27;
end;
MouseBox (700, 89, 702, 90, mouse_Left); //to safe
Wait(RandomRange(8277, 9761));
end ;
function SafeCracker : Boolean;
begin
if not LoggedIn then LoginPlayer;
if InvFull then Bank;
FindObjEx(x,y, ['rack', 'all', 'safe'], [3162453, 3096403], 2, 40, 46, 23, 446, 253);
GetMousePos(x, y);
Mouse(x, y, 5, 5, true);
Result := True;
WaitSafe(4200);
end;
begin
SRL_SixHourFix := True;
SetupSRL;
DeclarePlayers;
LoginPlayer;
ClickNorth(SRL_ANGLE_NONE);
SetAngle(0);
Repeat
if InvFull then Bank;
if (HPPercent < 200) then Eat;
SafeCracker;
MakeProggy;
Antiban;
Until (False);
end .