SRL Archive - Reflection Development

updated banking procedures


traveler

2010-12-02 12:09:03

i updated some of the banking procedures to support the update of not having the Deposit-All when there is only one item in your inventory.

{*******************************************************************************
Function R_DepositAll: Boolean;
By: Camero, Updated by: Traveler
Description: Deposits the whole inventory either by
-Fast clicks the button
-Fast = false deposits each item
*******************************************************************************}
procedure R_DepositAll(Fast: Boolean);
var
I, Fs, MT: Integer;
begin
if not R_BankScreen then
Exit;

if(fast)then
DepositAll
else
for I := 1 to 28 do
begin
MarkTime(MT);
while (R_ItemExists(I) and (TimeFromMark(mt) < 6000)) do
begin
MouseItem(I, False);
Wait(40 + random(40));
if (OptionExists('All')) then
begin
R_ChooseOption('All');
end
else
begin
R_ChooseOption('Deposit');
end;
MarkTime(FS);
while (R_ItemExists(I) and (TimeFromMark(FS) < 2500)) do
Wait(44 + random(44));
end;
end;

end;

{*******************************************************************************
function R_DepositAllID(ID : Integer): Boolean;
By: Zyt3x, updated by: Traveler
Description: Deposits all the items with the specified ID
*******************************************************************************}
function R_DepositAllID(ID : Integer): Boolean;
begin
if(R_CountItemID(ID) = 1) then
Result := R_ClickItemID(ID, false, 'Deposit')
else
Result := R_ClickItemID(ID,False, 'All');
end;

{*******************************************************************************
procedure R_DepositAllButIDEx(IDs : TIntegerArray);
By: Zyt3x, updated by Traveler9559
Description: Deposits all items but the items with one of the specified IDs to
the bank.
*******************************************************************************}
procedure R_DepositAllButIDEx(IDs : TIntegerArray);
var
I, T : Integer;
Item : TInvItem;
begin
if not R_BankScreen then
Exit;
for I := 1 to 28 do
begin
Item := GetInvItemAt(I);
if(InIntArray(IDs, Item.ID))then Continue;
if(not R_ItemExists(I)) then Continue;
MouseItem(I, False);
if(OptionExists('All')) then
R_ChooseOption('All')
else
R_ChooseOption('Deposit');
T := GetSystemTime;
while(R_ItemExists(I)) and (GetSystemTime-T<6000) do
wait(100+random(100));
end;
end;

Bad Boy JH

2010-12-02 21:24:39

really? thats pretty crap…

What about something more to the order of….

function R_DepositAll: Boolean;(Fast: Boolean);
var
I, Fs, MT: Integer;
begin
if not R_BankScreen then
Exit;

if fast then
Result := DepositAll
else
for I := 1 to 28 do
begin
MarkTime(MT);
while R_ItemExists(I) and (TimeFromMark(mt) < 6000) do
begin
if R_CountItemID(GetItemIDAT(I)) = 0 then
MouseItem(I, True) else
begin
MouseItem(I, False);
R_ChooseOption('All');
end;
while (R_ItemExists(I) and (TimeFromMark(FS) < 2500)) do
Wait(44 + random(44));
if R_ItemExists(I) then
Exit;
end;
end;
Result := True;
end;

function R_DepositAllID(ID : Integer): Boolean;
begin
if(R_CountItemID(ID) = 1) then
Result := R_ClickItemID(ID, false, 'Deposit')
else
Result := R_ClickItemID(ID,False, 'All');
end;

function R_DepositAllButIDEx(IDs : TIntegerArray): Boolean;
var
I, T : Integer;
Item : TInvItem;
begin
if not R_BankScreen then
Exit;
for I := 1 to 28 do
begin
Item := GetInvItemAt(I);
if InIntArray(IDs, Item.ID) then
Continue;
if not R_ItemExists(I) then
Continue;
if (R_CountItemID(GetItemIDAt(I)) = 1) then
MouseItem(I, True) else
begin
MouseItem(I, False);
R_ChooseOption('All');
end;
T := GetSystemTime;
while(R_ItemExists(I)) and (GetSystemTime-T<6000) do
wait(100+random(100));
if R_ItemExists(I) then
Exit;
end;
Result := True;
end;

I made R_DepositAllButIDEx and R_DepositAll functions rather than procedures, and then made a check to see if there was more than 1 of that item, and if only 1 it left clicked, otherwise right clicked and deposited all…

Cstrike

2010-12-02 21:29:34

As soon as randoms get figured out (aka Prison and Arnav) I will be looking and adding both your procedures to reflection if it goes well

Bad Boy JH

2010-12-03 01:22:18

goddamn cstrike, stop changing your avatar, I don't read names, i look at avatars…its slightly confusing…

Cstrike

2010-12-03 13:31:15

From: Bad Boy JH
goddamn cstrike, stop changing your avatar, I don't read names, i look at avatars…its slightly confusing…


Only changed it 2x xD
What if I had no avatar?

Daedolon

2010-12-03 14:35:52

Cstrike's avatar clearly insinuates subtle trolling. The facial expression of the avatar only begins to describe the pleasure he takes watching someone rage.

Bad Boy JH

2010-12-03 19:55:01

most of the important people (developers) have avatars, I may need one at some point…

Cstrike

2010-12-03 20:09:07

From: Daedolon
Cstrike's avatar clearly insinuates subtle trolling. The facial expression of the avatar only begins to describe the pleasure he takes watching someone rage.

:spot:

I am evil after all.