I will give you a big head start here is the source I used for my Auto-Summon bot. This is one of my early script and it is pretty basic. The best way to find coords is with the Autoit Window Info tool that comes with Autoit. Do not use the in game screenshots to determine color these are compressed into jpg which caused color changes. Use a screenshot utility that offers screenshots in a lossless format(I use x-shot in tga format). Use Autoit Info Tool on the screen shot to determine the color. Use infranview to determine the coord in the SS. Simply click a spot and it will tell you the coords in the title bar.
This script was written for 1024x768 monitor resolution running the game in 1024x768 windowed mode. It no longer works as is. I believe all that needs to be changed to get it up and running is to change the color. This was made before I learned to use x-shot so the color was taken from a SS. Hope this helps you out!
Code:
while 1 = 1
sleep(500)
PixelSearch ( 835, 672, 846, 679, 12390424, 9)
If @error Then
ControlSend("2Moons","","","{9}")
EndIF
wend