PDA

View Full Version : RSPS Bank Pin??



The Legendary
04-23-2015, 05:51 AM
I want to do something like this but with a call function that if pin input from script setup like Pin ='1234'; then only the pin coordinate of 1,2,3,4 moves to their point only. But I couldn't figure how I can make that function. And Yes this is for rsps.

program PinCracker;
{$i srl-osr/srl.simba}
//this script were quaoted from : https://villavu.com/forum/showthread.php?t=109962
var
x, y:Integer;
Pin1, pin2, pin3, pin4, pin5, pin6, pin7, pin8, pin9, pin0:TPoint;

Procedure AssignNumbers;

Begin
pin1 := Point(70, 139);
pin2 := Point(165, 138);
pin3 := Point(250, 135);
pin4 := Point(343, 141);
pin5 := Point(71, 212);
pin6 := Point(164, 224);
pin7 := Point(254, 214);
pin8 := Point(80, 290);
pin9 := Point(167, 290);
pin0 := Point(257, 289);
End;

Procedure ClickPin;
var
x, y:Integer;
Begin
Mouse(Pin1.x, pin1.y, 0, 0, true);
Mouse(Pin2.x, pin2.y, 0, 0, true);
Mouse(Pin3.x, pin3.y, 0, 0, true);
Mouse(Pin4.x, pin4.y, 0, 0, true);
End;

begin
mouseSpeed := 25;
AssignNumbers
ClickPin
end.program PinCracker;
{$i srl-osr/srl.simba}

var
x, y:Integer;
Pin1, pin2, pin3, pin4, pin5, pin6, pin7, pin8, pin9, pin0:TPoint;

Procedure AssignNumbers;

Begin
pin1 := Point(70, 139);
pin2 := Point(165, 138);
pin3 := Point(250, 135);
pin4 := Point(343, 141);
pin5 := Point(71, 212);
pin6 := Point(164, 224);
pin7 := Point(254, 214);
pin8 := Point(80, 290);
pin9 := Point(167, 290);
pin0 := Point(257, 289);
End;

Procedure ClickPin;
var
x, y:Integer;
Begin
Mouse(Pin1.x, pin1.y, 0, 0, true);
Mouse(Pin2.x, pin2.y, 0, 0, true);
Mouse(Pin3.x, pin3.y, 0, 0, true);
Mouse(Pin4.x, pin4.y, 0, 0, true);
End;

begin
mouseSpeed := 25;
AssignNumbers
ClickPin
end.

Here is the BankPin Window
http://i58.tinypic.com/2dv0sxe.png

rj
04-23-2015, 03:50 PM
Is this for alotic?

Turpinator
04-23-2015, 04:12 PM
procedure EnterPin(pin: string);
var
pinP: array[0..9] of TPoint;
i, n: integer;
begin
if length(pin) <> 4 then
begin
writeln('PIN is incorrect length');
exit();
end;
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToIntDef(pin[i], -1);
if n <> -1 then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;


No idea if this works, but it should.

The Legendary
04-23-2015, 05:05 PM
Is this for alotic?

Nope, This is for Emps-World.


procedure EnterPin(pin: string);
var
pinP: array[0..9] of TPoint;
i, n: integer;
begin
if length(pin) <> 4 then
begin
writeln('PIN is incorrect length');
exit();
end;
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToIntDef(pin[i], -1);
if n <> -1 then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;


No idea if this works, but it should.

I want it to somewhat read the input numbers from the setup. I was planning on releasing this script that's why i need to make it easy for botters to just put in bankpin/username/password. Then start this bot. I'm sorry but I still can't figure out how i can make that procedure move to the specific spot of the bank number of 0-9 base on user input of bankpin.


Program: test;
cons
pin='1234';
....
begin
end.

rj
04-23-2015, 05:13 PM
Nope, This is for Emps-World.



I want it to somewhat read the input numbers from the setup. I was planning on releasing this script that's why i need to make it easy for botters to just put in bankpin/username/password. Then start this bot. I'm sorry but I still can't figure out how i can make that procedure move to the specific spot of the bank number of 0-9 base on user input of bankpin.


Program: test;
cons
pin='1234';
....
begin
end.

Do the numbers change places when you enter a digit?

The Legendary
04-23-2015, 05:21 PM
The Numbers does not change places, I know i can make an easier function that will check to see if there is a bankpin window then move the coordinate to my bankpin numbers but I don't want make that functions just for me. I want to share the script in the future to my fellow botters to use so they can just input their inform without the modifying and thinking.

rj
04-23-2015, 08:05 PM
The Numbers does not change places, I know i can make an easier function that will check to see if there is a bankpin window then move the coordinate to my bankpin numbers but I don't want make that functions just for me. I want to share the script in the future to my fellow botters to use so they can just input their inform without the modifying and thinking.

Did you try Turpinator;'s function?

enterPin('1786');


That's how you use it

Turpinator
04-23-2015, 10:57 PM
Did you try Turpinator;'s function?


enterPin('1786');


That's how you use it[/QUOTE]

Or ofc...
program SomeStupidRSPSCrapScript;
{$i whatever_include.simba}

const
USERNAME = 'ilikeRSPSes@RSPS.ftw';
PASSWORD = 'isuckatregularRSsoihavetoplayaRSPS';
PIN = '6969';

procedure EnterPin(pin: string);
var
pinP: array[0..9] of TPoint;
i, n: integer;
begin
if length(pin) <> 4 then
begin
writeln('PIN is incorrect length');
exit();
end;
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToIntDef(pin[i], -1);
if n <> -1 then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;

begin
SetupWhateverRSPS;
LoginToRSPS;
OpenBank;
enterPin(PIN);
dostupidstuff;
end;

The Legendary
04-24-2015, 07:45 AM
This Compile successfully but when I hit the play button I got an error: Could not call proc at line 56. This error only happen when i put 4 bank pin numbers in total. It does not happen if i only put 3 or 2 or 1 bank pin numbers total in the pin='1891'; Also when i put just one bank pin number, I don't see the mouse move anywhere, all it does is saying PIN is incorrect length.

program Example;
{$I SRL/SRL.simba}

const
USERNAME = 'IlikeRSPSVeryMuch';
PASSWORD = 'Ihaveneverplayrsinmylife';
PIN = '1891';


function BankpinWindow:Boolean;
var
Bankk,x,y:Integer;
begin
Bankk := BitmapFromString(42, 10, 'meJy9UkkOwCAI5Hf9QK/+/xmWaK' +
'2EZegWCQeZIAMDVCuxN9v2Qi3kx/XueIQ88rSgDNexK5fsVg2BRCD' +
'6zjbAiXTzZld7CRGXyCabL1+UR7pFmab5d+zRIGmfv1xdlI/Yvb2j' +
'Zrwbw8qnk84GxhbOHC+8iQDcFlfKrPcDqrraxA==');
If FindBitmapToleranceIn(Bankk,x,y,MSX1,MSY1,MSX2,MSY 2,15)then
begin
Wait(100+random(100));
Writeln('Sees Bank Pin Interface');
Result:=True;
End else
//Writeln('No bank pin interface');
FreeBitmap(Bankk);
End;


function BankofEmps:Boolean;
var
GoldenBank,x,y:Integer;
begin
GoldenBank:=BitmapFromString(45, 9, 'meJy9UkEOgDAI2+/4gFf//4y5zGx' +
'pCtQZF4kHWmA2FDvO2qP0sAFbYlC6Yci8+sQ4lRD+L4MCZfj9 IJOR' +
'Yrw9njWXEeE2yLKMCf/om7G00RSxyayTNHyX4bexIoMc2SjjcXbxN' +
'gSs0UFqU/SJzhyVkFMhXGQE7x+f+QW4SljF');
If FindBitmapToleranceIn(GoldenBank,x,y,MSX1,MSY1,MSX 2,MSY2,15)then
Begin
Writeln('Bank Open Successful');
Result:=TruE
End Else
Writeln('Can''t Open bank');
FreeBitmap(GoldenBank);
End;


