Idk...Just started really messing with it today. First function I've made along the lines of this. Criticism accepted.
SCAR Code:
function FindDBank : boolean;
var
DBankCol: array of integer;
x, y, DBankCols, Started, Count: integer;
Result1: boolean;
begin
repeat
MakeCompass('W');
Inc(Count);
until(Count=5);
SetArrayLength(DBankCol, 9);
DBankCol := [4871001, 2049368, 7566199, 5598072, 3421240, 5462111, 2247776, 5461592, 3422267];
MarkTime(Started);
repeat
for DBankCols := 0 to 8 do
if FindColorSpiralTolerance(x, y, DBankCol[DBankCols], MSCX-200, MSCY-200, MSCX+200, MSCY+200, 15) then
Result1 := True;
until(Result1);
MMouse(x, y, 2, 2);
Wait(100);
if IsUpText('ank booth') then
Mouse(x, y, 1, 1, False);
ChooseOption('uickly');
if BankScreen then
Result := True;
WriteLn('Found in: ' + IntToStr(TimeFromMark(Started)) + ' msec.');
end;
Also, tell me what I can improve on.
Usage:
SCAR Code:
if FindDBank then
Withdraw(1, 1, 5);
Requirements: Be standing in front or very close to one of the bank booths.