SRL Archive - SRL Bugs

InvCount or DepositAll bug, I'm not sure..


jimthesoundman

2010-02-01 14:48:35

I was testing a new script last night. Ran fine for over four hours, no problems at all.

Woke up this morning and decided to make sure Scar and SRL were all up to date so I Tortoise'd them both to make sure they were up to date.

Now I'm having a wierd issue with a snippet of code that was running flawlessly last night.

It is part of a banking procedure:


if (PinScreen then
InPin(IntToStr(PinNumber));
until BankScreen;
FindNormalRandoms;
if InvCount>0 then
begin
DepositAll;
wait(1000+random(1000));
end;

So, last night it worked find.
Today, what it's doing is:after the bankscreen opens up, the mouse is moving to about 656,187 and hovering around over where the inventory tab would be. But since the bankscreen is already open, there is no tab there. It just hovers there and moves around a bit, but it doesn't click or anything.
I've tried commenting out the FindNormalRandoms to see if that was causing it. Didn't change anything.
Then I tried to comment out the DepositAll line and substitute a blindclick at 397,307 but that didn't change anything either.
Then I tried to substitute a FindColorTolerance for the InvCount>0 to see if that was causing it, but it didn't change anything either.

Next I figured maybe somehow my SCAR or SRL got corrupted so I downloaded both of them from scratch and reinstalled them. Still no change.

So I'm stumped.

Anyone have any ideas?

Bionicle

2010-02-01 15:12:20

From: jimthesoundman
I was testing a new script last night. Ran fine for over four hours, no problems at all.

Woke up this morning and decided to make sure Scar and SRL were all up to date so I Tortoise'd them both to make sure they were up to date.

Now I'm having a wierd issue with a snippet of code that was running flawlessly last night.

It is part of a banking procedure:


if (PinScreen then
InPin(IntToStr(PinNumber));
until BankScreen;
FindNormalRandoms;
if InvCount>0 then
begin
DepositAll;
wait(1000+random(1000));
end;

So, last night it worked find.
Today, what it's doing is:after the bankscreen opens up, the mouse is moving to about 656,187 and hovering around over where the inventory tab would be. But since the bankscreen is already open, there is no tab there. It just hovers there and moves around a bit, but it doesn't click or anything.
I've tried commenting out the FindNormalRandoms to see if that was causing it. Didn't change anything.
Then I tried to comment out the DepositAll line and substitute a blindclick at 397,307 but that didn't change anything either.
Then I tried to substitute a FindColorTolerance for the InvCount>0 to see if that was causing it, but it didn't change anything either.

Next I figured maybe somehow my SCAR or SRL got corrupted so I downloaded both of them from scratch and reinstalled them. Still no change.

So I'm stumped.

Anyone have any ideas?


Hmm…I'm getting the same bug with the script I'm working on, I'm not sure if it's clicking or not, because it is already on the inventory tab.

alucard123

2010-02-01 15:25:57

ive got some problem since this morning too :S with banking part it was working fine yesterday…. mmouseitem problem, mayb updates

Nava2

2010-02-01 18:26:29

Its probably checking for inventory randoms..

Take out the FindNormalRandoms from that spot and it should work. :)

Bionicle

2010-02-01 18:32:33

From: Nava2
Its probably checking for inventory randoms..

Take out the FindNormalRandoms from that spot and it should work. :)


i have all the FindNormalRandoms edited out of the script for its testing stage, as it needs a declareplayers section to compile, which i dont have atm. That's not it :(

jimmy_mac

2010-02-01 18:50:28

From: jimthesoundman

if (PinScreen then
InPin(IntToStr(PinNumber));
until BankScreen;
FindNormalRandoms;
if InvCount>0 then
begin
DepositAll;
wait(1000+random(1000));
end;


Try this:
repeat
if PinScreen then InPin(IntToStr(PinNumber));
until BankScreen;
FindNormalRandoms;
if InvCount>0 then
begin
DepositAll;
wait(1000+random(1000));
end;

jimthesoundman

2010-02-01 19:03:16

That was a typo in my post, not in my script.

The original was:


procedure Banking;
begin
ClickNorth(true);
repeat
if not OpenBankNPC then
if not OpenBank('lb',false,false) then
if not FindBank('lb') then
if not OpenBankGlass('lb', false, false) then
OpenBankFast('lb');
if (PinScreen) then
InPin(IntToStr(PinNumber));
until BankScreen;
FindNormalRandoms;
if InvCount>0 then
begin
DepositAll;
wait(1000+random(1000));
end;
mouse(53,107,10,10,false); //Rightclick on flax
getmousepos(xx,yy);
wait(500+random(500));
mouse(xx,yy+103+random(2),30,0,true); //Left click on withdraw all
wait(500+random(500));
CloseBank;
end;

but I'll try your version just to see what happens. Thanks!

EDIT: Nope, doesn't work any better than before, but now it hovers at a different spot 716,482 near where the music menu tab would be. I have no idea what is going on here.

WhiteShadow

2010-02-01 19:13:51

Yeah I get the same thing too.
I think there's something wrong with InvFull, InvCount, > ExistsItem > GameTab()

I'm too sleepy right now to figure out exactly what :redface:

EDIT: Runescape updated?

Bionicle

2010-02-01 19:16:56

From: WhiteShadow
Yeah I get the same thing too.
I think there's something wrong with InvFull, InvCount, > ExistsItem > GameTab()

I'm too sleepy right now to figure out exactly what :redface:


Hmm…that gives me an idea…
It might be InvFull, because out of those four things, thats the only thing i use in my script.
Ill take it out and use
If FindBlackChatMessage('Your inventory is too full to hold any more logs.') Then
Begin
Writeln('Inventory is full.');
Exit;
End;
Will get back to you :p

E: oo i gave it away that its a wcer ^.^ meh w/e thats only a part of it ;)

E: it worked, but now im sad, as i found out my chop detection method dosn't work

Timer

2010-02-01 19:24:23

Hahaha.. fail. I already updated my SRL manually. :)

Bionicle

2010-02-01 19:26:50

From: Timer
Hahaha.. fail. I already updated my SRL manually. :)


Command | Update
Completed | At revision: 360


I have the latest revision =.=

Nava2

2010-02-01 19:44:43

Its BankScreen.

Thats why its messing up. I think BankScreen is broken, its the only way that it would mess up. BankScreen must be returning true.

Bionicle

2010-02-01 19:46:26

From: Nava2
Its BankScreen.

Thats why its messing up. I think BankScreen is broken, its the only way that it would mess up. BankScreen must be returning true.


I fixed one of the things that was messing up a lot of the functions:
http://www.villavu.com/forum/showthread.php?t=54662
GameTab and Inventory functions are fixed with this AFAIK