I'm just not sure if this is just LUA & XML, so I'm posting in the general place.
This is the original topic, in wowhead:
http://www.wowhead.com/?forums&topic=167919
But since I couldn't get email notifications there, I wanted to continue with it in here.
Basically, I'm simplifying a script I've found that I couldn't customize to make it work as I wanted. The original one is called Mouse Combat.
So if you could be kind enough to check the rest of this on the link I appreciate any help.
And please just let me know if I'm doing something wrong here or should be doing this some other way. I'll fix it. But for now I'll leave like this.