Gushers
2012-01-02 03:51:07
Okay so I need help with opening two doors that are right by each other. There are three doors that are the exact same.
I only need it to open two of them, when the two doors are closed the script works fine, but when the first one is opened it messes up and continues on with the rest of the script.
I have it to open the first door, run closer to the second, and open the second one. Please help.
Here's the doors that I need it to open:
Here's my code:
I only need it to open two of them, when the two doors are closed the script works fine, but when the first one is opened it messes up and continues on with the rest of the script.
I have it to open the first door, run closer to the second, and open the second one. Please help.
Here's the doors that I need it to open:
Here's my code:procedure OpenTheDoors;
var
X, Y: Integer;
begin
MakeCompass('N');
SetAngle(true);
If FindObj(x,y,'Open',2770782,5) then
Begin
StatsGuise('Opening Door...');
ClickMouse2(True);
if not DidRedClick then //If we missed, then exit so we can try again (maybe use a label here?)
exit;
While IsMoving do
Wait(1);
end else
if FindObj(x,y,'Close',2770782,5) then //The door is already open, so let's exit
Exit;
Wait(3000);
Mouse(622, 102, 0, 0, true);
Wait(3000);
begin
If FindObj(x,y,'Open',2770782,5) then
Begin
StatsGuise('Opening Door...');
ClickMouse2(True);
if not DidRedClick then //If we missed, then exit so we can try again (maybe use a label here?)
exit;
While IsMoving do
Wait(1);
end else
if FindObj(x,y,'Close',2770782,5) then //The door is already open, so let's exit
Exit;
end;
end;
