Results 1 to 4 of 4

Thread: Turn run off?

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

    Default Turn run off?

    Hi, just wondering is there a way to tell your script not to turn run on? Just completed the sps walking tut:
    Code:
    program SPSTut;
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    Var
      myPath:TPointArray;
    begin
      SetupSRL;
      SPS_Setup(RUNESCAPE_SURFACE,['11_6','10_6','10_7','11_7','12_6']);//SPS Areas
      myPath := [Point(4555, 2681), Point(4553, 2667),
       Point(4550, 2654), Point(4546, 2647),
        Point(4541, 2641), Point(4533, 2635),
         Point(4516, 2631), Point(4502, 2626),
          Point(4477, 2623), Point(4468, 2625),
           Point(4452, 2635), Point(4447, 2647),
            Point(4444, 2657), Point(4441, 2668),
             Point(4441, 2675), Point(4442, 2686),
              Point(4451, 2711), Point(4463, 2719),
               Point(4487, 2736), Point(4498, 2750)];
      SPS_WalkPath(myPath);
    end.

  2. #2
    Join Date
    Jul 2012
    Posts
    279
    Mentioned
    5 Post(s)
    Quoted
    46 Post(s)

    Default

    I'm not sure I get what you mean... run automatically "turns" to off once you reach 0 energy. You can turn it back on by running:

    Simba Code:
    RunEnergy(30);    //Will start running again if you have 30 energy

    However, do know that this line will only "work" once it's triggered. You might want to split your walking procedure to run this function at more than one place.

  3. #3
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    SPS_Walkpath automaticly turn runs on, to prevent this you could just copy the function and remove the run like this

    Simba Code:
    function SPS_WalkPathCustom(Path: TPointArray): boolean;
    var
      I, H, T, D: integer;
      P, MM: TPoint;
    begin
      H := High(Path);
      T := GetSystemTime + 20000 + Random(5000);

      while (not Result) and (GetSystemTime < T) do
      begin
     //   RunEnergy(20);

        P := SPS_GetMyPos;
        for I := H downto 0 do
        begin
          MM.X := MMCX + Path[I].X - P.X;
          MM.Y := MMCY + Path[I].Y - P.Y;

          D := Distance(MM.X, MM.Y, MMCX, MMCY);

          if (D < 10) then
            break
          else
            if (D < 70) then
            begin
              if (SPS_MultiMouse) then
                MultiMouse(MM.X, MM.Y, 25, 3, false)
              else
                Mouse(MM.X, MM.Y, 5, 5, mouse_Left);

              FFlag(Integer(I <> H) * 15);

              T := getSystemTime + 20000 + Random(1000);
                Break;
            end;
        end;

        Result := (I = H);
      end;
    end;

    then justcall sps_walkpathcustom(point(100,100)) etc

  4. #4
    Join Date
    Dec 2011
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I want the script to not turn run on, at the moment it's turning it on when i've manually turned it off, I wish for my player to walk...

    EDIT: Thanks Olly has worked!+rep
    Last edited by ILikeSmoothHeads; 12-12-2012 at 10:29 PM.

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
  •