Wikia

Heroes of Gaia Wiki

Macros/Guild Build - AutoIt

Talk0
607pages on
this wiki

< Macros

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.4.0

 Script Function:
	Build Guild Automation
	
 Notes:
	for this to function properly you will need to do several things
	1. Heroes of Gaia must be up and running in your browser and you have to be
	   on the build page you wish to use and have selected the Hero you wish
	   to receive the XP
	2. The MouseClick coordinates I use are specific to my setup, you will need
	   to create a seperate mouse position script (code below) to find the correct 
	   x and y numbers for the "Confirm" and "Close" buttons, the coordinates
	   for the "Close" button should be the same for the "Need more AP?" "Don't
	   Remind Me" button
#ce ----------------------------------------------------------------------------

#cs begin mouse position script  -----------------------------------------------

;wait 5 seconds after starting the script	
sleep(5000)

; put the mouse over the button now!
$pos = MouseGetPos()
MsgBox(0,"Your mouse pointer coordinate is:", $pos[0]&"x"&$pos[1])

#ce end mouse position script --------------------------------------------------

; uncomment the WinActivate line for the browser you are using
; I did not find the class for IE as I never use it, AutoIt has a
; Window Info tool that will find it if you need it

; Google Chrome
;WinActivate("[CLASS:Chrome_WindowImpl_0]", "")
; Mozilla Firefox
;WinActivate("[CLASS:MozillaUIWindowClass]", "")

$i = InputBox("How much AP?", "Enter your current AP", "", " M3")

; pause 5 seconds
Sleep(5000)

Do
	; click the "Confirm" button
	MouseClick("left", 510, 781, 1, 1)
	; decrement the AP
	$i = $i - 20
	; wait 5 seconds to deal with lag issues
	sleep(5000)
	
	; click the "Close" button on the "System Information" popup
	MouseClick("left", 510, 624, 1, 1)
	sleep(2000)
	; add second click for the "Need more AP?" nag you get when AP is around 20% of max
	; I have it click the "Don't Remind Me Again" button
	MouseClick("left", 510, 624, 1, 1)		
	
	; if we have enough AP for another go around wait 60 seconds
	if $i >= 20 Then
		sleep(60000)
	EndIf	
	
Until $i < 20

MsgBox(0, "Finished", "Finished at " & @hour & ":" & @MIN)

Around Wikia's network

Random Wiki