PDA

View Full Version : Custom Banking: Explained



NKN
04-20-2012, 01:37 AM
This tutorial is about -finding- the bank, because, in my opinion, the SRL ones are just too slow, and you have to put which bank, this just makes it easier on you.


Contents

What we're using
How to find the bank
How to use
Conclusion

What we're using

We'll be using AutoColorAid to find the colors.
The link can be found here. (http://villavu.com/forum/showthread.php?t=26944)
Alright. This is what how you need to set it up.
Go to Client -> Find RS
http://i49.tinypic.com/2d7iry9.png

After you clicked two, click on the booths, click about three different booths, about 7 - 10 times each in different places, to get a good reading. Click "Mark Best Color" and if mostly only those are colored red, you did it! If say, the ground is lit, redo it with less points.
This is my final picture:http://i39.tinypic.com/35mii61.png

The color: That's the color you'll be needed. The first and second number I circled, we'll get to that in a minute.

How to find the bank
You got your info on the Autocolor, time to put it into code.

function FindBankTeller(var x, y : Integer) : Boolean;
var
a : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
Box,SearchArea : TBox;
begin
if not LoggedIn then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03,0.78);
SearchArea := IntToBox((MSCX - 200),(MSCY - 100),(MSCX),(MSCY + 150));
SMART_DrawBoxEx(True,SearchArea,clPurple);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,2313821,MS CX -200,MSCY - 100 ,MSCX,MSCY + 150,9);
SortTPAFrom(TPA,point(MSCX,MSCY));
ATPA := TPAtoATPAEx(TPA,15,15);
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
Box := IntToBox((MP.x - 20),(MP.y - 20),(MP.x + 20),(MP.y + 20));
SMART_DrawBoxEx(False,Box,clYellow);
MMouse(MP.x,MP.y,4,4);
if(WaitUpText('ank',750))then
begin
While(InvCount > 15) do
begin
x := MP.x; y := MP.y;
Result := True
SMART_ClearCanvas;
Mouse(x,y,0,0,True);
WaitFunc(@BankScreen, 10 + Random(15), 10000);
Deposit(2,28,True);
Writeln('Depotsitied');
Ore := Ore+28
stats_IncVariable('Clay (Mined)',27);
stats_IncVariable('Total Exp Gained',140);
Antiban;
end;
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2,0.2);
end;

I'm not going to go over all of it, but I'll go over the parts you need to know.

SetColorSpeed2Modifyers: The first number should be the red circled number, and the second the green.

SearchArea: is defined as a Tbox, or three points. I used MSCX and MSCY to start the box, and them again to mark the end. The first two is the first corner of the box, the second is the last. MSCX/Y is Main Screen Center, then plus or minus X/y To make a box.

SMART_DrawBoxEx: This draws the box on screen do you know what you're looking at. Set the first variable to True if you want it to clear the screen, or false to keep it there. Second variable is the name of the Tbox, third is the color (cl"ColorName").

FindSpiralTolerance: You use MSCX,MSCY as the first two, then TPA, then the color, then where it searches, this is where painting the box comes in handy, so you know where it's looking. Those four that should usually be MSX1, MSY1,ect, should be the same thing you put in the box! The tolerance is off to the right of the AutoColorAid program(ACA). It's right under Main color. The - is not a minus sign, tolerance is always positive!

WaitFunc: This waits for the BankScreen, which is @BankScreen. It waits 10 seconds, checking every 10 milliseconds, plus random 15.

The rest you should be able to gauge what it does, and how to work it!


How to use it

You call it in a function like this if(-NameOfFunction-(x,y)) then //The (x,y) has to be after the name for it to work, that's where it saves the location to.
begin
//blah blah blah, remember, the banking is done IN the color finding function, so this is AFTERWARDS
end;
Conclusion
I hoped this helped, I know I didn't go that into detail, because I just recently learned how to use this correctly, so I was trying not to give any wrong information. If anything is wrong, please leave a post so I can fix it right away. For more detail on what these do, please refer to "Kyle Undefined"'s Your First Simple Script tutorial, he uses the same thing, but for a different reason.

Cheers, NKN

PatDuffy
04-20-2012, 01:44 AM
Just a little suggestion, it is much easier to read the Hue,Sat, Tolerance, and Best color from the little List under the selected Colors menu.

Also, you could modify the ATPA to remove points that don't have a certain number of color results, so you would get less false positives as your color-finding would be picking up some lines near the wall. I forget the function for it, but it has a fairly obvious name and can be found in the wizzyplugin file in the misc portion of the srl include.

NKN
04-20-2012, 01:46 AM
Thanks, I'll mess around with it, and see if I can get it to work first, before I do anything to this guide.

b_lone
04-21-2012, 12:07 AM
Will this work for deposit boxes?

NKN
04-21-2012, 12:23 AM
Sure, you just have to change a few things.

@BankScreen
Would need to be @DepositScreen

I don't know if the Deposit function works in Deposit box, or if it's something different.
Also, the Uptext needs to be changed.

b_lone
04-21-2012, 12:26 AM
Sure, you just have to change a few things.

@BankScreen
Would need to be @DepositScreen

I don't know if the Deposit function works in Deposit box, or if it's something different.
Also, the Uptext needs to be changed.

Ah, I see. I wanted to add banking to Living Caverns script. ):

NKN
04-21-2012, 12:30 AM
Oh!
That's easy!
I have one, this works perfectly for it.
Underneath the swinging platform, there is a little piece that sticks out, it's about five millimeters in size. It has pretty unique colors. Set the colors to that, and then put the box around the whole pulley!

b_lone
04-21-2012, 12:34 AM
Oh!
That's easy!
I have one, this works perfectly for it.
Underneath the swinging platform, there is a little piece that sticks out, it's about five millimeters in size. It has pretty unique colors. Set the colors to that, and then put the box around the whole pulley!

Thanks Bro. LOL but...I still think I got a long way! I haven't even written a script yet! :) Thanks though!

NKN
04-21-2012, 12:35 AM
No problem.

punkerpunk13
04-21-2012, 04:58 AM
I really actually enjoyed this. I have been looking for a guide just like this. I appreciate this.

Bookmarked. :)

NKN
04-25-2012, 01:57 AM
Thanks, really appreciate it when people take time to read and comment back.

Skywalk
05-09-2012, 08:58 PM
still a great guide thanks
i can use it for banking in my nature rune script :D

cadet54
05-29-2012, 07:37 PM
A nice method of banking thanks for the guidance :)

bishknight
06-06-2012, 12:51 PM
Would this also work for chests like castle wars and soul wars? If it does, what would you need to change? This helped me a lot making my first script, thanks :)

Olly
06-06-2012, 05:14 PM
Would this also work for chests like castle wars and soul wars? If it does, what would you need to change? This helped me a lot making my first script, thanks :)

Yes this guide would work for that but I recommend you save yourself some hassle and use the built in SRL functions for chests, they work very good :)

bishknight
06-06-2012, 06:10 PM
Yes this guide would work for that but I recommend you save yourself some hassle and use the built in SRL functions for chests, they work very good :)

Found it, thanks for the help :)

llovro
11-10-2012, 08:45 AM
uhm for some reason when I go to client<RS it says runescape client not found...

NKN
11-10-2012, 05:08 PM
uhm for some reason when I go to client<RS it says runescape client not found...

When SMART was updated, that no longer works.
Move SMART infront of your screen, put ACA in a corner, and click Load Desktop Image or W/E

mike-gee420
11-11-2012, 12:44 AM
Thanks its gonna help allot :)!

Pakyakkistan
02-19-2014, 12:16 AM
Enjoying your tutorials NKN, thanks to you I can now improve my script's banking procedure.