Well actually, I guess its not a gate but rather a hole in a fence.
This is what I am trying to find/go through:

As you can see, that part of the fence has an ID of 19171.
I made a procedure to go through this:
SCAR Code:
procedure OpenGate;
var
P : TPoint;
begin
if FindObjectEx(P, 19171, 8) then
begin
P := TileToMSEx(Tile(2522.0,3375.5), 15);
MMouse(P.x, P.y, 2, 2);
wait(100);
if IsUpText('queeze') then
begin
GetMousePos(P.x, P.y);
Mouse(P.x, P.y, 0, 0, True);
Wait(RandomRange(300, 500));
end;
end;
Wait(750+Random(250));
end;
I wasn't sure if the tile part was right, so I also tried chaning that line to just:
Neither one worked, so I tried just finding the object id and the object id of the surrounding fence to make sure I had the right IDs:
SCAR Code:
procedure OpenGate;
var
P : TPoint;
begin
if FindObjectEx(P, 19171, 10) then
begin
writeln('found gate');
end;
if FindObjectEx(P, 997, 10) then
begin
writeln('found fence');
end;
end;
To my dismay, only found fence is appearing in the debug box. Any ideas?