Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Aion
You last visited: Today at 04:38

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

Advertisement



Autoit autopot

Discussion on Autoit autopot within the Aion forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2009
Posts: 16
Received Thanks: 0
Autoit autopot

Was hoping I could get some help from more experienced scripters. This should be really easy =/

Code:
WinActivate("AION Client")
while 1

$coord = PixelSearch(127,26,127,26,0xC81B19,1);looking for the HP pixel in a color;range of 1

If not @error Then;if the color is not found
Send ("{-}") ;it presses "-"

EndIf

Sleep(100) ; if we don't put this sleep the auto-pot will keep the CPU used 100%
WEnd


while 1;just keep the script alive
	sleep(1000)
	wend
jammer817 is offline  
Old 10/24/2009, 23:58   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 16
Received Thanks: 0
PS I play with Top UI for the pixel location
jammer817 is offline  
Old 10/25/2009, 01:05   #3
 
elite*gold: 0
Join Date: Oct 2009
Posts: 16
Received Thanks: 0
Found some new code
Code:
$Color1 = PixelGetColor(233,58) ;
If $Color1 = 1580056 Then ;
$Color1 = 0
Send("0")
Sleep(100)
EndIf
If I changed "$Color1 = PixelGetColor(233,58)" to the coord of my HP bar..
and changed "If $Color1 = 1580056 Then" to the color of the grey background of my hp when I'm hurt..
then could that work? Is it the most efficient?
jammer817 is offline  
Old 10/25/2009, 02:22   #4
 
Jatacid's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 336
Received Thanks: 315
Quote:
$Color1 = PixelGetColor(233,58) ;
If $Color1 = 1580056 Then ;
$Color1 = 0
Send("0")
Sleep(100)
EndIf
If you put this inside a While loop, you will find it simply does the same thing - so why bother changing $Color1, to 0?

As far as which one would work better, or at least more efficient, its completely up to you and how you like to operate. PixelSearch(coords,colour,colourrange) is very handy sometimes if the HP isnt going to be exactly the correct colour. PixelGetcolour can be a little too 'specific'.
If for example you loose a massive chunk of HP, your HP bar will appear 'pink' briefly as it drops before it goes black. With a wider colour range, that wont trigger your potting, but with a narrower range it will- but might not register.

Keep in mind also, that Aion's gameplay can often be pretty clunky. If you are in the middle of casting, or in the middle of gliding, or in the middle of some sort of animation - the pot wont go off.

Code:
Opt("SendKeyDownDelay",100) ;Important to have this or manually "keydown" & "keyup" instructions so that it actually registers the keypresses.

WinActivate("AION Client")
Sleep(10) ;give the time for the client to come to front
While 1
$coord = PixelSearch(127,26,127,26,0xC81B19,100)
;experiment with a range until you find it JUST works) ;you could also use the pixelget func- up to you it doesnt matter really

If not @error Then;if the color is not found
If PixelSearch(coords of a cast bar) = colourofaCastBar(Black Bit) Then
Sleep(10) ;AKA do nothing
Else
Send ("{-}") ;it presses "-"
Endif

EndIf
Sleep(500) ; if we don't put this sleep the auto-pot will keep the CPU used 100%
WEnd
Seems you know most things already so you should figure it out
Jatacid is offline  
Thanks
1 User
Old 10/25/2009, 03:20   #5
 
elite*gold: 0
Join Date: Oct 2009
Posts: 16
Received Thanks: 0
Thanks for the reply. I made a bot for WAR that would tab and look for friendly targets to heal but damned if I can remember how to do it.

I will do some tweaking and see what I can manage with my very limited coding knowledge
jammer817 is offline  
Old 10/25/2009, 03:42   #6
 
elite*gold: 0
Join Date: Oct 2009
Posts: 16
Received Thanks: 0
Code:
Opt("SendKeyDownDelay",100) ;Important to have this or manually "keydown" & "keyup" instructions so that it actually registers the keypresses.

WinActivate("AION Client")
Sleep(10) ;give the time for the client to come to front
While 1
$coord = PixelSearch(127,26,127,26,0xC81B19,100)
;experiment with a range until you find it JUST works) ;you could also use the pixelget func- up to you it doesnt matter really

If not @error Then;if the color is not found
If PixelSearch(127,26,127,26) = 0xC81B19 Then
Sleep(10) ;AKA do nothing
Else
Send ("{-}") ;it presses "-"
Endif

EndIf
Sleep(500) ; if we don't put this sleep the auto-pot will keep the CPU used 100%
WEnd

Code:
Opt("SendKeyDownDelay",100) ;Important to have this or manually "keydown" & "keyup" instructions so that it actually registers the keypresses.
Ok I get the delay for the send keys, thanks forgot about that!
Code:
WinActivate("AION Client")
Sleep(10) ;give the time for the client to come to front
Ahh that is why my script was always paused probably, I didn't give it time to show up?

Code:
$coord = PixelSearch(127,26,127,26,0xC81B19,100)
This is the part that really confused me. This is the part of the loop that keeps looking at a spot in the hp bar and reading the color. The variable $coord does what though? It isn't used again in the script so why declare it?

PixelSearch(127,26,127,26,0xC81B19,100). Ok so it looks at 1 pixel (127,26) for a color within 100 shades of 0xC81B19 right? Well 0xC81B19 is my red color, so it is my color when I have health, is this the right value for this portion of the script?
Code:
If not @error Then;if the color is not found
If PixelSearch(127,26,127,26) = 0xC81B19 Then
Sleep(10) ;AKA do nothing
This confuses me also, big surprise! In your notes it said use the grey color code here. It seemed to me it was saying if (127,26) is grey I will do nothing. So I changed it to my red value, ELSE use pot.

This stuff is more interesting than playing the game, are there any online courses that teach autoit?
jammer817 is offline  
Old 10/25/2009, 04:55   #7
 
Jatacid's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 336
Received Thanks: 315
lol yeah - my last game I spent way more time playing around with autoit than i did playing :P Its good fun but alot of trial and error.

As for your pixel searching - ill copy paste a section of my code from my autopot function from my requiem bot.

Code:
Func healbot()

$recasthp = GUIctrlread($pottimerInput) + 3 ;the GUI had a section where you could input the cooldown of the pot.  So that once it pots - it doesnt keep spamming it. (Can interfere with other key strokes etc)
$recastmp = GUIctrlread($pottimerInput) + 3


;Heal hp
If PixelSearch($pixelused,665,$pixelused,665,0x363722,15) = @error = 0 ;$pixelused is chosen by the user with GUI.  It basically gets them to point to anywhere on the HP bar.  The colour is the 'depleted' colour (greyish).
Then  			;depleted health colour low at selected %
		If TimerDiff($timerhp) / 1000 >= $recasthp Then  ;use TimerInit($timerhp) at the start or something to get a timer happening.  If the timer is greater or equal to the user-inputted cooldown, then it means its ready to be cast again.
		Send("{=}")
		$timerhp = TimerInit()  ;resets the timer
	EndIf
EndIf


;This heal mp thing is the same principle as heal HP
;Heal mp
If Pixelsearch($mpixelused,685,$mpixelused,685,0x192930,15) = @error = 0 Then 			;mana depleted colour at selected %
		If Timerdiff($timermp) / 1000 >= $recastmp Then
		Send("{-}")
		$timermp = Timerinit()
	EndIf
EndIf
EndFunc
Jatacid is offline  
Reply


Similar Threads Similar Threads
AutoIt AutoPot Script
08/23/2009 - Dragonica Hacks, Bots, Cheats & Exploits - 46 Replies
**** THIS SCRIPT ONLY WORK IN WINDOW MODE **** **** THIS SCRIPT ONLY WORK IN WINDOW MODE **** **** THIS SCRIPT ONLY WORK IN WINDOW MODE **** Hi all, scripted an autoIt script that will do auto login and autopot This script utilize a configuration file name config.dat to do the following, so it should be in the same folder as where the script is. To terminate the script just press F11. Auto Login (ID must be save)



All times are GMT +2. The time now is 04:38.


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.