Rune Hacker
2007-05-16 20:03:47
Idk, I think these could be useful functions with a little editing, you tell me. The will scroll the bank looking for a dtm or a bitmap you made and even close the bank. Ide add more options to do such as closing the bank an option or stuff, idk, you tell me. Ide just love a function made by me in srl, but in the mean time, im just making functions i find useful. Im always up for suggestions.
{*******************************************************************************
function FindDTMInBank(DTM, Amount: Integer): Boolean;
By: Rune Hacker
Description: Will start at the top of the bank and scroll down until it finds the DTM, then
it will withdraw X amount of it and close the bank.
*******************************************************************************}
function FindDTMInBank(DTM, Amount: Integer): Boolean;
var
z, ScrollDown, AtBottom, CloseButton, TimeMarker : Integer;
begin
if not LoggedIn then Exit;
ScrollDown := BitmapFromString(10, 10, 'z78DA33713131323636' +
'C1200D40C010429AE0506342B15E4C35B8F4228BE057835F9C5A7' +
'AF1BB871895C490F8C396785DA48606E5F10B006F477801');
AtBottom := BitmapFromString(6, 19, 'z78DA33713131323636193' +
'4A4B1B1918B9129E5A4B9999999A909E524A9EE37000143083998' +
'D5208B60AA4116A19CC46F26F16E06003C788BC5');
CloseButton := BitmapFromString(10, 11, 'z78DA3330000243033' +
'069E664EA62628C9F3440528F4912AF0BBF380159135373134308' +
'89DF3D505D48EA3149F274E13201971A533753236367641297BD9' +
'82A89D185DF04FC6A70C96211B7347131B6C42409B807872E5C26' +
'0000D95685F1');
MarkTime(TimeMarker);
Mouse(475, 80, 2, 2, True);
repeat
if(FindDTM(DTM, x, y, MSX1, MSY1, MSX2, MSY2))then
begin
Wait(1000 + random(400));
Mouse(x, y, 2, 2, False);
Wait(900 + random(500));
ChooseOption(x, y, 'ithdraw X');
Wait(1300 + random(300));
TypeSend(IntToStr(Amount));
Wait(1500 + random(500));
FindBitmapSpiralTolerance(CloseButton, x, y, MSX1, MSY1, MSX2, MSY2, 3);
MMouse(x, y, 1, 1);
Wait(600 + random(100));
Mouse(x, y, 1, 1, True);
Result := True;
end else
FindBitmapSpiralTolerance(ScrollDown, x, y, MSX1, MSY1, MSX2, MSY2, 2);
MMouse(x, y, 1, 1);
HoldMouse(x, y, True);
Wait(700 + random(50));
ReleaseMouse(x, y, True);
z := z + 1;
until (z >= 12) or (TimeFromMark(TimeMarker) >= 70000) or (FindBitmapSpiralTolerance(AtBottom, x, y, MSX1, MSY1, MSX2, MSY2, 2));
if (z >= 12) or (TimeFromMark(TimeMarker) >= 70000) or (FindBitmapSpiralTolerance(AtBottom, x, y, MSX1, MSY1, MSX2, MSY2, 2))then
begin
Result := False;
end;
FreeBitmap(ScrollDown);
FreeBitmap(AtBottom);
FreeBitmap(CloseButton);
end;{*******************************************************************************
function FindBitmapInBank(Bitmap, Amount, Tol: Integer): Boolean;
By: Rune Hacker
Description: Will start at the top of the bank and scroll down until it finds the Bitmap with a
tolerance, then it will withdraw X amount of it and close the bank.
*******************************************************************************}
function FindBitmapInBank(Bitmap, Amount, Tol: Integer): Boolean;
var
z, ScrollDown, AtBottom, CloseButton, TimeMarker : Integer;
begin
if not LoggedIn then Exit;
ScrollDown := BitmapFromString(10, 10, 'z78DA33713131323636' +
'C1200D40C010429AE0506342B15E4C35B8F4228BE057835F9C5A7' +
'AF1BB871895C490F8C396785DA48606E5F10B006F477801');
AtBottom := BitmapFromString(6, 19, 'z78DA33713131323636193' +
'4A4B1B1918B9129E5A4B9999999A909E524A9EE37000143083998' +
'D5208B60AA4116A19CC46F26F16E06003C788BC5');
CloseButton := BitmapFromString(10, 11, 'z78DA3330000243033' +
'069E664EA62628C9F3440528F4912AF0BBF380159135373134308' +
'89DF3D505D48EA3149F274E13201971A533753236367641297BD9' +
'82A89D185DF04FC6A70C96211B7347131B6C42409B807872E5C26' +
'0000D95685F1');
MarkTime(TimeMarker);
Mouse(475, 80, 2, 2, True);
repeat
if(FindBitmapSpiralTolerance(Bitmap, x, y, MSX1, MSY1, MSX2, MSY2, Tol)then
begin
Wait(1000 + random(400));
Mouse(x, y, 2, 2, False);
Wait(900 + random(500));
ChooseOption(x, y, 'ithdraw X');
Wait(1300 + random(300));
TypeSend(IntToStr(Amount));
Wait(1500 + random(500));
FindBitmapSpiralTolerance(CloseButton, x, y, MSX1, MSY1, MSX2, MSY2, 3);
MMouse(x, y, 1, 1);
Wait(600 + random(100));
Mouse(x, y, 1, 1, True);
Result := True;
end else
FindBitmapSpiralTolerance(ScrollDown, x, y, MSX1, MSY1, MSX2, MSY2, 2);
MMouse(x, y, 1, 1);
HoldMouse(x, y, True);
Wait(700 + random(50));
ReleaseMouse(x, y, True);
z := z + 1;
until (z >= 12) or (TimeFromMark(TimeMarker) >= 70000) or (FindBitmapSpiralTolerance(AtBottom, x, y, MSX1, MSY1, MSX2, MSY2, 2));
if (z >= 12) or (TimeFromMark(TimeMarker) >= 70000) or (FindBitmapSpiralTolerance(AtBottom, x, y, MSX1, MSY1, MSX2, MSY2, 2))then
begin
Result := False;
end;
FreeBitmap(ScrollDown);
FreeBitmap(AtBottom);
FreeBitmap(CloseButton);
end;