what makes this script really hard is the fact that you want to click on events if not for that it would be fairly easy. also I or any one else who did this would need a mouse input script.
I suppose you could check for a mouse click, record the position of the mouse, translate the mouse x any y in to the 32 x 32 grid or rmxp and then check if there was an even at said position. that said I have a script the checks events that i could use as a base...
tell you what if you can beg Blizz and get him to release his mouse input script I'll see what i can do I'll probably only have time to do part of the system for you (the part that records event clicks) so don't get upset when i can't finish it for you.