SRL Archive - RS3 Help

Is this a bug?


lanadekat

2014-11-18 01:56:17

Everytime I let my bot run overnight I find It back like this:

I tried pausing the script walking away, but it just teleports back to the bank ( it's supposed to do that ) and stand there moving over the boxes.
stopping the script and starting it again fixes the problem.
here's the code it get's stuck at:

 procedure Bank();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
bankTimer: TTimeMarker;
InBank : Tbox;
begin
banktimer.start();
if (bankTimer.getTime() > 120000) and not bankScreen.isOpen() then TeleportToBank();
mainscreen.findObject(x, y, 7771300, 11, ['ank'], MOUSE_LEFT);
if (not bankScreen.isOpen(8000)) then
begin
if(tabBackpack.count() = 28) then
begin
Bank;
end;
end;
bankScreen.deposit([2],[-1]);
bankScreen.close;
tabBackpack.waitWhileLocked;
exit;
Inc(bankfailcount);
if (bankfailcount < 4) then
begin
Bank;
end;
end;

Clarity

2014-11-18 02:27:19


procedure Bank();
var
x, y, i: integer;
TPA: TPointArray; //Unused variable
ATPA: T2DPointArray; //Unused variable
bankTimer: TTimeMarker;
InBank: Tbox; //Unused variable
begin
banktimer.start();
if (bankTimer.getTime() > 120000) and not bankScreen.isOpen() then
TeleportToBank();
mainscreen.findObject(x, y, 7771300, 11, ['ank'], MOUSE_LEFT);
if (not bankScreen.isOpen(8000)) then
begin
if (tabBackpack.count() = 28) then
begin
Bank;
end;
end;
bankScreen.deposit([2], [ - 1]);
bankScreen.close;
tabBackpack.waitWhileLocked;
exit;
Inc(bankfailcount);
if (bankfailcount < 4) then
begin
Bank;
end;
end;

If mainscreen.findObject fails, it will then wait 8 seconds to confirm whether bankscreen.isOpen. Since that will also fail, it will exit the function without increasing fail count because this code…

Inc(bankfailcount);
if (bankfailcount < 4) then
begin
Bank;
end;
end;
…will never occur since you have exit; before it. So whatever failsafe you intended with that failcount will never happen.

It also seems like your colors are a bit inaccurate if the color search for the bank results in those boxes all over the place.

Calling a function within itself can be confusing unless you truly want to start the entire section of code again. Try using things like attempts instead and having everything laid out clearly in the single function so you can better see the order of events.


var
attempts: integer;

while attempts < 5 do
begin
doStuff;
if weFailed then
begin
inc(attempts);
writeln('We failed!');
continue;
end;
end;

cosmasjdz

2014-11-18 02:46:46

Also if treasure hunter chest is on the screen at certain locations bankscreen.isopen() fails.

The Mayor

2014-11-18 02:51:37

post your whole script pls

lanadekat

2014-11-18 03:26:00

got it working :)
Let's run it for a few hours. The thing causing the problem was:
It tried "bankScreen.deposit([2],[-1]);" before the bankscreen was open, adding a pause fixed that ( well I hope it did )

Ashaman88

2014-11-18 08:52:16

Does bankscreen.open(NPCGREY not work?

lanadekat

2014-11-19 04:46:15

From: Ashaman88
Does bankscreen.open(NPCGREY not work?


Never liked bankscreen.open(NPC_TYPE) cus sometimes ( for me ) it didn't work.
Seems to work fine now on Blue bankers in varock west bank.
Might give it a try.

edit: doesn't work
picture:
http://i.imgur.com/Qd7V87w.png

Clarity

2014-11-19 06:23:38

From: lanadekat
Never liked bankscreen.open(NPC_TYPE) cus sometimes ( for me ) it didn't work.
Seems to work fine now on Blue bankers in varock west bank.
Might give it a try.

edit: doesn't work
picture:
http://i.imgur.com/Qd7V87w.png


Might want to hide your RSN.

lanadekat

2014-11-19 11:00:01

From: Clarity
Might want to hide your RSN.


oops :duh:
I'm just gonna leave it, that isn't any prove I'm botting. That could be a normal runescape and someone photoshoped the overlay and the smart window. That pricture is no prove I'm botting.
And if they ban me, I don't care about the account.

Clarity

2014-11-19 11:04:20

From: lanadekat
oops :duh:
I'm just gonna leave it, that isn't any prove I'm botting. That could be a normal runescape and someone photoshoped the overlay and the smart window. That pricture is no prove I'm botting.
And if they ban me, I don't care about the account.


I mean, I just think it's generally a good idea not to broadcast one's RSNs, and they are pretty easy to edit out. But if you don't care, you don't care :)

Ashaman88

2014-11-19 11:08:37

From: lanadekat
Never liked bankscreen.open(NPC_TYPE) cus sometimes ( for me ) it didn't work.
Seems to work fine now on Blue bankers in varock west bank.
Might give it a try.

edit: doesn't work
]


Man that stinks. For banks that don't work you should make a bug report (see big bug button at the top of the forums). I don't usually use very many banks on a regular basis and I don't regularly test them all so we need as many bug reporters as we can get! :)

lanadekat

2014-11-19 12:18:27

From: Ashaman88
Man that stinks. For banks that don't work you should make a bug report (see big bug button at the top of the forums). I don't usually use very many banks on a regular basis and I don't regularly test them all so we need as many bug reporters as we can get! :)


I'll try running your herblore script on that bank, It could be a problem with my script.
and I'll create a bug report if it doesn't work