procedure EnterPin(pin: string);
var
pinP: array[0..9] of TPoint;
i, n: integer;
begin
if length(pin) <> 4 then
begin
writeln('PIN is incorrect length');
exit(bankofemps);
end;
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToIntDef(pin[i], -1);
if n <> -1 then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;


Begin
ClearDebug;
SetupSRL;
ActivateClient;
Wait(1000);
if bankpinwindow then begin enterPin(Pin); end;
end.

rj
04-24-2015, 10:54 AM
This Compile successfully but when I hit the play button I got an error: Could not call proc at line 56. This error only happen when i put 4 bank pin numbers in total. It does not happen if i only put 3 or 2 or 1 bank pin numbers total in the pin='1891'; Also when i put just one bank pin number, I don't see the mouse move anywhere, all it does is saying PIN is incorrect length.

program Example;
{$I SRL/SRL.simba}

const
USERNAME = 'IlikeRSPSVeryMuch';
PASSWORD = 'Ihaveneverplayrsinmylife';
PIN = '1891';


function BankpinWindow:Boolean;
var
Bankk,x,y:Integer;
begin
Bankk := BitmapFromString(42, 10, 'meJy9UkkOwCAI5Hf9QK/+/xmWaK' +
'2EZegWCQeZIAMDVCuxN9v2Qi3kx/XueIQ88rSgDNexK5fsVg2BRCD' +
'6zjbAiXTzZld7CRGXyCabL1+UR7pFmab5d+zRIGmfv1xdlI/Yvb2j' +
'Zrwbw8qnk84GxhbOHC+8iQDcFlfKrPcDqrraxA==');
If FindBitmapToleranceIn(Bankk,x,y,MSX1,MSY1,MSX2,MSY 2,15)then
begin
Wait(100+random(100));
Writeln('Sees Bank Pin Interface');
Result:=True;
End else
//Writeln('No bank pin interface');
FreeBitmap(Bankk);
End;


function BankofEmps:Boolean;
var
GoldenBank,x,y:Integer;
begin
GoldenBank:=BitmapFromString(45, 9, 'meJy9UkEOgDAI2+/4gFf//4y5zGx' +
'pCtQZF4kHWmA2FDvO2qP0sAFbYlC6Yci8+sQ4lRD+L4MCZfj9 IJOR' +
'Yrw9njWXEeE2yLKMCf/om7G00RSxyayTNHyX4bexIoMc2SjjcXbxN' +
'gSs0UFqU/SJzhyVkFMhXGQE7x+f+QW4SljF');
If FindBitmapToleranceIn(GoldenBank,x,y,MSX1,MSY1,MSX 2,MSY2,15)then
Begin
Writeln('Bank Open Successful');
Result:=TruE
End Else
Writeln('Can''t Open bank');
FreeBitmap(GoldenBank);
End;


procedure EnterPin(pin: string);
var
pinP: array[0..9] of TPoint;
i, n: integer;
begin
if length(pin) <> 4 then
begin
writeln('PIN is incorrect length');
exit(bankofemps);
end;
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToIntDef(pin[i], -1);
if n <> -1 then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;


Begin
ClearDebug;
SetupSRL;
ActivateClient;
Wait(1000);
if bankpinwindow then begin enterPin(Pin); end;
end.

Change exit(bankofemps); at line 55 to exit;


Exit; will exit the current procedure. If you were using lape then you could do exit(varType) in a function like

function bankOpen():boolean;
begin
exit(true);
end;

That would exit the function and return the result true

If you are trying to exit the procedure if the bank is not open then you can do

if (not bankOfEmps) then
exit;


I highly suggest you use the SRL-6 include unless there are functions/procedures in OSR that you need

The Legendary
04-24-2015, 02:59 PM
This still give me the Error: Could not call proc at line 56.
Even when I add this line to it. Error still there.
Delete the exit-->Error still there.
Leave at Exit-->error still there
if (not bankOfEmps) then
exit;
program Example;
{$I SRL/SRL.simba}

const
USERNAME = 'IlikeRSPSVeryMuch';
PASSWORD = 'Ihaveneverplayrsinmylife';
PIN = '1234';

