Gu3st...
2010-05-29 06:06:29
I just quickly made some procedures and functions for you guys
Bank.simba:
Iventory.simba:
EDIT: Some more:
core.simba:
More Bank.simba:
Bank.simba:
{*******************************************************************************
function R_DepositAllID(ID : Integer): Boolean;
By: Zyt3x
Description: Deposits all the items with the specified ID
*******************************************************************************}
function R_DepositAllID(ID : Integer): Boolean;
begin
Result := R_ClickItemID(ID, false, 'All');
end;
{*******************************************************************************
procedure R_DepositItemsButIDEx(IDs : TIntegerArray);
By: Zyt3x
Description: Deposits all items but the items with one of the specified IDs to the bank.
*******************************************************************************}
procedure R_DepositItemsButIDEx(IDs : TIntegerArray);
var
I : Integer;
Item : TInvItem;
begin
for I := 1 to 28 do
begin
Item := GetInvItemAt(I);
if(InIntArray(IDs, Item.ID))then Continue;
R_ClickItem(I, False, 'eposit');
end;
end;
{*******************************************************************************
procedure R_DepositItemsButID(ID : Integer);
By: Zyt3x
Description: Deposits all items but the items with the specified ID to the bank.
*******************************************************************************}
procedure R_DepositItemsButID(ID : Integer);
begin
R_DepositItemsButIDEx([ID]);
end;
{*******************************************************************************
function R_DepositAll: Boolean;
By: Zyt3x
Description: Deposits all items to bank.
*******************************************************************************}
function R_DepositAll: Boolean;
begin
DepositAll;
Result := R_InvEmpty;
end;Iventory.simba:
{*******************************************************************************
function R_InvEmpty : Boolean;
By: Zyt3x
Description: Results true if the inventory is empty
*******************************************************************************}
function R_InvEmpty : Boolean;
begin
Result := R_InvCount = 0;
end;
{*******************************************************************************
function R_InvFull : Boolean;
By: Zyt3x
Description: Results true if the inventory is full
*******************************************************************************}
function R_InvFull : Boolean;
begin
Result := R_InvCount = 28;
end;EDIT: Some more:
core.simba:
{*******************************************************************
Function LoginIndex: Integer;
By: Zyt3x
Description: Uses the LoginIndex hook.
2 = Logged Out, 4 = Logging Into Lobby, 6 = Lobbby,
8 = logging into game, 9 = Logged In. Reaches 10 at
some points, but with no significance.
********************************************************************}
function LoginIndex : Integer;
begin
Result := SmartGetFieldInt(0, hook_static_LoginIndex);
end;
{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Uses LoginIndex to see if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := LoginIndex = 9;
end;
{*******************************************************************
function R_InLobby : Boolean;
By: Zyt3x
Description: Uses LoginIndex to see if you're in lobby.
********************************************************************}
function R_InLobby : Boolean;
begin
Result := LoginIndex = 6;
end;More Bank.simba:
{*******************************************************************************
procedure R_DepositItem(Slot: integer);
By: Zyt3x
Description: Deposits the item at the slot.
*******************************************************************************}
procedure R_DepositItem(Slot: integer);
var
mt, t: integer;
begin
MarkTime(mt);
while(R_ItemExists(slot) and (TimeFromMark(mt) < 5000))do
begin
MouseItem(slot, false);
R_ChooseOption('eposit');
MarkTime(t);
while(R_ItemExists(slot) and (TimeFromMark(t) < 1500))do
wait(25+Random(25));
end;
end;
{*******************************************************************************
function R_DepositAllID(ID : Integer): Boolean;
By: Zyt3x
Description: Deposits all the items with the specified ID
*******************************************************************************}
function R_DepositAllID(ID : Integer): Boolean;
begin
Result := R_ClickItemID(ID, false, 'All');
end;
{*******************************************************************************
procedure R_DepositAllItemsName(Name: String);
By: Zyt3x
Description: Deposits all the items with the specified Name
*******************************************************************************}
procedure R_DepositAllItemsName(Name: String);
var
i: integer;
item: TInvItem;
begin
for i := 1 to 28 do
begin
item := GetInvItemAt(i);
if(lowercase(item.Name) = lowercase(Name))then
R_DepositItem(i);
end;
end;