Results 1 to 9 of 9

Thread: [SPS] Walking past doors.

  1. #1
    Join Date
    Sep 2012
    Location
    Australia.
    Posts
    839
    Mentioned
    16 Post(s)
    Quoted
    225 Post(s)

    Default [SPS] Walking past doors.

    Alright, I am unsure as how to go about doing this:

    I'm at the Barbarian Outpost deposit box, I want to walk to the Willows but there is a door. I walk to the door and wish to detect if it is open or closed, and then continue walking (after opening the door if open).

    Here is my walk to tree procedure.

    Simba Code:
    Procedure OutpostWalkToTree;
    var
      OutpostToDoor, OutpostToTree: TPointArray;
    begin
      ClickNorth(SRL_Angle_High);
      FFlag(3);
      SPS_Setup(RUNESCAPE_SURFACE, ['']);
      OutpostToDoor := [Point(1927, 2317), Point(1879, 2315)]; //Walks to door from bank
      OutpostToTree := [Point(1879, 2315), Point(1863, 2314)]; //Walks from door to tree
      SPS_WalkPath(OutpostToDoor);
      if (FindDoor = True) then  //FindDoor is my function for detecting the door itself
      SPS_WalkPath(OutpostToTree);
      while IsMoving do
       Antiban
    end;

    Any help is welcomed.

    -Chris!

  2. #2
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Simba Code:
    if (FindDoor = True) then
    begin
      SPS_WalkPath(OutpostToTree);
      while IsMoving do
       Antiban
    end;

    Missing a begin right there?
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  3. #3
    Join Date
    Dec 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    Simba Code:
    if (FindDoor = True) then
    begin
      SPS_WalkPath(OutpostToTree);
      while IsMoving do
       Antiban
    end;

    Missing a begin right there?
    i dont think he needs one there since there's only one line right?

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by doxin View Post
    i dont think he needs one there since there's only one line right?
    Correct.

    EDIT:

    And to be a bit relevant, here are some threads that showed up when I searched for "find open closed door":

    http://villavu.com/forum/showthread....en+closed+door
    http://villavu.com/forum/showthread....en+closed+door
    http://villavu.com/forum/showthread....en+closed+door
    http://villavu.com/forum/showthread....en+closed+door

    Those should help.
    Last edited by i luffs yeww; 01-19-2013 at 06:59 PM.

  5. #5
    Join Date
    Dec 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    you could make a TPA of the door and check for the door uptext, or right click the door and click open. then on your find door function have it detect for door, open it if it's closed, then have it return true

  6. #6
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Chris! View Post
    Simba Code:
    Procedure OutpostWalkToTree;
    var
      OutpostToDoor, OutpostToTree: TPointArray;
    begin
      SPS_WalkPath(OutpostToTree);
      while IsMoving do
       Antiban
    end;
    I think
    Simba Code:
    while IsMoving do
       Antiban

    Will not happen during the path, as SPS_WalkPath will hold you


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  7. #7
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Well then:

    Simba Code:
    while IsMoving do
       Antiban;
    end;

    Needs a semicolon after Antiban.


    As DannyRS said, this may not work at all, try using Flag or FFlag or something similar.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  8. #8
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    Well then:

    Simba Code:
    while IsMoving do
       Antiban;
    end;

    Needs a semicolon after Antiban.


    As DannyRS said, this may not work at all, try using Flag or FFlag or something similar.
    1) semi-colon isn't needed.
    2) SPS_WalkPath has its own FFLag functions, if it's only 1 point, use SPS_WalkToPos(), then add a While(IsMoving)

  9. #9
    Join Date
    Sep 2012
    Location
    Australia.
    Posts
    839
    Mentioned
    16 Post(s)
    Quoted
    225 Post(s)

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
  •