GREEN GIANT
2013-07-16 13:50:01
Hello everyone,
I have been making good progress using simple functions and procedures to pathwalk, open doors teleport etc but now that i'm trying to implement failsafes and loops i'm failing terribly.
The script below should find the function 'CastleDoorColor' and then check for the uptext 'oor' and then check for the option 'wait' before clicking on x,y. Although the script compiles and runs it does not check for uptext or option and simply clicks the door ignoring my if and then loops. Can anyone point out my faults?
Procedure FindDoorClick;
var
x, y: integer;
begin
if (FindColorSpiral(x, y, CastleDoorColor, 193, 9, 342, 337)) then
MMouse(x, y, 0, 0);
if isuptext('oor') and
WaitOption('pen', 500) then
writeln('woot');
ClickMouse(x, y, 1);
end;
I have been making good progress using simple functions and procedures to pathwalk, open doors teleport etc but now that i'm trying to implement failsafes and loops i'm failing terribly.
The script below should find the function 'CastleDoorColor' and then check for the uptext 'oor' and then check for the option 'wait' before clicking on x,y. Although the script compiles and runs it does not check for uptext or option and simply clicks the door ignoring my if and then loops. Can anyone point out my faults?
Procedure FindDoorClick;
var
x, y: integer;
begin
if (FindColorSpiral(x, y, CastleDoorColor, 193, 9, 342, 337)) then
MMouse(x, y, 0, 0);
if isuptext('oor') and
WaitOption('pen', 500) then
writeln('woot');
ClickMouse(x, y, 1);
end;