SRL Archive - OSR Help

Need Banking Help (selects wrong option)


poopy2177

2012-01-15 15:08:43

Ok so basicaly I don't get why my script is doing this
Function BankFish:Boolean;
var
x,y: Integer;
begin
x:=MSCX
y:=MSCY
if FindObjTPA(x,y,Banker,5,1,5,25,20, ['lk-to']) then
begin
WriteLn('Found Banker...clicking');
begin
Mouse(x,y,5,5,False);
ChooseOption('Bank');
end;
end;
end;
It finds the banker and then it right clicks but then it selects the option Talk-to not Bank??
Why is it doing this sorry I'm still a uber noob scripter

SOLVED

Griff

2012-01-15 15:14:53

Never use capitals when using ChooseOption. So it should just be
ChooseOption('ank');

Hero

2012-01-15 15:21:11

Function BankFish:Boolean;
var
x,y: Integer;
begin
x:=MSCX
y:=MSCY
if FindObjTPA(x,y,Banker,5,1,5,25,20, ['lk-to']) then
begin
WriteLn('Found Banker...clicking');
begin
Mouse(x,y,5,5,False);
ChooseOption('Bank');//This is your issue. Try something like 'ank Ban' since I am sure there are multiple options with 'Bank' in it.
end;
end;
end;

poopy2177

2012-01-15 15:22:13

From: Griff
Never use capitals when using ChooseOption. So it should just be
ChooseOption('ank');

Thanks for the tip but that's what I had at first and it still chooses talk to?
also I can't find a color that really works well with bankers using aca should I do NPC DTM's instead?

From: Hero
Function BankFish:Boolean;
var
x,y: Integer;
begin
x:=MSCX
y:=MSCY
if FindObjTPA(x,y,Banker,5,1,5,25,20, ['lk-to']) then
begin
WriteLn('Found Banker...clicking');
begin
Mouse(x,y,5,5,False);
ChooseOption('Bank');//This is your issue. Try something like 'ank Ban' since I am sure there are multiple options with 'Bank' in it.
end;
end;
end;

That worked thanks(:

Hero

2012-01-15 15:42:22

Yeah it is mostly because there are more then one option with the choice of words you use. So you have to try to be a tad bit more specific. I had this issue when I first started too. Good luck :)

poopy2177

2012-01-15 16:06:26

From: Hero
Yeah it is mostly because there are more then one option with the choice of words you use. So you have to try to be a tad bit more specific. I had this issue when I first started too. Good luck :)


alright thank you!
I'm just about done with my first script now! all I gotta do is add a progress report!