SRL Archive - OSR Help

radialwalking


mafia miles

2013-04-03 12:32:06

Needed help getting it to the furnace
program TestSPS7;
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
{$i ObjectDTM\ObjDTMInclude.simba}

var x, y, i:integer;
FurnaceDTM:integer;
TPA : TPointArray;

const
AccountLogin = ''; //Declare your username and password
AccountPass = '';
CharacterName = '';
version = '1.2'; //Logs back in if logged out.

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
End;








procedure WalkingSpec(TheWalk:Integer);
var
i: Integer;
begin
if not LoggedIn then Exit;
case TheWalk of
1: RadialWalkTolerance(12345,159,186,74,5,5,15);
2: RadialWalkTolerance(12345,136,153,74,5,5,15);

end;

procedure WalkingToFurnace;
var
i,x,y:Integer;
begin
for i := 1 to 2 do//Uses 1-3 of my RadialWalks, which walks to the first rock
begin
Writeln('You are on Walk Number ' + IntToStr(i));
WalkingSpec(i);
end;
(Anything you want the script to do after walking to the rock)
end;

begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(2000);
WalkingToFurnace;
end.

[Error] C:\Simba\Scripts\TestSPS8.simba(47:1): Identifier expected at line 46
Compiling failed.

Kevin

2013-04-03 12:40:33

Well I don't know which line 46 is… but

procedure WalkingSpec(TheWalk:Integer);
var
i: Integer;
begin
if not LoggedIn then Exit;
case TheWalk of
1: RadialWalkTolerance(12345,159,186,74,5,5,15);
2: RadialWalkTolerance(12345,136,153,74,5,5,15);
end;//You need an extra end here for your case statement.
end;

Hopefully that helps!

mafia miles

2013-04-03 12:47:47

Thanks!
Still tells me Im on Walk Number 1 and 2. any ideas? Im in alkarid maybe thats why.

Kevin

2013-04-03 12:50:44

From: mafia miles
Thanks!
Still tells me Im on Walk Number 1 and 2. any ideas? Im in alkarid maybe thats why.


You currently only have 2 walks in the code I can see. And even if you had more than 2, your for loop only iterates through 2 numbers, 1 to 2:
for i := 1 to 2 do//Uses 1-3 of my RadialWalks, which walks to the first rock

mafia miles

2013-04-03 12:53:29

I dont really understand why its not trying to click in the radialwalk boundaries.
I appreciate your help Nivek Ive been at it for hours.
I've got it to click the bank on the minimap but thats all the success ive gotten :/

Function MyFirstWalk:boolean;
begin
If RadialRoadWalk(RoadColor, 252, 109, 56, 1, 1) then
begin
Writeln('Walking 1 is working fine!');
Result := true;
Exit;
end else
Writeln(' Walking 1, error finding road using Backup. (Symbol Clicking)');
If FindSymbol(x,y,'Bank') then
begin
Mouse(x,y,1,1,true);
FFlag(0);
Writeln('Successfully completed Walking 1.');
Result := True;
end else
Writeln('Walking failed!');

Kevin

2013-04-03 13:01:46

Ok, so let's analyze your walk statements:

1: RadialWalkTolerance(12345,159,186,74,5,5,15);
2: RadialWalkTolerance(12345,136,153,74,5,5,15);
RadialWalkTolerance(color,startDeg,endDeg,radius,xOffset,yOffset,tolerance: integer);//probably not the exact var names, but that's what they are
So you have a color of 12345. While that could be legitimate, I feel like that's not the color of whatever you're trying to walk to and instead you just copy pasted this from a tutorial. It is only looking for said color in a small portion of the bottom of the minimap (origin is at north, 90 degrees at east, 180 at south, etc).

Perhaps the area you're searching through is roughly the right direction you want to go, but I think you need to fix that color to match wherever you're trying to go (use the colour picker tool in simba).

mafia miles

2013-04-03 13:19:39

Sweet Your a genius Im getting it to work now :)