SRL Archive - OSR Help

Not banking!?!


Jhangir

2011-12-24 22:51:54

program SnapeGrass;

{$define SMART}
{$i srl/srl.scar}
{$i sps/sps.simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Runecrafting';
Active := True;
end;
end;

Procedure Antiban;
Begin
case Random(250) Of
0: HoverSkill('random', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Procedure StatsGuise(wat:String);
begin
Status(wat);
Disguise(wat);
end;

Procedure StartScript;
Begin
SetUpSRL;
MouseSpeed := 15;
ActivateClient;
DeclarePlayers;
If (Not LoggedIn) then
LoginPlayer;
SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
SetAngle(True);
MakeCompass('n');
End;

Function WalkToBank: Boolean;
var
Path:TPointArray;
Begin
SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
If Not FindNormalRandoms Then
Begin
Path := [Point(5608, 1844), Point(5622, 1803), Point(5620, 1778), Point(5617, 1763)];
StatsGuise('Heading to Banker');
If SPS_WalkPath(Path) Then
StatsGuise('Arrived at Banker');
result := True;
End;
End;

Function Bank: Boolean;
Var
x, y:Integer;
Begin
If WalkToBank Then
begin
If FindObjCustom(x, y, ['anker'], [10117444], 5) Then
begin;
MMouse(x, y, 1, 1);
Wait(200+RandomRange(50,100));
Mouse(x, y, 0, 0, False);
Wait(200+Randomrange(100,150));
ChooseOption('ank Frem');
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
TerminateScript;
end;
end;
end;




begin
StartScript;
WalkToBank;
Bank;
end.

Why wont my script bank i used this exact same thing for my toad picker!?!?!

kevin33

2011-12-24 23:00:34

From: Jhangir
program SnapeGrass;

{$define SMART}
{$i srl/srl.scar}
{$i sps/sps.simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Runecrafting';
Active := True;
end;
end;

Procedure Antiban;
Begin
case Random(250) Of
0: HoverSkill('random', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Procedure StatsGuise(wat:String);
begin
Status(wat);
Disguise(wat);
end;

Procedure StartScript;
Begin
SetUpSRL;
MouseSpeed := 15;
ActivateClient;
DeclarePlayers;
If (Not LoggedIn) then
LoginPlayer;
SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
SetAngle(True);
MakeCompass('n');
End;

Function WalkToBank: Boolean;
var
Path:TPointArray;
Begin
SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
If Not FindNormalRandoms Then
Begin
Path := [Point(5608, 1844), Point(5622, 1803), Point(5620, 1778), Point(5617, 1763)];
StatsGuise('Heading to Banker');
If SPS_WalkPath(Path) Then
StatsGuise('Arrived at Banker');
result := True;
End;
End;

Function Bank: Boolean;
Var
x, y:Integer;
Begin
If WalkToBank Then
begin
If FindObjCustom(x, y, ['anker'], [10117444], 5) Then
begin;
MMouse(x, y, 1, 1);
Wait(200+RandomRange(50,100));
Mouse(x, y, 0, 0, False);
Wait(200+Randomrange(100,150));
ChooseOption('ank Frem');
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
TerminateScript;
end;
end;
end;




begin
StartScript;
WalkToBank;
Bank;
end.

Why wont my script bank i used this exact same thing for my toad picker!?!?!


Well what does it say? Where abouts does it stop, etc.

Jhangir

2011-12-24 23:19:14

It walks to the banker and then the scripts stops. It never does this part of the code

Function Bank: Boolean;
Var
x, y:Integer;
Begin
If WalkToBank Then
begin
If FindObjCustom(x, y, ['anker'], [10117444], 5) Then
begin;
MMouse(x, y, 1, 1);
Wait(200+RandomRange(50,100));
Mouse(x, y, 0, 0, False);
Wait(200+Randomrange(100,150));
ChooseOption('ank Frem');
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
TerminateScript;
end;
end;
end;

kevin33

2011-12-24 23:25:38

Does it say anything when it terminates? I wont be much help but I will try. I also am helping clarify for others who can help much better then I.

Jhangir

2011-12-24 23:26:36

Nope nothing it just says successfully executed.

Brandon

2011-12-24 23:45:25

From: Jhangir
Nope nothing it just says successfully executed.


You only have one colour for the banker :S if that's not a unique colour, then that could be your problem.. Does the mouse move at all? Nothing in the debug? You can always open the simba console and see if it printed anything there :S No script posted? By the looks of the uptext are u trying to bank at fremenik?

Jhangir

2011-12-24 23:49:05

I found out my problem I had to pick the right color! Face palm for me =p

Jhangir

2011-12-25 00:10:06

program SnapeGrass;

{$define SMART}
{$i srl/srl.scar}
{$i sps/sps.simba}

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

Procedure Antiban;
Begin
case Random(250) Of
0: HoverSkill('random', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Procedure StatsGuise(wat:String);
begin
Status(wat);
Disguise(wat);
end;

Procedure StartScript;
Begin
SetUpSRL;
MouseSpeed := 15;
ActivateClient;
DeclarePlayers;
If (Not LoggedIn) then
LoginPlayer;
SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
SetAngle(True);
MakeCompass('n');
End;

Function WalkToBank: Boolean;
var
Path:TPointArray;
Begin
SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
If Not FindNormalRandoms Then
Begin
Path := [Point(5608, 1841), Point(5621, 1814), Point(5620, 1782), Point(5621, 1764)];
StatsGuise('Heading to Banker');
If SPS_WalkPath(Path) Then
StatsGuise('Arrived at Banker');
result := True;
End;
End;

Function Bank: Boolean;
Var
x, y:Integer;

begin
If FindObjCustom(x, y, ['anker'], [10117444, 6723765], 50) Then
begin;
MMouse(x, y, 1, 1);
Wait(200+RandomRange(50,100));
Mouse(x, y, 0, 0, False);
Wait(200+Randomrange(100,150));
ChooseOption('ank Frem');
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
begin
writeln('NO PIN ENTERED!');
TerminateScript;
end;

end;
end;





begin
StartScript;
WalkToBank;
Bank;
end.


Now I have a new problem after choosing the bank option it never enters the pin. It just terminates =(.

Brandon

2011-12-25 00:17:06

From: Jhangir

Now I have a new problem after choosing the bank option it never enters the pin. It just terminates =(.


You might want to put a wait there.. what's happening is that as soon as it opens the bank, it looks for pinscreen without checking to see if the bank is even open yet..

Example Fix (You need to implement some failsafes bro):


var
T: Integer;
begin
while not (BankScreen or PinScreen) do
begin
wait(1);
MarkTime(T);
if(T > 10000) then
begin
writeln('Banking failed.. Bank is not Open!');
T:= 0;
TerminateScript; // or Break; <-- Or do a failsafe here so it tries again.. such as finding banker and clicking again. Until bankscreen
// Or Pinscreen.
end;
end;
end

kevin33

2011-12-25 00:19:08

Did u type in the pin you have to use?