lordsaturn
2008-10-30 21:33:33
My function seems to exit after it gets to the line with ToCartOffset in it.
I don't understand?
program New;
{.include srl/srl.scar}
procedure MMClick(x, y, rR, rT: integer);
var
P: PPoint;
T: TPoint;
begin
if not rs_OnMinimap(x, y) then Exit;
P := ToPolarOffset(Point(x, y), Point(MMCX, MMCY));
case Random(2) of
0: P.r := P.r + Random(rR+1);
1: P.r := P.r - Random(rR+1);
end;
case Random(2) of
0: P.t := P.t + Random(rT+1);
1: P.t := P.t - Random(rT+1);
end;
writeln('1');
T := ToCartOffset(P, Point(MMCX, MMCY));
writeln('2');
Mouse(T.x, T.y, 0, 0, True);
end;
begin
setupsrl;
mmclick(670, 71, 5, 2);
end.
I don't understand?