Hey guys, I just spent like an hour making a WithdrawPick procedure. It turned out SUPER successful. It will withdraw a new pick within the first 2 seconds of opening the bank anywhere in the first screen so far. Its really nice IMO. One problem is its pretty FAT and I was wondering if there are shorter ways of doing this. It looks like a jumble to look at. I tested it a whole lot.
SCAR Code:
{*******************************************************************************
procedure WithdrawPick;
By: The[Cheese]
Description: Will look in bank down each row for a DTM of a pickaxe. It will
withdraw the first one it comes to.
*******************************************************************************}
function WithdrawPick: boolean;
var
i1, i2, i3: integer;
BY1, BY2, BX1, BX2: integer;
PickDTM: integer;
begin
PickDTM := DTMFromString('78DA63E4666060E0614001060A6C0CAC409A1' +
'188FF0301A31090C1C48006189148202D0524B809A86123C21C66' +
'202149843904D4000068A204FC');
i3 := 0;
BY1 := 60;
BY2 := 97;
for i2 := 1 to 6 do
begin
if(i2 > 1)then
begin
BY1 := BY1 + 37;
BY2 := BY2 + 37;
end;
BX1 := 71;
BX2 := 118;
for i1 := 1 to 8 do
begin
if(i1 > 1)then
begin
BX1 := BX1 + 37;
BX2 := BX2 + 37;
end;
if(FindDTM(PickDTM, x, y, BX1, BY1, BX2, BY2))then
begin
Writeln('Withdrawing pick.');
Mouse(x, y, 8, 8, true);
wait(1000);
if(FindDTM(PickDTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Result := True;
Writeln('Withdrew Pick in row ' + inttostr(i2) + ' at column ' + inttostr(i1));
FreeDTM(BankDTM);
Exit;
end;
end;
end;
end;
Writeln('Could not withdraw pickaxe.');
Result := False;
FreeDTM(BankDTM);
end;