JamesDover Posted November 1, 2007 Posted November 1, 2007 I was looking at Malu05's wow link when I came across his configtool. I tried it but found some code missing to change the cord when the radio button was pressed does anyone know what the missing code would be? This looks like a usefull tool if I could get it working. I found the problem starts at If $msg = $Smartbehave Then SmartBehavior() endif SmartBehavior Func seems to be missing. Thanks, James ;CCT for WOW-BOT #include <GUIConstants.au3> HotkeySet("{ESC}","terminate") HotkeySet("{F2}","save") global $CurrentCheck = 0 ;; Apendix: global $Appname = "WOWBOT1.4c.exe" dim $file = "224403" ;;Apendix over--- ;;================================================================================ ;;Secure Filecheck (Diactivated due to testing) ;;================================================================================ ;if FileExists ( $Appname ) = 0 Then ; msgbox(0,"Error (CCT-1)", "Main bot app could not be found.") ; exit 0 ;endif ;if $file = FileGetSize ( $Appname ) Then ; ;Else ; msgbox(0,"Error (CCT-2)","Bot is not compitable with this version of CCT.") ; exit 0 ; EndIf ;;================================================================================ ;;Input from ini file ;;================================================================================ $OptionFilename=IniRead("Configuration.ini","Initialize","Filename","0") $CCX=IniRead("Configuration.ini","xycLocation","CombatcheckX","0") $CCY=IniRead("Configuration.ini","xycLocation","CombatcheckY","0") $CCC=IniRead("Configuration.ini","xycLocation","CombatcheckC","0") $MSX=IniRead("Configuration.ini","xycLocation","MobselectedX","0") $MSY=IniRead("Configuration.ini","xycLocation","MobselectedY","0") $MSC=IniRead("Configuration.ini","xycLocation","MobselectedC","0") $F1X=IniRead("Configuration.ini","xycLocation","Facingwron1X","0") $F1Y=IniRead("Configuration.ini","xycLocation","Facingwron1Y","0") $F1C=IniRead("Configuration.ini","xycLocation","Facingwron1C","0") $F2X=IniRead("Configuration.ini","xycLocation","Facingwron2X","0") $F2Y=IniRead("Configuration.ini","xycLocation","Facingwron2Y","0") $F2C=IniRead("Configuration.ini","xycLocation","Facingwron2C","0") $PHX=IniRead("Configuration.ini","xycLocation","PlayrhealthX","0") $PHY=IniRead("Configuration.ini","xycLocation","PlayrhealthY","0") $PHC=IniRead("Configuration.ini","xycLocation","PlayrhealthC","0") $ORX=IniRead("Configuration.ini","xycLocation","Outofrange1X","0") $ORY=IniRead("Configuration.ini","xycLocation","Outofrange1Y","0") $ORC=IniRead("Configuration.ini","xycLocation","Outofrange1C","0") $CBX=IniRead("Configuration.ini","xycLocation","ChatboxX","0") $CBY=IniRead("Configuration.ini","xycLocation","ChatboxY","0") $CBC=IniRead("Configuration.ini","xycLocation","ChatboxC","0") $MDX=IniRead("Configuration.ini","xycLocation","MousedeseleX","0") $MDY=IniRead("Configuration.ini","xycLocation","MousedeseleY","0") ;;================================================================================ ;;GUI Creation ;;================================================================================ ;;random Opt("GUIOnEventMode", 1) ;;GUI User interface GUICreate("Client Config Tool for " & $OptionFilename, 300, 400) GUISetState (@SW_SHOW) GUICtrlCreateLabel("Press [F2] to freeze current setting", 0, 0, 200, 20,($SS_LEFT)) ;;Combatcheck part: $CombatCX = GUICtrlCreateInput ( $CCX, 90, 30, 30, 20) $CombatCY = GUICtrlCreateInput ( $CCY, 140, 30, 30, 20) $CombatCC = GUICtrlCreateInput ( $CCC, 200, 30, 60, 20) GUICtrlCreateLabel("Combat Check", 0, 32, 75, 20,($SS_LEFT)) GUICtrlCreateLabel("X:", 75, 32, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Y:", 125, 32, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Col:", 175, 32, 20, 20,($SS_LEFT)) $checkCC = GUICtrlCreateRadio ("", 270, 30, 60, 20) GUICtrlSetOnEvent($checkCC, "OKPressed") ;;Facingwrong part: $FacingWX = GUICtrlCreateInput ( $F1X, 90, 70, 30, 20) $FacingWY = GUICtrlCreateInput ( $F1Y, 140, 70, 30, 20) $FacingWC = GUICtrlCreateInput ( $F1C, 200, 70, 60, 20) GUICtrlCreateLabel("Facing Wrong", 0, 72, 75, 20,($SS_LEFT)) GUICtrlCreateLabel("X:", 75, 72, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Y:", 125, 72, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Col:", 175, 72, 20, 20,($SS_LEFT)) $checkFC = GUICtrlCreateRadio ("", 270, 70, 60, 20) GUICtrlSetOnEvent(-1, "OKPressed") ;;Facingwrong 2 part: $FacingW2X = GUICtrlCreateInput ( $F2X, 90, 110, 30, 20) $FacingW2Y = GUICtrlCreateInput ( $F2Y, 140, 110, 30, 20) $FacingW2C = GUICtrlCreateInput ( $F2C, 200, 110, 60, 20) GUICtrlCreateLabel("Facing Wrong2", 0, 112, 75, 20,($SS_LEFT)) GUICtrlCreateLabel("X:", 75, 112, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Y:", 125, 112, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Col:", 175, 112, 20, 20,($SS_LEFT)) $checkFC2 = GUICtrlCreateRadio ("", 270, 110, 60, 20) GUICtrlSetOnEvent(-1, "OKPressed") ;;Playerhealth part: $PlayerHX = GUICtrlCreateInput ( $PHX, 90, 150, 30, 20) $PlayerHY = GUICtrlCreateInput ( $PHY, 140, 150, 30, 20) $PlayerHC = GUICtrlCreateInput ( $PHC, 200, 150, 60, 20) GUICtrlCreateLabel("Player Health", 0, 152, 75, 20,($SS_LEFT)) GUICtrlCreateLabel("X:", 75, 152, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Y:", 125, 152, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Col:", 175, 152, 20, 20,($SS_LEFT)) $checkPH = GUICtrlCreateRadio ("", 270, 150, 60, 20) GUICtrlSetOnEvent(-1, "OKPressed") ;;OutOfRange part: $OutOfRX = GUICtrlCreateInput ( $ORX, 90, 190, 30, 20) $OutOfRY = GUICtrlCreateInput ( $ORY, 140, 190, 30, 20) $OutOfRC = GUICtrlCreateInput ( $ORC, 200, 190, 60, 20) GUICtrlCreateLabel("Out Of Range", 0, 192, 75, 20,($SS_LEFT)) GUICtrlCreateLabel("X:", 75, 192, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Y:", 125, 192, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Col:", 175, 192, 20, 20,($SS_LEFT)) $checkOOR = GUICtrlCreateRadio ("", 270, 190, 60, 20) GUICtrlSetOnEvent(-1, "OKPressed") ;;Chatbox part: $ChatboxX = GUICtrlCreateInput ( $CBX, 90, 230, 30, 20) $ChatboxY = GUICtrlCreateInput ( $CBY, 140, 230, 30, 20) $ChatboxC = GUICtrlCreateInput ( $CBC, 200, 230, 60, 20) GUICtrlCreateLabel("Chatbox", 0, 232, 75, 20,($SS_LEFT)) GUICtrlCreateLabel("X:", 75, 232, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Y:", 125, 232, 10, 20,($SS_LEFT)) GUICtrlCreateLabel("Col:", 175, 232, 20, 20,($SS_LEFT)) $checkChat = GUICtrlCreateRadio ("", 270, 230, 60, 20) GUICtrlSetOnEvent(-1, "OKPressed") ;;================================================================================ ;;Positioning ;;================================================================================ ;;Activate $Smartbehave = GUICtrlCreateLabel("Color Exampel", 200, 360,80,30,($SS_SUNKEN )) $Smartbehave2 = GUICtrlCreateButton("Save to Configuration.ini", 50, 360) GUICtrlSetOnEvent(-1, "Savetofile") WinSetOnTop("CCT for WOW-BOT", "", 1) ; Run the GUI until the dialog is closed autorun() Func autorun() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf If $msg = $Smartbehave Then SmartBehavior() endif if $msg = $Smartbehave2 then msgbox(0,"hej","hej") endif if $CurrentCheck = 1 Then if GUICtrlRead($checkCC) = 1 then $pos = MouseGetPos() $col = PixelGetColor ($pos[0],$pos[1]) $colhex = hex($col,6) ControlSetText("CCT for WOW-BOT", "", $CombatCX, $pos[0]) ControlSetText("CCT for WOW-BOT", "", $CombatCY, $pos[1]) ControlSetText("CCT for WOW-BOT", "", $CombatCC, "0x" & hex($col,6)) GUICtrlSetBkColor($Smartbehave,$col) ; Green sleep(10) EndIf if $checkFC And BitAND(GUICtrlRead($checkFC), $GUI_CHECKED) = $GUI_CHECKED then $pos = MouseGetPos() $col = PixelGetColor ($pos[0],$pos[1]) $colhex = hex($col,6) ControlSetText("CCT for WOW-BOT", "", $FacingWX, $pos[0]) ControlSetText("CCT for WOW-BOT", "", $FacingWY, $pos[1]) ControlSetText("CCT for WOW-BOT", "", $FacingWC, "0x" & hex($col,6)) GUICtrlSetBkColor($Smartbehave,$col) ; Green sleep(10) EndIf if GUICtrlRead($checkFC2) = 1 then $pos = MouseGetPos() $col = PixelGetColor ($pos[0],$pos[1]) $colhex = hex($col,6) ControlSetText("CCT for WOW-BOT", "", $FacingW2X, $pos[0]) ControlSetText("CCT for WOW-BOT", "", $FacingW2Y, $pos[1]) ControlSetText("CCT for WOW-BOT", "", $FacingW2C, "0x" & hex($col,6)) GUICtrlSetBkColor($Smartbehave,$col) ; Green sleep(10) EndIf if GUICtrlRead($checkPH) = 1 then $pos = MouseGetPos() $col = PixelGetColor ($pos[0],$pos[1]) $colhex = hex($col,6) ControlSetText("CCT for WOW-BOT", "", $PlayerHX, $pos[0]) ControlSetText("CCT for WOW-BOT", "", $PlayerHY, $pos[1]) ControlSetText("CCT for WOW-BOT", "", $PlayerHC, "0x" & hex($col,6)) GUICtrlSetBkColor($Smartbehave,$col) ; Green sleep(10) EndIf if GUICtrlRead($checkOOR) = 1 then $pos = MouseGetPos() $col = PixelGetColor ($pos[0],$pos[1]) $colhex = hex($col,6) ControlSetText("CCT for WOW-BOT", "", $OutOfRX, $pos[0]) ControlSetText("CCT for WOW-BOT", "", $OutOfRY, $pos[1]) ControlSetText("CCT for WOW-BOT", "", $OutOfRC, "0x" & hex($col,6)) GUICtrlSetBkColor($Smartbehave,$col) ; Green sleep(10) EndIf if GUICtrlRead($CheckChat) = 1 then $pos = MouseGetPos() $col = PixelGetColor ($pos[0],$pos[1]) $colhex = hex($col,6) ControlSetText("CCT for WOW-BOT", "", $ChatboxX, $pos[0]) ControlSetText("CCT for WOW-BOT", "", $ChatboxY, $pos[1]) ControlSetText("CCT for WOW-BOT", "", $ChatboxC, "0x" & hex($col,6)) GUICtrlSetBkColor($Smartbehave,$col) ; Green sleep(10) EndIf EndIf if $msg = $GUI_EVENT_CLOSE then exit 0 EndIf Wend endfunc ;;================================================================================ ;;EVENT Save(pause) ;;================================================================================ func save() $CurrentCheck = 0 autorun() EndFunc ;==>Save func terminate() exit 0 EndFunc ;==>Terminate func OKPressed() $CurrentCheck = 1 EndFunc ;;================================================================================ ;;EVENT Savetofile (output) ;;================================================================================ func Savetofile() IniWrite("Configuration.ini","xycLocation","Combatcheckx",GUICtrlRead($CombatCX)) IniWrite("Configuration.ini","xycLocation","CombatcheckY",GUICtrlRead($CombatCY)) IniWrite("Configuration.ini","xycLocation","CombatcheckC",GUICtrlRead($CombatCC)) IniWrite("Configuration.ini","xycLocation","MobselectedX",GUICtrlRead($CombatCX)) IniWrite("Configuration.ini","xycLocation","MobselectedY",GUICtrlRead($CombatCY)) IniWrite("Configuration.ini","xycLocation","MobselectedC",GUICtrlRead($CombatCC)) IniWrite("Configuration.ini","xycLocation","Facingwron1X",GUICtrlRead($FacingWX)) IniWrite("Configuration.ini","xycLocation","Facingwron1Y",GUICtrlRead($FacingWY)) IniWrite("Configuration.ini","xycLocation","Facingwron1C",GUICtrlRead($FacingWC)) IniWrite("Configuration.ini","xycLocation","Facingwron2X",GUICtrlRead($FacingW2X)) IniWrite("Configuration.ini","xycLocation","Facingwron2Y",GUICtrlRead($FacingW2Y)) IniWrite("Configuration.ini","xycLocation","Facingwron2C",GUICtrlRead($FacingW2C)) IniWrite("Configuration.ini","xycLocation","PlayrhealthX",GUICtrlRead($PlayerHX)) IniWrite("Configuration.ini","xycLocation","PlayrhealthY",GUICtrlRead($PlayerHY)) IniWrite("Configuration.ini","xycLocation","PlayrhealthC",GUICtrlRead($PlayerHC)) IniWrite("Configuration.ini","xycLocation","Outofrange1X",GUICtrlRead($OutOfRX)) IniWrite("Configuration.ini","xycLocation","Outofrange1Y",GUICtrlRead($OutOfRY)) IniWrite("Configuration.ini","xycLocation","Outofrange1C",GUICtrlRead($OutOfRC)) IniWrite("Configuration.ini","xycLocation","ChatboxX",GUICtrlRead($ChatboxX)) IniWrite("Configuration.ini","xycLocation","ChatboxY",GUICtrlRead($ChatboxY)) IniWrite("Configuration.ini","xycLocation","ChatboxC",GUICtrlRead($ChatboxC)) IniWrite("Configuration.ini","xycLocation","MousedeseleX",GUICtrlRead($MDX)) IniWrite("Configuration.ini","xycLocation","MousedeseleY",GUICtrlRead($MDY)) WinSetOnTop("CCT for WOW-BOT", "", 0) msgbox(0,"Succes", "All data was succesfully written to the configuration.ini") EndFunc ;;================================================================================ ;,END ;;================================================================================ ;; Code by Malu05 <Batmazbaz@hotmail.com>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now