SRL Archive - Test corner

FastOpenBank


TheGuyWhoGotOn

2007-11-20 21:37:20

This works 99% of the time…It's very fast too:


//Created by: TheGuyWhoGotOn
//Description: Opens the bank of your choice. Returns true if it was done
//succesfully.

{ Working Locations ]
[Varrok East Bank: veb ]
[Varrok West Bank: vwb ]
[Lumby Bank: lb ]
[Draynor Bank: db ]
[Fally West Bank: fwb ]
[Fally East Bank: feb ]
[Edgeville Bank: eb ]
[Al-Kharid Bank: akb ]
[-----------------------}

//Used Like: FastOpenBank('veb', 2);
Function FastOpenBank(location: string; attempts: integer): Boolean;
begin
result:= false
location:= lowercase(location);
if location = 'veb' then if FindSomethingEx(6650497, 6915726, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
if location = 'vwb' then if FindSomethingEx(4144964, 4671309, attempts, true, false, 'Use Ba', false, false, true) then result:= ClickOption1('e-q');
if location = 'lb' then if FindSomethingEx(6391187, 6714235, attempts, true, false, 'Use Ba', true, false, true) then result:= ClickOption1('e-q');
if location = 'db' then if FindSomethingEx(5927552, 5862274, attempts, true, false, 'Use Ba', true, false, true) then result:= ClickOption1('e-q');
if location = 'fwb' then if FindSomethingEx(8032675, 7769247, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
if location = 'feb' then if FindSomethingEx(8032675, 7769247, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
if location = 'eb' then if FindSomethingEx(8096918, 7438988, attempts, true, false, 'Use Ba', true, true, true) then result:= ClickOption1('e-q');
if location = 'akb' then if FindSomethingEx(3618619, 3421240, attempts, true, false, 'Use Ba', true, true, true) then result:= ClickOption1('e-q');
if result = false then writeln('Bank Not Found');
end;

So what do you think? You have to include PH to use it…

pwnaz0r

2007-11-20 21:53:01

From: TheGuyWhoGotOn

So what do you think? You have to include PH to use it…



SRL Test Corner

.

R0b0t1

2007-11-20 21:56:55

Aww… C'mon. Give'm a break. I'll at least look through PH.scar .


When did I start using so many stress marks? (')

Santa_Clause

2007-11-21 07:22:02

From: TheGuyWhoGotOn
This works 99% of the time…It's very fast too:


//Created by: TheGuyWhoGotOn
//Description: Opens the bank of your choice. Returns true if it was done
//succesfully.

{ Working Locations ]
[Varrok East Bank: veb ]
[Varrok West Bank: vwb ]
[Lumby Bank: lb ]
[Draynor Bank: db ]
[Fally West Bank: fwb ]
[Fally East Bank: feb ]
[Edgeville Bank: eb ]
[Al-Kharid Bank: akb ]
[-----------------------}

//Used Like: FastOpenBank('veb', 2);
Function FastOpenBank(location: string; attempts: integer): Boolean;
begin
result:= false
location:= lowercase(location);
if location = 'veb' then if FindSomethingEx(6650497, 6915726, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
if location = 'vwb' then if FindSomethingEx(4144964, 4671309, attempts, true, false, 'Use Ba', false, false, true) then result:= ClickOption1('e-q');
if location = 'lb' then if FindSomethingEx(6391187, 6714235, attempts, true, false, 'Use Ba', true, false, true) then result:= ClickOption1('e-q');
if location = 'db' then if FindSomethingEx(5927552, 5862274, attempts, true, false, 'Use Ba', true, false, true) then result:= ClickOption1('e-q');
if location = 'fwb' then if FindSomethingEx(8032675, 7769247, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
if location = 'feb' then if FindSomethingEx(8032675, 7769247, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
if location = 'eb' then if FindSomethingEx(8096918, 7438988, attempts, true, false, 'Use Ba', true, true, true) then result:= ClickOption1('e-q');
if location = 'akb' then if FindSomethingEx(3618619, 3421240, attempts, true, false, 'Use Ba', true, true, true) then result:= ClickOption1('e-q');
if result = false then writeln('Bank Not Found');
end;

So what do you think? You have to include PH to use it…


Your standards scare me…I can't be bothered reading it when it's like that…

TheGuyWhoGotOn

2007-11-21 07:51:28

What's wrong with my standards? Also pwnaz0r, this is a place to test things…PH is compatible with SRL I could make it just SRL for you. This works very fast, could somebody please just test it?

I call if then if then because I can't use "and", if I didn't it looks worse, trust me. Please bare with me.

n3ss3s

2007-11-21 11:21:33

I would test, but since my internet seems to be on its periods it doesn't let me use it (?) so I'm on a shitty dial-up with no SCAR/SRL

Also, is there a file included? Because this laptop doesn't show that any is…

So, PH = ?

HyperSecret

2007-11-21 12:44:31

PH i believe is already included isnt it? its just not in the SRL folder, its in the same location as the SRL folder but you download when you install the includes i do believe…

R0b0t1

2007-11-21 12:55:11

Yeah, SCAR auto-dl's it.


The only reason its fast is because it doesn't rely upon other SRL things. SRL is like a hierarchy of things calling on one another.

Freddy1990

2007-11-21 13:27:41

From: TheGuyWhoGotOn
What's wrong with my standards?


I have to agree with them, it hurts my eyes :p

R0b0t1

2007-11-21 14:07:23

And, oh yeah, you could have used a case. I think thats what they think is wrong with it :p.

TheGuyWhoGotOn

2007-11-21 18:56:08

From: R0b0t1
And, oh yeah, you could have used a case. I think thats what they think is wrong with it :p.


I don't know how to use cases. Also I could use SRL for this…It would just take longer to make and have the same thing. The findsomething procedure I made is only in the PH include.

BTW, how do I use cases?

Method

2007-11-21 19:07:11

Like this:

//Created by: TheGuyWhoGotOn
//Description: Opens the bank of your choice. Returns true if it was done
//succesfully.

{ Working Locations ]
[Varrok East Bank: veb ]
[Varrok West Bank: vwb ]
[Lumby Bank: lb ]
[Draynor Bank: db ]
[Fally West Bank: fwb ]
[Fally East Bank: feb ]
[Edgeville Bank: eb ]
[Al-Kharid Bank: akb ]
[-----------------------}

//Used Like: FastOpenBank('veb', 2);
Function FastOpenBank(location: string; attempts: integer): Boolean;
begin
case Lowercase(location) of
'veb': if FindSomethingEx(6650497, 6915726, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
'vwb': if FindSomethingEx(4144964, 4671309, attempts, true, false, 'Use Ba', false, false, true) then result:= ClickOption1('e-q');
'lb': if FindSomethingEx(6391187, 6714235, attempts, true, false, 'Use Ba', true, false, true) then result:= ClickOption1('e-q');
'db': if FindSomethingEx(5927552, 5862274, attempts, true, false, 'Use Ba', true, false, true) then result:= ClickOption1('e-q');
'fwb': if FindSomethingEx(8032675, 7769247, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
'feb': if FindSomethingEx(8032675, 7769247, attempts, true, false, 'Use Ba', false, true, true) then result:= ClickOption1('e-q');
'eb': if FindSomethingEx(8096918, 7438988, attempts, true, false, 'Use Ba', true, true, true) then result:= ClickOption1('e-q');
'akb': if FindSomethingEx(3618619, 3421240, attempts, true, false, 'Use Ba', true, true, true) then result:= ClickOption1('e-q');
else Writeln('Invalid bank name');
end;
if not Result then Writeln('Bank Not Found');
end;

Of course, the standards still aren't fixed so you should probably do something about that. :P

R0b0t1

2007-11-23 12:57:10

Your forgot the : in the case :p.

Method

2007-11-23 13:13:51

From: R0b0t1
Your forgot the : in the case :p.


I did it very quickly. :P Thanks for the reminder, though.

Narcle

2007-11-23 13:25:18

I'll try it out once I start testing my fletcher/stringer/alcher. If its faster & works I'll use. I prefer fast over neatness.

Time is the most precious thing, you cannot buy it, speed it up or slow it down.

Damn I should put that in my sig.

TheGuyWhoGotOn

2007-11-23 16:25:37

From: Narcle
I'll try it out once I start testing my fletcher/stringer/alcher. If its faster & works I'll use. I prefer fast over neatness.

Time is the most precious thing, you cannot buy it, speed it up or slow it down.

Damn I should put that in my sig.


My only issue is that I don't have members so it may not work in most areas.

Thanks guys, I know how to use cases now but what is wrong with my standards?

BobboHobbo

2007-11-24 00:42:47

Mmm i never even noticed PH im my scar. You made like every proc on ther :)

TheGuyWhoGotOn

2007-11-24 08:37:58

From: BobboHobbo
Mmm i never even noticed PH im my scar. You made like every proc on ther :)


Lol, yes, Knives made a few too.

So could you please explain what's wrong with my standards.

n3ss3s

2007-11-24 08:51:13

Please somebody clarify, what is and where is this PH?

Bobarkinator

2007-11-24 10:22:51

It's in your includes folder when you download includes.

n3ss3s

2007-11-24 11:28:45

Woah, reminds me of Osi and all the other old includes…

Though the ClickMouses don't make me very happy.

TheGuyWhoGotOn

2007-11-25 19:19:58

From: n3ss3s
Woah, reminds me of Osi and all the other old includes…

Though the ClickMouses don't make me very happy.


OMFG thank you for pointing that out I must have mixed something up…WOW, thanks I'll fix that right now.

Back on topic, please, what are wrong with my standards?

Edit: Fixed, uploading now.

Edit2: Sent to Freddy :)

n3ss3s

2007-11-26 08:33:40

Nothing big, but spaces - like

 result := bla; 

and capped identifiers like

 Result := Bla; 

 x/X: Variant; 

Also, people prefer


If () Then
If () Then

TheGuyWhoGotOn

2007-11-26 18:29:51

Ok then…Grr, caps give me a headache. I'll do it all except the if/then thing…