* function OpenBankNPC: Boolean;
Hello i didn't saw any NPC bank openers so i created one, tested in several worlds and Towns. Please test and tell me what you think.
Thanks.
Code:
{*******************************************************************************
function OpenBankNPC: Boolean;
By: Home
Description: Opens the bank by using Banker.
*******************************************************************************}
function OpenBankNPC: Boolean;
var
bx, by, Speed, ColFace, ColGrey, ColBlue: Integer;
begin
Speed := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
ColFace := 7774419; // Face Color
ColGrey := 6381925; // Grey Color [ Clothes ]
ColBlue := 2429979; // Blue Color [ Clothes ]
if (FindObjThroughMM(bx, by, 'npc', [ColFace, ColBlue, ColGrey], [5, 5, 5], ['anke', 'to B', 'Banker', 'nker'], 2, 2)) then begin
Mouse(bx, by, 0, 0, False);
WaitOption('ank B', 300);
FFlag(0);
Wait(2000 + Random(500));
if (Length(Players) > 0) then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
end;
ColorToleranceSpeed(Speed);
end;
~Home