SRL Archive - RS3 Outdated / Broken Scripts

Safe Cracker by Ilya


Ilya

2012-12-28 13:26:11

Instructions in script.
Has no anti-ban, no fail-safes, and uses blind walking.

Please use at your own risk.
Has a few anti-leech measures, but you can easily figure it out. :bart:


————–
Added:
Some Antiban
Better SafeWait procedure

program SafeCrackerPublic;




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 .




Please post any bugs, comments, suggestions.

DannyRS

2012-12-28 13:29:21

I would really learn good anti-ban's, as its kinda crucial imo, good first script tho

Ilya

2012-12-28 13:35:47

From: DannyRS
I would really learn good anti-ban's, as its kinda crucial imo, good first script tho


Not my first.
I had this ole' F2P wizard killer, but it hasn't been updated in awhile.
http://villavu.com/forum/showthread.php?t=82954&highlight=Ilya

DannyRS

2012-12-28 13:40:17

From: Ilya
Not my first.
I had this ole' F2P wizard killer, but it hasn't been updated in awhile.
http://villavu.com/forum/showthread.php?t=82954&highlight=Ilya


looking at that, I'd suggest using/learning dtm/tpa, so your not relying on uptext and such

makes you look like a bot to jagex as players don't move the mouse like that

Hobbit

2012-12-28 13:56:31

Nice second script :)

Ilya

2012-12-28 14:07:21

From: Hobbit
Nice second script :)


Thanks:p

Gucci

2012-12-28 17:51:17

I was actually thinking of making one of these :D.

Decent first script, you should really take a look at the DTM tutorials as it could be fairly useful and for walking down there you could use the bank symbol and FindSymbol function to walk to the bank and RadialWalkTolerance for walking to the safes and work on your standards.

Pretty nice script overall though lot's that you can still at to it

Ilya

2012-12-28 18:48:50

From: Gucci
I was actually thinking of making one of these :D.

Decent first script, you should really take a look at the DTM tutorials as it could be fairly useful and for walking down there you could use the bank symbol and FindSymbol function to walk to the bank and RadialWalkTolerance for walking to the safes and work on your standards.

Pretty nice script overall though lot's that you can still at to it


Thanks for the kind words.
I've looked into DTMs for walking, but what would you suggest for better Safe finding procedure?
Certainly more updates to come, however it's running quite good so far.

Gucci

2012-12-28 19:23:09

From: Ilya
Thanks for the kind words.
I've looked into DTMs for walking, but what would you suggest for better Safe finding procedure?
Certainly more updates to come, however it's running quite good so far.


I actually found the one I was working on back in May ;). I used DTM's for finding the safe you could also use a TPA but that might be hard cause everything down there is grey

WT-Fakawi

2012-12-29 04:08:53

Nice one. A couple of things though:

For good thieving you need to check on three things in order to see if the chest was properly opened or failed. You begin by looking for the text: "You start cracking…", next you wait to see if you gain XP or you have an inv change or see he text "coins" (succeeded), or you find the chattext:"You slip" Which means you failed the safe.

If you do this instead of randomrange, you will increase the efficiency and make it more humanlike.

Here is my waitsafe function that is called after I click the safe.

Function WaitSafe(SW:Integer):Boolean;
var
OBCM, NBCM: String;
TimeOut, StartInv, InvPlus:Integer;
begin
FFlag(0);
FTWait(6);
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;

Ilya

2012-12-29 11:20:54

From: WT-Fakawi
Nice one. A couple of things though:

For good thieving you need to check on three things in order to see if the chest was properly opened or failed. You begin by looking for the text: "You start cracking…", next you wait to see if you gain XP or you have an inv change or see he text "coins" (succeeded), or you find the chattext:"You slip" Which means you failed the safe.

If you do this instead of randomrange, you will increase the efficiency and make it more humanlike.

Here is my waitsafe function that is called after I click the safe.

Function WaitSafe(SW:Integer):Boolean;
var
OBCM, NBCM: String;
TimeOut, StartInv, InvPlus:Integer;
begin
FFlag(0);
FTWait(6);
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;


