Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Perfect World
You last visited: Today at 01:47

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

Advertisement



Autoit - loop TAB key?

Discussion on Autoit - loop TAB key? within the Perfect World forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2009
Posts: 17
Received Thanks: 2
Angry Autoit - loop TAB key?

Hi everyone
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"
search_mob()

func search_mob() ; fonction "search_mob"
Send("{TAB}")
Sleep(1000)
EndFunc

While 1 ; begin of while unlimit
$Coord=PixelSearch ( 0, 0, 271, 62, $red, 5, 0 ) ;0xFF000 is red
$mob = @error
If $mob=0 Then ;if color isnt red do this
Sleep (1000) ;wait 1 sec
search_mob() ; go get the fonction "search_mob"

Else ;if color is red, do this
Sleep (1000) ;wait 1sec
Send ("{ALTDOWN}") ; press ALT DOWN
Send ("{1}") ; press 1
Send ("{ALTUP}") ; release ALT UP
Sleep (500) ; wait half seconde
EndIf ;end of if fonction
WEnd ; end of while fonction

************************************************** *******
Can you tell me what i miss???
all i want is to change the mob by using Tab key when this mob is dead.
it's work once. if i want to get it to work again, i have to press tab key and the rest do the job.

and do i have to use Injection to get tab key work?? everything working fine.

thx

edit: i just change from french to english, maybe someone could help me out...i stil testing this little script... btw this is not a REAL boting...it's just a bot to lvl up a pet in ROOM 4. i have other script that work with timer, and i would like to use with mob health, that all.
csk2k9 is offline  
Old 12/21/2009, 22:58   #2
 
dem0nz's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 50
Received Thanks: 4
make it hold tab down.
dem0nz is offline  
Old 12/22/2009, 05:54   #3
 
elite*gold: 0
Join Date: Oct 2009
Posts: 17
Received Thanks: 2
Quote:
Originally Posted by dem0nz View Post
make it hold tab down.
well, the pb isnt the hold tab down. the pb is, it's doesnt came back to the initial...
1. pixelsearch ; search for red mob with full HP
2. if it find the red mob, use the alt+1 for pet attack.
3. else, go back to pixelsearch

the pb i get is, it doesnt go back to #1 after my pet kill the mob. it stuck at #2, the alt+1 get stuck, no tab fonction...why i know? because when i click on other mob, my pet start attacking and come back to me. when i click on another mob my pet start again. i think i have pb with ''while 1'' or should i put Do command...? btw, HOLD TAB doesnt work
csk2k9 is offline  
Old 01/11/2010, 06:30   #4
 
elite*gold: 0
Join Date: Dec 2008
Posts: 2
Received Thanks: 0
Try this:
while true
ControlSend("Element Client" ,"", "", "{TAB}")
Sleep( 200 )
ControlSend("Element Client" ,"", "", "{TAB UP}")
wend

This is supposed to change mob every 200 - 300 millisecs

Also, use do (attacking stuff)... until (mob is dead) loop to stop tabbing when mob is selected.

If you have any other question you can pm me if you want.
Good luck!
zxfzxf is offline  
Old 01/11/2010, 06:31   #5
 
elite*gold: 0
Join Date: Dec 2008
Posts: 2
Received Thanks: 0
Also, use ControlSend(gameWindow's Title, "", "", !{1}) instead of altdown+1+altUp;
zxfzxf is offline  
Reply


Similar Threads Similar Threads
AutoIT Loop/If help needed
06/26/2010 - CO2 Programming - 2 Replies
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: While 1 $coord0 = PixelSearch ($pos0, $pos0, $pos1, $pos1, 0xD6A252); Search for CopperOre If Not @error Then MouseClick ("left", $coord0, $coord0, 1, 15) Sleep (500) MouseClick ("left", 450, 450, 1, 20); Drop CopperOre Sleep (2000)
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 +2. The time now is 01:47.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.