Guard Vision System

So I'm looking for someone able to work on a guard vision system for my stealth game. I'm currently doing via events and it works "ok" but with scripting it would no only work better but also would be less of a hassle to set up. 

View attachment 7662

Guard's line of sight

View attachment 7663

When close to a wall or other specified tile id.

  • For the line of sight is basic a cone of vision that it doesn't go through e specified tile IDs so I can do something on the event's page like "can_see(3, 4)?" 
  • If possible I'd like to have an option to display that line of sight.
As I said I'm doing this via event but also a "steal item system". I kinda wanted to start adding this as script and then add more stuff like a sound detection system and a steal system too. If anyone is interested or has any doubts please feel free to post here and pm me.
Similiar features have been requested before, and there are already solutions available

The following two links turned up in a quick search, but I remember several more posts about this - you might do another search to find them.

http://forums.rpgmakerweb.com/index.php?/topic/3452-direction-based-line-of-sight-events/

http://forums.rpgmakerweb.com/index.php?/topic/3336-stealth-system/

If those are not what you want, simply describe what you want to be different - that will help others to fulfill the request.
I've tried using Jet Stealth System before but didn't manage to get it to work. I've read what people say there but it still makes no sense to me. I tried talking to others there to help me but didn't have any luck. The second link I've seen it to, but it uses events like I'm doing it. 
http://yanflychannel.wordpress.com/rmvxa/field-scripts/event-chase-player/
It's an interesting system but his "vision" code is just based on distance like I'm doing. It's not a line of sight so it will go through walls and objects on the way.

Original thread: https://forums.rpgmakerweb.com/threads/guard-vision-system.16927/