SRL Archive - Help and Support

Function help


BobboHobbo

2009-10-08 13:01:39

I made a procedure to right click the x,y and choose the option provided by the text in the parm. But for some reason it isnt recognising it.

For example im using it as finding the item in bank, it right clicks it, the menu shows up with the withdraw- but the script just hovers as if i set the Waitoption wrong.

function MouseOption(var qx, qy: integer; amount: string): boolean;
begin
if not (LoggedInFailSafe) then exit;
Result := true;
Mouse(qx, qy, 5, 5, false);
if not WaitOption('aw-'+amount, 250) then
if WaitOption('aw-X', 500) then
if WaitColor(215, 399, 0, 1, 4500) then
TypeSend(Amount);
if not WaitInvMinCount(1, 1500) then
Result := false;
end;

It just hovers off, like it doesn't recognise the aw-X?

rogeruk

2009-10-08 14:50:43

Edit:

function MouseOption(var qx, qy: integer; amount: string): boolean;
begin
Result := true;
Mouse(qx, qy, 5, 5, false);
If(WaitOption('-'+amount, 200))Then Exit;
Mouse(qx, qy, 5, 5, false);
WaitOption('-X', 300);
if WaitColor(215, 399, 0, 1, 4500) then
TypeSend(Amount);
if not WaitInvMinCount(1, 1500) then
Result := false;
end;

The mouse moves off the menu if it cant find the first option, so it cant find the second cause its not there. If you re-click it will work.

BobboHobbo

2009-10-08 17:00:00

Oh never knew that, thanks!