Yakman
04-05-2007, 12:51 PM
ever since the chicken suits come out, if found the number of false positives of gas have risen dramatically,
i was watching my script for a bit last night, almost every time the script tries to mine something, it detects some gas, and tries to avoid it
the problem: my character is wearing a chicken suit
the most used method for checking gas is Piv's GasCheck
the way that works is, first it looks for a color, then uses canvases to check for movement
look at this line
if (FindColorTolerance(xG, yG, 8296866, gx - 20, gy - 20, gx + 20, gy + 20, 20)) then
begin
thats the first line, which checks for a color
if found that the color, 8296866, with tolerance 20, also appears on the chicken suit
iv used scar to highlight every pixel of that color in blue,
http://img329.imageshack.us/img329/7792/chickensuitgasfl1.png
as you can see, there are quite a few pixels of that color on the chicken suit,
this causes pivs gas check to check for movement, which it normally finds because you're always moving about
my advice is dont wear the chicken suit while mining,
or go into SRL\SRL\Skill\Mining.scar, to GasCheck and change the color it searches for.
heres the scar script i used for making the above screenshot
program New;
var
gx,gy:integer;
Canvas:TCanvas;
bmp:integer;
Points:TPointArray;
ClientHandle:integer;
f:integer;
begin
Bmp:=bitmapfromstring(40,40,'');
Canvas:= GetBitmapCanvas(bmp);
ClientHandle:= GetClientWindowHandle;
repeat
GetMousePos(gx,gy);
CopyCanvas(GetClientCanvas,Canvas,gx-20,gy-20,gx+20,gy+20,0,0,40,40);
SetTargetBitmap(bmp);
FindColorsTolerance(Points,8296866,0,0,40,40,20);
if(GetArrayLength(Points) > 0)then
writeln('found '+inttostr(random(9999)));
for f:=0 to GetArrayLength(Points)-1 do
Canvas.pixels[Points[f].x,Points[f].y] := clBlue;
DisplayDebugImgWindow(120,120);
CopyCanvas(Canvas,GetDebugCanvas,0,0,40,40,0,0,120 ,120);
SetClientWindowHandle(ClientHandle);
wait(300);
until(IsFkeydown(2));
end.
i was watching my script for a bit last night, almost every time the script tries to mine something, it detects some gas, and tries to avoid it
the problem: my character is wearing a chicken suit
the most used method for checking gas is Piv's GasCheck
the way that works is, first it looks for a color, then uses canvases to check for movement
look at this line
if (FindColorTolerance(xG, yG, 8296866, gx - 20, gy - 20, gx + 20, gy + 20, 20)) then
begin
thats the first line, which checks for a color
if found that the color, 8296866, with tolerance 20, also appears on the chicken suit
iv used scar to highlight every pixel of that color in blue,
http://img329.imageshack.us/img329/7792/chickensuitgasfl1.png
as you can see, there are quite a few pixels of that color on the chicken suit,
this causes pivs gas check to check for movement, which it normally finds because you're always moving about
my advice is dont wear the chicken suit while mining,
or go into SRL\SRL\Skill\Mining.scar, to GasCheck and change the color it searches for.
heres the scar script i used for making the above screenshot
program New;
var
gx,gy:integer;
Canvas:TCanvas;
bmp:integer;
Points:TPointArray;
ClientHandle:integer;
f:integer;
begin
Bmp:=bitmapfromstring(40,40,'');
Canvas:= GetBitmapCanvas(bmp);
ClientHandle:= GetClientWindowHandle;
repeat
GetMousePos(gx,gy);
CopyCanvas(GetClientCanvas,Canvas,gx-20,gy-20,gx+20,gy+20,0,0,40,40);
SetTargetBitmap(bmp);
FindColorsTolerance(Points,8296866,0,0,40,40,20);
if(GetArrayLength(Points) > 0)then
writeln('found '+inttostr(random(9999)));
for f:=0 to GetArrayLength(Points)-1 do
Canvas.pixels[Points[f].x,Points[f].y] := clBlue;
DisplayDebugImgWindow(120,120);
CopyCanvas(Canvas,GetDebugCanvas,0,0,40,40,0,0,120 ,120);
SetClientWindowHandle(ClientHandle);
wait(300);
until(IsFkeydown(2));
end.