SRL Archive - Simba Tasks

Issues with bank pins


Jos3ph

2012-07-28 12:34:19

I been trying to use bank pins via my script but when it acesses my bank it doesnt insert bank pin into the script.

Brandon

2012-07-28 13:12:13


{$DEFINE SMART}
{$I SRL/SRL.Simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := ''; //Fill in this..
WorldInfo := [27, 42, 45, 46, 48, 52, 59, 70, 72, 78, 79, 87, 104, 115, 117];
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Slayer;
Active := True;
end;
end;

begin
{$IFDEF SMART}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}

DeclarePlayers;
SetupSRL;

OpenBankFast('vwb'); //Iunno I just tested with varrock bank after seeing this thread. It works.
end.

Jos3ph

2012-07-28 14:20:16

Brandon is this a new code?

Brandon

2012-07-28 14:36:16

From: po2n star
Brandon is this a new code?


No.. DeclarePlayers is the standard procedure in almost every script that requires logging in and automatic banking..

If you don't want to use that then check out the function: "InPin".

That will do Pins for your. I'd suggest using DeclarePlayers though as it really simplifies a lot of things. You usually call DeclarePlayers right before SetupSRL. The sixhourfix also uses declareplayers. If that procedure isn't found, it will just terminate the script as normal since there is no players to login. Make sense?

Jos3ph

2012-07-28 14:57:52

I am still learning this however this is the code I am currently using;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Member := true;
Active := true;
end;
end;

blinkblink

2012-07-28 14:58:08

From: Brandon
No.. DeclarePlayers is the standard procedure in almost every script that requires logging in and automatic banking..

If you don't want to use that then check out the function: "InPin".

That will do Pins for your. I'd suggest using DeclarePlayers though as it really simplifies a lot of things. You usually call DeclarePlayers right before SetupSRL. The sixhourfix also uses declareplayers. If that procedure isn't found, it will just terminate the script as normal since there is no players to login. Make sense?


wait a minute, so if you call declareplayer after setupsrl then the 6hr fix won't work? I guess that was the reason why the script I was complaining asking for help wasn't working with the sixhourfix :P

riwu

2012-07-28 20:23:29

From: Brandon

{$DEFINE SMART}
{$I SRL/SRL.Simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := ''; //Fill in this..
WorldInfo := [27, 42, 45, 46, 48, 52, 59, 70, 72, 78, 79, 87, 104, 115, 117];
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Slayer;
Active := True;
end;
end;

begin
{$IFDEF SMART}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}

DeclarePlayers;
SetupSRL;

OpenBankFast('vwb'); //Iunno I just tested with varrock bank after seeing this thread. It works.
end.

I thought u actually have to do something like this after OpenBank?
  if PinScreen then
if (Players[0].Pin='') then
begin
writeln('no pin entered, pls go to DeclarePlayers and enter it');
TerminateScript;
end else
InPin(Players[0].Pin);
Because when i look at the OpenBank procedure it simply returns true and exit if PinScreen/BankScreen is shown.

Brandon

2012-07-28 21:11:50

From: riwu
I thought u actually have to do something like this after OpenBank?
Because when i look at the OpenBank procedure it simply returns true and exit if PinScreen/BankScreen is shown.


I guess you have to do both :S Look at the end of the OpenBankFast Function. You'll see that it enters your pin for you. Not sure why it exits at the start though.

Footy

2012-07-28 21:13:43

From: blinkblink
wait a minute, so if you call declareplayer after setupsrl then the 6hr fix won't work? I guess that was the reason why the script I was complaining asking for help wasn't working with the sixhourfix :P


No, no! The six hour fix only works if you use declare players.

riwu

2012-07-29 02:37:54

From: Brandon
I guess you have to do both :S Look at the end of the OpenBankFast Function. You'll see that it enters your pin for you. Not sure why it exits at the start though.

Guess i understand now, its meant to exit if bank is already opened when the function is called, but the dev probably forget that if its PinScreen it will also exit and the pin will never be keyed.

Probably should separate the case that if PinScreen it should InPin before exiting. For now the safest way would be to add InPin yourselves after banking.

P1ng

2012-07-29 02:43:16

This is an AIO banking procedure I use in a couple of my scripts. It will try opening the bank and entering the PIN up to 5 times before failing. Also, it is best to use DeclarePlayers for entering in the PIN but you do still need to call InPin for alot of banking functions.

procedure POpenBank;
var
Counter: integer;
begin
Status('POpenBank');
SetAngle(SRL_ANGLE_HIGH);
while IsMoving do
Wait(RandomRange(500,800));
repeat
Inc(Counter);
FFlag(0);
if (not(LoggedIn)) or FindNormalRandoms or BankScreen then
Break;
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
case Players[0].Integers[1] of
0: OpenBankChest(SRL_BANK_SW);
1: OpenBank('feb',True,False);
2: OpenBank('fwb',True,False);
3: OpenBank('veb',True,False);
4: OpenBank('vwb',True,False);
5: OpenBank('db',True,False);
6: OpenBank('eb',True,False);
7: OpenBank('akb',True,False);
8: OpenBankChest(SRL_BANK_B);
9: OpenBankChest(SRL_BANK_CW);
end;
until(Counter > 5);
end;

riwu

2012-07-29 02:52:07

From: P1ng
This is an AIO banking procedure I use in a couple of my scripts. It will try opening the bank and entering the PIN up to 5 times before failing. Also, it is best to use DeclarePlayers for entering in the PIN but you do still need to call InPin for alot of banking functions.

procedure POpenBank;
var
Counter: integer;
begin
Status('POpenBank');
SetAngle(SRL_ANGLE_HIGH);
while IsMoving do
Wait(RandomRange(500,800));
repeat
Inc(Counter);
FFlag(0);
if (not(LoggedIn)) or FindNormalRandoms or BankScreen then
Break;
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
case Players[0].Integers[1] of
0: OpenBankChest(SRL_BANK_SW);
1: OpenBank('feb',True,False);
2: OpenBank('fwb',True,False);
3: OpenBank('veb',True,False);
4: OpenBank('vwb',True,False);
5: OpenBank('db',True,False);
6: OpenBank('eb',True,False);
7: OpenBank('akb',True,False);
8: OpenBankChest(SRL_BANK_B);
9: OpenBankChest(SRL_BANK_CW);
end;
until(Counter > 5);
end;

That doesn't include all the banks srl supports. Look into my BirdNest script for an extremely easy way of making it 'AIO' banking ;)