This is the function I made out of what you made.
Simba Code:
Function BankUptext:boolean;
var
s,uText:String;
begin
s := 'Bank chest';
uText := rs_GetUpTextAt(7,53);
if (s = uText) then
begin
writeLn('correct')
Result := True
end else
begin
Writeln('False');
Result := False
end;
This is how I'm calling it.
Simba Code:
Procedure Bank;
begin
Writeln('Time To Bank');
wait(randomrange(200, 300));
MMouse(259, 170, 2, 2);
wait(randomrange(200, 500));
if BankUptext = True then
begin
wait(randomrange(1500, 2000));
Mouse(583, 277, 2, 2, Mouse_right);
Chooseoption('ll')
wait(randomrange(400, 500));
Mouse(102, 159, 2, 2, Mouse_right);
wait(randomrange(300, 400));
Chooseoption('ll');
wait(randomrange(200, 400));
Mouse(490, 84, 2, 2, 1);
wait(randomrange(400, 600));
Fletched := Fletched + 28
end else
Bank
end;
And in my debug I got this
Code:
New window: 4326166
Compiled successfully in 640 ms.
SRL Compiled in 16 msec
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
False
Time To Bank
Successfully executed.
It only executed because I manually stopped it. I'm assuming the uptext has to match exactly what I entered? If so, its not much of a deal, Ill just have to click on the chest where it wont hover over people aswell.
E: @Pure, thats what I suspected. How would I go about using that function? My knowledge on functions is very limited, the function I made 2 minutes ago was the first I've ever made. Using Sins function wont work. It would mean I'm clicking on the same Y value +/- 1 every time.