SRL Archive - Bugs

Banking At Lummy Error


Yago

2011-02-25 23:46:35

I found a bug where you can't bank at lumbridge… Not really a bug, but it can be fixed in SRL with a check uptext failsafe.

So, I run R_OpenBankBook('lb')

Say theres like 20 people in front of the bank booth in Lumbridge. You cant open the bank cause the script is searching for option use quicklky, but there are 20 people in front of the booth so It would find something liek in the picture below:

… Can a mod or someone fix this image link? …. Its invisible unless u edit the post…

Link of the image : http://img199.imageshack.us/i/bankprob.jpg/

Edit : — Image attached.

Image explaination: The script opens the bank using use quickly option but as you can see the option is not present in the picture

BTW, FYI, W.e.:
And My Compass is north and might angle is at highest for all those who are wondering. Also, I find It can easily be fixed by again adding an uptext failsafe and i guess it would be useful for all banks not just lummy.

Right now since im too lazy to do that i just changed the co-ord for lummby bank in srl. And I was pondering that if ur lazy to then just do the same or use R_makecompass(any direction except north);

If You want I can attempt a fix

But enough of that… Im no pro scripter(new to this stuff) but heres my attempted fix …


Replace This Part Of R_OpenBankBooth:

P := TileToMS(Tiles[0], 10);
MMouse(p.x - 5, p.y - 5, 11, 11);
Wait(RandomRange(200, 300));
if IsUpTextMultiCustom(['ank', 'ooth']) then
begin
GetMousePos(P.x, P.y);
Mouse(P.x, P.y, 0, 0, false);
Wait(RandomRange(80, 110));
P.x := 0;
if R_ChooseOptionMulti(['Use-quickly']) then
repeat
R_Flag;
Wait(RandomRange(50, 90));
Inc(Tries);
if (Length(Players) > 0) then
if Players[CurrentPlayer].Pin <> '' then
Result := InPin(Players[CurrentPlayer].Pin);
Result := R_BankScreen or R_PinScreen;
until Result or (Tries > 40);
end;

With …:


P := TileToMS(Tiles[0], 10);
MMouse(p.x - 5, p.y - 5, 11, 11);
Wait(RandomRange(200, 300));
if IsUpTextMultiCustom(['ank', 'ooth']) then
begin
GetMousePos(P.x, P.y);
Mouse(P.x, P.y, 0, 0, false);
Wait(RandomRange(80, 110));
P.x := 0;
// couldnt find anything in reflection to help sry had to go to ChooseOptionMultiEx
if ChooseOptionMultiEx(['ank', 'ooth'], 'all', Move) // ud porbably have to set move as variable that is a fnct_ActionOptions
Begin
if R_ChooseOptionMulti(['Use-quickly']) then
repeat
R_Flag;
Wait(RandomRange(50, 90));
Inc(Tries);
if (Length(Players) > 0) then
if Players[CurrentPlayer].Pin <> '' then
Result := InPin(Players[CurrentPlayer].Pin);
Result := R_BankScreen or R_PinScreen;
until Result or (Tries > 40);
end
else
Begin
if R_ChooseOptionMulti(['Use-quickly']) then
repeat
R_Flag;
Wait(RandomRange(50, 90));
Inc(Tries);
if (Length(Players) > 0) then
if Players[CurrentPlayer].Pin <> '' then
Result := InPin(Players[CurrentPlayer].Pin);
Result := R_BankScreen or R_PinScreen;
until Result or (Tries > 40);
end

Explanation:

What is does … hopefully… havent tried it out it just all concept and thinking …

What it does is check if there is a bank booth option then it moves over it and does not click and if so then it chooses usequickly from the popup menu
and if there is no bank booth option then it just runs normally… hence the else.

Again im new to this… just made my first script 3 days ago so dont kill me if im wrong !!! please and thanks. Ill be of any help

Echo_

2011-02-26 09:55:07

The problem your having would be an issue with Reflection, not SRL. All Reflection functions are preceded by R_. Reflection bugs are posted in this section:
http://villavu.com/forum/forumdisplay.php?f=341

Yago

2011-02-26 12:18:21

Ok. Can I have a Mod or Someone move this to that section please?

Nava2

