SRL Archive - OSR Help

GE banker


halgboy_tbc

2012-04-08 10:35:13

Does anyone know an existing code that opens a bank at the GE please? Thanks.

OpenBankNPC; doesn't seem to be working well

m34tcode

2012-04-08 10:48:34

Gotta write it =]

OpenBank doesnt always work well ;]

There are many tpa tutorials that show exactly what you need to know, all listed here
http://villavu.com/forum/showthread.php?t=76632

halgboy_tbc

2012-04-08 10:58:19

From: halgboy_tbc
Does anyone know an existing code

Quote

m34tcode

2012-04-08 11:42:14

The best way to learn is not to use existing code dude ^

If you stick to existing code, you will never write anything that is truly innovative.

Abu

2012-04-08 11:44:21

I have a code I wrote myself…..


No you cannot use it :)



P.S - just make one using TPA's

halgboy_tbc

2012-04-08 13:50:01

Stop posting useless posts.

What a waste of time, if you don't want to help you can go somewhere else. I was trying to amend a script that I needed to use asap, I did not want to try so many things just to recreate the wheel.

If you cannot answer the question that is stated in the thread you shouldn't post at all.

halgboy_tbc

2012-04-08 13:51:25

By the way: this issue has already been resolved and I don't need anymore input on this issue.

Abu

2012-04-08 13:56:06

I did answer your question:
From: abu_jwka

P.S - just make one using TPA's


That's about the best answer you're going to get.

Take the time to learn and stop waiting for other people to make functions for you. You were already told you had to write it yourself but you persist in looking for existing code.

Since the time you've posted, you could have easily made the function yourself - laziness is a bad habit, get rid of it.

bolshak25

2012-04-08 13:59:15

double posting is bad. theres an edit button for a reason.

also as others have said its better to write your own. its not recreating the wheel, its learning.

halgboy_tbc

2012-04-08 14:08:42

From: abu_jwka
I did answer your question:


That's about the best answer you're going to get.

Take the time to learn and stop waiting for other people to make functions for you. You were already told you had to write it yourself but you persist in looking for existing code.

Since the time you've posted, you could have easily made the function yourself - laziness is a bad habit, get rid of it.


Why do you speculate on the motives of why people ask things: you have no clue. As my post already stated, this is fixed, and yes, I fixed it myself. It was not a problem of ability, it was an issue of time. You don't need to post anymore and try to accuse me of things you have no clue about. Please go somewhere else with your accusations. I doubt you want to help people you just don't have a better way to spend your time, but to accuse others. To say that I have a habit of laziness is absolutely absurd, you have no clue of who I am as a person. But, there are many others like you who lurk forums online, so I should in fact reprimand myself for being surprised and even wasting time in response.

Mor

2012-04-08 14:17:30

From: halgboy_tbc
Why do you speculate on the motives of why people ask things: you have no clue. As my post already stated, this is fixed, and yes, I fixed it myself. It was not a problem of ability, it was an issue of time. You don't need to post anymore and try to accuse me of things you have no clue about. Please go somewhere else with your accusations. I doubt you want to help people you just don't have a better way to spend your time, but to accuse others. To say that I have a habit of laziness is absolutely absurd, you have no clue of who I am as a person. But, there are many others like you who lurk forums online, so I should in fact reprimand myself for being surprised and even wasting time in response.


He just wanted to help you man, Don't be rude.

Abu

2012-04-08 14:25:15

From: halgboy_tbc
Why do you speculate on the motives of why people ask things: you have no clue. As my post already stated, this is fixed, and yes, I fixed it myself. It was not a problem of ability, it was an issue of time. You don't need to post anymore and try to accuse me of things you have no clue about. Please go somewhere else with your accusations. I doubt you want to help people you just don't have a better way to spend your time, but to accuse others. To say that I have a habit of laziness is absolutely absurd, you have no clue of who I am as a person. But, there are many others like you who lurk forums online, so I should in fact reprimand myself for being surprised and even wasting time in response.


What is wrong is with you? I call you lazy and you take it to heart as though I just insulted a member of your family - man up and whining about so little things. As for 'people like me who don't want to help people', I really hate to brag but there's a little bear next to my avatar which is labelled SRL Helper, which means I have been acknowledged for helping people around the forums - in fact, I have SO many people who would vouch for me. Also, you state that you already mentioned it was fixed, maybe I would've seen that if you had edited your original post rather double-post - which is a virtue that everyone here finds extremely annoying. And yes, please don't waste your time with another response.

