SRL Archive - OSR Help

Open bank problem


slackeru

2010-02-25 02:23:10

function OpenEbBankFast: Boolean;  //Edited version of OpenBankFast
var
x, y, i, l, c, z, fail: Integer;
Info: TIntegerArray;
Booths, t: TPointArray;
begin
Wait(400);
Info := [(MSCX + 25), MSCY, 3230295, 9, 2];
MakeCompass('n');
SetAngle(true);
z := GetColorToleranceSpeed;
ColorToleranceSpeed(Info[4]);
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSCX-25, MSY1, MSX2, MSY2, Info[3]);
ColorToleranceSpeed(z);
SetArrayLength(t, 0);
t := Booths;
SetArrayLength(Booths, 0);
Booths := ReArrangeAndShortenArray(t, 14);
l := GetArrayLength(Booths) -1;
for i := 0 to l do
begin
if (not LoggedIn) or BankScreen or PinScreen then
Break;
MMouse(Booths[i].X, Booths[i].Y, 3, 3);
Wait(75 + Random(75));
if IsUpTextMultiCustom(['ooth', 'ank', 'anker']) Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(70 + Random(75));
if ChooseOption('uickly') then
begin
MarkTime(c);
repeat
Wait(100);
until (BankScreen) or (PinScreen) or (TimeFromMark(c) > 3000);
fail:= getcolor(260, 180);
if (fail = 0) then MouseBox(126, 138, 388, 152, 1);
if (Length(Players) > 0) then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
end;
end;
end;
Result := (BankScreen) or (PinScreen);
end;

Whats wrong here? It finds bank but doesn't click any options.
Someone said I could use WaitOptionMulti, but where should I put it?

Thanks.

NCDS

2010-02-25 02:26:26


function OpenEbBankFast: Boolean; //Edited version of OpenBankFast
var
x, y, i, l, c, z, fail: Integer;
Info: TIntegerArray;
Booths, t: TPointArray;
begin
Wait(400);
Info := [(MSCX + 25), MSCY, 3230295, 9, 2];
MakeCompass('n');
SetAngle(true);
z := GetColorToleranceSpeed;
ColorToleranceSpeed(Info[4]);
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSCX-25, MSY1, MSX2, MSY2, Info[3]);
ColorToleranceSpeed(z);
SetArrayLength(t, 0);
t := Booths;
SetArrayLength(Booths, 0);
Booths := ReArrangeAndShortenArray(t, 14);
l := GetArrayLength(Booths) -1;
for i := 0 to l do
begin
if (not LoggedIn) or BankScreen or PinScreen then
Break;
MMouse(Booths[i].X, Booths[i].Y, 3, 3);
Wait(75 + Random(75));
if IsUpTextMultiCustom(['ooth', 'ank', 'anker']) Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(70 + Random(75));
if WaitOption('uickly', 3000) then // the 3000 means wait 3 seconds maximum
begin
MarkTime(c);
repeat
Wait(100);
until (BankScreen) or (PinScreen) or (TimeFromMark(c) > 3000);
fail:= getcolor(260, 180);
if (fail = 0) then MouseBox(126, 138, 388, 152, 1);
if (Length(Players) > 0) then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
end;
end;
end;
Result := (BankScreen) or (PinScreen);
end;

…and you asked about UpText before?

slackeru

2010-02-25 02:29:32

From: NCDS

function OpenEbBankFast: Boolean; //Edited version of OpenBankFast
var
x, y, i, l, c, z, fail: Integer;
Info: TIntegerArray;
Booths, t: TPointArray;
begin
Wait(400);
Info := [(MSCX + 25), MSCY, 3230295, 9, 2];
MakeCompass('n');
SetAngle(true);
z := GetColorToleranceSpeed;
ColorToleranceSpeed(Info[4]);
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSCX-25, MSY1, MSX2, MSY2, Info[3]);
ColorToleranceSpeed(z);
SetArrayLength(t, 0);
t := Booths;
SetArrayLength(Booths, 0);
Booths := ReArrangeAndShortenArray(t, 14);
l := GetArrayLength(Booths) -1;
for i := 0 to l do
begin
if (not LoggedIn) or BankScreen or PinScreen then
Break;
MMouse(Booths[i].X, Booths[i].Y, 3, 3);
Wait(75 + Random(75));
if IsUpTextMultiCustom(['ooth', 'ank', 'anker']) Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(70 + Random(75));
if WaitOption('uickly', 3000) then // the 3000 means wait 3 seconds maximum
begin
MarkTime(c);
repeat
Wait(100);
until (BankScreen) or (PinScreen) or (TimeFromMark(c) > 3000);
fail:= getcolor(260, 180);
if (fail = 0) then MouseBox(126, 138, 388, 152, 1);
if (Length(Players) > 0) then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
end;
end;
end;
Result := (BankScreen) or (PinScreen);
end;

and you asked about UpText before..?


Thanks, but it still does the same thing, just that it waits longer before right clicking the bank booth again xD

NCDS

2010-02-25 02:31:41


function OpenEbBankFast: Boolean; //Edited version of OpenBankFast
var
x, y, i, l, c, z, fail: Integer;
Info: TIntegerArray;
Booths, t: TPointArray;
begin
Wait(400);
Info := [(MSCX + 25), MSCY, 3230295, 9, 2];
MakeCompass('n');
SetAngle(true);
z := GetColorToleranceSpeed;
ColorToleranceSpeed(Info[4]);
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSCX-25, MSY1, MSX2, MSY2, Info[3]);
ColorToleranceSpeed(z);
SetArrayLength(t, 0);
t := Booths;
SetArrayLength(Booths, 0);
Booths := ReArrangeAndShortenArray(t, 14);
l := GetArrayLength(Booths) -1;
for i := 0 to l do
begin
if (not LoggedIn) or BankScreen or PinScreen then
Break;
MMouse(Booths[i].X, Booths[i].Y, 3, 3);
Wait(75 + Random(75));
if IsUpTextMultiCustom(['ooth', 'ank', 'anker']) Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(70 + Random(75));
if WaitOptionMulti(['uickly', 'ui', 'ck', 'ly', 'ic', 'kl'], 3000) then // the 3000 means wait 3 seconds maximum
begin
MarkTime(c);
repeat
Wait(100);
until (BankScreen) or (PinScreen) or (TimeFromMark(c) > 3000);
fail:= getcolor(260, 180);
if (fail = 0) then MouseBox(126, 138, 388, 152, 1);
if (Length(Players) > 0) then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
end;
end;
end;
Result := (BankScreen) or (PinScreen);
end;

slackeru

2010-02-25 02:38:02

From: NCDS

if WaitOptionMulti(['uickly', 'ui', 'ck', 'ly', 'ic', 'kl'], 3000) then // the 3000


Lol :) Finally it worked. Did you do something else than this line?

NCDS

2010-02-25 02:46:54

From: bi a op
Lol :) Finally it worked. Did you do something else than this line?


Nope, it's as easy as that ;)

Coh3n

2010-02-25 22:13:09

You may as well take out the 'y', letters that go below the line (f, q, g, y, etc), often don't get detected as the right letter.