ub3r |<1||3r*1337*
2006-05-14 13:43:01
Its all what you've people have been waiting for! A Perfect Gas finder! it checks for the ore you've made it look for, and it will look for it! Driger helped a lot with the function! Thanks driger!
Post any other bugs here!!
1 = Copper
2 = Tin
3 = Iron
thats all i have for now. Need more vids for the other ores.
[php]Function RunGas (Ore : Integer) : boolean;
var
ghx, ghy, color1, color2, color3:integer;
begin
case ore of
1 : begin
color1 := 7441057;
color2 := 8164779;
color3 := 7769505;
end;
2 : begin
color1 := 11185328;
color2 := 10857131;
color3 := 10001567;
end;
3 : begin
color1 := 9016474;
color2 := 8687006;
color3 := 6516605;
end;
end;
if(findcolortolerance(ghx, ghy, color1, MSX1, MSY1, MSX2, MSY2, 10)) and
(findcolortolerance(ghx, ghy, color2, MSX1, MSY1, MSX2, MSY2, 10)) and
(findcolortolerance(ghx, ghy, color3, MSX1, MSY1, MSX2, MSY2, 10)) then
begin
WriteLn('Gas Found! Running Away!')
SetRun(True);
RunAwayDirection('N');
RunBack;
end else
begin
ClearDebug;
WriteLn('No Gas was Found')
end;
end;[/php]
Post any other bugs here!!
1 = Copper
2 = Tin
3 = Iron
thats all i have for now. Need more vids for the other ores.
[php]Function RunGas (Ore : Integer) : boolean;
var
ghx, ghy, color1, color2, color3:integer;
begin
case ore of
1 : begin
color1 := 7441057;
color2 := 8164779;
color3 := 7769505;
end;
2 : begin
color1 := 11185328;
color2 := 10857131;
color3 := 10001567;
end;
3 : begin
color1 := 9016474;
color2 := 8687006;
color3 := 6516605;
end;
end;
if(findcolortolerance(ghx, ghy, color1, MSX1, MSY1, MSX2, MSY2, 10)) and
(findcolortolerance(ghx, ghy, color2, MSX1, MSY1, MSX2, MSY2, 10)) and
(findcolortolerance(ghx, ghy, color3, MSX1, MSY1, MSX2, MSY2, 10)) then
begin
WriteLn('Gas Found! Running Away!')
SetRun(True);
RunAwayDirection('N');
RunBack;
end else
begin
ClearDebug;
WriteLn('No Gas was Found')
end;
end;[/php]