SRL Archive - SRL Archives

New Banking Procedure


pwnaz0r

2007-02-22 20:32:46

Thanks to Boreas For Helping Me fix this

Well guys I was going to make this but I keep getting the error "Variable expected in line 1 of script" and i haven't forgotten to declare a var. Nyways this is what I have. I mainly made this because so many scripts have trouble finding the bank. No1 has ever thought to use the bank deposit box.



{*****************************************************
procedure BankDepositBox(Bx,By,Color1,Color2,Color3 : integer);
By : Pwnaz0r
Description : Finds Bank using deposit box so not to have pin or banking problems;
*****************************************************}
procedure BankDepositBox(Bx, BY, Color1, Color2, Color3 : integer);
var
BDBX, BDBY, BSBX1, BSBX2, BSBY1, BSBY2, MMSCX, MMSCY : integer;
BtmpBox1 : Tbox;
begin

MMSCX := BX;
MMSCY := BY;

If (FindColorFromCentre(BDBX, BDBY, MMSCX, MMSCY, Color1, 100, 15))or
(FindColorFromCentre(BDBX, BDBY, MMSCX, MMSCY, Color2, 100, 15))or
(FindColorFromCentre(BDBX, BDBY, MMSCX, MMSCY, Color3, 100, 15))then
begin
wait(10);
MMouse(BDBX,BDBY,1,1);
If(IsUpTextMulti('Deposit','eposit','ox'))then
begin
Mouse(BDBX,BDBY,0,0,false);
ChooseOption(x,y,'eposi')
end;
If not(IsUpTextMulti('Deposit','eposit','ox'))then
begin

GetMousePos(x,y);
BSBX1 := x-15;
BSBX2 := x+15;
BSBY1 := y-15;
BSBY2 := y+15;

BtmpBox1 := cBox2(BSBX1,BSBY1,BSBX2,BSBy2);

If (FindColorSkipBoxTolerance(BDBX, BDBY, Color1, 10, 10, MSX2, MSY2, 15, BtmpBox1 ))or
(FindColorSkipBoxTolerance(BDBX, BDBY, Color2, 10, 10, MSX2, MSY2, 15, BtmpBox1 ))or
(FindColorSkipBoxTolerance(BDBX, BDBY, Color3, 10, 10, MSX2, MSY2, 15, BtmpBox1 ))then
begin
wait(10);
MMouse(BDBX,BDBY,1,1);
If(IsUpTextMulti('Deposit','eposit','ox'))then
begin
Mouse(BDBX,BDBY,0,0,false);
If(ChooseOption(x,y,'eposi'))then
begin
Exit;
end
end
If not(IsUpTextMulti('Deposit','eposit','ox'))then
begin
Writeln('Couldnt Find Deposit Box');
end;
end;
end;
end;
end;

Heres a color finding function. Really easy but I thought it would/might be helpful for auto updating the positions of colors;


{*****************************************************
function FindColorFromMouse(Color, radius : integer) : boolean;
By : Pwnaz0r
Description : Finds Color from the mouse;
*****************************************************}
function FindColorFromMouse(Color, radius : integer) : boolean;
var
aax, aay : integer;
begin
GetMousePos(aax,aay);
MMouse(-15,0,6,0);//To get mouse away from what you are looking for
If(FindColorFromCentre(aax,aay,aax,aay,color,radius, 15))then
result := true;
else
result := false;
end;

^ Dnt know if that will compile im at school right now

Boreas

2007-02-22 21:59:26

procedure BankDepositBox(Color1, Color2, Color3 : integer);
var
BDBX, BDBY, BSBX1, BSBX2, BSBY1, BSBY2, MMSCX, MMSCY : integer;
BtmpBox1 : Tbox;
begin
MMSCX := 260;
MMSCY := 137;
If (FindColorFromCentre(BDBX, BDBY, MMSCX, MMSCY, Color1, 100, 15))or
(FindColorFromCentre(BDBX, BDBY, MMSCX, MMSCY, Color2, 100, 15))or
(FindColorFromCentre(BDBX, BDBY, MMSCX, MMSCY, Color3, 100, 15))then
begin
wait(10);
MMouse(BDBX,BDBY,1,1);
If(IsUpTextMulti('Deposit','eposit','ox'))then
begin
Mouse(BDBX,BDBY,0,0,false);
ChooseOption(x,y,'eposi')
end;
If not(IsUpTextMulti('Deposit','eposit','ox'))then
begin
GetMousePos(x,y);
BSBX1 := x-15;
BSBX2 := x+15;
BSBY1 := y-15;
BSBY2 := y+15;
BtmpBox1 := cBox2(BSBX1,BSBY1,BSBX2,BSBy2);
If ((FindColorSkipBoxTolerance(BDBX, BDBY, Color1, 10, 10, MSX2, MSY2, 15, BtmpBox1 ))or
(FindColorSkipBoxTolerance(BDBX, BDBY, Color2, 10, 10, MSX2, MSY2, 15, BtmpBox1 ))or
(FindColorSkipBoxTolerance(BDBX, BDBY, Color3, 10, 10, MSX2, MSY2, 15, BtmpBox1 )))then
begin
wait(10);
MMouse(BDBX,BDBY,1,1);
If(IsUpTextMulti('Deposit','eposit','ox'))then
begin
Mouse(BDBX,BDBY,0,0,false);
If(ChooseOption(x,y,'eposi'))then
begin
Exit;
end;
end;
If not(IsUpTextMulti('Deposit','eposit','ox'))then
begin
Writeln('Couldnt Find Deposit Box');
end;
end;
end;
end;
end;

pwnaz0r

2007-02-22 22:28:40

:P Well I had already fixed it be4 he posted that but thx nyways

EDIT: Updated Top Post

syberium

2007-02-24 02:44:37

pwnaz0r=l33t :) nice function hopefully some1 will put these to good use

pwnaz0r

2007-02-25 04:21:21

Well thanks Syberium :)