SRL Archive - OSR Help

Banking not working


IsoMorphic

2012-12-17 06:57:24

trying to bank at edge

OpenBankFast
OpenBank
OpenDepositBox

isn't working.

just hovers

xtrapsp

2012-12-17 08:08:29

Basically from what I've read recently banking is broken… I haven't tested since as I use my own banking methods but it might be wise to use TPA's and make your own banking.

To view the TPA you could make a paint debug to show you where the TPA would be. e.g you could paint a circle around the found TPA.

Tutorials:
TPA: http://villavu.com/forum/showthread.php?t=90767
TPA: http://villavu.com/forum/showthread.php?t=21786
Paint: http://villavu.com/forum/showthread.php?t=68856

IsoMorphic

2012-12-18 04:26:54

can anyone provide a banking method?

Justin

2012-12-18 04:30:11

From: fisherblue23
can anyone provide a banking method?



function OpenBankNPC: Boolean;

See how you go with that

mounty

2012-12-18 05:13:25

You should follow xtrapsps advice and make a custom one. It can be fairly simple to start and you can develop it as your skills grow. Or you could try fix the built in function. Have you tried the npc option. Think its openbanknpc.

IsoMorphic

2012-12-18 06:45:13

Openbanknpc dowsnt work


if(not(BankScreen)) then
begin
OpenBankNPC;

DepositAll;
CloseBank;



end;

doesn't even hover

IsoMorphic

2012-12-18 07:08:23

whats wrong with this
procedure bankin;
var
x,y:integer;
begin
if FindColorTolerance(x, y, bankercol, MSX1, MSY1, MSX2, MSY2,5) then
if WaitUpText('alk-to Banke', 1000) then
begin
//Waits 1000 ms for the uptext to be "tree"
Mouse(x, y, 10, 10, false);
WaitOption('Bank',1000);
end;
end;

P1ng

2012-12-18 07:10:44

Try this. But if you're going to release the script with this function I'd appreciate credit for it

function PBankNPC: Boolean;
var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
CTS, T, ii, i :Integer;

begin
Result := (BankScreen) or (PinScreen);
if Result then
Exit;

NPCArray := GetMinimapDots('NPC');

if Length(NPCArray) < 1 then
Exit;

SortTPAFrom(NPCArray, Point(MMCX, MMCY));
for i := 0 to High(NPCArray) do
begin
NPCPoint := MMToMS(NPCArray[i]);

if NPCPoint = Point(-1, -1) then
begin
TurnToMMPoint(NPCPoint);
Wait(RandomRange(100,200));
end;

with NPCPoint do
NPCBox := IntToBox(Max(X - 80, MSX1), Max(Y - 80, MSY1), Min(X + 80, MSX2), Min(Y + 80, MSY2));
if PixelShift(NPCBox, 200) > 500 then
Continue;

CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.58);

if FindColorsTolerance(Colors, 3810090, NPCBox.X1, NPCBox.Y1, NPCBox.X2, NPCBox.Y2, 10) then
begin
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);

ATPA := TPAToATPAEx(Colors, 15, 20);
SortATPASize(ATPA, True);

for ii := 0 to High(ATPA) do
begin
MSNPC := MiddleTPA(ATPA[ii]);
MMouse(MSNPC.X, MSNPC.Y, 3, 3);

if WaitUpTextMulti(['ooth', 'anke'], 200) then
begin
ClickMouse2(False);
if WaitOption('ank B', 600) then
begin
MarkTime(T);

repeat
Wait(RandomRange(100, 200));
until (BankScreen) or (PinScreen) or (TimeFromMark(T) > 4500);

if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);

Result := (BankScreen) or (PinScreen);
if Result then
Exit;

end;
end;
end;
end;
end;
end;

IsoMorphic

2012-12-18 07:19:26

From: P1ng
Try this. But if you're going to release the script with this function I'd appreciate credit for it

function PBankNPC: Boolean;
var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
CTS, T, ii, i :Integer;

begin
Result := (BankScreen) or (PinScreen);
if Result then
Exit;

NPCArray := GetMinimapDots('NPC');

if Length(NPCArray) < 1 then
Exit;

SortTPAFrom(NPCArray, Point(MMCX, MMCY));
for i := 0 to High(NPCArray) do
begin
NPCPoint := MMToMS(NPCArray[i]);

if NPCPoint = Point(-1, -1) then
begin
TurnToMMPoint(NPCPoint);
Wait(RandomRange(100,200));
end;

with NPCPoint do
NPCBox := IntToBox(Max(X - 80, MSX1), Max(Y - 80, MSY1), Min(X + 80, MSX2), Min(Y + 80, MSY2));
if PixelShift(NPCBox, 200) > 500 then
Continue;

CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.58);

if FindColorsTolerance(Colors, 3810090, NPCBox.X1, NPCBox.Y1, NPCBox.X2, NPCBox.Y2, 10) then
begin
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);

ATPA := TPAToATPAEx(Colors, 15, 20);
SortATPASize(ATPA, True);

for ii := 0 to High(ATPA) do
begin
MSNPC := MiddleTPA(ATPA[ii]);
MMouse(MSNPC.X, MSNPC.Y, 3, 3);

if WaitUpTextMulti(['ooth', 'anke'], 200) then
begin
ClickMouse2(False);
if WaitOption('ank B', 600) then
begin
MarkTime(T);

repeat
Wait(RandomRange(100, 200));
until (BankScreen) or (PinScreen) or (TimeFromMark(T) > 4500);

if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);

Result := (BankScreen) or (PinScreen);
if Result then
Exit;

end;
end;
end;
end;
end;
end;

I sure will. ily

IsoMorphic

2012-12-18 07:21:45

unknown identifier turn to mm point

E: hold on googled it
/showthread.php?p=1085330

P1ng

2012-12-18 07:50:40

whoops! Just copy the TurnToMMPoint function into your script above where you place this function and it should work fine.

IsoMorphic

2012-12-18 08:10:55

From: P1ng
whoops! Just copy the TurnToMMPoint function into your script above where you place this function and it should work fine.


its just rotating not doing anything…

IsoMorphic

2012-12-18 08:14:13

btw im at draynor bank

___

2012-12-18 09:36:15

Its probably easier to use a DTM on the bank rather than learn TPA's while the banking function is being fixed. Although it is a good idea to use TPA's.

xtrapsp

2012-12-18 09:42:00

My suggestion = best.
My suggestion = ignored.

___

2012-12-18 10:44:58

From: xtrapsp
My suggestion = best.
My suggestion = ignored.


Your humble suggestion has fallen upon deaf ears.