Naike
2009-05-26 18:07:32
Been trying to find stuff to make or update, and it's getting harder and harder…
- SearchBankDTM
- ItemToBankTab
{*******************************************************************************
Function SearchBankDTM(DTM: Integer; var x, y: Integer): Boolean;
by: N1ke!
Description: Searches for a Item(DTM) in your bank scrolling down.
Returns Cords and True if found.
*******************************************************************************}
Function SearchBankDTM(DTM: Integer; var x, y: Integer): Boolean;
var
sx, sy, tm: Integer;
mx, my: Integer;
begin
If(Not(LoggedIn))Or(Not(BankScreen))Then Exit;
Result := False;
FixBankTab;
FixBank;
Result := FindDTM(DTM, x, y, 31, 88, 477, 292);
If Result then
Exit;
tm := GetSystemTime;
MMouse(488, 284, 3, 3);
GetMousePos(mx, my);
Repeat
HoldMouse(mx, my, True);
Wait(200+Random(380));
ReleaseMouse(mx, my, True);
Wait(400+Random(2000));
Result := FindDTM(DTM, x, y, 31, 88, 477, 292);
Until(Result)or(Not(FindColorTolerance(sx, sy, 1975337, 485, 268, 491, 274, 5))or(GetSystemTime - tm > 20000));
end;
{*******************************************************************************
Function ItemToBankTab(Name: String; x, y, Tab: Integer): Boolean;
by: N1ke!
Description: Moves the item to the given BankTab.
*******************************************************************************}
Function ItemToBankTab(Name: String; x, y, Tab: Integer): Boolean;
var
lx, ly: Integer;
begin
Result := False;
MMouse(x, y, 5, 5);
Wait(175+Random(100));
If not IsUpText(Name) then
Exit;
GetMousePos(lx, ly);
HoldMouse(lx, ly, True);
Wait(200+Random(800));
Result := BankTab(Tab);
ReleaseMouse(lx, ly, True);
end;