Da 0wner
2009-02-05 20:45:59
Clicks an option in a message like the fletching message that says would you like to make 15 arrows, crossbow shaft etc. Returns true when the message is found. If the message is found but the option is not it returns false.
This is an example. Run it when the fletching menu is open.
function ClickMultiMessage(Option : string; Left : boolean; rx, ry : integer) : boolean;
var
x, y : integer;
begin
if FindText(x, y, lowercase(Option), NPCChars, MCX1, MCY1, MCX2, MCY2) then
begin
Mouse(x, y, rx, ry, left);
result := true;
end;
end;
This is an example. Run it when the fletching menu is open.
Program Example;
{.include SRL/SRL.scar}
var
x, y : integer;
function ClickMultiMessage(Option : string; Left : boolean; rx, ry : integer) : boolean;
var
x, y : integer;
begin
if FindText(x, y, lowercase(Option), NPCChars, MCX1, MCY1, MCX2, MCY2) then
begin
Mouse(x, y, rx, ry, left);
result := true;
end;
end;
Begin
SetupSRL;
WriteLn(BoolToStr(ClickMultiMessage('rro', false, 10, 10)));
End.