2011-02-26 15:08:40

Moved at OP's request.

Train

2011-02-26 15:57:16

R_ChooseOptionSpecial. -.0

Yago

2011-02-26 16:04:48

From: Train
R_ChooseOptionSpecial. -.0


What Do You Mean?

Anyways Do You see my point? It fails to open the bank …

Nava2

2011-02-26 16:50:54

I think he means that R_ChooseOptionSpecial tackles this issue.

Yago

2011-02-26 17:08:54

I dont think it does from the description.

Heres the problem again:

When There are more than 6 - 7 People in front of the bank booth, the bank option stacks up on top of their names… Therefore you would have to move your mouse over(But Not Click) the option "Bank Booth" that pops up which you can see in the picture that I attached. Then A sub popup-menu would come up and You would choose Use quickly option …

Problem: What I believe the problem is, judging on the code I saw from R_OpenBankBooth is that R_OpenBankBooth simply looks for the option "use quickly". But in the picture I attached, you can clearly see that use quickly is not present. Again, you would have to hover over the bank booth option in the picture in order for use quickly to appear. And therefore since it cant find use quickly R_Openbankbooth returns false and doesnt open the bank booth.

Proposal:
You can see my replacement. It isnt at all accurate. Its just my raw outline of how it should be taclked(my mind thinking how the function should run). What It Does is looks for the bank booth option… Hovers Over It(Not Clicks It) … Then Chooses use quickly. If the bank booth option is not present then it acts normal.

Get What Im saying?

KingKong

2011-02-26 21:23:28

From: Echo_
The problem your having would be an issue with Reflection, not SRL. All Reflection functions are preceded by R_. Reflection bugs are posted in this section:
http://villavu.com/forum/forumdisplay.php?f=341


Not all reflection functions are preceded by an 'R_', but the ones that are preceded by 'R_' are reflection functions.

Train

2011-02-26 21:24:29

From: KingKong
Not all reflection functions are preceded by an 'R_', but the ones that are preceded by 'R_' are reflection functions.


They all SHOULD be, but they aren't.
—
Make your own bank function. Use r_ChooseOptionSpecial.

Yago

2011-02-26 21:27:26

Yeah but the problem is that R_chooseoptionspecial clicks on the option (according to description). The fix would need to hover over it.

Train

2011-02-26 21:28:35

From: yago
Yeah but the problem is that R_chooseoptionspecial clicks on the option (according to description). The fix would need to hover over it.


……
it moves the mouse to the sub menu, over the the menu, and clicks the proper place.. l2read the code the function uses.

Yago

2011-02-26 21:31:23

K. Thanks :) Ill recheck it. Anyways It would be good if someone updated the reflection banking function though

Train

2011-02-26 21:33:53

From: yago
K. Thanks :) Ill recheck it. Anyways It would be good if someone updated the reflection banking function though


The function isn't foolproof yet. It can't be used consistently.

Yago

2011-02-26 21:35:55

K. What I might do instead of taking madd time creatigng a banking function is change my lumbridge bank tpoint move it up a bit so i can bank without interference. Either that or change my compass direction to anything besides north…

Oh cool that function is made by you.

Train

2011-02-26 21:41:34

What you could do is have a tpoint.
Point(0, -5).
Say your bank point is (345, 364).
menu is not tabbed, bank, exit;
-=-
the menu is tabbed –
Add the points together, your new bank point is (345, 359).
check again, re loop, add it, new point is (345, 354).
check again, until menu is not tabbed or you changed 30 pixels..
^

in theory that would work, but you would want to rotate the point depending on your compass. so (0, -5) might become (2, -2) to replicate the same movement as (0, -5) since your compass is at a different angle.

Yago

2011-02-26 22:33:06

Yeah that would work. But if you rotate say like south theres nobody in the way(but the banker) so you wouldnt really need to do the tpoint. You could also rotate east and west for better results but youd look a bit more bot-like for rotating everytime.

Train

2011-02-26 23:20:46

From: yago
Yeah that would work. But if you rotate say like south theres nobody in the way(but the banker) so you wouldnt really need to do the tpoint. You could also rotate east and west for better results but youd look a bit more bot-like for rotating everytime.


exactly.