Doofy
2007-06-26 16:52:35
Stores everything from your inventory into bank except any axes. For use in WoodCutting obviously.
{*********************************************************************
function ExistsInIntArray(number : integer; intarray : Array of integer) : boolean;
By: The_Rs_Monkey
Checks to see if a number exists in an array of integer.
*********************************************************************}
function ExistsInIntArray(number : integer; intarray : Array of integer) : boolean;
var
e : integer;
begin
for e := 0 to GetArrayLength(intarray) - 1 do
begin
if intarray[e] = number then
begin
Result := True;
Exit;
end;
end;
end;
{*********************************************************************
procedure DepositAllButTheseDTM(item : array of integer);
By: The_Rs_Monkey
Usage: DepositAllButThese([bmp1, bmp2, bmp3, bmp4]);
Deposits everything in the inventory except these item (represents by an array of DTMs);
*********************************************************************}
procedure DepositAllButTheseDTM(item : array of integer);
var
Spots : Array Of Integer;
e, i, q, Mx, My : integer;
begin
GameTab(4);
if GetArrayLength(item) = 0 then Exit;
for e := 0 to 6 do
begin
for i := 0 to 3 do
begin
Mx := (561 + (i * 43));
My := (208 + (e * 37));
for q := 0 to GetArrayLength(item) - 1 do
begin
if (FindDTM(item[q], x, y, Mx, My, Mx + 40, My + 35)) then
begin
SetArrayLength(Spots, GetArrayLength(Spots) + 1);
Spots[GetArrayLength(Spots) - 1] := e * 4 + i + 1;
Break;
end;
end;
end;
end;
for i := 1 to 28 do
begin
if Not ExistsInIntArray(i, Spots) then
if ExistsItem(i) then
Deposit(i, i, 2);
end;
end;
{*******************************************************************************
procedure DepositAllButAxes;
By: Doofy
Description: Deposits everything in inventory except any axes, using
The_Rs_Monkey's DepositAllButTheseDTM and the DTM's from SRL/SRL/skill/
WoodCutting.
*******************************************************************************}
procedure DepositAllButAxes;
var
Axes: Array [0..5] of Integer;
begin
if (not(LoggedIn)) or (not(BankScreen)) then
begin
Exit;
end;
Axes[0]:= DTMFromString('78DA639CCEC4C0F09401051485F1318800694' +
'620FE0F048C4B806AEEA2AA718E4864E082AA0101C6C54035F751' +
'D5D887C6A1AA590A547313558D4B740A8A1A00CFA10E03'); //rune
Axes[1]:= DTMFromString('78DA6374606060686440014D497C0C22409A1' +
'188FF0301A337905187AAC6C6D786810BAA0604187D804415AA1A' +
'7B7F7B5435BE40A21C558D73B0338A1A00C1660AA8'); //addy
Axes[2]:= DTMFromString('78DA633CC4C4C010C0C8800C5A53F81852803' +
'448F43F10309E05AAF14155636111CCC0055503028CE7816A5C51' +
'D5D839C4A2AA3981A9C6C52D0D450D0061FC0C64'); //mith
Axes[3]:= DTMFromString('78DA63CC636260D8C3C8800C5A53F81852803' +
'448F43F10305602D5EC4055939B9ACAC0055503028CD540351B51' +
'D594E5E5A2AA29C154D3545989A20600C3BC0E32'); //steel
Axes[4]:= DTMFromString('78DA63BCC9C4C0309191010498182020C6859' +
'34103488344FF0301E353A04C2F230332F0707161E082AA0101C6' +
'0740356DA86A22838351D5BC00AAE94655932ACA89AAE639A6394' +
'1DEDE286A00B1F90F6D'); //iron
Axes[5]:= DTMFromString('78DA63EC626060086140016DA97C0C22409A1' +
'188FF0301E33420C307558D97A5220317540D08304E051201A86A' +
'DCCCE451D54C07129EA86AFC6C5450D40000D77E0AA2'); //bronze
DepositAllButTheseDTM(Axes);
end;