Page 2 of 2 FirstFirst 12
Results 26 to 47 of 47

Thread: Help me autocolor this

  1. #26
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Quote Originally Posted by randy marsh View Post
    Simba Code:
    procedure FindColorz;
    var
      TPA:TPointArray;
      ATPA:T2DPointArray;
      bmp:String;
      i,p:integer;
    begin
      SetColorToleranceSpeed(3);
      SetToleranceSpeed3Modifier(0.01);
      if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038,80,256,334,343,529)) then
      begin
        SplitTPAWrap(TPA,1,ATPA);
        p := length(ATPA);
        for i := 0 to p-1 do
        begin
        writeln(p);
          if(length(ATPA[i])<25) then
          begin
            DeleteValueInATPA(ATPA,i);
            i := i-1;
            p := p -1;
          end;
        end;
        SortATPASize(ATPA,true);
        Mouse(MiddleTPA(ATPA[0]).x,MiddleTPA(ATPA[0]).y,4,4,3);
      end;
    end;
    #NKN
    You didn't change the cords...

    Change where it's looking for them!

    The 4 numbers after the color.

  2. #27
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by NKN View Post
    You didn't change the cords...

    Change where it's looking for them!

    The 4 numbers after the color.
    Simba Code:
    procedure FindColorz;
    var
      TPA:TPointArray;
      ATPA:T2DPointArray;
      bmp:String;
      i,p:integer;
    begin
      SetColorToleranceSpeed(3);
      SetToleranceSpeed3Modifier(0.01);
      if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038,80,412,168,174,118)) then
      begin
        SplitTPAWrap(TPA,1,ATPA);
        p := length(ATPA);
        for i := 0 to p-1 do
        begin
        writeln(p);
          if(length(ATPA[i])<25) then
          begin
            DeleteValueInATPA(ATPA,i);
            i := i-1;
            p := p -1;
          end;
        end;
        SortATPASize(ATPA,true);
        Mouse(MiddleTPA(ATPA[0]).x,MiddleTPA(ATPA[0]).y,4,4,3);
      end;
    end;
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  3. #28
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Quote Originally Posted by randy marsh View Post
    Simba Code:
    procedure FindColorz;
    var
      TPA:TPointArray;
      ATPA:T2DPointArray;
      bmp:String;
      i,p:integer;
    begin
      SetColorToleranceSpeed(3);
      SetToleranceSpeed3Modifier(0.01);
      if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038,80,412,168,174,118)) then
      begin
        SplitTPAWrap(TPA,1,ATPA);
        p := length(ATPA);
        for i := 0 to p-1 do
        begin
        writeln(p);
          if(length(ATPA[i])<25) then
          begin
            DeleteValueInATPA(ATPA,i);
            i := i-1;
            p := p -1;
          end;
        end;
        SortATPASize(ATPA,true);
        Mouse(MiddleTPA(ATPA[0]).x,MiddleTPA(ATPA[0]).y,4,4,3);
      end;
    end;
    Still not changed.

    Change to MSX1,MSY1.MSX2,MSY2

  4. #29
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    I give up this is bullshit
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  5. #30
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Quote Originally Posted by randy marsh View Post
    I give up this is bullshit
    Don't give up.

  6. #31
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by randy marsh View Post
    Simba Code:
    procedure FindColorz;
    var
      TPA:TPointArray;
      ATPA:T2DPointArray;
      bmp:String;
      i,p:integer;
    begin
      SetColorToleranceSpeed(3);
      SetToleranceSpeed3Modifier(0.01);
      if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038,80,412,168,174,118)) then
      begin
        SplitTPAWrap(TPA,1,ATPA);
        p := length(ATPA);
        for i := 0 to p-1 do
        begin
        writeln(p);
          if(length(ATPA[i])<25) then
          begin
            DeleteValueInATPA(ATPA,i);
            i := i-1;
            p := p -1;
          end;
        end;
        SortATPASize(ATPA,true);
        Mouse(MiddleTPA(ATPA[0]).x,MiddleTPA(ATPA[0]).y,4,4,3);
      end;
    end;
    FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038,80, 412,168,174,118)

    function FindColorsSpiralTolerance(x, y: Integer; var pts: TPointArray; col, x1, y1, x2, y2, tol: Integer): Boolean;

    x1, y1, x2, y2 : this is the box where we will let simba search in.

    In your case: MSX1, MSY1, MSX2, MSY2 ==> Which is the Mainscreen
    Last edited by Sjoe; 04-30-2013 at 02:12 AM.

    Creds to DannyRS for this wonderful sig!

  7. #32
    Join Date
    Dec 2011
    Location
    U.S.A.
    Posts
    635
    Mentioned
    5 Post(s)
    Quoted
    249 Post(s)

    Default

    if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038, 80,412,168,174,118)) then
    In order to change where it looks, change the 80, 412, 168, 174, 118 to MSX1, MSY1, MSX2, MSY2
    Ex.
    if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,Color,Msx1,msy1,msx2,Msy2,Tolerance)) then

    Whenever you do not know the parameters of a function, move your mouse over it and press CTRL+Space, and it will show you the parameters that are needed for the function.

    Quote Originally Posted by randy marsh View Post
    Randy Marsh

  8. #33
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Sawyer View Post
    if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038, 80,412,168,174,118)) then
    In order to change where it looks, change the 80, 412, 168, 174, 118 to MSX1, MSY1, MSX2, MSY2
    Ex.
    if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,Color,Msx1,msy1,msx2,Msy2,Tolerance)) then

    Whenever you do not know the parameters of a function, move your mouse over it and press CTRL+Space, and it will show you the parameters that are needed for the function.
    if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038, MSX1, MSY1, MSX2, MSY2,529)) then

    Thats it right?
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  9. #34
    Join Date
    Mar 2007
    Posts
    393
    Mentioned
    1 Post(s)
    Quoted
    98 Post(s)

    Default

    Quote Originally Posted by randy marsh View Post
    if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038, MSX1, MSY1, MSX2, MSY2,529)) then

    Thats it right?
    529 tolerance is pit much

  10. #35
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Quote Originally Posted by randy marsh View Post
    if(FindColorsSpiralTolerance(MSCX,MSCY,TPA,726038, MSX1, MSY1, MSX2, MSY2,529)) then

    Thats it right?
    Looks good

    Quote Originally Posted by t4q View Post
    529 tolerance is pit much
    CTS3

  11. #36
    Join Date
    Mar 2007
    Posts
    393
    Mentioned
    1 Post(s)
    Quoted
    98 Post(s)

    Default

    Quote Originally Posted by NKN View Post


    CTS3
    My bad, missed that

  12. #37
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by t4q View Post
    My bad, missed that

    cts?


    Thanks nkn i got there in the end problem was it was also cliking on the floor in random places ...


    Thanks
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  13. #38
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by NKN View Post
    Looks good


    CTS3
    What? we have no code that will pick the best colors + tolerance + modifier for cts3, all cynics aca does is DISPLAY the values you put in.

  14. #39
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    I need help with my tolerances (
    If FindObjTPA( x, y, Safecolor, 10, 1, 20,80, 200,['Wall,afe']) then)

    what should the height etc be set to?

    heres a pic to show you rough height (Trying to click on safes)

    safe.jpg
    Simba Code:
    program crack2;





    {$I SRL-OSR/SRL.Simba}



     //------------------------------------------------------------------\\
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';  //Username goes here
      Players[0].Pass := '';  //Password goes here
      Players[0].Nick := '';  //Character name (excluding first letter)
      Players[0].Active := True;
    end;
    //--------------------------------------------------------------------\\



    function Safecolor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.00, 0.00);

      if not (FindColorsTolerance(arP, 2832440, MSX1, MSY1, MSX2, MSY2, 0)) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        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.');
    end;

    function Cracksafe:Boolean;
    Var
    X,Y:Integer;




    Begin


      If FindObjTPA( x, y, Safecolor, 10, 1, 20,80, 200,['Wall,afe']) then
      Begin
        Movemouse(x, y);
        ClickMouse(x,y,2)
        Writeln('Cracking safe');
      end;

    End;















    begin
     DeclarePlayers;
      SetupSRL;
        ActivateClient;
      Repeat;
      Cracksafe ;
      until (false);
    End.
    Last edited by randy marsh; 04-30-2013 at 04:33 PM.
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  15. #40
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    how well does this work?
    Simba Code:
    program FindObject;
    {$i SRL\SRL.simba}

    var
      x, y: Integer;

    function FindObject(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2: Integer;
      P: TPoint;
      R, G, B: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.94, 10.11);

      if not(FindColorsTolerance(arP, 332316, MSX1, MSY1, MSX2, MSY2, 3)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);

      for i := 0 to arL do
      begin
        ColorToRGB(arC[i], R, G, B);

        if (R >= 18) and (R <= 38) and (G >= 8) and (G <= 25) and (B >= 0) and (B <= 11) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 0.37) and (X <= 1.15) and (Y >= 0.32) and (Y <= 1.08) and (Z >= 0.03) and (Z <= 0.40) then
          begin
            for j := 0 to arL2 do
            begin
              if (arUC[i] = arC[j]) then
              begin
                SetLength(arAP, Length(arAP) + 1);
                arAP[High(arAP)] := arP[j];
              end;
            end;
          end;
        end;
      end;

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 10, 10);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
        if (IsUpTextMultiCustom(['Wall', 'afe'])) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;

    begin
      SetupSRL;
      FindObject(x, y);
    end.

    ~shut

  16. #41
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Im using osrs by the way


    {$I SRL-OSR/SRL.Simba}

    heres

    guccis one for eoc scape:

    Simba Code:
    program SafeCracker;
    {$DEFINE SMART8}
    {$i SRL/SRL.simba}
    {$i SPS/SPS.simba}
    {$I SRL/SRL/Misc/Debug.Simba}
    {$IFDEF SMART}
      {$I SRL/SRL/Misc/SmartGraphics.Simba}
    {$ENDIF}

    {***************************************************************
    *******************Safe Cracker by Gucci************************
    ********************** Instructions ****************************
    ************** 1. Have food in first bank slot. ****************
    ************ 2. Make sure player is near Emerald. **************
    ******** 3. Have Stethoscope in first inventory slot. *********
    ****************** 4. Have inventory empty. ********************
    ******************** 5. Hit run and enjoy. *********************
    ***************************************************************}


    const
      SRLSTATS_USER     = '';   // Your SRL Stats Username
      SRLSTATS_PASSWORD = '';   // Your SRL Stats Password
      SERVER            = 0;  // Enter "0" to pick a random server.
      MEMBERS           = True;
      NUMBOFPLAYERS     = 1;
      STARTPLAYER       = 0;
      HOWMUCHFOOD       = 2; // How much food to withdraw (13 or less)
      FOOD              = 'SwordFish'; // MonkFish, Lobster or Shark (Will add others upon request)
      STETHOSCOPE       = 'yes'; //yes or no
      HPFOREATING       = 1500;
      WHICHSAFES        = 'north'; // South or North safes
      GETMAPS           = True; // Always leave True

    var
      MonkFish, x, y, NumbOfBanks, CurrentEXP, TotalEXP, StartEXP,
      Lobster, Safe, Safe2, Shark, SafesFailed, FoodLeft, EmerBMP,
      SappBMP, RubyBMP, DiamBMP, SafeBMP, Sapphires, Emeralds, Rubies,
      CurrentGP, StartGP, Swordy: Integer;
      thingy: String;
      aFound: Extended;

    procedure DeclarePlayers;
      var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer
      for i := 0 to NumbOfPlayers-1 do
      Players[i].BoxRewards := ['XP'];

      With Players[0] do
        begin
          Name := ''; //Username.
          Pass := ''; //Password.
          Nick := ''; //Nickname
          Pin  := ''; // Pin
          Active := True;
        end;
    end;

    function Walking(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;
    var
      i, x, y, rx, ry: Integer;
      TPA: TPointArray;
      begin
        if not LoggedIn then Exit;
        FindNormalRandoms;
        FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
        SortTPAFrom(TPA, SortFrom);

        for i := 0 to High(TPA) do
        begin
          x := TPA[i].x;
          y := TPA[i].y;

          rx := RandomRange(-6, 6);
          ry := RandomRange(-6, 6);
          if (not rs_OnMinimap(x + rx, y + ry)) then
          Continue;

          Mouse(x + rx, y + ry, 0, 0, true);
          FFlag(0);
          Wait(300 + Random(300));
          Result := True;
          Break;
        end;
    end;
    {****************************************
    * Procedure of downloading maps.
    * Taken from Ashaman88.
    *****************************************}

    procedure DownloadImage(ImageName: String; Location: String);
    var
      Image, Path: string;
      FP: Integer;
    begin
      Image:= GetPage(Location);
      Path:= IncludePath + 'SPS\img\runescape_other\' + ImageName + '.png';
      Path:= Trim(Path);
      FP:= CreateFile(Path);
      WriteFileString(FP, Image);
      CloseFile(FP);
    end;

    function GrabMaps: Boolean;
    var
      DENMap: String;    //Map Locations
      DENName: String;      //Map Names
    begin
      DENName:= 'ROGUES_DEN';
      DENMap:= 'http://i.imgur.com/2VztZ.png?1';
      if GETMAPS then
      begin
        if (not FileExists(IncludePath + 'SPS\img\runescape_surface\ROGUES_DEN.png')) then
          DownloadImage(DENName, DENMap);
      end;
      Result:= (FileExists(IncludePath + 'SPS\img\runescape_surface\ROGUES_DEN.png'));
    end;

    procedure WalkToSafe;
    begin
      case lowercase(WHICHSAFES) of

        'south':
        begin
          SPS_WalkToPos(Point(257, 259));
        end;

        'north':
        begin
          SPS_WalkToPos(Point(259, 225));
          MakeCompass('S');
        end;
      end;
      Writeln('Walked to the safes.');
    end;

    procedure WalkToBank;
    begin
      Writeln('Walking to bank.');
      case WHICHSAFES of

        'south':
        begin
          case Random(2) of

            0:
            begin
              Walking(2867698, 5, Point(MMCX, MMCY));
            end;

            1:
            begin
              RadialWalk(5263451, 240, 300, 55, -1, 2);
            end;

            2:
            begin
              SPS_WalkToPos(Point(210, 256));
            end;
          end;
        end;

        'north':
        begin
          SPS_WalkToPos(Point(210, 256));
        end;
      end;

      repeat
        Wait(100 + Random(100));
      until(not(IsMoving))
    end;

    procedure DoneSafes;
    begin
      if FindBlackChatMessage('You slip and trigger a trap!') then
      begin
        Inc(SafesFailed);
      end;
    end;

    function EmeraldColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.56, 1.15);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 3505508, MSX1, MSY1, MSX2, MSY2, 11);
      if (Length(arP) = 0) then
      begin
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 4.68) and (X <= 35.02) and (Y >= 6.39) and (Y <= 41.33) and (Z >= 3.35) and (Z <= 9.76) then
        begin
          Result := arC[i];
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
    end;

    function FindEmerald(x, y: Integer): Boolean;
    var
      CTS, I: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.56, 1.15);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, EmeraldColor, MSX1, MSY1, MSX2, MSY2, 11);
      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 15, 15);

      for I := 0 to High(ATPA) do
      begin
        MiddleTPAEx(ATPA[i], x, y);
        if High(TPA) > 100 then
        MMouse(x, y, 2, 2);
        if(IsUpTextMultiCustom(['alk', 'merald', 'enedict'])) then
        begin
          Result := True;
          GetMousePos(x, y);
          Break;
        end;
      end;
    end;

    procedure Hop;
    begin
      if Length(GetMinimapDotsIn('player', MMX1, MMY1, MMX2, MMY2)) >= 4 then
      begin
        ExitToLobby;
        OpenWorldScreen;
        SelectWorld(RandomWorld(True, False));
      end;
    end;

    procedure FoodCheck;
    begin
      case FOOD of
        'MonkFish':
        begin
          FoodLeft := CountItems('dtm', MonkFish, []);
        end;

        'Lobster':
        begin
          FoodLeft := CountItems('dtm', Lobster, []);
        end;

        'Shark':
        begin
          FoodLeft := CountItems('dtm', Shark, []);
        end;

        'SwordFish':
        begin
          FoodLeft := CountItems('dtm', Swordy, []);
        end;
      end;
    end;

    procedure GetFood;
    var
      x, y: integer;
    begin
      case STETHOSCOPE of

        'no':
        begin
          if (BankScreen) or (PinScreen) then
          begin
            if (PinScreen) then
              repeat
                InPin(Players[0].Pin);
              until (BankScreen);

            if (BankScreen) then
            begin
              DepositAll;
              Wait(RandomRange(300, 400));
              WithDraw(0, 0, HOWMUCHFOOD);
              CloseBank;
            end;
          end;
        end;

        'yes':
        begin
          if (BankScreen) or (PinScreen) then
          begin
            if (PinScreen) then
            repeat
              InPin(Players[0].Pin);
            until (BankScreen);

            if (BankScreen) then
            begin

              if FindBitmapToleranceIn(SappBMP, x, y, MIX1, MIY1, MIX2, MIY2, 45) then
              begin
                MMouse(x, y, 0, 0);
                ClickMouse2(mouse_right);
                WaitOption('ll', 500);
              end;

              if FindBitmapToleranceIn(EmerBMP, x, y, MIX1, MIY1, MIX2, MIY2, 45) then
              begin
                MMouse(x, y, 0, 0);
                ClickMouse2(mouse_right);
                WaitOption('ll', 500);
              end;

              if FindBitmapToleranceIn(RubyBMP, x, y, MIX1, MIY1, MIX2, MIY2, 45) then
              begin
                MMouse(x, y, 0, 0);
                ClickMouse2(mouse_right);
                WaitOption('ll', 500);
              end;

              if FindBitmapToleranceIn(DiamBMP, x, y, MIX1, MIY1, MIX2, MIY2, 45) then
              begin
                MMouse(x, y, 0, 0);
                ClickMouse2(mouse_right);
                WaitOption('ll', 500);
              end;

              Wait(RandomRange(300, 400));
              if FoodLeft = 0 then
              begin
                WithDraw(0, 0, HOWMUCHFOOD);
              end;
              CloseBank;
            end;
          end;
        end;
      end;
    end;

    function EatFood: Boolean;
    begin
      Result := False;
      if (GetMMLevels('hp', thingy) < HPFOREATING) then
      begin
        Result := True;
      end;
    end;

    procedure Eat;
    var
      x, y: integer;
    begin
      case FOOD of
        'MonkFish':
        begin
          if EatFood = True then
          begin
            Writeln('Need to eat food.');
            if FindDTM(MonkFish, x, y, MIX1, MIY1, MIX2, MIY2) then
            begin
              MMouse(x, y, 2, 2);
              if IsUpText('at') then
              begin
                GetMousePos(x, y);
                Mouse(x, y, 2, 2, False);
                Wait(RandomRange(200, 300));
                ChooseOption('at');
              end;
            end;
            repeat
              Eat;
            until(EatFood = False)

          end;
        end;

        'Lobster':
        begin
          if EatFood = True then
          begin
            Writeln('Need to eat food.');
            if FindDTM(Lobster, x, y, MIX1, MIY1, MIX2, MIY2) then
            begin
              MMouse(x, y, 2, 2);
              if IsUpText('at') then
              begin
                GetMousePos(x, y);
                Mouse(x, y, 2, 2, False);
                Wait(RandomRange(200, 300));
                ChooseOption('at');
              end;
            end;
            repeat
              Eat;
            until(EatFood = False)

          end;
        end;

        'Shark':
        begin
          if EatFood = True then
          begin
            Writeln('Need to eat food.');
            if FindDTM(Shark, x, y, MIX1, MIY1, MIX2, MIY2) then
            begin
              MMouse(x, y, 2, 2);
              if IsUpText('at') then
              begin
                GetMousePos(x, y);
                Mouse(x, y, 2, 2, False);
                Wait(RandomRange(200, 300));
                ChooseOption('at');
              end;
            end;
            repeat
              Eat;
            until(EatFood = False)
          end;
        end;

        'SwordFish':
        begin
          if EatFood = True then
          begin
            Writeln('Need to eat food.');
            if FindDTM(Swordy, x, y, MIX1, MIY1, MIX2, MIY2) then
            begin
              MMouse(x, y, 2, 2);
              if IsUpText('at') then
              begin
                GetMousePos(x, y);
                Mouse(x, y, 2, 2, False);
                Wait(RandomRange(200, 300));
                ChooseOption('at');
              end;
            end;
            repeat
              Eat;
            until(EatFood = False)
          end;
        end;
      end;
    end;

    procedure DTMS;
    begin
      Safe     := DTMFromString('mLgAAAHicY2JgYMhnZGBIAeKvQPZzII5yMWIoivVh4AKyQZgRihkYAIqnBLU=');
      Safe2    := DTMFromString('mLgAAAHicY2JgYNBjZGDQAuLXQPYTIPa21GQICw5i4AKyWYGYEYoZGABvOgPl');
      MonkFish := DTMFromString('mLgAAAHicY2JgYNBjYmAwBeKpjAwM/UA8t6qCwdZUn4ELKAfCjFDMwAAAawkD1g==');
      Lobster  := DTMFromString('mLgAAAHicY2JgYLjDyMDwEognAHEbEK8Pl2C4lyfPwAWUA2FGKGZgAACm8wWB');
      Swordy   := DTMFromString('mLgAAAHicY2JgYNgPxCeB+CUQPwfiqZELGNrj+xhYgWwQZoRiBgYAvboGaQ==');
      Shark    := DTMFromString('mGQAAAHicY2RgYGBjYmBoY2RgqEgKYGAF8oFMBgYAGCABwQ==');
      EmerBMP  := BitmapFromString(12, 17, 'meJyN0b0KgzAQwPFZzJdXkyfq7FSwUAep0G4+g6FT6Ut7NSU9TxOE/3Y/jiOxHqwH3clfN0ErzwVmFxNiAJOXbxFUD40dMYylDGUZE1neBEaNe5+2BnOfWvfSThCC0ewydRXRVE+9m2jKjMEpvrxqk3sCYIay//clDAVbgzHAjLkr2sq8wAwqEx4/AxlAbCw=');
      SappBMP  := BitmapFromString(13, 17, 'meJyN0rEKwkAMgOHipuZMe165vpGLIIibglAHEcRuvkRvFJ/XYCDE9ozCP35kSJJiSDGcygXXfraCKTUpivRmXDtiewROzM0j9ScbSINpaTORPxlLNmuYsXk09ZhRz6Y+V0isj4G7L8usPKLbwFxY5zHbzoHNCNBdDuY0NswoYVrKiQ2mTZb16lW+sUuFugGj3V49Gm0dUC/4hHvA');
      RubyBMP  := BitmapFromString(14, 18, 'meJyN0rEKwjAQgOHiZNrTpHUwjyFkEyEiQsXBIiiIi48gLuLje3gYk0tMC/+Q4eMy3BnbjoqCVakDRu/FcmNsaz6sUseojhrDynk5v1Mxc5i8k1/fsUq5o3wGzQUbLhnOSx/3SoeHSMLEBNif1M9YYrV+QX0KJM6c3ZIY9yUm6/D3azIx3fZKNLi1Uu7zkhhJTOlHEvsHk5HstJIyPKq/EpqzH5NvIIpyRQ==');
      DiamBMP  := BitmapFromString(14, 15, 'meJyFz9EGw0AUhOHIm4ZYWa1KhaaRUCUSVkqpXPUddnvVvF5OHMZyNhv+y88w1i3WLe63ZcybapoHKq83ZIX08aEElpKxLxmDZZmKSApsk/aP5vkrcV13Uk7TR6b1Jc81FZdt+6yq+6EkxpIxHQliZpBUUIJFJOWzPdn3BgUlNYyvvYrizKVJgp0IU+q0Agm/WVs=');
      SafeBMP  := BitmapFromString(21, 15, 'meJyNku1L21AUh/8L/TYr1dIaa19M04XGmDTWlmpbm9a6LnQhlFDciiiIUMYQBhsTXxDHEPww2H+6Zxx3EWUweAjh5j7n/s65iaI4+ksYjhVBECqGw9FTarVGoaj33k2ddhj9Qx+NIsUz3fO2c7kC+t7byf/oz5KgQ7U7hpRWaDZbivF4oojjQwWBFY7rWZaNS/h0Vtd1QyHHvSxSLpsKdNjqxbDRDFihl9XVNbBtVyXxewMFswK2pVLpubl5qeB2opLboSOpAGQTt93297p9hXyFRGKRCoRHIb+xsQ1sUK0hvkRFqjd2QHSq4eoVjx53dzsgm+XEfHWwZvvA/un7CVBc5UHPZLTXmw1YSKaZj6z/+vnw5fP5x9kZes7pr5g7D/ffzz/N5L5ADkInQ8VrwVP9sVmnX/SGPIFqCc00TUsgHnPjBX2z7gP6wUEgIpVLjdDyp1cXXzl0vRbAq4whLvn394fAO9eUN2zg9ldyBgGkd1yUH3c3cHpyRPtLBderOlJBBphMLqO338SCVnIZoAwZK2t1bi6/CVqltZi1jo8+yHVL71A0H/V6d1T2/kxY1m+vLwhJcRAF5JeQDcwcBgP/N+PwH8Y=');
    end;

    function SafeColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.16, 1.00);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 4147799, MSX1, MSY1, MSX2, MSY2, 4);
      if (Length(arP) = 0) then
      begin
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 5.58) and (X <= 9.64) and (Y >= 5.51) and (Y <= 9.45) and (Z >= 4.00) and (Z <= 6.80) then
        begin
          Result := arC[i];
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
    end;

    function Cracking: Boolean;
    var
      PBox: TBox;
    begin
      PBox := IntToBox(245, 130, 285, 195);
      Result := (AveragePixelShift(PBox, 450, 600) > 250);
    end;

    function FindSafe(x, y: Integer): Boolean;
    var
      CTS, I: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.16, 1.00);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, SafeColor, MSX1, MSY1, MSX2, MSY2, 4);
      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 15, 15);

      for I := 0 to High(ATPA) do
      begin
        MiddleTPAEx(ATPA[i], x, y);
        if High(TPA) > 100 then
        MMouse(x, y, 2, 2);
        if(IsUpTextMultiCustom(['rack', 'all', 'afe'])) then
        begin
          Result := True;
          GetMousePos(x, y);
          Break;
        end;
      end;
    end;

    procedure FrDTMS;
    begin
      FreeDTMS([Safe, MonkFish, Swordy, Lobster, Shark, Safe2]);
      FreeBitmap(SappBMP);
      FreeBitmap(RubyBMP);
      FreeBitmap(EmerBMP);
      FreeBitmap(DiamBMP);
      FreeBitmap(SafeBMP);
    end;

    procedure Proggy;
    begin

      CurrentEXP := GetXPBarTotal;
      TotalEXP := (CurrentEXP - StartEXP);
      Stats_IncVariable('Thieving EXP (Gained)', (TotalEXP));

      ClearDebug;
      Writeln('############# Guccis Safe Cracker ###########');
      Writeln('|= Player : ' + Players[CurrentPlayer].Nick);
      Writeln('|= Time Running : ' + TimeRunning);
      Writeln('|= EXP Gained : ' + IntToStr(TotalEXP));
      Writeln('|= GP Gained : ' + IntToStr(CurrentGP - StartGP));
      Writeln('|= Sapphires : ' + IntToStr(Sapphires));
      Writeln('|= Emeralds : ' + IntToStr(Emeralds));
      Writeln('|= Rubies : ' + IntToStr(Rubies));
      Writeln('|= Safes Done : ' + IntToStr(TotalEXP/70));
      Writeln('|= Safes Failed : ' + IntToStr(SafesFailed));
      Writeln('#############################################');

      Stats_Commit;
    end;

    procedure OnSmart;
    var
      XPH, XP: Integer;
    begin
      CurrentEXP := GetXPBarTotal;
      XPH := round((CurrentEXP - StartEXP) / (GetTimeRunning / 3600000.0));
      XP := (CurrentEXP - StartEXP);

      Smart_ClearCanvas;
      SMART_DrawTextEx(False, 8, 79, SmallCharsNS, 'Guccis Safe Cracker', clWhite);
      SMART_DrawTextEx(False, 8, 92, SmallCharsNS, 'Player:' + Players[CurrentPlayer].Nick, clWhite);
      SMART_DrawTextEx(False, 8, 105, SmallCharsNS, 'Time Running:' + TimeRunning, clWhite);
      SMART_DrawTextEx(False, 8, 118, SmallCharsNS, 'XP Gained:' + IntToStr(XP), clWhite);
      SMART_DrawTextEx(False, 8, 131, SmallCharsNS, 'XP/H:' + IntToStr(XPH), clWhite);
    end;

    procedure BankEmerald;
    begin
      if FindObjCustom(x, y, ['alk', 'merald', 'enedict'], [3101758, EmeraldColor], 11) or FindEmerald(x, y) then
      begin
        MMouse(x, y, 0, 0);
        if IsUpText('merald') then
        begin
          ClickMouse2(mouse_right);
          WaitOption('ank', 1000);
          Inc(NumbOfBanks);
        end;

        if DidRedClick then
        begin
          repeat
            Wait(100);
          until(BankScreen)
        end;
      end;
    end;

    procedure OpenSafe;
    var
      x, y, t, StartCount, EndCount, REXP, SEXP: integer;
      vable: Extended;
    begin
      if (EatFood = True) then
      begin
        Eat;
      end;

      if (EatFood = False) and (Cracking = False) then
      begin
        StartCount := InvCount;
        SEXP := GetXPBarTotal;
        Writeln('Dont need to eat food and not currently cracking a safe.');
        case lowercase(WHICHSAFES) of

          'south':
          begin
            if FindDTMRotated(Safe, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) or FindDeformedBitmapToleranceIn(SafeBMP, x, y, MSX1, MSY1, MSX2, MSY2, 15, 5, True, vable) or FindSafe(x, y) then
          end;

          'north':
          begin
            if FindDTMRotated(Safe2, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) or FindDeformedBitmapToleranceIn(SafeBMP, x, y, MSX1, MSY1, MSX2, MSY2, 15, 5, True, vable) or FindSafe(x, y) then
          end;
        end;

        begin
          //Smart_DrawBoxEx(True, False, [Box], clWhite);
          MMouse(x, y, 1, 1);
          if WaitUpText('afe', 100) then
          begin
            ClickMouse2(True);
            MarkTime(t);
            Wait(100 + Random(50));
          end;
        end;
        repeat
          Wait(500 + Random(100));
          DoneSafes;
          EndCount := InvCount;
          REXP := GetXPBarTotal;
          FindNormalRandoms;
          OnSmart;
          Proggy;
          FoodCheck;
        until((TimeFromMark(t) >= 12000) or (REXP > SEXP) or FindBlackChatMessage('slip and trigger') or (EndCount > StartCount) or FindBlackChatMessage('coins have'))
      end;
    end;

    procedure CountGP;
    begin
      CurrentGP := GetMoneyPouchAmount;
    end;

    procedure CountGems;
    begin
      IncEx(Sapphires, CountItems('bmp', SappBMP, [45]));
      IncEx(Emeralds, CountItems('bmp', SappBMP, [45]));
      IncEx(Rubies, CountItems('bmp', SappBMP, [45]));
    end;

    begin
      ClearDebug;
      {$IFDEF SIMBAMAJOR980}
        SMART_SERVER := 24;
        SMART_MEMBERS := TRUE;
        SMART_SIGNED := TRUE;
        SMART_SUPERDETAIL := FALSE;
      {$ELSE}
        SMART_FIXSPEED := TRUE;
      {$ENDIF}
      GrabMaps;
      ActivateClient;
      SetupSRL;
      SPS_AnyAngle := True;
      SPS_Setup(RUNESCAPE_OTHER, ['ROGUES_DEN']);
      SRL_SixHourFix := True;
      DTMS;
      SafeColor;
      EmeraldColor;
      DeclarePlayers;
      if not (LoggedIn) then
      LoginPlayer;
      Wait(4000 + Random(400));
      StartEXP := GetXPBarTotal;
      FindNormalRandoms;
      ToggleXPPopUp(True);
      StartGP := GetMoneyPouchAmount;
      ClickNorth(SRL_ANGLE_HIGH);
      SetupSRLStats(1295, SRLSTATS_USER, SRLSTATS_PASSWORD);
      repeat
        if (InvCount < 2) then
        begin
          Writeln('Getting food.');
          FoodCheck;
          repeat
            BankEmerald;
          until(BankScreen)

          repeat
            GetFood;
          until(InvCount >= 2)
        end;
        if InvCount < 14 then
        begin
          WalkToSafe;
        end;
        if (not(InvFull)) then
        begin
          repeat
            OpenSafe;
            EatFood;
            Eat;
          until(InvFull or (FoodLeft = 0));
        end;
        if (FoodLeft = 0) or InvFull then
        begin
          Writeln('Food left:' + IntToStr(FoodLeft));
          CountGems;
          CountGP;
          Proggy;
          repeat
            WalkToBank;
          until(Flag)
          repeat
            BankEmerald;
          until(BankScreen)
          if BankScreen then
          begin
            FoodCheck;
            GetFood;
          end;
        end;
      until(False)
      FrDTMS;
    end.
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  17. #42
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    how well does this work?
    Simba Code:
    program FindObject;
    {$i SRL\SRL.simba}

    var
      x, y: Integer;

    function FindObject(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2: Integer;
      P: TPoint;
      R, G, B: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.94, 10.11);

      if not(FindColorsTolerance(arP, 332316, MSX1, MSY1, MSX2, MSY2, 3)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);

      for i := 0 to arL do
      begin
        ColorToRGB(arC[i], R, G, B);

        if (R >= 18) and (R <= 38) and (G >= 8) and (G <= 25) and (B >= 0) and (B <= 11) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 0.37) and (X <= 1.15) and (Y >= 0.32) and (Y <= 1.08) and (Z >= 0.03) and (Z <= 0.40) then
          begin
            for j := 0 to arL2 do
            begin
              if (arUC[i] = arC[j]) then
              begin
                SetLength(arAP, Length(arAP) + 1);
                arAP[High(arAP)] := arP[j];
              end;
            end;
          end;
        end;
      end;

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 10, 10);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
        if (IsUpTextMultiCustom(['Wall', 'afe'])) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;

    begin
      SetupSRL;
      FindObject(x, y);
    end.

    ~shut
    Just hovered around the floor
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  18. #43
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Seems impossible to do with colors :s

    U could ask Olly, or Flight. They're master at the usage of TPA's

    Creds to DannyRS for this wonderful sig!

  19. #44
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    Seems impossible to do with colors :s

    U could ask Olly, or Flight. They're master at the usage of TPA's

    But theres two safe crackers on eoc runescape they use bitmaps and dtms?
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  20. #45
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default Anyone wana test my script

    Download herecrack2.simba


    Simba Code:
    program crack2;





    {$I SRL-OSR/SRL.Simba}





    const
      SRLSTATS_USER     = '';   // Your SRL Stats Username
      SRLSTATS_PASSWORD = '';   // Your SRL Stats Password
      SERVER            = 0;  // Enter "0" to pick a random server.
      MEMBERS           = True;
      NUMBOFPLAYERS     = 1;
      STARTPLAYER       = 0;


    var
       x, y, Safe, Safe2, Shark,
      SafeBMP:Integer;
      String,aFound: Extended;

     //------------------------------------------------------------------\\
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';  //Username goes here
      Players[0].Pass := '';  //Password goes here
      Players[0].Nick := '';  //Character name (excluding first letter)
      Players[0].Active := True;
    end;
    //--------------------------------------------------------------------\\



    procedure DTMS;
    begin
      Safe     := DTMFromString('mggAAAHicY2NgYPjEyMDwE4jfAPF3KP0RiLmAmBGIOaFsfiBmAuKyKHMGCwsdBjcLC4bMQAMwXZ9oxYALMOLAEAAA/r8LBg==');
      Safe2    := DTMFromString('mggAAAHicY2NgYDjMxMBwGor3A/EhKL0OKLcciLcB8VogXgrEW4G4OlyWwcJCB4zdLCzgNC7AiANDAACwsQzz');
                   safeBmp := BitmapFromString(25, 35, 'meJzFld9r2mAUhq+98EIQhICIIC' +
            'ISJEWKwRLpEDKyQEcrNEXaZiOua7cyL8YG3Q8GBWH7q91rTnK+Yz6' +
            '/mm0XgwfBCx/PeXNyTtuP237c7E0q/i3RPf3Qv3jon38i8JXpBAum' +
            'dRyBWsehX63X6+7Ju9b0smb1WDV49QiVe/WFGZ4vGef0jiAVKKjYQ' +
            'yo3/s4cXnxkDmb3YHByA3RVJ3wL2IOOCqrR/DNDKgISa/wSVFt9Vl' +
            'ldl1VOshpc/xi/VrBHtklVkapidVhVqVlPqJDVzsIQC2gMfZCpggV' +
            '77Pk3qI4Wj4zstFAVaHozULePSCUDd978At7NipC1yfD5ISpV3YKq' +
            '0R6CnSrCNBV2mKiHmKrkAyXV5O4nY5qKbB7SuAiTynbdMsBGDxGYV' +
            'K7r761qYwuTLVVaXjW4B/9RVWzwz1U0CVDhU6qwYZBVeRVP+44G09' +
            'j/RdVwnoGnG2xGX6vhErBqa0TTrDDtf6fSYzeqkhWQKqBvLRm7VFH' +
            's2DO6irNiCcllVnpVOBNGVf4uc78yKz4WUDXtKbFXRR626ar2QbhH' +
            'lSNVnJVU1cdnhK4qbHipQrNQ0bFQKi/aeOi/hGprLYvtVxhRilqpv' +
            'EhVnqvUFjWs9ywrsfpMqjJssqKxDJcb1fElkDmUWch8KQBOaqaizA' +
            '2qnbdVDXyY4AjSr/QGSxbGx4tKkip7Eve9OdMbR1v3y5A83peW85x' +
            'VkBBS1R3NQOEaygbtILZGL4BUyUoI8hD6uVd3md+4XGWF7zOCW6Yx' +
            'jRlKICN/NUBtGBCs+g2pNUfx');
    end;


    function SafeColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.16, 1.00);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 4147799, MSX1, MSY1, MSX2, MSY2, 4);
      if (Length(arP) = 0) then
      begin
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 5.58) and (X <= 9.64) and (Y >= 5.51) and (Y <= 9.45) and (Z >= 4.00) and (Z <= 6.80) then
        begin
          Result := arC[i];
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
    end;

    function Cracking: Boolean;
    var
      PBox: TBox;
    begin
      PBox := IntToBox(245, 130, 285, 195);
      Result := (AveragePixelShift(PBox, 450, 600) > 250);
    end;

    function FindSafe(x, y: Integer): Boolean;
    var
      CTS, I: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.16, 1.00);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, SafeColor, MSX1, MSY1, MSX2, MSY2, 4);
      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 15, 15);

      for I := 0 to High(ATPA) do
      begin
        MiddleTPAEx(ATPA[i], x, y);
        if High(TPA) > 100 then
        MMouse(x, y, 2, 2);
        if(IsUpTextMultiCustom(['rack', 'all', 'afe'])) then
        begin
          Result := True;
          GetMousePos(x, y);
          Break;
        end;
      end;
    end;





    procedure DoneSafes;
    begin
      if FindBlackChatMessage('You slip and trigger a trap!') then
      Writeln('You slip and trigger a trap!');
    end;

    procedure OpenSafe;
    var
      x, y, t, StartCount, EndCount, REXP, SEXP: integer;
      vable: Extended;
    begin

      begin

          begin
            if FindDTMRotated(Safe, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) or FindDeformedBitmapToleranceIn(SafeBMP, x, y, MSX1, MSY1, MSX2, MSY2, 15, 5, True, vable) or FindSafe(x, y) then
          end;

          begin
            if FindDTMRotated(Safe2, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) or FindDeformedBitmapToleranceIn(SafeBMP, x, y, MSX1, MSY1, MSX2, MSY2, 15, 5, True, vable) or FindSafe(x, y) then
          end;
        end;

        begin
          MMouse(x, y, 1, 1);
          if WaitUpText('afe', 100) then
          begin
            ClickMouse2(True);
            MarkTime(t);
            Wait(100 + Random(50));
          end;
        end;
        repeat
          Wait(500 + Random(100));
          DoneSafes;
        until((TimeFromMark(t) >= 6000) or (REXP > SEXP) or FindBlackChatMessage('slip and trigger') or (EndCount > StartCount) or FindBlackChatMessage('coins have'))
      end;


                procedure FrDTMS;
    begin
      FreeDTMS([Safe,  Safe2]);
      FreeBitmap(SafeBMP);
    end;






    begin
     DeclarePlayers;
      SetupSRL;
        ActivateClient;
      DTMS;
      SafeColor;

      Repeat;
      OpenSafe;
      until (false);
    End.
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  21. #46
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Bmup tester needed
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  22. #47
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    I'll be really surprised if a bitmap really works there.

    Anyways, that looks impossible to detect with simple TPA searches.
    Someone should try to detect the lines between the bricks on the wall, and then click the middle of the largest gap(the safes)
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

Page 2 of 2 FirstFirst 12

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
  •