function BankpinWindow:Boolean;
var
Bankk,x,y:Integer;
begin
Bankk := BitmapFromString(42, 10, 'meJy9UkkOwCAI5Hf9QK/+/xmWaK' +
'2EZegWCQeZIAMDVCuxN9v2Qi3kx/XueIQ88rSgDNexK5fsVg2BRCD' +
'6zjbAiXTzZld7CRGXyCabL1+UR7pFmab5d+zRIGmfv1xdlI/Yvb2j' +
'Zrwbw8qnk84GxhbOHC+8iQDcFlfKrPcDqrraxA==');
If FindBitmapToleranceIn(Bankk,x,y,MSX1,MSY1,MSX2,MSY 2,15)then
begin
Wait(100+random(100));
Writeln('Sees Bank Pin Interface');
Result:=True;
End else
//Writeln('No bank pin interface');
FreeBitmap(Bankk);
End;


function BankofEmps:Boolean;
var
GoldenBank,x,y:Integer;
begin
GoldenBank:=BitmapFromString(45, 9, 'meJy9UkEOgDAI2+/4gFf//4y5zGx' +
'pCtQZF4kHWmA2FDvO2qP0sAFbYlC6Yci8+sQ4lRD+L4MCZfj9 IJOR' +
'Yrw9njWXEeE2yLKMCf/om7G00RSxyayTNHyX4bexIoMc2SjjcXbxN' +
'gSs0UFqU/SJzhyVkFMhXGQE7x+f+QW4SljF');
If FindBitmapToleranceIn(GoldenBank,x,y,MSX1,MSY1,MSX 2,MSY2,15)then
Begin
Writeln('Bank Open Successful');
Result:=TruE
End Else
Writeln('Can''t Open bank');
FreeBitmap(GoldenBank);
End;

procedure EnterPin(pin: string);
var
pinP: array[0..9] of TPoint;
i, n: integer;
begin
if length(pin) <> 4 then
begin
writeln('PIN is incorrect length');
end;
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToIntDef(pin[i], -1);
if n <> -1 then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;

Begin
ClearDebug;
SetupSRL;
ActivateClient;
Wait(1000);
enterPin(Pin);
end.
Here is a picture of I trying to just use that procedure only
http://i59.tinypic.com/311o16q.png

rj
04-24-2015, 03:44 PM
This still give me the Error: Could not call proc at line 56.
Even when I add this line to it. Error still there.
Delete the exit-->Error still there.
Leave at Exit-->error still there
if (not bankOfEmps) then
exit;
program Example;
{$I SRL/SRL.simba}

const
USERNAME = 'IlikeRSPSVeryMuch';
PASSWORD = 'Ihaveneverplayrsinmylife';
PIN = '1234';

function BankpinWindow:Boolean;
var
Bankk,x,y:Integer;
begin
Bankk := BitmapFromString(42, 10, 'meJy9UkkOwCAI5Hf9QK/+/xmWaK' +
'2EZegWCQeZIAMDVCuxN9v2Qi3kx/XueIQ88rSgDNexK5fsVg2BRCD' +
'6zjbAiXTzZld7CRGXyCabL1+UR7pFmab5d+zRIGmfv1xdlI/Yvb2j' +
'Zrwbw8qnk84GxhbOHC+8iQDcFlfKrPcDqrraxA==');
If FindBitmapToleranceIn(Bankk,x,y,MSX1,MSY1,MSX2,MSY 2,15)then
begin
Wait(100+random(100));
Writeln('Sees Bank Pin Interface');
Result:=True;
End else
//Writeln('No bank pin interface');
FreeBitmap(Bankk);
End;


function BankofEmps:Boolean;
var
GoldenBank,x,y:Integer;
begin
GoldenBank:=BitmapFromString(45, 9, 'meJy9UkEOgDAI2+/4gFf//4y5zGx' +
'pCtQZF4kHWmA2FDvO2qP0sAFbYlC6Yci8+sQ4lRD+L4MCZfj9 IJOR' +
'Yrw9njWXEeE2yLKMCf/om7G00RSxyayTNHyX4bexIoMc2SjjcXbxN' +
'gSs0UFqU/SJzhyVkFMhXGQE7x+f+QW4SljF');
If FindBitmapToleranceIn(GoldenBank,x,y,MSX1,MSY1,MSX 2,MSY2,15)then
Begin
Writeln('Bank Open Successful');
Result:=TruE
End Else
Writeln('Can''t Open bank');
FreeBitmap(GoldenBank);
End;

