Agh, why rely on Reflection for something as simple as object-finding?...
function openTheDoor()
Simba Code:
Function openTheDoor(): Boolean;
var
i : Integer;
begin
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
for i:=0 to 2 do
If findObjCustom(x, y, ['pen'], [2012657], 2) then
begin
Wait(randomRange(100, 250));
clickMouse2(Mouse_Left);
result := didRedclick;
if result then
Wait(RandomRange(3000, 4000));
break;
end;
case result of
True : Writeln('Found & clicked the door!');
False: Writeln('Failed to find the door.');
end;
end;
function climbTheStairs()
Simba Code:
Function climbTheStairs(): Boolean;
var
i : Integer;
begin
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
for i:=0 to 2 do
If findObjCustom(x, y, ['-up'], [5261641], 2) then
begin
Wait(randomRange(100, 250));
clickMouse2(Mouse_Left);
result := didRedclick;
if result then
Wait(RandomRange(3000, 4000));
break;
end;
case result of
True : Writeln('Found & clicked the stairs!');
False: Writeln('Failed to find the stairs.');
end;
end;
Come on you guys, use color for the easy stuff and use reflection as a last resort.