character area attack problem

I want to ask about how can I script this situation in javascript. I know to script detect in front of my character, but it just very small area. I want to increase the angle in front of character so that my character can attack in area. Can anyone help me...I stopped here for a long time and dun know how to do.

Sample http://img856.imageshack.us/i/samples.jpg/

Why not using a trigger that checks of somebody is in there and than attack him if the attack-button is pressed?