SRL Archive - OSR Help

Finding Bank Chests


ForgotMyName

2010-03-02 15:34:05

Can someone please explain how to reliably bank using a chest? Thanks.

Mr. Doctor

2010-03-02 15:41:12

From: ForgotMyName
Can someone please explain how to reliably bank using a chest? Thanks.


AutoColor and MM or TPAs would be your best bet. I use AC and MM to search for the Deposit Box in my script, works fine. Try getting a distinct color, also.

Bionicle

2010-03-02 15:46:16

You can use a find color procedure.
Here is something I would do that someone at your current level could get your head around I think..
Function OpenChest: Boolean;

Var
BankTime, X, Y: Integer;

Begin
MarkTime(BankTime); //marking the time under the integer BankTime. It will start counting up in milliseconds. this is used as a failsafe
Repeat
FindColorTolerance(X, Y, *****, MSX1, MSY1, MSX2, MSY2, 5); //find a unique color on the chest and add the color number into the *****
MMouse(X, Y, 4, 4);
If WaitUpText('pen', 500) Then //if the chest is closed, it will open it
Begin
Mouse(X, Y, 0, 0, true);
Wait(500+Random(500));
Continue;
End;
If WaitUpText('lose', 500) Then //if the chest is open, it will right click it...
Begin
Mouse(X, Y, 0, 0, false);
WaitOption('ank', 500); //...and choose the bank option.
Wait(500+Random(500));
Result := true;
End;
Until((BankTime > 30000) Or (Result = true)); //this ensures that if opening the bank takes longer then 30 seconds (something is probably wrong) it will stop trying
End;

This is not tested, I just wrote it up now, i don't know if the uptext or the option of the chest is right, it wouldn't be to hard to change though :p any questions you may have of anything I said, don't be afraid to ask :) from what i have seen or your scripting abilities from joining yesterday, you seem very promising :)
Good luck!

ForgotMyName

2010-03-02 15:52:54

Thanks for the responses.

They've littered the area with similarly colored rocks, crates, landscape, and even bits of npcs and such, possibly because they anticipated this purpose. I'm not sure there is a consistently unique color to the bank chest.

Right now I'm doing something color based with FindObjCustom and IsUpText, and it works most of the time. I guess my options are either find something consistent or put in error recovery to my current method.

I tried to use a DTM earlier. I have no idea if I was doing it wrong or if the DTM was an unreliable one, but I couldn't get any matches.

If anyone has a chest banking procedure, I'd appreciate seeing it.

Bionicle

2010-03-02 15:54:49

From: ForgotMyName
Thanks for the responses.

They've littered the area with similarly colored rocks, crates, landscape, and even bits of npcs and such, possibly because they anticipated this purpose. I'm not sure there is a consistently unique color to the bank chest.

Right now I'm doing something color based with FindObjCustom and IsUpText, and it works most of the time. I guess my options are either find something consistent or put in error recovery to my current method.

I tried to use a DTM earlier. I have no idea if I was doing it wrong or if the DTM was an unreliable one, but I couldn't get any matches.

If anyone has a chest banking procedure, I'd appreciate seeing it.


Yea, DTMs wouldn't work in this case.
Are you sure that there is not even one singular pixel that is a random color within the chest that you could use? Even one pixel could work ;)

Where is the chest? Lumby basement? I could look into it if you'd like..

ForgotMyName

2010-03-02 16:28:14

I'm rather interested in chests in general. They seem like they'd be easy banks to use.

Right now, I'm messing around with the Soul Wars bank. It has a color that sorta works, but sometimes the script goes wonky and starts chasing rocks and mountains and Nomad's head.

Bionicle

2010-03-02 16:30:23

From: ForgotMyName
I'm rather interested in chests in general. They seem like they'd be easy banks to use.

Right now, I'm messing around with the Soul Wars bank. It has a color that sorta works, but sometimes the script goes wonky and starts chasing rocks and mountains and Nomad's head.


Chasing mountains…that's silly…
It has the same layout as the Lumbridge chest though, right? I don't have members, so i can't check out that one..

ForgotMyName

2010-03-02 17:05:53

It's a lot simpler. Just a chest and a left click option to Bank. And a ton of nearby similar colors.

Bionicle

2010-03-02 17:06:30

From: ForgotMyName
It's a lot simpler. Just a chest and a left click option to Bank. And a ton of nearby similar colors.


Don't you have to open it if it is closed?

mormonman

2010-03-02 17:09:04

From: bionicle1800
Don't you have to open it if it is closed?


Not in soulwars.

ForgotMyName

2010-03-02 17:48:17

There's a tendency to obscure some bits the chest by standing in front of it. One of the promising colors from earlier gets messed up that way.

Bionicle

2010-03-02 17:52:51

From: ForgotMyName
There's a tendency to obscure some bits the chest by standing in front of it. One of the promising colors from earlier gets messed up that way.


How about adjusting the camera angle? can it be revealed that way?

ForgotMyName

2010-03-02 18:18:34

The sides are even more camouflaged than the front. At least the front has a small solid patch, but that gets blocked a lot.

i luffs yeww

2010-03-02 18:30:15

For a Castle Wars EP/Alcher I made, I just used the trim around the chest. I think Soul Wars has something similar, but if not, I can help you later when I get home from work. :)

Bionicle

2010-03-02 18:36:12

You have no moving in your script rite?
How about something like this:
Function OpenChest: Boolean;

Var
BankTime: Integer;

Begin
Repeat
FindColorTolerance(X, Y, *******, MSCX, MSCY+40, MSCX+70, MSCY-40, 5);
MMouse(X, Y, 4, 4);
If WaitUpText('ank', 500) Then
Begin
Mouse(X, Y, 0, 0, true);
Result := true;
End;
Until((BankTime > 30000) or (Result = true));
End;

This way, it limits the huge mount of chance of not finding the chest. The measurements are not tested, however :p

marpis

2010-03-03 08:47:51

FindObjTPA, look into SRL/Objects.scar

Coh3n

2010-03-04 17:51:20

You could also just use ColorToleranceSpeed 2 or 3 if you're picking up other colors that way it'll be much more accurate. This could easily be done if you learned TPAs. There are plenty of awesome tutorials around for you to learn from. It's not a hard concept to grasp. :)