Results 1 to 9 of 9

Thread: need help with FindObjCustom

  1. #1
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need help with FindObjCustom!

    SCAR Code:
    program ClaySoftenerEdge;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}
    var
    x, y:integer;

    const
      SRLStatsID = ''; // 4 digit number which records autoing things
                            // get one at [url]http://stats.srl-forums.com[/url]
      SRLStatsPassword = ''; // your SRLStatsID Password
      RunDirection = 'N'; //N = North, E = East, S = South, W = West
                          //this is the direction to run, if your in a fight
                         
       Loads = 2; //how many loads to soft?
       SmartWorld = 155; //What world to load smart in
      Signed = False; //False = unsigned, slower and for multiplayer
                              //True = signed, faster and for 1 player only
                             
                             
    procedure DeclarePlayers;
    // you can add more if you want... make sure you change players[0] to
    // players [1] etc.
    // don't forget to change HowManyPlayers to the total amount of players!
    begin
    Status('Declaring Players');
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; //your runescape account
      Players[0].Pass := ''; // your runescape password of your account
      Players[0].Nick := ''; //3 or 4 letters of the name, used for finding randoms
                               //zezima would be ezi for example
      Players[0].Active := True; //do you want this account to auto? true = yes, false = no
    end;

    procedure SetUpSmart;
    begin
      Status('Setting up SMART!');
      smartSetupex(SmartWorld, False, Signed);
        While Not (SmartReady) Do
          Wait(100);
          SetTargetDC(SmartGetDC);
             If Not (LoggedIn) Then
              Begin
               While Not (SmartGetColor(386, 249) = 65535) Do
           Wait(100);
        end;
    end;

    procedure DontGetBanned;
    begin
      if not LoggedIn then
        Exit;
        Status('Performing Antiban');
      case Random(68) of
        0: HoverSkill('Mining', False);
        1: HoverSkill('Smithing', false);
        2:
          begin
            GameTab(1 + Random(12));
            wait(800 + random(500));
            GameTab(4)
          end;
        3: BoredHuman;
        4: AlmostLogout;
        5: DoEmote(400 + Random(90));
     end;
    end;

    Procedure FindFightEx;
    Begin
     If(FindFight) then
       Begin
       Status('Fight found!');
         Writeln('Our player is being attacked!')
         Writeln('Lets run away!')
       Begin
       Status('Running away!');
         WriteLn('Running....')
         RunAway(RunDirection,False,1,9000+Random(3000))
         WriteLn('Successfully ran away from fight!')
       end;
     end;
    end;

    Procedure AntiRandoms;
    var
    i : Integer;
    Begin
    Status('Doing AntiRandoms');
     for i := 0 to 3 do
       FindNormalRandoms;
       FindFightEx;
       FindNonInventoryRandoms;
     wait(1)
    end;

    procedure WalkToFontain;
    begin
      if (not(loggedIn)) then exit;
       Begin
        status('Walking To Fontain');
        radialWalk(findVarrockRoadColor,265,320,55,2,2);
        wait(5000+random(1000));
        FFlag(0);
      end;
    end;

    procedure FillTheBuckets;
    begin
      if(FindObjCustom(x,y,['ell'],[3493724,5796738,5796738,4350579,3757155],55))then
       begin
         mouse(x,y,2,2,true);
       end else
       begin
         writeln('Could not find the well, switching players!');
         nextplayer(false);
      end;
    end;

    begin
      SetUpSmart;
      SetupSRL;
      DeclarePlayers;
      Activateclient;
       Repeat
         if not loggedin then loginplayer;
           SetAngle(true);
           MakeCompass('N');
           WalkToFontain;
           FillTheBuckets;
        Until(Not(Loggedin))
       If (Not (LoggedIn)) then
        Begin
         NextPlayer(False);
       end;
     Disguise('FINISHED!');
    end.
    this is going to be a clay softener
    i got some problems..
    it walks to the well...
    but it doesn't find the well
    i made it to click, just to see if it works or not,.
    can someone fix this please
    this is in edgeville
    rep++ will be given
    thanks a lot!

  2. #2
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    I had an idea, try making it just 3 colours, and try different tols, sometimes it takes a while to find the right tol.

  3. #3
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ill try that
    rep++ for you

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Muchos gracios senor

  5. #5
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    right... now i made the script differtent
    it walks to the well..
    clicks on the bucket..
    and than it needs to click on the well..
    i changed colors, tolerance.. everything like 30 times!
    can someone please give me the good colors and good tolerance?

    i will credit you in my script and of course rep++!

    this is my script now:
    SCAR Code:
    program ClaySoftenerEdge;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}
    var
    x, y, SoftClay, Bucket, Clay:integer;

    const
      SRLStatsID = ''; // 4 digit number which records autoing things
                            // get one at [url]http://stats.srl-forums.com[/url]
      SRLStatsPassword = ''; // your SRLStatsID Password
      RunDirection = 'N'; //N = North, E = East, S = South, W = West
                          //this is the direction to run, if your in a fight
                         
       Loads = 2; //how many loads to soft?
       SmartWorld = 155; //What world to load smart in
      Signed = False; //False = unsigned, slower and for multiplayer
                              //True = signed, faster and for 1 player only
                             
                             
    procedure DeclarePlayers;
    // you can add more if you want... make sure you change players[0] to
    // players [1] etc.
    // don't forget to change HowManyPlayers to the total amount of players!
    begin
    Status('Declaring Players');
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; //your runescape account
      Players[0].Pass := ''; // your runescape password of your account
      Players[0].Nick := ''; //3 or 4 letters of the name, used for finding randoms
                               //zezima would be ezi for example
      Players[0].Active := True; //do you want this account to auto? true = yes, false = no
    end;

    procedure LoadDTMs;
    begin
    SoftClay := DTMFromString('78DA63146360601060400179C17C0CFF81342' +
           '310FF0702464E204398010D302291401A648E1401352A40829780' +
           '1A90196C04D4F001090EFC6A00A9C006B5');

    Bucket := DTMFromString('78DA63E4636060906240010B9ABD19FE03694' +
           '620FE0F048C3C40061B031A60442281B438909020A04600482811' +
           '50C30E241408A8610512A204D47000092E026A40EE15C0AF06003' +
           'A920797');
           
    Clay := DTMFromString('78DA63E4656060106440016B272733FC07D28' +
           'C40FC1F0818F9810C760634C0884402695120C141408D00901021' +
           'A006640F3F01359C408287801A909F84F1AB010039A30777');
           end;

    procedure SetUpSmart;
    begin
    Status('Setting up SMART!');
    smartSetupex(SmartWorld, False, Signed);
    While Not (SmartReady) Do
    Wait(100);
    SetTargetDC(SmartGetDC);
    If Not (LoggedIn) Then
    While Not (SmartGetColor(386, 249) = 65535) Do
    Wait(100);
    end;

    procedure DontGetBanned;
    begin
      if not LoggedIn then
        Exit;
        Status('Performing Antiban');
      case Random(68) of
        0: HoverSkill('Mining', False);
        1: HoverSkill('Smithing', false);
        2:
          begin
            GameTab(1 + Random(12));
            wait(800 + random(500));
            GameTab(4)
          end;
        3: BoredHuman;
        4: AlmostLogout;
        5: DoEmote(400 + Random(90));
     end;
    end;

    Procedure FindFightEx;
    Begin
     If(FindFight) then
       Begin
       Status('Fight found!');
         Writeln('Our player is being attacked!')
         Writeln('Lets run away!')
       Begin
       Status('Running away!');
         WriteLn('Running....')
         RunAway(RunDirection,False,1,8000+Random(3000))
         WriteLn('Successfully ran away from fight!')
       end;
     end;
    end;

    Procedure AntiRandoms;
    var
    i : Integer;
    Begin
    Status('Doing AntiRandoms');
     for i := 0 to 3 do
       FindNormalRandoms;
       FindFightEx;
       FindNonInventoryRandoms;
     wait(1)
    end;

    procedure WalkToFontain;
    begin
    if (not(loggedIn)) then exit;
    status('Walking To Fontain');
    radialWalk(findVarrockRoadColor,265,320,55,2,2);
    FFlag(0);
    end;

    procedure FillTheBuckets;
    begin
    if (FindDTM(Bucket, x, y, MIX1, MIY1, MIX2, MIY2)) then
    begin
    mouse(x,y,1,1,true);
    end;
    if not (FindDTM(Bucket, x, y, MIX1, MIY1, MIX2, MIY2)) then
    begin
    writeln('Could not find the buckets, switching players!');
    nextplayer(false);
    end;
    if FindObjCustom(x, y, ['ell'], [3493725, 4548473, 5862274],10) then
    begin
    mouse(x,y,2,2,true);
    end else
        begin
    writeln('Could not find the well, switching players!');
    nextplayer(false);
        end;
    end;

    begin
    LoadDTMs;
    SetUpSmart;
      SetupSRL;
      DeclarePlayers;
      Activateclient;
       Repeat
         if not loggedin then loginplayer;
           SetAngle(true);
           MakeCompass('N');
          WalkToFontain;
           FillTheBuckets;
        Until(Not(Loggedin))
       If (Not (LoggedIn)) then
        Begin
         NextPlayer(False);
       end;
     Disguise('FINISHED!');
    end.

  6. #6
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    If you were SRL member you would read this...
    http://www.srl-forums.com/forum/find...om-t31158.html

    FindObjCustom is being reverted back in rev 16. Just wait for rev 16, or put the old FindObjCustom into your script and name it something different.
    SCAR Code:
    function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tolerance: Integer): Boolean;
    var
      a, b, c, i, x1, y1, x2, y2: Integer;
      Start: Boolean;
    begin
      for b := 0 to (GetArrayLength(Color)-1) do
      begin
        if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, Tolerance)) then
        begin
          Start := True;
          Break;
        end;
      end;
      if(Start)then
      begin
        x1 := 245;
        y1 := 165;
        x2 := 277;
        y2 := 185;
        repeat
          if not(LoggedIn)then break;
          a := a + 1;
          if (a = 1) then
            c := c + 1
          else if (a = 3) then
            c := c + 1;
          for i := 1 to c do
          begin
            if (a = 1) then
            begin
              x1 := x1 + 30;
              x2 := x2 + 30;
            end else
            if (a = 2) then
            begin
              y1 := y1 - 20;
              y2 := y2 - 20;
            end else
            if (a = 3) then
            begin
              x1 := x1 - 30;
              x2 := x2 - 30;
            end else
            if (a = 4) then
            begin
              y1 := y1 + 20;
              y2 := y2 + 20;
            end;
            if (x1 = 485) and (x2 = 517) then
              x2 := x2 - 2;
            if (y1 = 325) and (y2 = 345) then
              y2 := y2 - 7;
            if (x2 > 515) then
              Break;
            for b := 0 to (GetArrayLength(Color)-1) do
            begin
              if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance)) then
              begin
                MMouse(cx, cy, 3, 3);
                Wait(5+Random(10));
                if (IsUpTextMultiCustom(Text)) then
                begin
                  Result := True;
                  Exit;
                end;
              end;
            end;
          end;
          if (a = 4) then
            a := 0;
        until (x2 > 515) or (Result = True);
      end;
    end;
    Hope I helped


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  7. #7
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks a lot!
    it worked
    rep++ for you and credits in script

  8. #8
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    ....Or you can just degrade back to Rev #14

  9. #9
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    ....Or you can just degrade back to Rev #14
    well.. i want it to be updated with the latest rev... and my script is done now
    i also applied to members with it.. lol
    lets see ^^
    thanks for your help everyone!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. FindObjCustom
    By the nerd in forum OSR Help
    Replies: 1
    Last Post: 07-25-2008, 06:25 PM
  2. help with FindObjCustom
    By cocodog13 in forum OSR Help
    Replies: 5
    Last Post: 04-17-2008, 09:14 AM
  3. Help with FindObjCustom
    By 1q1q in forum OSR Help
    Replies: 7
    Last Post: 09-12-2007, 02:58 PM
  4. FindObjCustom Help
    By rodnman1234 in forum OSR Help
    Replies: 5
    Last Post: 08-25-2007, 07:25 PM

Posting Permissions

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