Sir R. M8gic1an
2008-06-06 18:48:05
well, the latest fashion is to turn all DTMs into TPAs so here it is ;)
i can't do lumbridge bank cus there's only one banker
didn't do vwb yet cus there's two lines of bankers which means more work
didn't do ge cus didn't have time.
i'll probably do ge tomorrow, i'll see about vwb,
enjoy :D
~RM
//by Rasta Magician
//Note: missing -> lb, vwb, ge from f2p
//didn't include OpenBankFast, but who cares for now >.>
procedure FindBankTPA(name:string);
var
TPA:TPointArray;
ATPA: T2DPointArray;
TP: TPoint;
TempCTS, i, rx, ry, ExtraAngle:integer;
begin
TempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00, 0.13);
try
if not (FindColorsTolerance(TPA, 125931, MMX1, MMY1, MMX2, MMY2, 7)) then
begin
Writeln('Failed to find the color, no result.');
Exit;
end;
ATPA:=TPAToATPA(TPA, 3);
if Length(ATPA) < 4 then
begin
writeln('could not find bankers');
exit;
end;
Setlength(TPA, Length(ATPA))
for i:=0 to High(ATPA) do
TPA[i] := MiddleTPA(ATPA[i]);
ATPA := SplitTPA(TPA, 8);
for i:=0 to High(ATPA) do
if Length(ATPA[i]) >=3 then
begin
writeln('found our bankers');
TP := MiddleTPA(ATPA[i]);
case lowercase(name) of
'eb' : begin rx := -11; ry := -3; ExtraAngle := 0; end;
'veb': begin rx := 3; ry := 11; ExtraAngle := -90; end;
'fwb': begin rx := 10; ry := 8; ExtraAngle := -90; end;
'feb': begin rx := 3; ry := 8; ExtraAngle := -90; end;
'akb': begin rx := 7; ry := 5; ExtraAngle := 0; end;
'db' : begin rx := 9; ry := 10; ExtraAngle := 0; end;
end;
IncEx(TP.x, Round(rx * Cos(rs_GetCompassAngleRadians + ExtraAngle)));
IncEx(TP.y, Round(ry * Sin(rs_GetCompassAngleRadians + ExtraAngle)));
Mouse(TP.x, TP.y, 0, 0, true);
break;
end;
finally
ColorToleranceSpeed(tempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
end;
i can't do lumbridge bank cus there's only one banker
didn't do vwb yet cus there's two lines of bankers which means more work
didn't do ge cus didn't have time.
i'll probably do ge tomorrow, i'll see about vwb,
enjoy :D
~RM