Gunner
2014-05-13 00:43:47
Hey dudez, me again. What is the easiest way to write a right click hover option for banking? I've successfully written in a hover for this before, but that's all it was. It just hovered the mouse over the banker then left clicked when it was supposed to, but sometimes it would jump from banker to banker before clicking. I would like to right click the banker and hover the "Bank Banker" option.
Here is the code from the original hover I "wrote"…err…stole from The Mayor's tut and deleted the fastClick bit…
And here is my current banking code:
I'm assuming I would not be able to incorporate the bankScreen.open(WhicheverBanker), which is ok but I don't want to right click and hover one banker, then go off and left click another when it's time to actually bank. Which so far, is the only thing I've been able to do. I guess what I need is a hoverOption(); instead of chooseOption.select().
Is the best way to do this by using the ATPA above, then a right click, then a wait time, then a chooseOption.select? Or is there a more reliable, more logical way to do it?
Thanks in advance!
Here is the code from the original hover I "wrote"…err…stole from The Mayor's tut and deleted the fastClick bit…
procedure hoverBank();
begin
if bankScreen.isOpen then
exit;
findColorsSpiralTolerance(x, y, TPA, 5385548, mainScreen.getBounds(), 16, colorSetting(2, 0.59, 0.72));
if (Length(TPA) < 1) then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
end;
end;
end;And here is my current banking code:
procedure openBank();
begin
if not isLoggedIn() then
begin
writeln('We got logged out, logging back in!');
exit;
end;
bankScreen.open(BANK_NPC_BLUE); //Change this to the bank of your choice.
if (pinscreen.isOpen()) then
begin
writeln('Pinscreen is open!');
if (pinScreen.enter('1234')) then //Change the number to your bank pin.
writeln('Entered our bank pin!');
end;
if bankScreen.isOpen then
begin
inc(LoadsDone);
exit;
end;
end;I'm assuming I would not be able to incorporate the bankScreen.open(WhicheverBanker), which is ok but I don't want to right click and hover one banker, then go off and left click another when it's time to actually bank. Which so far, is the only thing I've been able to do. I guess what I need is a hoverOption(); instead of chooseOption.select().
Is the best way to do this by using the ATPA above, then a right click, then a wait time, then a chooseOption.select? Or is there a more reliable, more logical way to do it?
Thanks in advance!