m34tcode

2012-04-08 16:10:23

Your attitude is really inappropriate dude. We posted to help you learn, and you are attacking us for it.

Sin

2012-04-08 16:20:17

Enough.
It's over, let's not start it into a flame war..

Home

2012-04-08 16:51:36

function GeScreen :Boolean;
begin
Result := CountColor(39116, 145, 32, 354, 50) > 320;
end;


function OpenBankGE :Boolean;
var
TPA :TPointArray;
NPC :TPoint;
C, I, Hi :Integer;
begin
If not LoggedIn then Exit;
If GeScreen then
begin
Result := True;
Exit;
end;

TPA := GetMiniMapDots('NPC');
Hi := Length(TPA);

for I := 0 to Hi - 1 do
begin
NPC := MMtoMS(TPA[I]);
If NPC = Point(-1, -1) then Continue;
MMouse(NPC.X, NPC.Y, 1, 1);
If WaitUpTextMulti(['Clerk', 'Ex', 'change', 'rand'], 200) then
begin
ClickMouse2(False);
If WaitOptionMulti(['change G', 'ge Gr'], 600) then
begin
MarkTime(C);
Repeat
Wait(RandomRange(50, 100));
Until (GeScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (GeScreen) or (PinScreen);
If Result then
Break;
end;
end;
end;
end;


I just made it to loop through NPC's no colors needed.

~Home

Home

2012-04-08 16:52:49

function OpenBankGE :Boolean;
var
TPA :TPointArray;
NPC :TPoint;
C, I, Hi :Integer;
begin
If not LoggedIn then Exit;
If BankScreen then
begin
Result := True;
Exit;
end;

TPA := GetMiniMapDots('NPC');
Hi := Length(TPA);

for I := 0 to Hi - 1 do
begin
NPC := MMtoMS(TPA[I]);
If NPC = Point(-1, -1) then Continue;
MMouse(NPC.X, NPC.Y, 1, 1);
If WaitUpTextMulti(['Clerk', 'Ex', 'change', 'rand'], 200) then
begin
ClickMouse2(False);
If WaitOptionMulti(['change G', 'ge Gr'], 600) then
begin
MarkTime(C);
Repeat
Wait(RandomRange(50, 100));
Until (BankScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
If Result then
Break;
end;
end;
end;
end;


I just made it to loop through NPC's no colors needed.

~Home

m34tcode

2012-04-08 16:55:40

Relys on the accuracy of mmToMS though. Is it accurate enough? o.O

halgboy_tbc

2012-04-08 22:31:10

From: Home
function OpenBankGE :Boolean;
var
TPA :TPointArray;
NPC :TPoint;
C, I, Hi :Integer;
begin
If not LoggedIn then Exit;
If BankScreen then
begin
Result := True;
Exit;
end;

TPA := GetMiniMapDots('NPC');
Hi := Length(TPA);

for I := 0 to Hi - 1 do
begin
NPC := MMtoMS(TPA[I]);
If NPC = Point(-1, -1) then Continue;
MMouse(NPC.X, NPC.Y, 1, 1);
If WaitUpTextMulti(['Clerk', 'Ex', 'change', 'rand'], 200) then
begin
ClickMouse2(False);
If WaitOptionMulti(['change G', 'ge Gr'], 600) then
begin
MarkTime(C);
Repeat
Wait(RandomRange(50, 100));
Until (BankScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
If Result then
Break;
end;
end;
end;
end;


I just made it to loop through NPC's no colors needed.

~Home


Thanks, a ton. I had made a simple one that worked, but I'm sure this may be better to use in future scripts. Thanks a lot for your beneficial input.

Er1k

2012-04-08 22:40:43

From: m34tcode
Relys on the accuracy of mmToMS though. Is it accurate enough? o.O


It varies from place to place.

My solution was, to stand on a particular tile and just use static coords :)

m34tcode

2012-04-08 23:17:46

I am assuming that they use a matrix to convert the coordinates, so ubermath wizzes, could theoretically, fine tune it to perfection.

But with camera rotation static coords is less dependable. for more than just a starting point anyway.