Footy
2012-08-28 13:47:35
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
2012-08-28 13:47:35
2012-08-28 13:51:51
2012-08-28 13:53:21
2012-08-28 13:55:18
From: Footy
Findcolorstolerance doesent support hue mod and sat mod, and I currently dont know how to use CTS2 for object finding.
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(2.67, 2.07);
FindColorsTolerance(TPA, 8025465, MSX1, MSY1, MSX2, MSY2, 5);
2012-08-28 13:56:44
2012-08-28 13:57:07
2012-08-28 13:57:31
Procedure this
var
ColorTPA:TPointArray
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(huemod, satmod);
findcolorspiraltolerance(...)
end;
2012-08-28 13:58:49
From: Footy
:O So i can do something like this and it will use CTS2?
Procedure this
var
ColorTPA:TPointArray
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(huemod, satmod);
findcolorspiraltolerance(...)
end;
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;
2012-08-28 13:59:49
2012-08-28 14:19:20
2012-08-28 14:21:18
From: litoris
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)
2012-08-28 14:30:22
[Error] C:\Simba\Scripts\Agility.simba(58:23): Unknown identifier 'tmpCTS' at line 57
Compiling failed.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.
2012-08-28 14:32:53
2012-08-28 14:35:02
2012-08-28 14:39:33
From: x[Warrior]x3500
i have still found cts2 far more accurate than cts3 in most cases
2012-08-28 14:40:11
From: Footy
What type would you define it as?
2012-08-28 14:49:13
2012-08-28 14:56:16
From: litoris
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)
2012-08-28 16:28:10
From: masterBB
1, CTS 1 is default iirc