SRL Archive - OSR Help

Banking Script Notion


m3gaman3g3nd

2012-01-07 20:05:14

I Have A Banking Procedure That I Made
Was Wondering If Anyone Can Help And Make It Run Smoother
Here It Is

Function IsDepositBoxOpen : Boolean ;
var
x , y : integer ;
begin
if not LoggedIn or InvEmpty or DepositScreen then
Exit ;
begin
if InvFull and GuyJustchilln then
begin
GetSymbolColor( x , y , 'bank' ) ;
SSMouse ( x + 14 , y , 5 , 5 , True ) ;
wait ( 2000 + Random ( 1000 ) ) ;
if FindObjTPA ( x , y , 8095630 , 10 , - 1 , 30 , 60 , 600 , [ 'deposit' ] ) or (*i use this for findind depot box cuz i can change/add color acrdingly*)
FindObjTPA ( x , y , 7964044 , 10 , - 1 , 30 , 60 , 600 , [ 'deposit' ] ) or
FindObjTPA ( x , y , 8226960 , 10 , - 1 , 30 , 60 , 600 , [ 'deposit' ] ) then
begin
SSMouse ( x , y , 5 , 5 , True ) ;
Result := True ;
end ;
end ;
end ;
end ;





procedure BankItems ;
var
SCMark , x , y : Integer ;
begin
if not LoggedIn or InvEmpty then
Exit ;
begin
if InvFull and WalkFinished then
begin
SCMark := DTMFromString('mWAAAAHicY2FgYBAGYiUg5gBiUSDmAWIxIGYHYhUgrq+qYrCxsmSIDg9naK2vZ5AEiiFjRjQMAgAKowW6');
if FindDTM ( SCMark , x , y , msx1 , msx1 , mscx , mscy ) then (*this dtm is a thing on left side of bank, for positioning is all*)
begin
IsDepositBoxOpen ;
Wait ( 3000 + Random ( 500 ) ) ;
if DepositScreen then
begin
DepositAll ;
end else
if FindObjTPA ( x , y , 8095630 , 10 , - 1 , 30 , 60 , 600 , [ 'deposit' ] ) or
FindObjTPA ( x , y , 7964044 , 10 , - 1 , 30 , 60 , 600 , [ 'deposit' ] ) or
findObjTPA ( x , y , 8226960 , 10 , - 1 , 30 , 60 , 600 , [ 'deposit' ] ) then
begin
SSMouse ( x , y , 5 , 5 , True ) ;
Wait ( 3000 + Random ( 500 ) ) ;
if DepositScreen then
begin
Wait ( 3000 + Random ( 500 ) ) ;
DepositAll ;
end ;
end ;
end ;
end ;
end ;
end ;

PatDuffy

2012-01-07 20:09:11

Why do you have it exit the function is the DepositeBox screen is up, without returning True for the function?

m3gaman3g3nd

2012-01-07 20:13:07

what it does is move my character in range to the deposit box and clicks on it. if the deposit box is already open then we should not need to call this function.

my script is very slow and it may have weird ways of functioning but it woks all except this part.

Andr01d721

2012-01-07 20:18:04

same here i cant get my bank.scar file compiled cause i keep getting this error:

if (FindTextTPA(4106994, 20, 20, 22, 400, 45, 'Bank', upchars, Nothing)) then

what do i do?