Results 1 to 24 of 24

Thread: Safe Cracker by Ilya

  1. #1
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default Safe Cracker by Ilya

    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.



    --------------
    Added:
    Some Antiban
    Better SafeWait procedure

    program SafeCrackerPublic;


    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 .



    Please post any bugs, comments, suggestions.
    Last edited by Ilya; 12-30-2012 at 06:36 PM.

  2. #2
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

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


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  3. #3
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    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....highlight=Ilya

  4. #4
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    Not my first.
    I had this ole' F2P wizard killer, but it hasn't been updated in awhile.
    http://villavu.com/forum/showthread....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
    Last edited by DannyRS; 12-28-2012 at 06:42 PM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  5. #5
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Nice second script
    STOP PM'ING ME

  6. #6
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by Hobbit View Post
    Nice second script
    Thanks

  7. #7
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    I was actually thinking of making one of these .

    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
    Current Project: Retired

  8. #8
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by Gucci View Post
    I was actually thinking of making one of these .

    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.

  9. #9
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    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
    Current Project: Retired

  10. #10
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    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.

    Simba Code:
    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;
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  11. #11
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by WT-Fakawi View Post
    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.

    Simba Code:
    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.

  12. #12
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    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.

  13. #13
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    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
    Current Project: Retired

  14. #14
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by Gucci View Post
    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
    Simba Code:
    SRL_SixHourFix := True;
    is not working for me. Still..... Am I implementing it wrong in my Mainloop?

  15. #15
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    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.
    Code:
    If Not LoggedIn Then
       LoginPlayer
    That inside the loop should work
    Last edited by DannyRS; 12-30-2012 at 08:02 AM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  16. #16
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    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
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  17. #17
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

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

  18. #18
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

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

  19. #19
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    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
    Current Project: Retired

  20. #20
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    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.

  21. #21
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    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
    Current Project: Retired

  22. #22
    Join Date
    Mar 2012
    Posts
    139
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    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

  23. #23
    Join Date
    Mar 2012
    Posts
    139
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    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

  24. #24
    Join Date
    Mar 2012
    Posts
    139
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •