Results 1 to 10 of 10

Thread: Oldschool walking script help

  1. #1
    Join Date
    Aug 2012
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    28 Post(s)

    Default Oldschool walking script help

    ok so I have written a walking script to walk from lumbridge to port sarim (yes it is very messy and not the best way to do it but it doesnt matter as long as it works) but every time I try to run it I get an "compiling failed, unexpected end of file" error.

    http://pastebin.com/trkFUGxg

    thankyou



    this is the error:

    [Hint] C:\Simba\Includes\SPS/sps-osr.simba(480:3): Variable 'Z' never used at line 479
    [Hint] C:\Simba\Includes\SPS/sps-osr.simba(482:3): Variable 'DEGREEFIX' never used at line 481
    [Hint] C:\Simba\Includes\SPS/sps-osr.simba(483:3): Variable 'FINDPOINT' never used at line 482
    [Error] (34590:1): Unexpected end of file at line 34589
    Compiling failed.

  2. #2
    Join Date
    Apr 2013
    Location
    England
    Posts
    223
    Mentioned
    2 Post(s)
    Quoted
    106 Post(s)

    Default

    ok so to get it to compile, remove the
    Simba Code:
    procedure WalkAroundGE;

    and instead as the first line of the script put:
    Simba Code:
    program WalkAroundGE;

    and at the end of the script change:
    Simba Code:
    end;
    to
    Simba Code:
    end.

    now it will compile. however you have setup anything so there are no players defined, no smart client spawned and srl is not setup. So it wont actually do anything :/

    i havent tested it out, but i have put it in my default script as a procedure and then called it. this should load-up/connect-to SMART login (if you enter your details) and then carry out your procedure

    Simba Code:
    program TestScript;
    {$DEFINE SMART8}
    {$i SRL-OSR/Srl.simba}
    {$I SPS/sps-osr.simba}

    procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        Players[0].Name := '';
        Players[0].Pass := '';
        Players[0].Nick := '';
        Players[0].Active := TRUE;
      end;

    procedure SetupSmartClient;
      begin
        SMART_FixSpeed := True;
        ClearDebug;
        SetupSRL;
        ActivateClient;
        DeclarePlayers;
        WriteLn('players declared ...');
        LoginPlayer;
        WriteLn('logged in.');
      end;

    procedure WalkAroundGE;
    var
      First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, twe, thir, fourt, fitht, sixt, eighte, ninete, twent, tone, ttwo, tthree, tfour, tfive :TPoint;
    begin
      SPS_Setup(RUNESCAPE_SURFACE, ['10_5', '10_6', '10_7', '11_5', '11_6', '11_7']);
      First := Point(4686, 3730);
      Second := Point(4735, 3696);
      Third := Point(4687, 3648);
      Fourth := Point(4669, 3584);
      Fifth := Point(4661, 3518);
      Sixth := Point(4627, 3484);
      Seventh := Point(4561, 3471);
      Eighth := Point(4492, 3457);
      Ninth := Point(4426, 3436);
      Tenth := Point(4360, 3422);
      Eleventh := Point(4294, 3404);
      twe := Point(4229, 3415);
      thir := Point(4162, 3434);
      fourt := Point(4100, 3455);
      fitht := Point(4052, 3497);
      sixt := Point(3993, 3531);
      eighte := Point(3937, 3568);
      ninete := Point(3874, 3587);
      twent := Point(3904, 3644);
      tone := Point(3904, 3709);
      ttwo := Point(3906, 3771);
      tthree := Point(3918, 3830);
      tfour := Point(3946, 3830);
      tfive := Point(3957, 3830);


        SPS_WalkToPos(First);
        SPS_WalkToPos(Second);
        SPS_WalkToPos(Third);
        SPS_WalkToPos(Fourth);
        SPS_WalkToPos(Fifth);
        SPS_WalkToPos(Sixth);
        SPS_WalkToPos(Seventh);
        SPS_WalkToPos(Eighth);
        SPS_WalkToPos(Ninth);
        SPS_WalkToPos(Tenth);
        SPS_WalkToPos(eleventh);
        SPS_WalkToPos(twe);
        SPS_WalkToPos(thir);
        SPS_WalkToPos(fourt);
        SPS_WalkToPos(fitht);
        SPS_WalkToPos(sixt);
        SPS_WalkToPos(eighte);
        SPS_WalkToPos(ninete);
        SPS_WalkToPos(twent);
        SPS_WalkToPos(tone);
        SPS_WalkToPos(ttwo);
        SPS_WalkToPos(tthree);
        SPS_WalkToPos(tfour);
        SPS_WalkToPos(tfive);
      SetRun(True)
    end;

    begin
      SetupSmartClient;

      WalkAroundGE;

      WriteLn('Script Complete!');
    end.
    Last edited by EngageTheRage; 06-02-2013 at 03:02 PM.

  3. #3
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    U could try BlindWalk instead of WalkToPos

    Here's a tut: http://villavu.com/forum/showthread....716&highlight=

    Creds to DannyRS for this wonderful sig!

  4. #4
    Join Date
    Aug 2012
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    28 Post(s)

    Default

    Quote Originally Posted by EngageTheRage View Post
    ok so to get it to compile, remove the
    Simba Code:
    procedure WalkAroundGE;

    and instead as the first line of the script put:
    Simba Code:
    program WalkAroundGE;

    and at the end of the script change:
    Simba Code:
    end;
    to
    Simba Code:
    end.

    now it will compile. however you have setup anything so there are no players defined, no smart client spawned and srl is not setup. So it wont actually do anything :/

    i havent tested it out, but i have put it in my default script as a procedure and then called it. this should load-up/connect-to SMART login (if you enter your details) and then carry out your procedure

    Simba Code:
    program TestScript;
    {$DEFINE SMART8}
    {$i SRL-OSR/Srl.simba}
    {$I SPS/sps-osr.simba}

    procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        Players[0].Name := '';
        Players[0].Pass := '';
        Players[0].Nick := '';
        Players[0].Active := TRUE;
      end;

    procedure SetupSmartClient;
      begin
        SMART_FixSpeed := True;
        ClearDebug;
        SetupSRL;
        ActivateClient;
        DeclarePlayers;
        WriteLn('players declared ...');
        LoginPlayer;
        WriteLn('logged in.');
      end;

    procedure WalkAroundGE;
    var
      First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, twe, thir, fourt, fitht, sixt, eighte, ninete, twent, tone, ttwo, tthree, tfour, tfive :TPoint;
    begin
      SPS_Setup(RUNESCAPE_SURFACE, ['10_5', '10_6', '10_7', '11_5', '11_6', '11_7']);
      First := Point(4686, 3730);
      Second := Point(4735, 3696);
      Third := Point(4687, 3648);
      Fourth := Point(4669, 3584);
      Fifth := Point(4661, 3518);
      Sixth := Point(4627, 3484);
      Seventh := Point(4561, 3471);
      Eighth := Point(4492, 3457);
      Ninth := Point(4426, 3436);
      Tenth := Point(4360, 3422);
      Eleventh := Point(4294, 3404);
      twe := Point(4229, 3415);
      thir := Point(4162, 3434);
      fourt := Point(4100, 3455);
      fitht := Point(4052, 3497);
      sixt := Point(3993, 3531);
      eighte := Point(3937, 3568);
      ninete := Point(3874, 3587);
      twent := Point(3904, 3644);
      tone := Point(3904, 3709);
      ttwo := Point(3906, 3771);
      tthree := Point(3918, 3830);
      tfour := Point(3946, 3830);
      tfive := Point(3957, 3830);


        SPS_WalkToPos(First);
        SPS_WalkToPos(Second);
        SPS_WalkToPos(Third);
        SPS_WalkToPos(Fourth);
        SPS_WalkToPos(Fifth);
        SPS_WalkToPos(Sixth);
        SPS_WalkToPos(Seventh);
        SPS_WalkToPos(Eighth);
        SPS_WalkToPos(Ninth);
        SPS_WalkToPos(Tenth);
        SPS_WalkToPos(eleventh);
        SPS_WalkToPos(twe);
        SPS_WalkToPos(thir);
        SPS_WalkToPos(fourt);
        SPS_WalkToPos(fitht);
        SPS_WalkToPos(sixt);
        SPS_WalkToPos(eighte);
        SPS_WalkToPos(ninete);
        SPS_WalkToPos(twent);
        SPS_WalkToPos(tone);
        SPS_WalkToPos(ttwo);
        SPS_WalkToPos(tthree);
        SPS_WalkToPos(tfour);
        SPS_WalkToPos(tfive);
      SetRun(True)
    end;

    begin
      SetupSmartClient;

      WalkAroundGE;

      WriteLn('Script Complete!');
    end.
    ok thankyou man that got it working

  5. #5
    Join Date
    Aug 2012
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    28 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    U could try BlindWalk instead of WalkToPos

    Here's a tut: http://villavu.com/forum/showthread....716&highlight=
    Im not sure what that is sorry, haha im a complete newbie to scripting

  6. #6
    Join Date
    Aug 2012
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    28 Post(s)

    Default

    Ok now it logs in fine but just stands there and doesn't do anything :/

  7. #7
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by downwindchubs View Post
    Ok now it logs in fine but just stands there and doesn't do anything :/
    See what SPS_GetMyPos returns. or call SPS_Debug := True; in your mainloop.

    If your points return Point(1-,1-) then the map isn't working

    Creds to DannyRS for this wonderful sig!

  8. #8
    Join Date
    Aug 2012
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    28 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    See what SPS_GetMyPos returns. or call SPS_Debug := True; in your mainloop.

    If your points return Point(1-,1-) then the map isn't working
    How do I do this again? sorry :L

  9. #9
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by downwindchubs View Post
    How do I do this again? sorry :L
    Read these tutorials to get a better understanding of sps(skip the making a map part)

    http://villavu.com/forum/showthread.php?t=81109
    http://villavu.com/forum/showthread.php?t=84360

    Creds to DannyRS for this wonderful sig!

  10. #10
    Join Date
    Aug 2012
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    28 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    Read these tutorials to get a better understanding of sps(skip the making a map part)

    http://villavu.com/forum/showthread.php?t=81109
    http://villavu.com/forum/showthread.php?t=84360
    okayy thanks

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
  •