SRL Archive - OSR Help

Edgeville banking + (veryy slow banking)


ssshhhaaa

2012-04-25 08:39:18

The bank function below doesnt seem to work for when i use it for the location edgeville, is there a bug or is it not working anymore?

function OpenBankFast(Location: String): Boolean;

Also i managed to bank by using this function instead
begin
OpenBankQuiet('eb')
end;

begin
findObjCustom(x, y, ['Deposit'], [1985922], 15);
Mouse(x,y,10,10,false);
WaitOption ('Deposit carried', 3000);
end;

But it takes like 40 seconds and instead of clicking on the bank it clicks the deposit bank.

Can anyone suggest a fast (ish) banking method that currently works in edgevile?

(feels like im posting too much asking for help :duh:)

ogustuce

2012-04-25 15:17:13

try using dtms cuz they very accurate. heres an example of the bank method i use(function)


Function ClickBank: Boolean;

Var
x,y,BankBooth: integer;
aFound:extended;
begin
BankBooth := DTMFromString('mggAAAHicY2NgYFBgZGDQAmJtIJYAYnEgVgfit0C5y0D8 FYj/A/E9IH4JxBnxMQyBVtwMSe68YBzjxMuwYkoxgxxQjh8LZsSBIQAA2aIMQQ=='); // this is for yanille bank
if FindDTMRotated(BankBooth, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 5, 5, True);
wait(1000+random(250));
Result := True;
wait(250+random(150));
end;
FreeDtm(BankBooth);
If not Bankscreen then
result :=False
end;


if u dont know how to make dtm check a tutorial. they very easy to use andmake once u know how. with this function, u just have to make a DTM (deformable model template) for the bankbooth

ssshhhaaa

2012-04-25 16:41:29

From: ogustuce
try using dtms cuz they very accurate. heres an example of the bank method i use(function)


Function ClickBank: Boolean;

Var
x,y,BankBooth: integer;
aFound:extended;
begin
BankBooth := DTMFromString('mggAAAHicY2NgYFBgZGDQAmJtIJYAYnEgVgfit0C5y0D8 FYj/A/E9IH4JxBnxMQyBVtwMSe68YBzjxMuwYkoxgxxQjh8LZsSBIQAA2aIMQQ=='); // this is for yanille bank
if FindDTMRotated(BankBooth, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 5, 5, True);
wait(1000+random(250));
Result := True;
wait(250+random(150));
end;
FreeDtm(BankBooth);
If not Bankscreen then
result :=False
end;


if u dont know how to make dtm check a tutorial. they very easy to use andmake once u know how. with this function, u just have to make a DTM (deformable model template) for the bankbooth

Yeh i know how to make DTMs but was wondering if there was already a reliable function, so it would wave script length and time in the script.

Olly

2012-04-25 16:43:32

Use
 OpenBankNPC; 
works flawless at edgeville for me :)

Joe

2012-04-25 16:44:33

…
There are PRESET banking functions in the SIMBA file on your computer…

YoHoJo

2012-04-25 16:49:22

From: JOEbot
…
There are PRESET banking functions in the SIMBA file on your computer…


He knows that, in his original script he is using openbankquiet which is in SRL he is just saying that it's not working.

You can open the bank.simba file and see all of the other different banking functions and try some of them instead. Ideally it's always nice to just create your own from scratch! That way you can make it exactly how you like and tweak it when/if it breaks.

Joe

2012-04-25 16:51:41

From: YoHoJo
He knows that, in his original script he is using openbankquiet which is in SRL he is just saying that it's not working.

You can open the bank.simba file and see all of the other different banking functions and try some of them instead. Ideally it's always nice to just create your own from scratch! That way you can make it exactly how you like and tweak it when/if it breaks.


If it ain't broke don't fix it? Don't mean to sound snide or superior, but for a beginner wouldn't using the normal presets be the best idea (work up from there)?

YoHoJo

2012-04-25 16:54:13

Yes it would be best for a beginner to just use premade stuff, be he said it's broken/not working for him at edgeville so he's looking for an alternative.

CephaXz

2012-04-25 19:18:20

I used the OpenBankNpc function for one of my script in edge since all the others dont work quite well.

NKN

2012-04-25 22:10:26

I use custom banks. I wrote a tutorial for it. :D In my signature.

ssshhhaaa

2012-04-26 03:47:15

I tried making a Dtm (of the banker) using the built in editor, but it didnt seem to find it at all.
Does anyone have a working DTMstring for the edgeille bankers?

YoHoJo

2012-04-26 03:58:39

From: ssshhhaaa
I tried making a Dtm (of the banker) using the built in editor, but it didnt seem to find it at all.
Does anyone have a working DTMstring for the edgeille bankers?


DTMs are not very reliable for main-screen stuff, try using ACA or FindObj or just different banking methods built into SRL.
ACA Tutorial Here:
http://youtu.be/98wVrr6GwyU

Joe

2012-04-26 07:47:52

From: YoHoJo
Yes it would be best for a beginner to just use premade stuff, be he said it's broken/not working for him at edgeville so he's looking for an alternative.


That makes sense, because isn't Edgeville the bank with the darker colors… that's probably why openbankfast or quiet isn't working
OpenBankNPC would probably work the best as all bankers (in a building) wear the same clothes.
He could try finddepositbox… dunno if I spelled it right, but i know its in the include.

