Results 1 to 19 of 19

Thread: CTS0 or 1?

  1. #1
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Question CTS0 or 1?

    I often use ACA to find a best color to use in findcolor functions, but when doing this, should I have CTS set to 0 or 1? Or if using ACA for this is bad practice, let me know! Thanks in advance
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  2. #2
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    I thought CTS2 was the better option, at least that's what was in YoHoJo's video tut.
    Solar from RiD.

  3. #3
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Findcolorstolerance doesent support hue mod and sat mod, and I currently dont know how to use CTS2 for object finding.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  4. #4
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    Findcolorstolerance doesent support hue mod and sat mod, and I currently dont know how to use CTS2 for object finding.
    It does. As long as you set the CTS and modefiers.

    Simba Code:
    ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(2.67, 2.07);  
      FindColorsTolerance(TPA, 8025465, MSX1, MSY1, MSX2, MSY2, 5);

  5. #5
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    Wouldn't you be able to use SetColorspeed2Modifiers?
    Solar from RiD.

  6. #6
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    i use CTS 2 for almost everything. all of my object finding is cts 2. its way more accurate than 0,1,3. i would highly recommend u use it

  7. #7
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    :O So i can do something like this and it will use CTS2?
    Simba Code:
    Procedure this
    var
      ColorTPA:TPointArray
    begin
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(huemod, satmod);
      findcolorspiraltolerance(...)
    end;
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  8. #8
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    :O So i can do something like this and it will use CTS2?
    Simba Code:
    Procedure this
    var
      ColorTPA:TPointArray
    begin
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(huemod, satmod);
      findcolorspiraltolerance(...)
    end;
    Yes. And don't forget to set it back to the normal CTS at the end of the procedure or function. One of my old function:

    Simba Code:
    Function ClickAltar7 :Boolean;
    var
      a,t, CurrentXP: Integer;
      TPA  : TPointArray;
      ATPA : T2DPointArray;
      MP   : TPoint;
      tmpCTS : Integer;
    begin
      if(not(LoggedIn))then Exit;
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(2.67, 2.07);

      FindColorsTolerance(TPA, 8025465, MSX1, MSY1, MSX2, MSY2, 5);
      SortTPAFrom(TPA, Point(MSCX, MSCY));
      ATPA := TPAtoATPAEx(TPA, 40, 40);
      SortATPAFromSize(ATPA, 500, true);

      CurrentXP := GetXPBarTotal;

      for a := 0 to High(ATPA) do
      begin
        SMART_DrawDotsEx(true,ATPA[a], clAqua);
        MP := MiddleTPA(ATPA[a]);
        //MMouse(MP.X, MP.Y, 4, 4);
        MoveMouse(MP.X, MP.Y);
        if WaitUpTextMulti(['raft', 'ft-ru', 'rune', 'ne Altar'], 2000) then
        begin
          //ClickMouse2(mouse_Left);
          ClickMouse(MP.X, MP.Y, mouse_Left);
          writeln('Crafting Runes');
          MarkTime(t);
            repeat
              wait(10);
              if TimeFromMark(t) > 4000 then
                ClickAltar6;
            until CurrentXP < GetXPBarTotal;
          writeln('Crafted runes');
          wait(RandomRange(400, 500));
          Result := True;
          Break;
        end;
      end;

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

    You can see tmpCTS := GetColorToleranceSpeed; is to take the current CTS before setting it is CTS 2. And at the end of the function, I set it back to the previous CTS and 0.2 in both hue and sat (Default in CTS 1 I think).
    Last edited by CephaXz; 08-28-2012 at 06:00 PM.

  9. #9
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, Thanks! Ill be sure to use this in scripts for now on!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

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

    Default

    Screw CTS2, skip right onto CTS3. Final version of ACA supports CTS3 and you add it onto Simba, like the DTM editor. If you set the colors correctly, it takes just about the same time as CTS2 to find the colors, and has more accurate results.(On the other hand, it's hard to get the colors right. Most colors give you 1-2 points in the array, which is very unreliable, and if you have too high tolerance, it may adds many points to the array and that takes 5+ minutes to compute in Simba) It has only one modifier, and you don't have to use it because it is directly derived from tolerance. I suggest you get your hand on the latest ACA and try it. The standalone ACA gets the colors wrong anyway.(acknowledged by the dev on the thread)
    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

  11. #11
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Quote Originally Posted by litoris View Post
    Screw CTS2, skip right onto CTS3. Final version of ACA supports CTS3 and you add it onto Simba, like the DTM editor. If you set the colors correctly, it takes just about the same time as CTS2 to find the colors, and has more accurate results.(On the other hand, it's hard to get the colors right. Most colors give you 1-2 points in the array, which is very unreliable, and if you have too high tolerance, it may adds many points to the array and that takes 5+ minutes to compute in Simba) It has only one modifier, and you don't have to use it because it is directly derived from tolerance. I suggest you get your hand on the latest ACA and try it. The standalone ACA gets the colors wrong anyway.(acknowledged by the dev on the thread)
    i have still found cts2 far more accurate than cts3 in most cases

  12. #12
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm getting this error when running this script, can someone help me?
    Error:
    Code:
    [Error] C:\Simba\Scripts\Agility.simba(58:23): Unknown identifier 'tmpCTS' at line 57
    Compiling failed.
    Script:
    Simba Code:
    program new;
    {$i srl/srl.simba}

    procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';  //Username Here!
      Players[0].Pass := '';  //Password Here!
      Players[0].Pin := '';   //Pin here!
      Players[0].Active := True;

      Players[1].Name := '';  //Username Here!
      Players[1].Pass := '';  //Password Here!
      Players[1].Pin := '';   //Pin here!
      Players[1].Active := False; //Set to true if you are using

    End;

    Procedure SetupStuff;
    begin
      SetupSRL;
      DeclarePlayers;
      Loginplayer;
      wait(randomrange(500, 1000));
      FindNormalRandoms;
      wait(randomrange(500, 1000));
    end;


    Function ClickLog:boolean;
    var
      Sex, SeY, i, Counter:Integer;
      LogTPA:TPointArray;
      LogATPA: T2DPointArray;
    begin

      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.15, 0.28);
      FindColorsSpiralTolerance(SeX, SeY, LogTPA, 3556433, MSX1, MSY1, MSX2, MSY2, 2);
      LogATPA := SplitTPA(LogTPA, 15);
      for i := 0 to high(LogATPA) do
        begin
          if MiddleTPAEX(LogATPA[i], SeX, SeY) then
            Mmouse(SeX, SeY, 3, 3);
            wait(randomrange(150, 400));
            if IsUptextMultiCustom(['cross', 'og b', 'alenc']) then
              begin
                writeln('Log found!');
                Clickmouse2(mouse_left);
                Result := true;
                Exit;
              end;
        end;
      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
      wait(randomrange(500, 2000));

    end;


    begin
      //SetupStuff
      SetupSRL;
      ClickLog




    end.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  13. #13
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    I think you need to define tmpCTS as a variable.
    Solar from RiD.

  14. #14
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What type would you define it as?
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

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

    Default

    Quote Originally Posted by x[Warrior]x3500 View Post
    i have still found cts2 far more accurate than cts3 in most cases
    http://villavu.com/forum/showthread.php?t=40686
    One of the few threads comparing CTS modes.

    I used to do CTS2, but through experiments I found CTS3 to be more accurate. Depends on what sort of accuracy you want though-- if it's something with homogeneous colors(ie. ore on rock) 3 works much better, for larger objects with more similar but different colors, 2 could be better. Not having to bother with hue and saturation gets me :P
    Edit:^Integer, bu you don't really have to because it is 0 1 by default. Just set it to 0 1 after finding the colors.(0 1 is used in text finding)
    Last edited by litoris; 08-28-2012 at 08:29 PM.
    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

  16. #16
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    What type would you define it as?
    Integer. Look at the example I posted above

  17. #17
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Forgot about the example, thanks
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  18. #18
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by litoris View Post
    Edit:^Integer, bu you don't really have to because it is 0 by default. Just set it to 0 after finding the colors.(0 is used in text finding)
    1, CTS 1 is default iirc
    Working on: Tithe Farmer

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

    Default

    Quote Originally Posted by masterBB View Post
    1, CTS 1 is default iirc
    Yeah, just checked Thanks.
    Edit:You are the guy who wrote the master tutorial! /Respect
    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

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
  •