SRL Archive - OSR Help

Reliable way to open a door?


Itankbots

2012-11-26 20:53:44

Does anyone have a reliable way to Check to see if a door is open, then if it is closed , it will open it?

I cant seem to get a stable way to check for the door.

The door doesn't close by its self, only when people close it. Any suggestions?

Thanks in advance.

riwu

2012-11-26 21:00:13

It can usually be done with (A)TPAs pretty effectively. There should be difference in amount of color pixels. Post a pic?

Flight

2012-11-26 21:51:42

Man there's multiple ways to do this honestly. Off the top of my head I can think of three:

1) First using a color-finding and UpText checking ('Open' or 'Close')
2) If you're walking through a doorway then check the flag distance from where you clicked; if the distance from the flag to where you clicked it small then the door you're walking through is open, otherwise if the flag appears near the door instead, then it's close
3) Also using color, find the door color (TPA) while your camera is at a certain angle, and find the bounds of that TPA; if it's wider than, let's say, 30 pixels, it's closed, otherwise if it's rather narrow then it's probably open.

Just use your logic, how do you yourself determine if a door is open/closed in RS? Apply the same logic to your script.

Enslaved

2012-11-27 18:34:25

in one of my scripts, i checked for The door handle colour clusters if they were close to the wood colour clusters, then made a TPA from that, then i checked for uptext to say that if it was open. Another Method is to use the flag, using the minimap to walk, if the flag was a certain distance away from my mouse click, it would show flag a variable to say that the target location is not in the destination area then use that as a detection to set off the door finder