Something I've been playing around with. Only works with varrock west bank.
Finds the banker npcs on the minimap, figures out which one is the closest, translates that to onscreen and banks at that bankbooth.
Works pretty well for me, but curious to see if it falls down when "released to the wild".
Also attached a script that tests it. Requires latest srl dev and smart 4.5. Place yourself anywhere in varrock west bank and run.Code:{******************************************************************************* function C_BankNearestBankerVWB(): Boolean; By: Bixby Sayz Description: Attempts to bank at the nearest bank booth in varrock west bank. Returns true on success. Note: There is enough uncertainty/randomness in the conversions that randomness in the mouse clicking isn't really required. *******************************************************************************} function C_BankNearestBankerVWB(): Boolean; var Npc : TPointArray; // Location of npcs on minimap. ScreenPt: TPoint; // Screen point. Sx, Sy : Integer; // Screen (x,y) coords. begin Result := False; if not LoggedIn then Exit; // We need proper rotation/camera angle for this to work. SetAngle(True); MakeCompass('n'); // Figure out nearest npc on minimap. Npc := GetMiniMapDots('npc'); if (High(Npc) = 0) then Exit; SortTPAFrom(Npc, Point(MMCX, MMCY)); if (Npc[0].x = 0) then Exit; // Convert minimap point to main screen point. Conversion isn't 100% accurate // so some tweaking is needed, plus we want the bank booth not the banker // itself. ScreenPt := MMToMS(Npc[0]); Sx := ScreenPt.x; Sy := ScreenPt.y; IncEx(Sx, (MMCX - Npc[0].x)); if (Npc[0].x > MMCX) then DecEx(Sx, 25) else IncEx(Sx, 70); DecEx(Sy, 15); // Move mouse over to where we think bank booth is and look for bank booth // color in a box centered on that point. MMouse(Sx, Sy, 0, 0); if not WaitFindColor(Sx, Sy, BankBoothColor, (Sx - 20), (Sy - 20), (Sy + 20), (Sy + 20), 5, 500) then Exit; // Move mouse to where we now know the bank booth is and double check the // the uptext to be sure. If we have a match, right-click and select // "Use-quickly bank booth". MMouse(Sx, Sy, 0, 0); if not WaitUpText('booth', 500) then Exit; Mouse(Sx, Sy, 0, 0, False); Wait(RandomRange(100, 250)); if not WaitOption('quickly', 500) then Exit; // We should have an open bankscreen at this point. Result := BankScreen; end;
Edit: Broken since the Sep 17 update. Only works accurately if standing in middle of bank now. Won't have time to fix it for a while.



Reply With Quote












