Applescript bot

Could anyone help me write a script that could click at programed locations. I already can make it type but can’t figure out how to get system events to click at a global coordinate. And yes I will be using this for online games and I don’t need a lesson on how using bots is cheating and therefor wrong.
(p.s. I hope this is the right place for the post)

look at this…
http://macscripter.net/viewtopic.php?id=33468