SRL Archive - OSR Help

PIN support?


Mister Snow

2012-11-17 22:58:08

PIN is too short to search, and pins came up with nothing for me. I dled some random scripts, but the best I could find was just putting :

Pin := '';


I tried it, and it didn't work.

Is there no longer pin support with simba?

If there is, a link to something that talks about it would be greatly appreciated!

Thanks!

Olly

2012-11-17 23:02:32

function Inpin(Pin: string): Boolean;

Enters bank pin. Will try 3 times, returns true if bank is opened.

Rezozo

2012-11-17 23:04:21

Did you try taking it out entirely?
Do you have a pin? If you do, what exactly do you get when you put it in.
If you don't, then what is the problem? Just type in anything.

KeepBotting

2012-11-17 23:17:59

if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;

riwu

2012-11-17 23:27:26

From: KeepBotting
if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;

Surely you want a failsafe to that potentially infinite loop? :p

Mister Snow

2012-11-17 23:31:41

Heh, thanks guys, fast response. I figured pin was like the other parts of declare players :redface:

inpin was what I was missing :spot:

Awesome! thanks for the help… especially that fast! Issue solved =D

KeepBotting

2012-11-18 08:56:37

From: riwu
Surely you want a failsafe to that potentially infinite loop? :p
Failsafe was in the following procedure.

riwu

2012-11-18 09:03:34

From: KeepBotting
Failsafe was in the following procedure.


repeat
if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;
How does this break out if no pin is provided or the pin provided is wrong? It will keep trying the wrong pin eternally.

KeepBotting

2012-11-18 09:39:33

From: riwu

repeat
if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;
How does this break out if no pin is provided or the pin provided is wrong? It will keep trying the wrong pin eternally.
Oh, good point.

for i:=0 to 3 do 
repeat
if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;
Better? Will only try 3 times.

Gu3st...

2012-11-18 10:33:43

From: KeepBotting
Oh, good point.

for i:=0 to 3 do 
repeat
if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;
Better? Will only try 3 times.

No, you didn't remove the potential infinite loop. Think about it like this: what if the pin is incorrect? It will then repeat the input of the false pin until forever; the pinscreen will always be visible, and the bankscreen will never be visible.

Olly

2012-11-18 11:14:21

Inpin retry 3 times irc

Gu3st...

2012-11-18 11:25:02

From: Ollybest
Inpin retry 3 times irc
Hmm, true… But only when ClosePinScreen is working correctly. One should always practice having loops like this time-out at some time anyways

riwu

2012-11-18 20:24:00

From: Ollybest
Inpin retry 3 times irc

What if no pin is provided? It will simply keep calling InPin which keep exits, hence stuck at the pinscreen forever (instead of say, switching players). Also with that extra external loop, ('repeat' before if Pinscreen()…') it won't break out even if PinScreen return false…

I pointed out the infinite loop, and instead of removing it, he added an extra for loop in front :duh:
But who are we to judge him? We are but noobs and leechers!
http://villavu.com/forum/showpost.php?p=1128970&postcount=31

Sin

2012-11-18 20:25:43


for i:=0 to 3 do
repeat
if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;

Forgot ``if (i = 3') then.."?