Wilio
2007-08-29 14:56:08
Here is a simple function I made(My first official function actually).
Result is true if the player is Default(bald, brown shirt, green pants)
Result is true if the player is Default(bald, brown shirt, green pants)
{*******************************************************************************
Function created by: Wilio.
Version: 1.6.1
Description: is he bald? wear a brown shirt and green pants?
*******************************************************************************}
function DefaultPlayer: Boolean;
var
x,y,x1,y1,dist:Integer;
matched: Boolean;
begin
//Open equip screen
wait(450 + random(200));
Mouse(676,184,6,6,true);
wait(1200 + random(400))
Mouse(602, 428,6,6,true);
wait(1200 + random(400))
Mouse(98, 86,6,6,true);
wait(400 + random(100));
Mouse(105, 178,6,6,true);
wait(400 + random(100));
Mouse(109, 211,6,6,true);
wait(1200 + random(400))
//Then check color
if(findcolortolerance(x,y,6984648,179,72,356,301,4)) //head
and (findcolortolerance(x1,y1,2245649,179,72,356,301,4)) //pants
then
begin
writeln('colors found');
dist:= y1 - y;
if(dist >= 90) then
begin
writeln('distance matched');
matched := true;
end
else
begin
writeln('distance not matched');
matched := false;
end;
end
if(matched = true)
and(findcolortolerance(x,y,2647153,179,72,356,301,4))
then
begin
result:= true
writeln ('Default player detected');
end
end;