SRL Archive - OSR Help

Walking Problem


lilcmp1

2012-01-02 18:12:41

When I run;

program New;
{$i srl/srl.scar}
{$i sps/sps.simba}

Var
ToOb: TPointArray;
Procedure TeletoBank;
Begin;
End;
Procedure WalkingToOb;
Begin
if (LoggedIn) then
begin
SPS_Setup(RUNESCAPE_SURFACE,['9_7','8_7']);
ToOb := [Point(3700, 3080), Point(3694, 3014),
Point(3652, 2970), Point(3631, 2927),
Point(3623, 2868), Point(3587, 2850)];
SPS_WalkPath(ToOb);
Wait(RandomRange(300, 400));
If Not (SPS_WalkPath(ToOb)) then
Begin
TeleToBank;
WalkingToOb;
End;

End;
End;

begin
SetupSRL;
WalkingToOb;
end.

It clicks once (hooray) but then the window for Flag shows up and line 24 is highlighted. It then stops and never clicks again.
Exception: Range check error at line 24
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]


Line 24 is ifFindBitmapToleranceIn
Function FindFlag(var X, Y: integer): Boolean;
begin
Result := False;
if FindBitmapToleranceIn(bmpFlag, X, Y, MMX1, MMY1, MMX2, MMY2, 60) then
begin
Result := True;
X := X+4;
Y := Y+9;
end;
end;


Is there something I need to change in find flag ? O_o

Jhangir

2012-01-02 21:03:19

Try using smart and the tell me what happened.

Hero

2012-01-02 21:04:09

program New;
{$i srl/srl.scar}
{$i sps/sps.simba}


Procedure TeletoBank;
begin;
//empty why?
End;


Procedure WalkingToOb;
var
ToOb: TPointArray;

begin
if (LoggedIn) then
begin
SPS_Setup(RUNESCAPE_SURFACE,['9_7','8_7']);

ToOb := [Point(3700, 3080), Point(3694, 3014),
Point(3652, 2970), Point(3631, 2927),
Point(3623, 2868), Point(3587, 2850)];

SPS_WalkPath(ToOb);
FFlag(3);
Wait(RandomRange(300, 400));
If Not (SPS_WalkPath(ToOb)) then
Begin
//TeleToBank; //Easier to comment the line instead.
WalkingToOb;
end;

end;
end;

begin
SetupSRL;
ActivateClient;//Puts RS as the main window
WalkingToOb;
end.

Give that a try. Also you have to make sure you are in the right area. Usually when simba opens another file like that it means you typed something wrong or you are just off a bit and can edit it real fast because if done right it shouldn't open the file it calls upon unless bugged horribly.

lilcmp1

2012-01-02 21:38:32

Well it works when using smart O_o good enough I suppose lol.

Jhangir

2012-01-02 21:50:13

From: lilcmp1
Well it works when using smart O_o good enough I suppose lol.


I know your problem. Glad i fixed it but this happens when the simba client overlaps your other window. Your two windows have to be separated. Cant touch each other. You get errors when the client touched the window and you select with the window picker.