let me use their bank pin function or whatever or teach me how to make/use 1 in my script?
let me use their bank pin function or whatever or teach me how to make/use 1 in my script?
InPin('BankPin Here');
Print screen save in paint and take DTMs of the numbers...
InPin works just fine. Just make sure its getting a string not an integer. If you use the Players[0].Pin, use IntToStr(). I modified OpenBank so that I could use it to take a pin, but I believe that in xBank.scar there is an OpenBank3 that already accepts a pin. Here is my modified code, its pretty much exactly the OpenBank in Bank.scar, i just added the InPin.
SCAR Code://SRL team i suppose, i just added InPin to it :P
function OpenMyBank: Boolean;
var
x, y, f: Integer;
begin
Status('Openning Bank...');
if not(LoggedIn) then exit;
Flag;
Wait(350 + random(150));
if not BankScreen then
repeat
if FindObjCustom(x, y, ['ank', 'ooth', 'booth'], [864829,4086384], 5) then
Mouse(x, y, 4, 4, False);
Wait(250);
if (ChooseOption('Use-quickly')) then
begin
FFlag(0);
wait(1000);
if(PinScreen) then
repeat
Wait(500);
InPin(IntToStr(Players[CurrentPlayer].Pin));
Inc(f);
until (BankScreen) or (f > 5);
end;
until (BankScreen);
Result := BankScreen;
end;
Kave posted what I think will work by looking at it except for one issue. Unless I am wrong
SCAR Code:InPin(IntToStr(Players[CurrentPlayer].Pin));
will no longer work. The ".pin" is no longer an option in SRL4. If you are doing a script like your fletcher for only one player you could simply define it as a constant and do something like:
SCAR Code:if(PinScreen)then InPin(***); // making *** whatever constant you assigned
Or if its a multiplayer script in DeclarePayers add:
SCAR Code:Players[0].Strings[0] := '0000'; // Bank PIN, If needed
and put something like:
SCAR Code:if(PinScreen)then InPin(Players[CurrentPlayer].Strings[0]);
I don't have my script I'm working on in front of me but if I remember right it was something close to that.
heres mine:
SCAR Code:Function InPin2(pin:integer):Boolean;
var pinstr:string;
star,i,x,y:integer;
tpt1,tpt2:array[0..3] of tpoint;
begin
if (PinScreen) then
begin
star := BitmapFromString2(False, 'a81C2B78DA4D8B3912C0200C0' +
'3BF247C01A5C984FF3F29166970B1A359C90090A3007F0A61493A' +
'8DDBCBACF4328CE66C7C07BDF0A9A7928B6DF4C63C4FA15E684B6' +
'C1AD47EEE3AE036373F9CC');
tpt1[0].x:=428; tpt1[0].y:=31;
tpt2[0].x:=442; tpt2[0].y:=48;
tpt1[1].x:=444; tpt1[1].y:=31;
tpt2[1].x:=458; tpt2[1].y:=48;
tpt1[2].x:=460; tpt1[2].y:=31;
tpt2[2].x:=474; tpt2[2].y:=48;
tpt1[3].x:=476; tpt1[3].y:=31;
tpt2[3].x:=490; tpt2[3].y:=48;
PinStr:=(inttostr(pin))
mmouse(322,203,20,20);
for i:=1 to 4 do
begin
wait(100+random(100));
ClickText(pinstr[i], upchars, 1, 1, 512, 336, True);
wait(100+random(100))
mmouse(322,203,20,20);
repeat
wait(20)
if i=4 then
begin
repeat
wait(20)
until bankscreen
break;
end;
until FindBitmaptoleranceIn(star,x,y,tpt1[i-1].x,tpt1[i-1].y,tpt2[i-1].x,tpt2[i-1].y,20)
end;
end;
if (bankscreen) then result:=true;
freebitmap(star)
end;
use like inpin2(1234) <---its an integer but if you want it a string you have to change one thing.
There are currently 1 users browsing this thread. (0 members and 1 guests)