Thanks a ton! I tried writing something like this, but couldn't find the text at the right time. Do you mind if I use yours? I'll give you credit of course.

Ilya

2012-12-29 11:37:15

Ran the 6 hour limit overnight last night.
Here is roughly what it accomplished in a span of two days.

Will add Antiban, and WaitSafe tonight, possibly DTMs for walking.

Gucci

2012-12-29 11:43:44

From: Ilya
Ran the 6 hour limit overnight last night.
Here is roughly what it accomplished in a span of two days.

Will add Antiban, and WaitSafe tonight, possibly DTMs for walking.


Nice what's your thieving level? I fail so many safes :/. Or to detect when your done cracking you could use pixelshift, works pretty well fod me

Ilya

2012-12-30 01:53:52

From: Gucci
Nice what's your thieving level? I fail so many safes :/. Or to detect when your done cracking you could use pixelshift, works pretty well fod me


Started at 78 crafting, now at 81. Thinking about taking it to 99, updating it along the way.
However
SRL_SixHourFix := True; 
is not working for me. Still….. Am I implementing it wrong in my Mainloop?

DannyRS

2012-12-30 02:58:48

You are repeating the loop Until you are not logged in then the program exits
You need to just repeat, and check inside the loop if you are logged in or not,

E.g.

If Not LoggedIn Then
LoginPlayer
That inside the loop should work

WT-Fakawi

2012-12-30 05:03:52

Cracking safes is not the best thieving xp around. Not even best value for money anymore since they removed the diamonds. It is nice to have a lot of gems though, and their prices are relatively stable.

BTW: I have written a deformed bitmap detector that finds any safe at any angle. Originally I wanted to write a two-safe detector, but the deformed worked so well that my player switched safes automatically :)

If you are looking for fast thieving xp, you need to check on the thieving guild. There are NPC everywhere that you can pick for 66xp, without damage nor reward. Adds up to 80-90k xp per hour.

Edit: sure you may use my functions :) But if you can read and understand them…you can make them yourself :)

Gucci

2012-12-30 11:31:59

I used a DTM and TPA finding for the safes and it works really well, also you really should update the walking :p

Ilya

2012-12-30 14:01:17

Added a DTM for walking to bank.
Trying to learn RadialWalkTolerance now.

Gucci

2012-12-30 14:04:04

From: Ilya
Added a DTM for walking to bank.
Trying to learn RadialWalkTolerance now.


I just tried out TPA walking down there and it actually works pretty decently

Ilya

2012-12-30 14:34:52

What would i do with TPA?
Like get it to find the black safes box on the map, but then i need it to get to the south safes.
Tried making a DTM for walking to safes, didn't work.

Gucci

2012-12-30 15:19:57

From: Ilya
What would i do with TPA?
Like get it to find the black safes box on the map, but then i need it to get to the south safes.
Tried making a DTM for walking to safes, didn't work.


You use grey from the floor and sort the tpa from the bottom right hand corner of the minimap so you'll always be fairly close to the boxes. Yeah DTM walking didnt work to well from me either

cradlefatal

2013-03-08 22:07:28

very nice!!! easy anti leach here is my proggy I just got it running I'll give you another one as soon as long as my computer doesn't mess up before the script does if it does ummm it also clicks off to the side instead of the safe every once in a whiel is that part of the antiban?



================ SafeCracker ================
[+] By Ilya [+]
===============
////////Time Running: 4 Minutes and 7 Seconds

cradlefatal

2013-03-08 22:22:32

this is how long it took me to get an inv of gems at 97 thieving walks to bank and back with perfection
will send my next report tommorrow when I wake up its usually after I close my lid the laptop will mess up and shut down when its not supposed to so no promisses if it shuts down I won't be sending one I hope it doesn't though 99 thieving here i come


================ SafeCracker ================
[+] By Ilya [+]
===============
////////Time Running: 18 Minutes and 45 Seconds

cradlefatal

2013-03-09 01:07:12

it doesn't eat just runs to bank pulls 5 fish out eats it all then it stops cracking the safe and just sits there