SRL Archive - SRL Archives

DepositBox Stuff.


WhiteShadow

2007-01-07 05:04:32

Hi, I quickly wrote up a few things and I thought I'd share.

function DepositScreen : Boolean;
var
BankOf, jx, jy : Integer;
begin
BankOf:= CreateBitmapMaskFromText('ep', UpChars);
Result:= FindBitmapMaskTolerance(BankOf, jx, jy, 309, 31, 368, 64, 10, 2);
FreeBitmap(BankOf);
end;
Description
True/False Deposit Screen open or not.

function OpenDepositBox : Boolean;
var
TempColor, dx, dy, i : Integer;
begin
repeat
i:= i + 1;
dx:= Mscx;
dy:= Mscy;
if(FindColorSpiralTolerance(dx, dy, 606808, Msx1, Msy1, Msx2, Msy2, 2 + i))then
if(PixelsMatch(dx, dy, 15, 10, 10, 10))then
begin
TempColor := GetColor(dx, dy);
x:= dx;
y:= dy;
if(FindColorSpiral2(x, y, TempColor, Msx1, Msy1, Msx2, Msy2))then
begin
MMouse(x, y, 0, 0);
Wait(200 + random(100));
if(IsUpText('epos'))then
begin
Mouse(x, y, 0, 0, false);
Wait(250 + random(100));
ChooseOption(x, y, 'eposit');
Flag;
Wait(300 + random(300));
if(DepositScreen)then
Result:= True;
end;
end;
end;
until(result = true) or (i > 6)
end;
Description
Opens DepositBox (usually one movement) true or false if it worked or not. Used the function PixelsMatch. Which can be found on the other thread.

Thankies.
- WhiteShadow.