Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 02:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



AutoIT Loop/If help needed

Discussion on AutoIT Loop/If help needed within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2007
Posts: 12
Received Thanks: 0
AutoIT Loop/If help needed

Hello, I'm trying out some AutoIT programming for the first time.

I'm trying to make a very simple mining bot but i got stuck, here's the code for the loop where i am stuck:

PHP Code:
While 1
            $coord0 
PixelSearch ($pos0[0], $pos0[1], $pos1[0], $pos1[1], 0xD6A252); Search for CopperOre
            
If Not @error Then MouseClick ("left"$coord0[0], $coord0[1], 115)
                
Sleep (500)
                
MouseClick ("left"450450120); Drop CopperOre
                Sleep 
(2000)
            
$coord0 PixelSearch ($pos0[0], $pos0[1], $pos1[0], $pos1[1], 0x4A494A); Search for IronOre
            
If Not @error Then MouseClick ("left"$coord0[0], $coord0[1], 115)
                
Sleep (500)
                
MouseClick ("left"450450120); Drop IronOre
                Sleep 
(2000)            
        
WEnd 
As it is now it searches for the ores but if there aren't any it clicks the 450,450 pixel anyway, which makes the character move. I need help to come up with a solution for this - how can I make it not do anything when it cannot find the ores?

Thanks in advance
EmilAbra is offline  
Old 06/26/2010, 11:33   #2
 
elite*gold: 0
Join Date: Feb 2006
Posts: 151
Received Thanks: 58
theres no endif's
trash is offline  
Old 06/26/2010, 17:03   #3
 
elite*gold: 0
Join Date: Aug 2007
Posts: 12
Received Thanks: 0
Quote:
Originally Posted by trash View Post
theres no endif's
Problem is, if I put EndIf I get an error telling me there are EndIf's without matching If functions... Any clue?
EmilAbra is offline  
Reply

Tags
autoit


Similar Threads Similar Threads
Autoit - loop TAB key?
01/11/2010 - Perfect World - 4 Replies
Hi everyone :confused: I have try all night to make a tab key work... here the code; ********************************************** $title = "Element Client" $game=WinActivate($title, "") WinSetOnTop($title, "", 0) Sleep(1000) $red = "0xFF0000"
autoit loop not working
02/17/2009 - Silkroad Online - 0 Replies
$checksum = PixelChecksum(0,0, 50,50) While 1 If ControlGetText ("SBot v1.10a (C)2008,2009 by bot-cave.net", "", "Static9") = "Connecting" or "Connected" Then If not ControlGetText ("SBot v1.10a (C)2008,2009 by bot-cave.net", "", "Static11") = "Login error" Then If $checksum = PixelChecksum(0,0, 50,50) Then Else Sleep(5000) EndIf Else ShellExecute($LoginScriptPath & "\" & $LoginScript, $LoginScriptPath)
Agbot loop dosnt loop
10/18/2008 - Silkroad Online - 1 Replies
my agbot after i tele will go through the 20 sec wait then says in bot concle feature not available yet feature not available yet idk whats wrong



All times are GMT +1. The time now is 02:03.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.