This sounds more like a good question than a good idea.
Yes you can do this. I'd suggest checking out thebind:Arena
to get an idea of just how much scripting power the Q3A engine has.
You can simplify many actions to the press of one key if you take the time to learn how.