Hello Stephen,
I would very much like to help you and write your script for you, but you've neglected to include some crucial information on the game in question. Is it web-based, or client based? If you're playing for money, do understand that some software includes anti-cheat detection and that it would cost more to identify and circumvent this.
Please contact me if you wish to discuss this further
Regards,
Patchouli Knowledge