[Work In Progress] Auto Synthesis Bot

11/16/2010 05:38 razer951#1
Here is my script so far for my auto synthesis bot. There are a few problems with it:
It clicks the upper let corner when the first item isn't found.
and more but im not going to go into things... If someone could help me fix these problems that would be great.
11/16/2010 08:16 kotarou3#2
Your gonna have more chance on MM ;)
Since you have posted it there already, and I taught you how to use code instead of spoiler tags...
11/16/2010 15:47 razer951#3
Quote:
Originally Posted by kotarou3 View Post
Your gonna have more chance on MM ;)
Since you have posted it there already, and I taught you how to use code instead of spoiler tags...
Lol. I just thought I would post it here too.
11/29/2010 00:05 Snoweł#4
Quote:
Originally Posted by razer951 View Post
Here is my script so far for my auto synthesis bot. There are a few problems with it:
It clicks the upper let corner when the first item isn't found.
and more but im not going to go into things... If someone could help me fix these problems that would be great.

You should use "If" statements to check if the Images have been found, if they haven't End the "If", if they have then execute the necessary action. Since the Image was not found the X and Y coordinate variables are equivalent to zero, adding Ifs would fix the problem that occurs when the Items are not found.

If you need a GUI I can code one for you with AutoIt or Sora - Script, I don't use Koda; GUIs designed with Koda are not efficient and use unnecessary code to check for Interaction with buttons, check-boxes, edit-boxes, etc.

Below is a revised version of the "Drop" Function, I just added a few "Ifs" and modified your ImageSearch functions.

Code:
Func Drop()
   $WCrystal = _ImageSearch("wcrystal1.bmp",1,$wc1x,$wc1y,25)
   $CCrystal = _ImageSearch("ccrystal1.bmp",1,$cc1x,$cc1y,25)
   $FCrystal = _ImageSearch("fcrystal1.bmp",1,$fc1x,$fc1y,25)
      If $WCrystal = 1 Then
      MouseMove($wc1x,$wc1y)
      Sleep(500)
      MouseClick("Secondary", $wc1x, $wc1y, 1)
      Sleep(500)
         $Drop = _ImageSearch("Drop.bmp",1,$drx,$dry,25)
         If $Drop = 1 Then
         MouseMove($drx,$dry)
         Sleep(500)
         MouseClick("Primary", $drx, $dry, 1)
         Sleep(500)
         EndIf
      EndIf
      If $FCrystal = 1 Then
      MouseMove($fc1x,$fc1y)
      Sleep(500)
      MouseClick("Secondary", $fc1x, $fc1y, 1)
      Sleep(500)
         $Drop = _ImageSearch("Drop.bmp",1,$drx,$dry,25)
         If $Drop = 1 Then
         MouseMove($drx,$dry)
         Sleep(500)
         MouseClick("Primary", $drx, $dry, 1)
         Sleep(500)
         EndIf
      EndIf
      If $CCrystal = 1 Then
      MouseMove($cc1x,$cc1y)
      Sleep(500)
      MouseClick("Secondary", $wc1x, $wc1y, 1)
      Sleep(500)
         $Drop = _ImageSearch("Drop.bmp",1,$drx,$dry,25)
         If $Drop = 1 Then
         MouseMove($drx,$dry)
         Sleep(500)
         MouseClick("Primary", $drx, $dry, 1)
         Sleep(500)
      Sleep(1000) ;[B]Why are there two "Sleep" functions here? You can completely remove this, it is unnecessary.[/B]
         EndIf
      EndIf
EndFunc
11/29/2010 22:18 razer951#5
Thanks
Also a GUI would be very useful if you could :D
11/30/2010 00:19 Snoweł#6
Quote:
Originally Posted by razer951 View Post
Thanks
Also a GUI would be very useful if you could :D
What features would you like in the GUI?
11/30/2010 04:19 razer951#7
Quote:
Originally Posted by Dark - Sora View Post
What features would you like in the GUI?
Idk go ahead and put in anything you think would be useful/cool/*I have no Idea*


Your botting skills are far greater than mine. thanks for all your help so far.