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
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!
I thought CTS2 was the better option, at least that's what was in YoHoJo's video tut.
Solar from RiD.
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!
Wouldn't you be able to use SetColorspeed2Modifiers?
Solar from RiD.
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
: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!
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.
Alright, Thanks! Ill be sure to use this in scripts for now on!
Thx Euphemism and Vinyl for the awesome siggy and avatar!
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
I'm getting this error when running this script, can someone help me?
Error:
Script:Code:[Error] C:\Simba\Scripts\Agility.simba(58:23): Unknown identifier 'tmpCTS' at line 57 Compiling failed.
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!
I think you need to define tmpCTS as a variable.
Solar from RiD.
What type would you define it as?
Thx Euphemism and Vinyl for the awesome siggy and avatar!
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
Forgot about the example, thanks
![]()
Thx Euphemism and Vinyl for the awesome siggy and avatar!
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
There are currently 1 users browsing this thread. (0 members and 1 guests)