If he wants the fastest banking procedure he should use ACA and follow the tutorials on custom banking. If he's not ready for that he may as well use DTMs..

ssshhhaaa

2012-04-26 07:50:15

From: JOEbot
That makes sense, because isn't Edgeville the bank with the darker colors… that's probably why openbankfast or quiet isn't working
OpenBankNPC would probably work the best as all bankers (in a building) wear the same clothes.
He could try finddepositbox… dunno if I spelled it right, but i know its in the include.

If he wants the fastest banking procedure he should use ACA and follow the tutorials on custom banking. If he's not ready for that he may as well use DTMs..


I think ill try out these ACA things you talk about :stirthepot:

Oxygen

2012-04-26 08:04:18

They speak of great truth :p
You should try YoHoJo's youtube link first.

ssshhhaaa

2012-04-26 12:10:51

Ok i have bad news, i tried using ACA for edgeville bank and heres what i got (just made it to a script that opens edge bank)

program new;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i ObjectDTM\ObjDTMInclude.simba}



Var

myPath:TpointArray;
var x,y : integer;
z, k, Home:Integer;

arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
H, S, L: Extended;
A, B, C: Extended; //X Y Z CHANGE TO A B C


begin
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
SetupSRL;
ObjDTM_Setup;
ClearDebug;


tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

if not(FindColorsTolerance(arP, 4072234, MSX1, MSY1, MSX2, MSY2, 11)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 71.09) and (H <= 71.55) and (S >= 27.76) and (S <= 28.59) and (L >= 16.45) and (L <= 21.20) then
begin
ColorToXYZ(arC[i], A, B, C);

if (A >= 1.87) and (A <= 2.99) and (B >= 1.57) and (B <= 2.50) and (C >= 3.68) and (C <= 5.97) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;

SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);

for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Take')) then
begin;
Result := True;
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;

GetMousePos(fx, fy);
end;
end.

begin
SetupSRL;
FindObject(x, y);
end.


And it came with the error
[Error] (84:7): Unknown identifier 'Result' at line 83
Compiling failed.

on the line : Result := True;

ssshhhaaa needs help ;'{

NCDS

2012-04-26 12:16:47

From: ssshhhaaa
Ok i have bad news, i tried using ACA for edgeville bank and heres what i got (just made it to a script that opens edge bank)

program new;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i ObjectDTM\ObjDTMInclude.simba}



Var

myPath:TpointArray;
var x,y : integer;
z, k, Home:Integer;

arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
H, S, L: Extended;
A, B, C: Extended; //X Y Z CHANGE TO A B C


begin
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
SetupSRL;
ObjDTM_Setup;
ClearDebug;


tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

if not(FindColorsTolerance(arP, 4072234, MSX1, MSY1, MSX2, MSY2, 11)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 71.09) and (H <= 71.55) and (S >= 27.76) and (S <= 28.59) and (L >= 16.45) and (L <= 21.20) then
begin
ColorToXYZ(arC[i], A, B, C);

if (A >= 1.87) and (A <= 2.99) and (B >= 1.57) and (B <= 2.50) and (C >= 3.68) and (C <= 5.97) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;

SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);

for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Take')) then
begin;
Result := True;
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;

GetMousePos(fx, fy);
end;
end.

begin
SetupSRL;
FindObject(x, y);
end.


And it came with the error
[Error] (84:7): Unknown identifier 'Result' at line 83
Compiling failed.

on the line : Result := True;

ssshhhaaa needs help ;'{


You have two mainloops there, and no function name, which is why the 'result' is throwing an error, because there's nothing to 'result' to.


As for the original problem with OpenBankFast(), the colors in the include most likely need to be updated.

Rich

2012-04-26 17:37:04

If you want to stick to premade functions, try using OpenBank. It uses all SRL bank opening functions in one.

NKN

2012-04-26 18:00:33

Those are broken for him.

Rich

2012-04-26 18:02:05

He only said OpenBankFast isn't work for him.

ssshhhaaa

2012-04-27 02:10:57

From: Rich
If you want to stick to premade functions, try using OpenBank. It uses all SRL bank opening functions in one.

Open bank doesnt work in edgeville too, i think the edgeville colours need to be updated to be honest because most of the bank functions dont work there.

Brandon

2012-04-27 02:28:31


Function BankEdgeville: Boolean;
var
Tries: Integer;
begin
Result := (LoggedIn and BankScreen);
if (Result) then
Exit;

if (Length(Players) > 0) then
if ((PinScreen) and (Players[CurrentPlayer].Pin <> '')) then
InPin(Players[CurrentPlayer].Pin);

while (Not OpenBankFast('eb')) do
begin
if (OpenBankFast('eb')) then
break;
Inc(Tries);
if (Tries > 5) then
Exit;
end;

if (Length(Players) > 0) then
if ((PinScreen) and (Players[CurrentPlayer].Pin <> '')) then
InPin(Players[CurrentPlayer].Pin);

Result := (BankScreen) or (PinScreen);
end;

P1nky

2012-04-27 02:28:34

For temporary, you should code up a function of your own; Wouldn't be too hard :)