SRL Archive - SRL Suggestions

Bank.Scar Wait*Multi edits


NCDS

2011-01-10 16:05:53

Pertaining to this problem: http://villavu.com/forum/showthread.php?t=61385

All I did was convert all the OpenBank* functions to use Wait*Multi() and set all the waits to 1 second, instead of some being 2 seconds and some being 200ms..

Patch:

===================================================================
--- bank.scar (revision 681)
+++ bank.scar (working copy)
@@ -749,11 +749,11 @@
FreeBitmap(TheCounter);
Exit;
end;
- if WaitUpTextMulti(['ank', 'Bo', 'ot'], 300) then
+ if WaitUpTextMulti(['ank', 'Bo', 'ot'], 1000) then
begin
GetMousePos(dx, dy);
Mouse(dx, dy, 0, 0, False);
- if WaitOption('uickly', 300) then
+ if WaitOptionMulti(['uickly', 'uick', 'ickly', 'ckl'], 1000) then
begin
MarkTime(Mark2);
repeat
@@ -788,11 +788,11 @@
Exit;
end;
MMouse(dx, dy, 0, 0);
- if WaitUptextMulti(['ank', 'Bo', 'ot'], 300) then
+ if WaitUptextMulti(['ank', 'Bo', 'ot'], 1000) then
begin
GetMousePos(dx, dy);
Mouse(dx, dy, 0, 0, False);
- if WaitOption('uickly', 200) then
+ if WaitOptionMulti(['uickly', 'uick', 'ickly', 'ckl'], 1000) then
begin
MarkTime(Mark2);
repeat
@@ -876,10 +876,10 @@
if FindColorSpiralTolerance(OBC.x, OBC.y, Col, MSX1, MSY1, MSX2, MSY2, 10) then
begin
MMouse(OBC.x, OBC.y, 4, 4);
- if WaitUpTextMulti(['nk', 'bo', 'ot'], 300) then
+ if WaitUpTextMulti(['nk', 'bo', 'ot'], 1000) then
begin
Mouse(OBC.x, OBC.y, 0, 0, False);
- WaitOption('uickly', 300);
+ WaitOptionMulti(['uickly', 'uick', 'ickly', 'ckl'], 1000);
FFlag(0);
Wait(2000 + Random(500));
if (Length(Players) > 0) then
@@ -891,7 +891,7 @@
if FindObj(OBC.x, OBC.y, 'ank', 10070458, 20) then
begin
Mouse(OBC.x, OBC.y, 0, 0, False);
- WaitOption('uickly', 300);
+ WaitOptionMulti(['uickly', 'uick', 'ickly', 'ckl'], 1000);
FFlag(0);
Wait(2000 + Random(500));
if (Length(Players) > 0) then
@@ -1010,11 +1010,11 @@
begin

MMouse(Booths[i].X, Booths[i].Y, 3, 3);
- if WaitUpText('ooth', 1200) Then
+ if WaitUpTextMulti(['ooth', 'Bo', 'ot'], 1000) Then
begin
GetMousePos(Booths[i].X, Booths[i].Y);
Mouse(Booths[i].X, Booths[i].Y, 0, 0, False);
- if WaitOption('uickl', 2200) then
+ if WaitOptionMulti(['uickly', 'uick', 'ickly', 'ckl'], 1000) then
begin
FFLag(0);
MarkTime(c);
@@ -1053,7 +1053,7 @@
['anke', 'to B', 'Banker', 'nker'], 2, 2)) then
begin
Mouse(bx, by, 0, 0, False);
- WaitOption('ank B', 500);
+ WaitOptionMulti(['ank B', 'ank', 'nker'], 1000);
FFlag(0);
Wait(2000 + Random(500));
if (Length(Players) > 0) then
@@ -1229,4 +1229,4 @@
end else
Writeln('Could not find the deposit box');
end;
-end;
\ No newline at end of file
+end;

RISK

2011-01-10 16:09:29

I don't think the problem in that thread was with the wait times. I think it had to do with the graphical settings they were on (Not on safe mode) / Not using SMART in that case.

Nevertheless interesting, though.

NCDS

2011-01-10 16:12:19

From: RISK
I don't think the problem in that thread was with the wait times. I think it had to do with the graphical settings they were on (Not on safe mode) / Not using SMART in that case.

Nevertheless interesting, though.


The wait times was just to keep consistent, The Wait*Multi is the more important thing here.

Not a big thing by any means but we may as well use the resources we have. Also, he shouldn't have needed to use Reflection to successfully open the bank.

One more thing, I don't think the setting was his problem as if he wasn't using the proper settings, he wouldn't have loggedIn or even clicked the bank to begin with. AFAIK, SRL doesn't function properly on any other setting?

RISK

2011-01-10 16:24:25

I would believe that if a person is not using SMART, SRL will work OpenGL, at least. Maybe not well, but still.

They may have not been in safe mode for their RuneScape settings, which would explain the text recognition not working correctly when it tried to click the "Use-quickly" option. It has happened to me before to where I just stopped trying to use the normal RuneScape client and I just use SMART to do anything RuneScape related, lol.

From: NCDS

One more thing, I don't think the setting was his problem as if he wasn't using the proper settings, he wouldn't have loggedIn or even clicked the bank to begin with. AFAIK, SRL doesn't function properly on any other setting?

Wanted

2011-01-10 16:30:26

This is pretty trivial as I doubt this will ever effect anything. Though 300 ms might not compensate for rare lag, I'll commit this next time in a bundle with something

NCDS

2011-01-10 16:35:39

From: IceFire908
This is pretty trivial as I doubt this will ever effect anything. Though 300 ms might not compensate for rare lag, I'll commit this next time in a bundle with something


Yeah I know it, I wouldn't have bothered if it wasn't for that thread. Though, I've had a simple Wait* fail, then switched it to Wait*Multi and not seen the same things fail since. I always feel kinda stupid posting these small things, but like I said, may as well use the resources we have.

Thanks though.