procedure EnterPin(pin: string);
var
pinP: array[0..9] of TPoint;
i, n: integer;
begin
if length(pin) <> 4 then
begin
writeln('PIN is incorrect length');
end;
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToIntDef(pin[i], -1);
if n <> -1 then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;

Begin
ClearDebug;
SetupSRL;
ActivateClient;
Wait(1000);
enterPin(Pin);
end.
Here is a picture of I trying to just use that procedure only
http://i59.tinypic.com/311o16q.png

try this out:

program Example;
{$I SRL/SRL.simba}

const
USERNAME = 'IlikeRSPSVeryMuch';
PASSWORD = 'Ihaveneverplayrsinmylife';
PIN = '1234';

function BankpinWindow: Boolean;
var
Bankk, x, y: Integer;
begin
Bankk := BitmapFromString(42, 10, 'meJy9UkkOwCAI5Hf9QK/+/xmWaK' + '2EZegWCQeZIAMDVCuxN9v2Qi3kx/XueIQ88rSgDNexK5fsVg2BRCD' + '6zjbAiXTzZld7CRGXyCabL1+UR7pFmab5d+zRIGmfv1xdlI/Yvb2j' + 'Zrwbw8qnk84GxhbOHC+8iQDcFlfKrPcDqrraxA==');
if FindBitmapToleranceIn(Bankk, x, y, MSX1, MSY1, MSX2, MSY2, 15) then
begin
Wait(100 + random(100));
Writeln('Sees Bank Pin Interface');
Result := True;
end
else
FreeBitmap(Bankk);
end;

function BankofEmps: Boolean;
var
GoldenBank, x, y: Integer;
begin
GoldenBank := BitmapFromString(45, 9, 'meJy9UkEOgDAI2+/4gFf//4y5zGx' + 'pCtQZF4kHWmA2FDvO2qP0sAFbYlC6Yci8+sQ4lRD+L4MCZfj9 IJOR' + 'Yrw9njWXEeE2yLKMCf/om7G00RSxyayTNHyX4bexIoMc2SjjcXbxN' + 'gSs0UFqU/SJzhyVkFMhXGQE7x+f+QW4SljF');
if FindBitmapToleranceIn(GoldenBank, x, y, MSX1, MSY1, MSX2, MSY2, 15) then
begin
Writeln('Bank Open Successful');
Result := TruE
end
else
Writeln('Cant Open bank');
FreeBitmap(GoldenBank);
end;

function validPin(p:string):boolean;
begin
try
strToInt(p); // convert p to a integer
{
If you try to convert a string like 'db34' to a integer,
it will cause a runtime error to happen (because db34 is not a number), so if you surround it
with try except, it will try to run the code that could cause an
error, and if it does, it will run the 'except' portion.
}
except
result := false; //except portion, if it's not a valid integer then it's not a valid bank pin
exit;
end;
if (length(p) = 4) then // if the length of p is not 4 then it's not
// a valid pin
result := true
else
result := false;
end;

procedure EnterPin(pin: string);
var
pinP: TPointArray;
i, n: integer;
begin
if (not validPin(pin)) then
exit
else begin
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToInt(pin[i]);
if (n <> - 0) then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;
end;

begin
ClearDebug;
SetupSRL;
ActivateClient;
Wait(1000);
enterPin(Pin);
end.

The Legendary
04-24-2015, 04:24 PM
Looking great, I will try this and get back to you when I get home in 5 Hours.

Davi
04-24-2015, 04:47 PM
Why is the program title pinCracker?

