SRL Archive - News and General

Some help with banking??


Emotional

2012-04-22 19:46:46

hey im working on my first script, but can anyone help me with banking in Soul Wars and withdrawing? PM me, if someone can help me out with my first script, i can donate 1-2m RSGP thanking you for your time helping, ive been trying to do this for a few days now and its not getting in my head, thanks(:

tehq

2012-04-22 19:54:58

What exactly do you need help with? I don't want the gp

Emotional

2012-04-22 19:58:52

can i PM you ?

Brandon

2012-04-22 20:02:35


Function WaitAmount(Item, Amount, TimeToWait: Integer): Integer;
var
T, Count: integer;
begin
Count:= 0; Result:= 0;
T := (GetSystemTime + TimeToWait);
while (GetSystemTime < t) do
begin
Count:= ItemAmount('inv', 'dtm', Item, []);
if (Count >= Amount) then
begin
Result:= Count;
Break;
end;
Wait(50);
end;
end;

Function WithdrawDTM(Item, HowMany: Integer; ItemUptext: TStringArray): Boolean;
var
X, Y, T, ItemCount: Integer;
begin
if (Not BankScreen) then
Exit;

ItemCount:= ItemAmount('inv', 'dtm', Item, []);
if (WaitFindDTMEx(Item, X, Y, MBX1, MBY1, MBX2, MBY2, 50, 1500)) then
begin
MMouse(X, Y, 5, 5);
if (WaitUptextMulti(ItemUptext, 500)) then
begin
if (HowMany = 1) then
ClickMouse2(MOUSE_LEFT)
else
begin
ClickMouse2(MOUSE_RIGHT);
if WaitOptionMulti(['w-X', 'draw-X'], 600) then
begin
Wait(1000);
if (Not BankScreen) then
exit;
T:= GetSystemTime + 10000;
while (T >= GetSystemTime) and (not (InRange(CountColor(0, 250, 396, 307, 410), 155, 165))) do
Wait(50);
TypeSend(ToStr(HowMany - ItemCount));
end;
end;
end;
end;
Result:= (HowMany >= WaitAmount(Item, HowMany, 1000));
end;

Function BankSoulwars: Boolean;
var
Tries: Integer;
begin
Result := (LoggedIn and BankScreen);
if (Result) then
Exit;

if (Length(Players) > 0) then
if ((PinScreen) and (Players[CurrentPlayer].Pin <> '')) then
InPin(Players[CurrentPlayer].Pin);

while (Not OpenBankChest(SRL_BANK_SW)) do
begin
if (OpenBankChest(SRL_BANK_SW)) then
break;
Inc(Tries);
if (Tries > 5) then
Exit;
end;

if (Length(Players) > 0) then
if ((PinScreen) and (Players[CurrentPlayer].Pin <> '')) then
InPin(Players[CurrentPlayer].Pin);

Result := (BankScreen) or (PinScreen);
end;

Gucci

2012-04-22 20:04:13

For opening the chest use the OpenBankChest function then for withdrawing use the WithDraw(row, col, amount) function depositing can be DepositAll; or Deposit(InvRow, InvCol, Amount);. Should be everything you need for banking

Emotional

2012-04-22 20:06:48

wow, thanks guys! i love this community!