Results 1 to 8 of 8

Thread: How would you open this gate?

  1. #1
    Join Date
    Mar 2012
    Posts
    182
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default How would you open this gate?

    I am trying to open the gate to the cow field in Lumbridge. The door randomly closes and the script would need to see if the door is not opening and if necessary open it before entering.

    The color is non specific (blends with the surrounding fence) and I have a really really hard time getting it to work. What would you do?

  2. #2
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    I would use MMToMS and GetTPABounds to initially find the area on the minimap that is red(indicating the gates location). Then after converting this to the mainscreen I would search within that TBox for the brown fence colour using CTS2.

    After I have searched for the brown colour I would then check the length of that TPA and if it is greater than a certain amount the fence is closed. If it is larger, then the fence must be open

  3. #3
    Join Date
    Mar 2012
    Posts
    182
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by P1ng View Post
    I would use MMToMS and GetTPABounds to initially find the area on the minimap that is red(indicating the gates location). Then after converting this to the mainscreen I would search within that TBox for the brown fence colour using CTS2.

    After I have searched for the brown colour I would then check the length of that TPA and if it is greater than a certain amount the fence is closed. If it is larger, then the fence must be open
    Thanks!! I am a noob, however, and only understood a half of what you said. Is there a link to tutorial of what you suggested I do? Sounds like more learning tonight.

  4. #4
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Look up and read through all of the TPA tutorials, you only really need the basics of TPA usage for this function, but you will also need knowledge of other SRL functions and a good amount of logic

  5. #5
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Use the minimap. If the minimap shows whether the gate is open, you can just search for a DTM.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  6. #6
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    How do you mean if the minimap shows whether the gate is open? It doesn't consistently change when the gate is opened and closed (sometimes it shows its open when it's closed and visa versa).

  7. #7
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Quote Originally Posted by P1ng View Post
    How do you mean if the minimap shows whether the gate is open? It doesn't consistently change when the gate is opened and closed (sometimes it shows its open when it's closed and visa versa).
    Well then you need to search for the red gate's DTM on the minimap(it's unique so it should be easy to find) and move close to it, and then understand your orientation wrt to the gate and click the fence on your correct side.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

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

    Default

    Make a box of where the fence would be.

    Get average color count of the brownish color when it's closed.
    Plug this in, then if the color count is lower by a lot, it's open, if it's roughly the same, it's closed?

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
  •