The Legendary
04-24-2015, 05:57 PM
Why is the program title pinCracker?
@Davi only: I can't figure out how to make a function/procedure where the script move the mouse to the coordinate base on my # input of bankpin to open bank pin so I just quote that script from another topic as an example of what I want to be done. I hope I make it clear for you:D
The Script in my first post of this thread is from https://villavu.com/forum/showthread.php?t=109962
The part where I want to be done is like this functionBegin
pin1 := Point(70, 139);
pin2 := Point(165, 138);
pin3 := Point(250, 135);
pin4 := Point(343, 141);
pin5 := Point(71, 212);
pin6 := Point(164, 224);
pin7 := Point(254, 214);
pin8 := Point(80, 290);
pin9 := Point(167, 290);
pin0 := Point(257, 289);
End;

The Legendary
04-24-2015, 09:40 PM
try this out:

program Example;
{$I SRL/SRL.simba}

const
USERNAME = 'IlikeRSPSVeryMuch';
PASSWORD = 'Ihaveneverplayrsinmylife';
PIN = '1234';

function BankpinWindow: Boolean;
var
Bankk, x, y: Integer;
begin
Bankk := BitmapFromString(42, 10, 'meJy9UkkOwCAI5Hf9QK/+/xmWaK' + '2EZegWCQeZIAMDVCuxN9v2Qi3kx/XueIQ88rSgDNexK5fsVg2BRCD' + '6zjbAiXTzZld7CRGXyCabL1+UR7pFmab5d+zRIGmfv1xdlI/Yvb2j' + 'Zrwbw8qnk84GxhbOHC+8iQDcFlfKrPcDqrraxA==');
if FindBitmapToleranceIn(Bankk, x, y, MSX1, MSY1, MSX2, MSY2, 15) then
begin
Wait(100 + random(100));
Writeln('Sees Bank Pin Interface');
Result := True;
end
else
FreeBitmap(Bankk);
end;

function BankofEmps: Boolean;
var
GoldenBank, x, y: Integer;
begin
GoldenBank := BitmapFromString(45, 9, 'meJy9UkEOgDAI2+/4gFf//4y5zGx' + 'pCtQZF4kHWmA2FDvO2qP0sAFbYlC6Yci8+sQ4lRD+L4MCZfj9 IJOR' + 'Yrw9njWXEeE2yLKMCf/om7G00RSxyayTNHyX4bexIoMc2SjjcXbxN' + 'gSs0UFqU/SJzhyVkFMhXGQE7x+f+QW4SljF');
if FindBitmapToleranceIn(GoldenBank, x, y, MSX1, MSY1, MSX2, MSY2, 15) then
begin
Writeln('Bank Open Successful');
Result := TruE
end
else
Writeln('Cant Open bank');
FreeBitmap(GoldenBank);
end;

function validPin(p:string):boolean;
begin
try
strToInt(p); // convert p to a integer
{
If you try to convert a string like 'db34' to a integer,
it will cause a runtime error to happen (because db34 is not a number), so if you surround it
with try except, it will try to run the code that could cause an
error, and if it does, it will run the 'except' portion.
}
except
result := false; //except portion, if it's not a valid integer then it's not a valid bank pin
exit;
end;
if (length(p) = 4) then // if the length of p is not 4 then it's not
// a valid pin
result := true
else
result := false;
end;

procedure EnterPin(pin: string);
var
pinP: TPointArray;
i, n: integer;
begin
if (not validPin(pin)) then
exit
else begin
pinP := [Point(257, 289), Point(70, 139), Point(165, 138), Point(250, 135), Point(343, 141), Point(71, 212), Point(164, 224), Point(254, 214), Point(80, 290), Point(167, 290)];
for i := 1 to 4 do
begin
n := StrToInt(pin[i]);
if (n <> - 0) then
Mouse(pinP[n].x, pinP[n].y, 0, 0, true);
end;
end;
end;

begin
ClearDebug;
SetupSRL;
ActivateClient;
Wait(1000);
enterPin(Pin);
end.
Thank you very much. It's working great now but it skips bankpin '0' only.

Edit: Fix it by changing
if (n <> - 0) then to if (n <> - 1) then
Once again Thank you to you two for helping....Repped both