Camaro'
2008-04-08 20:00:58
If FindSymbol(x, y, 'bank') ThenWhen i use that at draynor. It Never finds it. Im Right in front of the bank. I think the problem is that there is too many white dots over it. Is that the problem or is it my script?
2008-04-08 20:00:58
If FindSymbol(x, y, 'bank') Then2008-04-08 21:06:41
2008-04-08 23:35:54
{*******************************************************************************
function AutoBankSymb: Integer;
By: PriSoner using ACA2
Description: Finds colour of Bank Symbol.
*******************************************************************************}
function AutoBankSymb: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.45);
if not (FindColorsTolerance(arP, 3002600, MMX1, MMY1, MMX2, MMY2, 13)) then
begin
Writeln('Failed to find the bank symbol by AutoColour.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
if (rs_OnMinimap(arP[i].x, arP[i].y)) then
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 205) and (R <= 255) and (G >= 181) and (G <= 227) and (B >= 0) and (B <= 96) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 42.74) and (X <= 68.56) and (Y >= 46.79) and (Y <= 75.55) and (Z >= 7.39) and (Z <= 21.44) then
begin
Result := arC[i];
Break;
end;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then Writeln('AutoColor failed in finding the bank symbol color.');
end;
2008-04-09 01:49:57
2008-04-09 02:04:21
function findBankSymbol(var rx, ry:integer):boolean;
var
i, col:integer;
Tcols:array of integer;
p:TpointArray;
begin
FindColorsTolerance(p,2720662,mmx1,mmy1,mmx2,mmy2,70);
for i:=0 to high(p) do
begin
col:=getColor(p[i].x,p[i].y);
Tcols:=[getColor(p[i].x-1,p[i].y),
getColor(p[i].x+1,p[i].y),
getColor(p[i].x,p[i].y-1),
getColor(p[i].x,p[i].y+1)];
if (inIntArray(Tcols,col+11825))or(inIntArray(Tcols,col+22158)) then
begin
rx:=p[i].x;
ry:=p[i].y;
result:=true;
exit;
end;
end;
writeln('Bank Symbol Not Found!');
end;
test that out :) Its accurate but a little slow :/
2008-04-09 02:19:32
function findBankSymbol(var rx, ry:integer):boolean;
var
i, col, bc, tx, ty:integer;
Tcols:array of integer;
p:TpointArray;
begin
bc := GetSymbolColor(tx, ty, 'bank');
FindColorsTolerance(p,bc,mmx1,mmy1,mmx2,mmy2,70);
for i:=0 to high(p) do
begin
col:=getColor(p[i].x,p[i].y);
Tcols:=[getColor(p[i].x-1,p[i].y),
getColor(p[i].x+1,p[i].y),
getColor(p[i].x,p[i].y-1),
getColor(p[i].x,p[i].y+1)];
if (inIntArray(Tcols,col+11825))or(inIntArray(Tcols,col+22158)) then
begin
rx:=p[i].x;
ry:=p[i].y;
result:=true;
exit;
end;
end;
writeln('Bank Symbol Not Found!');
end;2008-04-09 02:42:38
From: HyperSecret
to make it alittle more accurate you could do
function findBankSymbol(var rx, ry:integer):boolean;
var
i, col, bc, tx, ty:integer;
Tcols:array of integer;
p:TpointArray;
begin
bc := GetSymbolColor(tx, ty, 'bank');
FindColorsTolerance(p,bc,mmx1,mmy1,mmx2,mmy2,70);
for i:=0 to high(p) do
begin
col:=getColor(p[i].x,p[i].y);
Tcols:=[getColor(p[i].x-1,p[i].y),
getColor(p[i].x+1,p[i].y),
getColor(p[i].x,p[i].y-1),
getColor(p[i].x,p[i].y+1)];
if (inIntArray(Tcols,col+11825))or(inIntArray(Tcols,col+22158)) then
begin
rx:=p[i].x;
ry:=p[i].y;
result:=true;
exit;
end;
end;
writeln('Bank Symbol Not Found!');
end;
getsymbolcolor to a variable and then searches for that color
2008-04-09 07:30:04
From: munk
yeah but I used ACA2 and alot of worldswitching to get that color/tol, and what if its covered, getSymbolColor wont work. I guess with like a default setting it could work real good. But you should test it :D try dropping buncha stuff on the bank symbol and seeing if it finds it:D
P.S. im gonna catch you in stats(h)
2008-04-09 13:20:12
2008-04-09 15:27:53
From: munk
the bank symbols can float alot and even end up outside the bank, so id suggest the bankers dtm so you can end up right next to bank slots. But if you really wanna find the bank symbol…test that out :) Its accurate but a little slow :/
function findBankSymbol(var rx, ry:integer):boolean;
var
i, col:integer;
Tcols:array of integer;
p:TpointArray;
begin
FindColorsTolerance(p,2720662,mmx1,mmy1,mmx2,mmy2,70);
for i:=0 to high(p) do
begin
col:=getColor(p[i].x,p[i].y);
Tcols:=[getColor(p[i].x-1,p[i].y),
getColor(p[i].x+1,p[i].y),
getColor(p[i].x,p[i].y-1),
getColor(p[i].x,p[i].y+1)];
if (inIntArray(Tcols,col+11825))or(inIntArray(Tcols,col+22158)) then
begin
rx:=p[i].x;
ry:=p[i].y;
result:=true;
exit;
end;
end;
writeln('Bank Symbol Not Found!');
end;
2008-04-09 15:57:58
From: SKy Scripter
How long does that take?
The new FindSymbol should only take 50.msc and should be very accurate.
But the Old one took me about 400.msc :)
2008-04-09 16:01:41
From: cnr sport
Well in my particular script, 50 ms or 600 ms isnt a factor lol. I just need effectiveness.
2008-04-19 12:34:30