Results 1 to 6 of 6

Thread: Opening Doors

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

    Default Opening Doors

    It opens the door, but if the door is already opened it will close it.
    Also when it gets to a point in the script where there are three doors around me it opens all three, when I only need it to open two.
    Help me out? Here's my code:
    Simba Code:
    procedure FindDoor;
    var
       X, Y: Integer;
    begin
      MakeCompass('W');
      SetAngle(false);
      If FindObj(x,y,'Open',8108474,5) then
      x:=MSCX;
      y:=MSCY;
      Begin
        StatsGuise('Opening Door...');
        GetMousePos(x, y);
        Mouse(X, Y, 5, 5, False);
        WaitOption('Door', 500);
        Wait(2000);
      end;

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

    Default

    For the first problem, I'd check if the door is closed before opening it by doing something like

    if IsUpText('pen') then
    openDoor();

    I'm not sure how you would solve your second problem though

  3. #3
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Give this a whirl:
    Simba Code:
    If FindObj(x,y,'Open',8108474,5) then
      Begin
        StatsGuise('Opening Door...');
        ClickMouse2(True);
        if not DidRedClick then   //If we missed, then exit so we can try again (maybe use a label here?)
          exit;
        While IsMoving do
          Wait(1);
        //Maybe wait a little longer?
      end else if FindObj(x,y,'Close',8108474,5) then  //The door is already open, so let's exit
        Exit;

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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

    Default

    Quote Originally Posted by Flight View Post
    Give this a whirl:
    Simba Code:
    If FindObj(x,y,'Open',8108474,5) then
      Begin
        StatsGuise('Opening Door...');
        ClickMouse2(True);
        if not DidRedClick then   //If we missed, then exit so we can try again (maybe use a label here?)
          exit;
        While IsMoving do
          Wait(1);
        //Maybe wait a little longer?
      end else if FindObj(x,y,'Close',8108474,5) then  //The door is already open, so let's exit
        Exit;
    Wow that works perfectly! Such a hero(: Lol.
    One more question so I can finish this quest script!
    Walking, on snow.. Possible? Or do I gotta wait until it's gone?

  5. #5
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Gushers View Post
    Wow that works perfectly! Such a hero(: Lol.
    One more question so I can finish this quest script!
    Walking, on snow.. Possible? Or do I gotta wait until it's gone?
    Mmm, I imagine the normal Runescape map is just around the corner. It'll be very soon, I personally believe, that the holiday update will be removed, along with those snow maps you see. What I would do is just work on the rest of the script, excluding walking in that area, while you wait for the maps to return to normal.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  6. #6
    Join Date
    Dec 2011
    Posts
    209
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Mmm, I imagine the normal Runescape map is just around the corner. It'll be very soon, I personally believe, that the holiday update will be removed, along with those snow maps you see. What I would do is just work on the rest of the script, excluding walking in that area, while you wait for the maps to return to normal.
    Alrighty thanks again man, I'll just have to wait!
    And in the code you gave me it said "maybe put a label here" ... Whats a label?

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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