Results 1 to 7 of 7

Thread: radialwalking

  1. #1
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default radialwalking

    Needed help getting it to the furnace
    Code:
    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.

  2. #2
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Well I don't know which line 46 is... but
    Simba Code:
    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!

  3. #3
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

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

  4. #4
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by mafia miles View Post
    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:
    Simba Code:
    for i := 1 to 2 do//Uses 1-3 of my RadialWalks, which walks to the first rock

  5. #5
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    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 :/

    Code:
    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!');
    Last edited by mafia miles; 04-03-2013 at 04:56 PM.

  6. #6
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Ok, so let's analyze your walk statements:
    Simba Code:
    1: RadialWalkTolerance(12345,159,186,74,5,5,15);
        2: RadialWalkTolerance(12345,136,153,74,5,5,15);
    Simba Code:
    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).

  7. #7
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    Sweet Your a genius Im getting it to work now

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •