Howdy!
Don't feel bad, we were all newbies at one point or another. I'm by no means an expert, but I can get around with AutoIT pretty well.
Although the coding might be different, the general principals still remain for scripting languages such as Auto it and ACtools.
First, if you want to make your program more "reactive", then your going to be pulling alot more information from the screen, much more of the time. So my first piece of advice is to make sure that you have your program broken up into manageable function calls to try to make everything run smoothly.
Attached to this is very QUICKLY written GUI application in AutoIT3 to help you get started. I originally had a regular script started, but wanted to try my hand at GUI stuff.
THIS IS NOT FULLY FUNCTIONAL! Not even close :0) The aggro color checkmarks do not work, it has a terrible combat system, dosen't loot, and dosen't move. It will, however, turn in a circl and kill monsters if they are in your pull range (movement to target is next if I ever get time to put a few lines in :0)
To run, make sure Attack is in slot one, and follow the directions on the GUI. It's kinda hard to understand, but here is a quick summary..
To set color information, press f2 when your mouse is over your health (AS CLOSE TO FULL AS POSSIBLE), F3 when your over the monsters health (THIS MUST BE ON THE LEFT HAND SIDE! AS CLOSE TO DEATH AS POSSIBLE), and press F5 on the gold border outline that a monster has around his name. After these points are set, YOU MUST CLICK SET AND TEST BUTTON FOR EACH ONE!
In the EQ window input box, you must have the exact window name (don't worry, you can save this later).
Just click the save button to save your settings, then load them back up the next time.
Anyway, I don't expect you to get this running, because its more of an outline for me anyway, but I hope it helps.
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
#include <GuiConstants.au3>
Opt("GUIOnEventMode", 1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Closeclicked")
Opt("WinTitleMatchMode", 2)
;GUI Information
GuiCreate("EQ2 CWBOt Version 0.00000001", 450, 500)
GUISetState() ; display the GUI
HotkeySet("{F2}", "Playerinfo1")
HOtkeyset("{F3}", "MobInfo1")
Hotkeyset("{F5}", "Moblevel")
;Variables
DIM $Playerhealthcolor
DIM $Mobhealthlevel
DIM $mobborder
;Input Box for Window Name
$windowname = GUICtrlCreateInput("", 135, 408, 300, 20)
GUICtrlCreatelabel("EQ2 Window Name", 20, 410, 110, 70)
; Buttons
$StartID = GUICtrlCreateButton("Start", 30, 460, 50)
GUICtrlSetOnEvent(-1, "Mainloop")
$ExitID = GUICtrlCreateButton("Exit", 350, 460, 50)
GUICtrlSetOnEvent(-1, "Closeclicked")
$SaveID = GUICtrlCreateButton("Save", 110, 460, 50)
GUICtrlSetOnEvent(-1, "Save")
$loadID = GUICtrlCreateButton("Load", 190, 460, 50)
GUICtrlSetOnEvent(-1, "Load")
$resetID = GUICtrlCreateButton("Reset", 270, 460, 50)
GUICtrlSetOnEvent(-1, "Reset")
; Combat Key Menu
GUICtrlCreateLabel("Action Buttons", 25, 30)
GuiCtrlCreateLabel("Pull key 2", 10, 60, 90, 70)
GUICtrlCreateLabel("HO Start Key 3", 10, 90, 90, 70)
GUICtrlCreateLabel("Advance HO Key 4", 10, 120, 110, 70)
GUICtrlCreateLabel("Finish HO Key 5", 10, 150, 90, 70)
GUICtrlCreateLabel("Heal Key 6", 10, 180, 90, 70)
; Aggro Menu
GUICtrlCreateLabel("Aggro LVL Range", 270, 30)
$Greyaggro = GUICtrlCreateCheckbox (" Grey Mobs", 275, 55, 120, 20)
$Greenaggro = GUICtrlCreateCheckbox (" Green Mobs", 275, 80, 120, 20)
$Blueaggro = GUICtrlCreateCheckbox (" Blue Mobs", 275, 110, 120, 20)
$Whiteaggro = GUICtrlCreateCheckbox (" White Mobs", 275, 140, 120, 20)
$Orangeaggro = GUICtrlCreateCheckbox (" Orange Mobs", 275, 170, 120, 20)
$Redaggro = GUICtrlCreateCheckbox (" Red Mobs", 275, 200, 120, 20)
;Setting the Health Information
GUICtrlCreateLabel("Set Player Info", 25, 235)
GUICtrlCreateLabel("F2 To Set Point", 10, 250)
$playerhealthlabel0x = GUICtrlCreateLabel ("0", 35, 305, 40, 40)
$Playerhealthlabel0y = GUICtrlCreatelabel ("0", 75, 305, 40, 40)
$playerhealthbutton0 = GUICtrlCreateButton ("Test and Set Color", 10, 270, 110, 30)
GUICtrlSetOnEvent(-1, "playerColortest")
;Setting Mob Info
GUICtrlCreateLabel("Set Mob Health", 170, 235)
GUICtrlCreateLabel("F3 to Set Point Near 0%", 150, 250)
$mobhealthlabelx = GUICtrlCreatelabel("0", 180, 305, 40, 40)
$mobhealthlabely = GUICtrlCreatelabel("0", 220, 305, 40, 40)
$mobhealthbestbutton = GUICtrlCreateButton ("Test and Set Color", 155, 270, 110, 30)
GUICtrlSetOnEvent(-1, "mobhealthcolortest")
;Setting Mob Level
GUICtrlCreatelabel("Set Monster Gold Border Color", 290, 235, 150)
GUICtrlCreateLabel("F5 to Set Border Color", 300, 250)
$mobborderx = GUICtrlCreatelabel("0", 330, 305, 40, 40)
$mobbordery = GUICtrlCreatelabel("0", 360, 305, 40, 40)
$mobhealthbestbutton = GUICtrlCreateButton ("Test and Set Color", 295, 270, 110, 30)
GUICtrlSetOnEvent(-1, "moblevelcolortest")
GUISetState() ; display the GUI
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
;--------------------------------------------------------------------------------------------
Func Playerinfo1()
$a = MouseGetPos()
GUIctrlSetData($playerhealthlabel0x, $a[0])
GUIctrlSetData($playerhealthlabel0y, $a[1])
EndFunc
;--------------------------------------------------------------------------------------------
;--------------------------------------------------------------------------------------------
Func mobinfo1()
$a = MouseGetPos()
GUIctrlSetData($mobhealthlabelx, $a[0])
GUIctrlSetData($mobhealthlabely, $a[1])
EndFunc
;----------------------------------------------------------------------------------------------
Func mobhealthColorTest()
$userpointx = GUICtrlRead($mobhealthlabelx)
$userpointy = GUICtrlRead($mobhealthlabely)
$var = Pixelgetcolor($userpointx, $userpointy)
MsgBox(0,"The Color at the point selected is ", $var)
MsgBox(0,"Test Color", "You have successfully set your mob border color. If you recived a 0 as the color selected, please try again. Remember, there is no specific color code, just make sure it is not 0" )
$mobhealthlevel = $var
Endfunc
;--------------------------------------------------------------------------------------------
Func Moblevelcolortest()
$userpointx = GUICtrlRead($mobborderx)
$userpointy = GUICtrlRead($mobbordery)
$var = Pixelgetcolor($userpointx, $userpointy)
MsgBox(0,"The Color at the point selected is ", $var)
MsgBox(0,"Test Color", "You have successfully set your mob border color. If you recived a 0 as the color selected, please try again. Remember, there is no specific color code, just make sure it is not 0" )
$mobborder = $var
Endfunc
;----------------------------------------------------------------------------------------------
Func moblevel()
$a = MouseGetPos()
GUIctrlSetData($mobborderx, $a[0])
GUIctrlSetData($mobbordery, $a[1])
EndFunc
;----------------------------------------------------------------------------------------------
Func PlayerColorTest()
$userpointx = GUICtrlRead($playerhealthlabel0x)
$userpointy = GUICtrlRead($playerhealthlabel0y)
$var = Pixelgetcolor($userpointx, $userpointy)
MsgBox(0,"The Color at the point selected is ", $var)
MsgBox(0,"Test Color", "You have successfully set your mob border color. If you recived a 0 as the color selected, please try again. Remember, there is no specific color code, just make sure it is not 0")
$Playerhealthcolor = $var
Endfunc
;----------------------------------------------------------------------------------------------
Func CLOSEClicked()
Exit
EndFunc
;----------------------------------------------------------------------------------------------
Func CheckPlayerHealth()
$userpointx = GUICtrlRead($playerhealthlabel0x)
$userpointy = GUICtrlRead($playerhealthlabel0y)
$var = Pixelgetcolor($userpointx, $userpointy)
DO
SEND ("{F1}")
SLEEP (1000)
$var = Pixelgetcolor($userpointx, $userpointy)
$userpointx2 = GUICtrlRead($mobhealthlabelx)
$userpointy2 = GUICtrlRead($mobhealthlabely)
$var2 = Pixelgetcolor($userpointx2, $userpointy2)
IF $Var2 = $mobhealthlevel Then
Combat()
Endif
Until $Var = $Playerhealthcolor
send("{ESC}")
Endfunc
;------------------------------------------------------------------
FUNC Scanformob()
DO
Send ("{LEFT Down}")
Sleep (500)
Send ("{LEFT Up}")
SEND ("{Tab}")
$userpointx = GUICtrlRead($mobhealthlabelx)
$userpointy = GUICtrlRead($mobhealthlabely)
$var = Pixelgetcolor($userpointx, $userpointy)
Sleep (2000)
Until $var = $mobhealthlevel
ENDFunc
;-------------------------------------------------------------
FUNC Mainloop()
$x = 1
Do
WinActivate (GUICtrlread($windowname), "")
Checkplayerhealth()
Scanformob()
Combat()
Until $x = 0
Endfunc
;-------------------------------------------------------------
FUNC Combat()
$userpointx = GUICtrlRead($mobhealthlabelx)
$userpointy = GUICtrlRead($mobhealthlabely)
$var = Pixelgetcolor($userpointx, $userpointy)
$mobborderx = GUICtrlRead($mobborderx)
$mobbordery = GUICtrlRead($mobbordery)
$var2 = Pixelgetcolor($mobborderx, $mobbordery)
$movecounter = 0
IF $var2 = $mobborder THEN
Do
Send("{1}")
sleep(1000)
Send("{2}")
DO
Sleep (2000)
Send("{3}")
sleep (2000)
Send("{4}")
sleep (2000)
Send("{5}")
$var = Pixelgetcolor($userpointx, $userpointy)
Until $var < 10000
Sleep (4000)
$var = Pixelgetcolor($userpointx, $userpointy)
Until $var < 10000
Endif
Endfunc
;---------------------------------------------------------------
Func Save()
IniWrite ( "c:\cwconfig.ini", "labels", "playerhealthlabel0x", GUICtrlRead($playerhealthlabel0x) )
IniWrite ( "c:\cwconfig.ini", "labels", "playerhealthlabel0y", GUICtrlRead($playerhealthlabel0y) )
IniWrite ( "c:\cwconfig.ini", "labels", "mobhealthlabelx", GUICtrlRead($mobhealthlabelx) )
IniWrite ( "c:\cwconfig.ini", "labels", "mobhealthlabely", GUICtrlRead($mobhealthlabely) )
IniWrite ( "c:\cwconfig.ini", "labels", "moblevely", GUICtrlRead($mobbordery) )
IniWrite ( "c:\cwconfig.ini", "labels", "moblevelx", GUICtrlRead($mobborderx) )
Iniwrite ( "c:\cwconfig.ini", "Eqfilename", "eqwindowname", GUICtrlRead($windowname))
Iniwrite ( "c:\cwconfig.ini", "Eqfilename", "playerhealthcolor",$playerhealthcolor )
Iniwrite ( "c:\cwconfig.ini", "Eqfilename", "mobbordercolor", $mobborder)
Iniwrite ( "c:\cwconfig.ini", "Eqfilename", "mobhealthlevel", $mobhealthlevel)
Endfunc
;------------------------------------------------------------------
Func Load()
GUICtrlSetData($playerhealthlabel0x, IniRead ("c:\cwconfig.ini", "labels", "playerhealthlabel0x", "0"))
GUICtrlSetData($playerhealthlabel0y, IniRead ("c:\cwconfig.ini", "labels", "playerhealthlabel0y", "0"))
GUICtrlSetData($mobhealthlabelx, IniRead ("c:\cwconfig.ini", "labels", "mobhealthlabelx", "0"))
GUICtrlSetData($mobhealthlabely, IniRead ("c:\cwconfig.ini", "labels", "mobhealthlabely", "0"))
GUICtrlSetData($mobborderx, IniRead ("c:\cwconfig.ini", "labels", "moblevelx", "0"))
GUICtrlSetData($mobbordery, IniRead ("c:\cwconfig.ini", "labels", "moblevely", "0"))
GUICtrlSetData($windowname, IniRead ("c:\cwconfig.ini", "eqfilename", "eqwindowname", ""))
$playerhealthcolor = IniRead ("c:\cwconfig.ini", "eqfilename", "playerhealthcolor", "0")
$mobborder = IniRead ("c:\cwconfig.ini", "eqfilename", "mobbordercolor", "0")
$mobhealthlevel = IniRead ("c:\cwconfig.ini", "eqfilename", "mobhealthcolor", "0")
Endfunc
;-------------------------------------------------------------------
Func Reset()
GUICtrlSetData($playerhealthlabel0x, "0")
GUICtrlSetData($playerhealthlabel0y, "0")
GUICtrlSetData($mobhealthlabelx, "0")
GUICtrlSetData($mobhealthlabely, "0")
GUICtrlSetData($mobborderx, "0")
GUICtrlSetData($mobbordery, "0")
GUICtrlSetData($windowname, "")
Endfunc
;-------------------------------------------------------------------