Dos anyone have a non reflection gas finding function?
Dos anyone have a non reflection gas finding function?
http://www.youtube.com/user/YoHoJoSRL
Good scripting guides on youtube
Formerly known as (djcheater)
i could make u one if u could upload some pics
thanks pics of gas?
http://www.youtube.com/user/YoHoJoSRL
Good scripting guides on youtube
Formerly known as (djcheater)
ye pm me im going out make when i get back round 9:00-10:00
make sure u get right detail as well just get whole main screen
(MSX1, MSY1, MSX2, MSY2)
thanks man..
http://www.youtube.com/user/YoHoJoSRL
Good scripting guides on youtube
Formerly known as (djcheater)
SCAR Code:{*******************************************************************************
function FindGas(gx, gy: Integer): Boolean;
By: Nielsie95 and Sumilion
Description: gx, gy are the coordinates of the found ore color
*******************************************************************************}
function FindGas(gx, gy: Integer): Boolean;
var
arP: TPointArray;
c: TIntegerArray;
i, l, t, m, r, g, b, x, y: Integer;
Bounds: TBox;
P: TPoint;
begin
if not InRange(gx, MSX1, MSX2) or not InRange(gy, MSY1, MSY2) then
Exit;
ColorToleranceSpeed(2);
t := 0;
m := 0;
SetColorspeed2Modifiers(0.13, 0.77);
if not FindColorTolerance(x, y, 10070706, gx - 30, gy - 30, gx + 30, gy + 30, 9) then
begin
ColorToleranceSpeed(1);
SetColorspeed2Modifiers(0.2, 0.2);
Exit;
end;
FindColorsTolerance(arP, 5335923, 3, 3, 515, 336, 6);
while True do
begin
if (Length(arP) < 3) then Break;
Bounds := GetTPABounds(arP);
SetColorspeed2Modifiers(0.1, 0.4);
FindColorsTolerance(arP, 7244690, Max(Bounds.x1 - 15, 0), Max(Bounds.y1 - 15, 0), Min(Bounds.x2 + 15, 515), Min(Bounds.y2 + 35, 336), 20);
if (Length(arP) < 65) then Break;
c := GetColors(arP);
l := High(c);
for i := 0 to l do
begin
ColorToRGB(c[i], r, g, b);
m := m + r + g + b;
end;
m := (m / (l + 1)) / 3;
for i := 0 to l do
begin
ColorToRGB(c[i], r, g, b);
r := iAbs(m - (r + b + g) / 3);
if (r < 15) then
Inc(t);
end;
Result := ((t / l * 1.0) < 0.85) and (Extended(t / l * 1.0) > 0.15);
if Result then
begin
P := MiddleTPA(arP);
Result := (Distance(P.x, P.y, MSCX, MSCY) < 80);
end;
Break;
end;
ColorToleranceSpeed(1);
SetColorspeed2Modifiers(0.2, 0.2);
end;
You should already have it. It is in includes/srl/srl/skill/mining.scar
i only asked as i was told that wasnt working very well!
http://www.youtube.com/user/YoHoJoSRL
Good scripting guides on youtube
Formerly known as (djcheater)
It doesn't work that well.
Use Wizzups:
SCAR Code:function GasFinder(GX, GY : Integer): Boolean; //Thanks Wizzup!
Var
x1, y1, x2, y2, I, time, c: Integer;
R, G, B: Integer;
H, S, L: ExtEnded;
X, Y, Z: ExtEnded;
Gas, Gas2: TPointArray;
Colors, C2: TIntegerArray;
begin
Try
x1 := gx - 35;
If x1 < 0 Then
x1 := 0;
y1 := gy - 35;
If y1 < 0 Then
y1 := 0;
x2 := gx + 35;
If x2 > 515 Then
x2 := 515;
y2 := gy + 35;
If y2 > 336 Then
y2 := 336;
Time := GetSystemTime;
Result := False;
c := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2ModIfiers(0.2, 0.2);
FindColorsTolerance(Gas, 8886170, x1, y1, x2, y2, 20);
ColorToleranceSpeed(c);
If length(Gas) < 10 Then
Exit;
Colors := GetColors(Gas);
C2 := Colors;
ClearSameIntegers(C2);
// writeln('Colors Length: ' + inttostr(length(colors)));
// writeln('C2 Length: ' + inttostr(length(C2)));
If Length(C2) < 40 Then
Exit;
For I := 0 To High(Gas) Do
Begin
ColorToRGB(Colors[I], R, G, B);
If Abs(R - G) <= 10.0 Then
Begin
ColorToHSL(Colors[I], H, S, L);
If (H > 11.5) And (H < 16.0) And (S < 12.0) Then
Begin
ColorToXYZ(Colors[I], X, Y, Z);
If (Abs(X - Y) < 5.0) And (Abs(X - Z) < 5.0) And (Abs(Y - Z) < 5.0) Then
Begin
SetLength(Gas2, Length(Gas2) + 1);
Gas2[High(Gas2)] := Gas[I];
End;
End;
End;
End;
//WriteLn('time: ' + IntToStr(GetSystemTime - Time));
//WriteLn('gas2 length: ' + IntToStr(Length(Gas2)));
Result := (Length(Gas2) > 30); // The only number you might want to tweak.
//debugtpa(Gas2, '');
if result then
begin
SaveScreenshot(ScriptPath + 'Found WIZZUP gas ' + TimeRunning + '.bmp')
Exit;
end;
//debugtpa(gas2, '');
Except WriteLn('No window selected'); end;
End;
here this is the one i made with the pics posted has Not been tested!!!
SCAR Code:Function FindColRecGas(X, Y : Integer) : Boolean;
Var
ColorRecord : TAutoColorInfo;
Begin
With ColorRecord Do
Begin
MinCount := 50;
Color := 6850196;
HueMod := 0.08;
SatMod := 0.71;
LumTol := 10;
MinR := 126; MaxR := 167;
MinG := 110; MaxG := 156;
MinB := 76; MaxB := 140;
MinX := 15.76; MaxX := 31.10;
MinY := 16.40; MaxY := 32.90;
MinZ := 9.34; MaxZ := 29.15;
End;
Result := FindColorRecordEx(x, y, ColorRecord, MSX1, MSY1, MSX2, MSY2, True);
End;
There are currently 1 users browsing this thread. (0 members and 1 guests)