Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #RequireAdmin
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Icon=..\Desktop\Healbot.ico
- #AutoIt3Wrapper_Outfile=ZeroBot Self Healer _Taleon_[BSE].Exe
- #AutoIt3Wrapper_Res_Fileversion=0.0.0.94
- #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <IE.au3>
- #include <Inet.au3>
- #include <InetConstants.au3>
- ;************FOR GUI***********
- #include <GUIConstantsEx.au3>
- #include <GuiListBox.au3>
- #include <WindowsConstants.au3>
- #include <WinAPIFiles.au3>
- ;**********FOR BUTTON **********
- #include <ButtonConstants.au3>
- #include <StaticConstants.au3>
- ;**********FOR STRINGS **********
- #include <StringConstants.au3>
- #include <String.au3>
- ;**********FOR COMBOBOX **********
- #include <StringConstants.au3>
- #include <EditConstants.au3>
- #include <GuiEdit.au3>
- #include <GuiComboBox.au3>
- ;***********FOR LISTVIEW**********
- #include <ListviewConstants.au3>
- #include <GuiListView.au3>
- ;**********FOR FONTS **********
- #include <FontConstants.au3>
- ;**********FOR PROCESS **********
- #include <Process.au3>
- #include <SendMessage.au3>
- #include <Array.au3>
- #include <Timers.au3>
- #include <TabConstants.au3>
- #include <ButtonConstants.au3>
- #include <GDIPlus.au3>
- #include <WinAPIDiag.au3>
- #include <Misc.au3>
- #include <ScreenCapture.au3>
- #include <ColorConstants.au3>
- #include <IsPressed_UDF.au3>
- #include <_PixelGetColor.au3>
- ;~ If Not IsAdmin() Then
- ;~ Exit
- ;~ EndIf
- Global Const $WL_RESULT_ERROR = 'e' ; this will be the page output on error (unable to connect to db)
- Global Const $WL_RESULT_FAILED = 'f' ; this will be the page output on failure (invalid username/password)
- Global Const $WL_RESULT_SUCCESS = 's' ; ; this will be the page output on success (valid username/password)
- ;~ Global $wsLoginURL = 'http://localhost/app_login.php' ; the URL to the PHP login page
- Global $wsLoginURL = 'http://localhost/app_login.php' ; the URL to the PHP login page
- ;============ C L I E N T I N F O ===========================
- Global $CLIENTS_DETECTED = 0
- Global $CLIENT_REGISTERED
- Global $CLIENT_CHARACTER_NAME
- Global $FIRST_SCAN = 0
- ;============ C H A R A C T E R I N F O ===========================
- Global $CHARACTER_HP, $CHARACTER_MP
- Global $EQ_COLLAPSE_STATE
- ;=======================================
- ;=========== S U P P O R T G L O B A L S T A T E S =================
- Global $AntiIdle = 0
- Global $CURE_POISON = 0
- Global $CURE_CURSE = 0
- Global $CURE_BLEED = 0
- Global $CURE_BURN = 0
- Global $CURE_ELEC = 0
- Global $CURE_PARA = 0
- Global $HOLD_HASTE = 0
- Global $HOLD_INVISIBLE = 0
- Global $HOLD_MAGICSHIELD = 0
- Global $HOLD_RECOVERY = 0
- Global $CONDITION_CURE_POX[4] = ["exana pox","Text",20,6000]
- Global $CONDITION_CURE_CURSE[4] = ["exana mort","Text",40,6000]
- Global $CONDITION_CURE_BLEED[4] = ["exana kor","Text",30,6000]
- Global $CONDITION_CURE_BURN[4] = ["exana flam","Text",30,6000]
- Global $CONDITION_CURE_ELEC[4] = ["exana vis","Text",30,6000]
- Global $CONDITION_CURE_PARA[4] = ["exura","Text",20,6000]
- Global $CONDITION_HOLD_HASTE[4] = ["utani hur","Text", 60, 2000]
- Global $CONDITION_HOLD_INVISIBLE[4] = ["utana vid","Text",440,2000]
- Global $CONDITION_HOLD_MAGICSHIELD[4] = ["utamo vita","Text",50,2000]
- Global $CONDITION_HOLD_RECOVERY[4] = ["utura","Text",65,2000]
- Global $LAST_CURE_POX_CAST = TimerInit()
- Global $LAST_CURE_CURSE_CAST = TimerInit()
- Global $LAST_CURE_BLEED_CAST = TimerInit()
- Global $LAST_CURE_BURN_CAST = TimerInit()
- Global $LAST_CURE_ELEC_CAST = TimerInit()
- Global $LAST_CURE_PARA_CAST = TimerInit()
- Global $LAST_HOLD_HASTE_CAST = TimerInit()
- Global $LAST_HOLD_INVISIBLE_CAST = TimerInit()
- Global $LAST_HOLD_MAGICSHIELD_CAST = TimerInit()
- Global $LAST_HOLD_RECOVERY_CAST = TimerInit()
- ;============ Tibia Client Positions ================
- Global $TIBIA_WINDOW_X
- Global $TIBIA_WINDOW_Y
- Global $TIBIA_WINDOW_WIDTH
- Global $TIBIA_WINDOW_HEIGHT
- Global $MP_UNIQUE_COLOR_POSITION
- Global $STOREI_NBOX_UNIQUE_COLOR_POSITION
- Global $EQ_COLLAPSE_RECTANGLE[4], $EQ_COLLAPSE_RECTANGLE_CHECKSUM
- Global $CONDITION_BAR_RECTANGLE[4], $CONDITION_BAR_RECTANGLE_CHECKSUM
- Global $HP_RECTANGLE[4], $HP_RECTANGLE_CHECKSUM, $HP_RECTANGLE_CHECKSUM_CAST_TIMING
- Global $MP_RECTANGLE[4], $MP_RECTANGLE_CHECKSUM, $MP_RECTANGLE_CHECKSUM_CAST_TIMING
- ;====================================================
- ;====== Tibia Window States ======
- Global $TibiaWindowScan = 0
- ;=================================
- ;====== Support Settings ======
- Global $Support = 0
- Global $AutoHeal_FirstStart = 0
- Global $HP_CONDITION, $MP_CONDITION
- Global $HP_CONDITION_ACTION_POS, $MP_CONDITION_ACTION_POS
- Global $HP_CONDITION_HOTKEY = 0, $MP_CONDITION_HOTKEY = 0
- Global $HOTKEY_HEX_INDEX[12] = ["70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7A", "7B"]
- Global $CONDITIONS[2] = ["1", "CurHP:<:300:20:H:F2:500"]
- Global $CAST_DELAY = 900
- Global $LAST_HEAL_CAST = TimerInit()
- Global $CURE_CAST_DELAY = 1000
- Global $LAST_CURE_CAST = TimerInit()
- Global $CURRENT_STAT_INDEX[2] = ["Current Health", "Current Mana"]
- Global $OPERATOR_INDEX[2] = ["Below", "Above"]
- Global $CAST_TYPE_INDEX[3] = ["Click", "Hotkey", "Text"]
- ;=================================
- ;========== A N T I I D L E ===============
- Global $TIBIA_IDLE_TIME = TimerInit()
- Global $ANTI_IDLE_TIME = (1000 * 60) * 10
- ;===== TEMP INITIALIZED GUI VARIABLES =======
- Global $GUI_TibiaPixelReader
- ;============================================
- Global $Label_Status
- ;~ ConsoleWrite(@CRLF & "#############################################")
- ;~ ConsoleWrite(@CRLF & "#############################################")
- ;~ ConsoleWrite(@CRLF & "########## PIXEL DIAGNOSE TEST ##############")
- ;~ ConsoleWrite(@CRLF & "#############################################")
- ;~ Local $time = TimerInit()
- ;~ Local $result = PixelGetColor(1057,358,"[CLASS:Qt5QWindowOwnDCIcon]")
- ;~ Local $result = PixelSearch(1057,358,@DesktopWidth,@DesktopHeight,0x42415c,0,2,"[CLASS:Qt5QWindowOwnDCIcon]")
- ;~ Local $diff = TimerDiff($time)
- ;~ ConsoleWrite(@CRLF & "PROCESS TIME: " & $diff)
- ;~ If $result == -1 Then
- ;~ ConsoleWrite(@CRLF & "COLOR NOT FOUND: Error Code[" & $result & "]")
- ;~ Else
- ;~ ConsoleWrite(@CRLF & "COLOR FOUND: Hex[" & Hex($result,6) & "]")
- ;~ EndIf
- ;~ ConsoleWrite(@CRLF & "#############################################")
- ;~ ConsoleWrite(@CRLF & "########## PIXEL DIAGNOSE TEST ##############")
- ;~ ConsoleWrite(@CRLF & "#############################################")
- ;~ ConsoleWrite(@CRLF & "#############################################")
- ;~ ActivateTibiaWindow()
- ;~ If TibiaWindowIsFocused() Then
- ;~ Local $iCheckSum
- ;~ $iCheckSum = PixelChecksum(1631, 156, 1636, 163)
- ;~ ConsoleWrite(@CRLF & "CHECKSUM = " & $iCheckSum)
- ;~ Sleep(9000)
- ;~ ActivateTibiaWindow()
- ;~ Sleep(2000)
- ;~ _PixelSetColor(1631,156,0x000000,0)
- ;~ _PixelSetColor(1632,156,0x000000,0)
- ;~ _PixelSetColor(1633,156,0x000000,0)
- ;~ Sleep(2000)
- ;~ Exit
- ;~ $iCheckSum = PixelChecksum(1631, 156, 1636, 163)
- ;~ ConsoleWrite(@CRLF & "CHECKSUM = " & $iCheckSum)
- ;~ EndIf
- ;~ ActivateTibiaWindow()
- ;~ If TibiaWindowIsFocused() Then
- ;~ Local $time = TimerInit()
- ;~ Local $hDll = DllOpen("gdi32.dll")
- ;~ Local $vDC = _PixelGetColor_CreateDC($hDll)
- ;~ Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
- ;~ For $x = 1632 To 1636
- ;~ For $y = 156 To 163
- ;~ Local $sColor = _PixelGetColor_GetPixel($vDC, $x,$y, $hDll)
- ;~ Local $sColor = PixelGetColor($x,$y)
- ;~ ConsoleWrite(@CRLF & "Color: " & $sColor)
- ;~ Next
- ;~ Next
- ;~ _PixelGetColor_ReleaseRegion($vRegion)
- ;~ _PixelGetColor_ReleaseDC($vDC,$hDll)
- ;~ DllClose($hDll)
- ;~ Local $diff = TimerDiff($time)
- ;~ ConsoleWrite(@CRLF & "COLOR: " & $sColor)
- ;~ ConsoleWrite(@CRLF & "TIME: " & $diff)
- ;~ EndIf
- ;========== DISABLE DWM ON WIN7 & VISTA =========================
- ;DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", 0)
- ;================================================================
- ;Run(@ComSpec & " /c cd net stop uxsms", "", @SW_SHOW) --- Stop DWM
- ;Run(@ComSpec & " /c cd net start uxsms", "", @SW_SHOW) --- Start DWM
- Opt("GUIOnEventMode", 1)
- GUI_ClientSelect()
- ;~ GUI_ConditionManager()
- ;~ GUI_Main()
- While 1
- Sleep(10)
- CheckProcessForTibiaClient()
- AntiIdle()
- If TibiaWindowChangedPos() And TibiaWindowIsFocused() Then
- UpdateStatusLabel("rescan...")
- TibiaWindowScan()
- Else
- If SupportActive() And TibiaWindowIsFocused() And CharacterLogedIn() Then
- AutoHeal()
- AutoCondition()
- Else
- ToolTip("")
- HotKeySet("^{DEL}")
- EndIf
- EndIf
- WEnd
- ;========== GUI =========================================
- Func GUI_ClientSelect()
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ClientSelect = GUICreate("ZeroBot Client Select", 320, 150, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "CloseBot")
- Global $list_ClientChoice = GUICtrlCreateListView("", 25, 15, 270, 100)
- _GUICtrlListView_SetExtendedListViewStyle($list_ClientChoice, BitOR($LVS_EX_GRIDLINES, $LVS_NOCOLUMNHEADER, $LVS_EX_FULLROWSELECT, $LVS_EX_FLATSB))
- _GUICtrlListView_SetBkColor($list_ClientChoice, 0x595959)
- _GUICtrlListView_SetTextColor($list_ClientChoice, 0xFFFFFF)
- _GUICtrlListView_SetTextBkColor($list_ClientChoice, 0x595959)
- _GUICtrlListView_InsertColumn($list_ClientChoice, 0, "Client", 123)
- _GUICtrlListView_InsertColumn($list_ClientChoice, 1, "HWND", 123)
- Global $input_ClientSelect_hidedn_infobox = GUICtrlCreateInput("",25,15)
- GUICtrlSetState(-1,$GUI_HIDE)
- GUICtrlCreateButton("Start",25,120,60,20)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetOnEvent(-1,"OnClick_ClientSelect_Start")
- GUICtrlCreateButton("Login",90,120,60,20)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetOnEvent(-1,"_Login")
- Global $input_Login_info = GUICtrlCreateInput("", 90, 120)
- GUICtrlSetState($input_Login_info,$GUI_HIDE)
- GUISetBkColor(0x4c4c4c, $GUI_ClientSelect)
- GUISetState(@SW_SHOW, $GUI_ClientSelect)
- ;~ _Vista_EnableBlurBehind($GUI_ClientChoice)
- EndFunc
- Func GUI_Main()
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_Main = GUICreate("ZeroBot Menu", 370, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Close")
- GUICtrlCreateLabel("Status:", 25, 10, 150)
- GUICtrlSetColor(-1, $FontColor)
- Global $Label_Status = GUICtrlCreateLabel("", 100, 10, 50, 20)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("Character:", 25, 30, 100)
- GUICtrlSetColor(-1, $FontColor)
- Global $Label_Character = GUICtrlCreateLabel("", 100, 30, 100, 20)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("Hitpoints:", 25, 50)
- GUICtrlSetColor(-1, $FontColor)
- Global $Label_HP = GUICtrlCreateLabel("", 100, 50, 60, 20)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("Manapoints:", 25, 70)
- GUICtrlSetColor(-1, $FontColor)
- Global $Label_MP = GUICtrlCreateLabel("", 100, 70, 60, 20)
- GUICtrlSetColor(-1, $FontColor)
- ;~ GUICtrlCreateLabel("Support", 194, 12)
- ;~ GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("Anti-Idle", 45, 95)
- GUICtrlSetColor(-1, $FontColor)
- Global $chkbox_AntiIdle = GUICtrlCreateCheckbox("", 25, 95, 15, 15)
- GUICtrlSetOnEvent($chkbox_AntiIdle, "OnClick_chkbox_AntiIdle")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("Turn Off DWM", 130, 95)
- GUICtrlSetColor(-1, $FontColor)
- Global $chkbox_DWM = GUICtrlCreateCheckbox("", 110, 95, 15, 15)
- GUICtrlSetOnEvent($chkbox_DWM, "OnClick_chkbox_DWM")
- GUICtrlSetColor(-1, $FontColor)
- ;==================== TOOLS CHECKBOX & BUTTON ===============================
- ;~ Global $chkbox_Tools = GUICtrlCreateCheckbox("", 210, 10, 15, 15)
- ;~ GUICtrlSetOnEvent($chkbox_Tools, "")
- ;~ GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateButton("Scan", 285, 10, 80, 20)
- GUICtrlSetOnEvent(-1, "OnClick_Scan")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $input_Scan_info = GUICtrlCreateInput("", 285, 10)
- GUICtrlSetState($input_Scan_info,$GUI_HIDE)
- ;==================== SUPPORT CHECKBOX & BUTTON ===============================
- Global $chkbox_Support = GUICtrlCreateCheckbox("", 265, 30, 15, 15)
- GUICtrlSetOnEvent($chkbox_Support, "OnClick_chkbox_Support")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateButton("Support", 285, 30, 80, 20)
- GUICtrlSetOnEvent(-1, "GUI_Support")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;==================== TARGETING CHECKBOX & BUTTON ===============================
- Global $chkbox_Targeting = GUICtrlCreateCheckbox("", 265, 50, 15, 15)
- GUICtrlSetOnEvent($chkbox_Targeting, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateButton("Targeting", 285, 50, 80, 20)
- GUICtrlSetOnEvent(-1, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;==================== WALKER CHECKBOX & BUTTON ===============================
- Global $chkbox_Walker = GUICtrlCreateCheckbox("", 265, 70, 15, 15)
- GUICtrlSetOnEvent($chkbox_Walker, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateButton("Walker", 285, 70, 80, 20)
- GUICtrlSetOnEvent(-1, "GUI_Walker")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;==================== LOOTER CHECKBOX & BUTTON ===============================
- Global $chkbox_Looter = GUICtrlCreateCheckbox("", 265, 90, 15, 15)
- GUICtrlSetOnEvent($chkbox_Looter, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateButton("Looter", 285, 90, 80, 20)
- GUICtrlSetOnEvent(-1, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;==================== DONATE BUTTON ===============================
- GUICtrlCreateButton("DONATE", 9315, 90, 50, 20)
- GUICtrlSetOnEvent(-1, "Donate")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUISetBkColor(0x4c4c4c, $GUI_Main)
- GUISetState(@SW_SHOW, $GUI_Main)
- EndFunc ;==>GUI_Main
- Func GUI_Close()
- ;~ DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", 1)
- GUIDelete($GUI_Main)
- GUI_ClientSelect()
- EndFunc ;==>GUI_Close
- Func GUI_Support()
- GUISetState(@SW_HIDE, $GUI_Main)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_Support = GUICreate("ZeroBot Support", 250, 75, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Support_Close")
- ;==================== SELF HEALER BUTTON ===============================
- GUICtrlCreateButton("Self Healer", 25, 10, 100, 25)
- GUICtrlSetOnEvent(-1, "GUI_SelfHealer_Settings")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;==================== CONDITION MANAGER BUTTON ===============================
- GUICtrlCreateButton("Condition Manager", 25, 40, 100, 25)
- GUICtrlSetOnEvent(-1, "GUI_ConditionManager")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;==================== EQ MANAGER BUTTON ===============================
- GUICtrlCreateButton("EQ Manager", 130, 40, 100, 25)
- GUICtrlSetOnEvent(-1, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUISetBkColor(0x4c4c4c, $GUI_Support)
- GUISetState(@SW_SHOW, $GUI_Support)
- EndFunc
- Func GUI_Support_Close()
- GUIDelete($GUI_Support)
- GUISetState(@SW_SHOW, $GUI_Main)
- EndFunc
- Func GUI_Walker()
- Local $initTime = TimerInit()
- Local $hDll = DllOpen("gdi32.dll")
- Local $vDC = _PixelGetColor_CreateDC($hDll)
- Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
- Local $tempArray
- Local $color
- For $x = 1513 To 1617
- For $y = 28 To 132
- $color = _PixelGetColor_GetPixel($vDC, 1513,28, $hDll)
- _ArrayAdd($tempArray, $color)
- Next
- Next
- Local $diffTime = TimerDiff($initTime)
- _PixelGetColor_ReleaseRegion($vRegion)
- _PixelGetColor_ReleaseDC($vDC,$hDll)
- DllClose($hDll)
- MouseClick($MOUSE_CLICK_LEFT, 1558, 85, 1, 1)
- EndFunc
- Func GUI_SelfHealer_Settings()
- GUISetState(@SW_HIDE, $GUI_Support)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_SelfHealer_Settings = GUICreate("Self Healer", 565, 200, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_SelfHealer_Settings_Close")
- ;====================== S E C T I O N S P E L L H E A L I N G ================================
- $label_title_SpellHealing = GUICtrlCreateLabel("Spell && Item Healing", 25, 15, 100, 17)
- GUICtrlSetColor(-1, $FontColor)
- Global $list_SelfHealer_Conditions = GUICtrlCreateListView("", 25, 35, 215, 140)
- _GUICtrlListView_SetExtendedListViewStyle($list_SelfHealer_Conditions, BitOR($LVS_EX_GRIDLINES, $LVS_NOCOLUMNHEADER, $LVS_EX_FULLROWSELECT, $LVS_EX_FLATSB)) ;, $LVS_EX_CHECKBOXES
- _GUICtrlListView_SetBkColor($list_SelfHealer_Conditions, 0x363636)
- _GUICtrlListView_SetTextColor($list_SelfHealer_Conditions, 0xFFFFFF)
- _GUICtrlListView_SetTextBkColor($list_SelfHealer_Conditions, 0x363636)
- _GUICtrlListView_InsertColumn($list_SelfHealer_Conditions, 0, "Heal String", 193)
- ;~ _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:200:20:F:F1:500")
- Load_SelfHealer_Conditions()
- ;=========== WHEN
- $label_SelfHealer_Condition_When = GUICtrlCreateLabel("When", 255, 35, 33, 17)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_SelfHealer_Condition_When = GUICtrlCreateButton("<", 335, 35, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_SelfHealer_Condition_When, "OnClick_btn_swipe_left_SelfHealer_Condition_When")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CurrentStat_SelfHealer_Condition_When = GUICtrlCreateLabel("Current Health", 360, 35, 155, 17, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_SelfHealer_Condition_When = GUICtrlCreateButton(">", 520, 35, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_SelfHealer_Condition_When, "OnClick_btn_swipe_right_SelfHealer_Condition_When")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- ;=========== IS
- $label_SpellHealing_Is = GUICtrlCreateLabel("Is", 255, 60, 12, 17)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_SelfHealer_Condition_Is = GUICtrlCreateButton("<", 335, 60, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_SelfHealer_Condition_Is, "OnClick_btn_swipe_left_SelfHealer_Condition_Is")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_Operator_SelfHealer_Condition_Is = GUICtrlCreateLabel("Below", 360, 60, 110, 17, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_SelfHealer_Condition_Is = GUICtrlCreateButton(">", 475, 60, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_SelfHealer_Condition_Is, "OnClick_btn_swipe_right_SelfHealer_Condition_Is")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- Global $input_SelfHealer_Condition_Is = GUICtrlCreateInput("300", 500, 60, 40, 17, $ES_NUMBER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;=========== CAST
- $label_SpellHealing_Cast = GUICtrlCreateLabel("Cast", 255, 85, 25, 17)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_SelfHealer_Condition_Cast = GUICtrlCreateButton("<", 335, 85, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_SelfHealer_Condition_Cast, "OnClick_btn_swipe_left_SelfHealer_Condition_Cast")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_SelfHealer_Condition_Cast = GUICtrlCreateLabel("Hotkey", 360, 85, 80, 17, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_SelfHealer_Condition_Cast = GUICtrlCreateButton(">", 445, 85, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_SelfHealer_Condition_Cast, "OnClick_btn_swipe_right_SelfHealer_Condition_Cast")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_SelfHealer_Condition_Cast = GUICtrlCreateButton("Position", 470, 85, 70, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_SelfHealer_Condition_Cast, "OnClick_btn_ClickPosition_SelfHealer_Condition_Cast")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast,$GUI_HIDE)
- Global $btn_Hotkey_SelfHealer_Condition_Cast = GUICtrlCreateButton("Hotkey", 470, 85, 70, 20)
- GUICtrlSetOnEvent($btn_Hotkey_SelfHealer_Condition_Cast, "OnClick_btn_Hotkey_SelfHealer_Condition_Cast")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- Global $input_Text_SelfHealer_Condition_Cast = GUICtrlCreateInput("exura", 470, 85, 70, 17, -1, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- ;============= MANA COST
- $label_SpellHealing_ManaCost = GUICtrlCreateLabel("Mana Cost", 255, 110, 55, 17)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_SelfHealer_Condition_ManaCost = GUICtrlCreateInput("20", 335, 110, 40, 17, $ES_NUMBER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- $chkbox_SpellHealing_Randomize = GUICtrlCreateCheckbox("Randomize", 380, 110, 81, 17)
- GUICtrlSetColor(-1, $FontColor)
- ;=========== CONTROLS
- $btn_SelfHealer_Settings_Delete = GUICtrlCreateButton("Delete", 305, 160, 75, 25)
- GUICtrlSetOnEvent($btn_SelfHealer_Settings_Delete, "OnClick_SelfHealer_Settings_Delete")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- $btn_SelfHealer_Settings_New = GUICtrlCreateButton("New", 385, 160, 75, 25)
- GUICtrlSetOnEvent($btn_SelfHealer_Settings_New, "OnClick_SelfHealer_Settings_New")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- $btn_SelfHealer_Settings_Save = GUICtrlCreateButton("OK", 465, 160, 75, 25)
- GUICtrlSetOnEvent($btn_SelfHealer_Settings_Save, "OnClick_SelfHealer_Settings_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_SelfHealer_Settings)
- GUISetState(@SW_SHOW)
- LoadFirstEntryIntoSelfHealerListBox()
- GUIRegisterMsg($WM_COMMAND, "My_WM_COMMAND")
- GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
- EndFunc ;==>GUI_SelfHealer_Settings
- Func GUI_SelfHealer_Settings_Close()
- GUIDelete($GUI_SelfHealer_Settings)
- GUISetState(@SW_SHOW, $GUI_Support)
- EndFunc ;==>GUI_SelfHealer_Settings_Close
- Func GUI_ConditionManager()
- GUISetState(@SW_HIDE, $GUI_Support)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager = GUICreate("Condition Manager", 480, 225, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Close")
- GUICtrlCreateLabel("Cure Conditions", 25, 25)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, 0xAEEDED)
- ;========= CURE POX ====================================================
- GUICtrlCreateLabel("[pox]", 25, 45)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Pox = GUICtrlCreateButton("Settings", 75, 42, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Pox, "GUI_ConditionManager_Settings_Pox")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Pox = GUICtrlCreateCheckbox("", 185, 45, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Pox, "OnClick_chkbox_CurePox")
- GUICtrlSetColor(-1, $FontColor)
- ;========= CURE CURSE ====================================================
- GUICtrlCreateLabel("[curse]", 25, 65)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Curse = GUICtrlCreateButton("Settings", 75, 62, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Curse, "GUI_ConditionManager_Settings_Curse")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Curse = GUICtrlCreateCheckbox("", 185, 65, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Curse, "OnClick_chkbox_CureCurse")
- GUICtrlSetColor(-1, $FontColor)
- ;========= CURE BLEEDING ====================================================
- GUICtrlCreateLabel("[bleed]", 25, 85)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Curse = GUICtrlCreateButton("Settings", 75, 82, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Curse, "GUI_ConditionManager_Settings_Bleed")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Bleed = GUICtrlCreateCheckbox("", 185, 85, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Bleed, "OnClick_chkbox_CureBleed")
- GUICtrlSetColor(-1, $FontColor)
- ;========= CURE BURNING ====================================================
- GUICtrlCreateLabel("[burn]", 25, 105)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Burn = GUICtrlCreateButton("Settings", 75, 102, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Burn, "GUI_ConditionManager_Settings_Burn")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Burn = GUICtrlCreateCheckbox("", 185, 105, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Burn, "OnClick_chkbox_CureBurn")
- GUICtrlSetColor(-1, $FontColor)
- ;========= CURE ELECTRICITY ====================================================
- GUICtrlCreateLabel("[elec]", 25, 125)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Elec = GUICtrlCreateButton("Settings", 75, 122, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Elec, "GUI_ConditionManager_Settings_Elec")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Elec = GUICtrlCreateCheckbox("", 185, 125, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Elec, "OnClick_chkbox_CureElec")
- GUICtrlSetColor(-1, $FontColor)
- ;========= CURE PARALYZE====================================================
- GUICtrlCreateLabel("[para]", 25, 145)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Para = GUICtrlCreateButton("Settings", 75, 142, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Para, "GUI_ConditionManager_Settings_Para")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Para = GUICtrlCreateCheckbox("", 185, 145, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Para, "OnClick_chkbox_CurePara")
- GUICtrlSetColor(-1, $FontColor)
- ;========= HOLD HASTE====================================================
- GUICtrlCreateLabel("Hold Conditions", 225, 25)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, 0xAEEDED)
- GUICtrlCreateLabel("[Haste]", 225, 45)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Haste = GUICtrlCreateButton("Settings", 275, 42, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Haste, "GUI_ConditionManager_Settings_Haste")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Haste = GUICtrlCreateCheckbox("", 385, 45, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Haste, "OnClick_chkbox_HoldHaste")
- GUICtrlSetColor(-1, $FontColor)
- ;========= HOLD INVISIBLE ====================================================
- GUICtrlCreateLabel("[UVid]", 225, 65)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Invisible = GUICtrlCreateButton("Settings", 275, 62, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Invisible, "GUI_ConditionManager_Settings_Invisible")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Invisible = GUICtrlCreateCheckbox("", 385, 65, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Invisible, "OnClick_chkbox_HoldInvisible")
- GUICtrlSetColor(-1, $FontColor)
- ;========= HOLD MSHIELD ====================================================
- GUICtrlCreateLabel("[UVita]", 225, 85)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_MagicShield = GUICtrlCreateButton("Settings", 275, 82, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_MagicShield, "GUI_ConditionManager_Settings_MagicShield")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_MagicShield = GUICtrlCreateCheckbox("", 385, 85, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_MagicShield, "OnClick_chkbox_HoldMagicShield")
- GUICtrlSetColor(-1, $FontColor)
- ;========= HOLD RECOVERY ====================================================
- GUICtrlCreateLabel("[Recover]", 225, 105)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_Hotkey_ConditionManager_Cast_Recovery = GUICtrlCreateButton("Settings", 275, 102, 90, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Recovery, "GUI_ConditionManager_Settings_Recovery")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $chkbox_ConditionManager_Recovery = GUICtrlCreateCheckbox("", 385, 105, 15, 14)
- GUICtrlSetOnEvent($chkbox_ConditionManager_Recovery, "OnClick_chkbox_HoldRecovery")
- GUICtrlSetColor(-1, $FontColor)
- $btn_SelfHealer_Settings_Save = GUICtrlCreateButton("OK", 385, 185, 75, 25)
- GUICtrlSetOnEvent($btn_SelfHealer_Settings_Save, "OnClick_ConditionManager_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager)
- GUISetState(@SW_SHOW)
- LoadConditionManagerEntry()
- EndFunc
- Func GUI_ConditionManager_Close()
- GUIDelete($GUI_ConditionManager)
- GUISetState(@SW_SHOW, $GUI_Support)
- EndFunc
- Func GUI_ConditionManager_Settings_Pox()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Pox = GUICreate("Condition Settings - Cure Poison", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Pox_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Pox = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Pox = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Pox, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Pox = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Pox = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Pox, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Pox_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Pox_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Pox_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Pox_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Pox_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Pox = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Pox = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Pox_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Pox_Save, "OnClick_Condition_Settings_Pox_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Pox)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Pox()
- EndFunc
- Func GUI_ConditionManager_Settings_Pox_Close()
- GUIDelete($GUI_ConditionManager_Settings_Pox)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_Curse()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Curse = GUICreate("Condition Settings - Cure Curse", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Curse_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Curse = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Curse = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Curse, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Curse = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Curse = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Curse, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Curse_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Curse_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Curse_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Curse_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Curse_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Curse_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Curse = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Curse = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Curse_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Curse_Save, "OnClick_Condition_Settings_Curse_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Curse)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Curse()
- EndFunc
- Func GUI_ConditionManager_Settings_Curse_Close()
- GUIDelete($GUI_ConditionManager_Settings_Curse)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_Bleed()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Bleed = GUICreate("Condition Settings - Cure Bleed", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Bleed_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Bleed = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Bleed = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Bleed, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Bleed = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Bleed = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Bleed, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Bleed_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Bleed_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Bleed_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Bleed_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Bleed_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Bleed = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Bleed = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Bleed_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Bleed_Save, "OnClick_Condition_Settings_Bleed_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Bleed)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Bleed()
- EndFunc
- Func GUI_ConditionManager_Settings_Bleed_Close()
- GUIDelete($GUI_ConditionManager_Settings_Bleed)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_Burn()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Burn = GUICreate("Condition Settings - Cure Burn", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Burn_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Burn = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Burn = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Burn, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Burn = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Burn = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Burn, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Burn_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Burn_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Burn_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Burn_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Burn_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Burn = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Burn = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Burn_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Burn_Save, "OnClick_Condition_Settings_Burn_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Burn)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Burn()
- EndFunc
- Func GUI_ConditionManager_Settings_Burn_Close()
- GUIDelete($GUI_ConditionManager_Settings_Burn)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_Elec()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Elec = GUICreate("Condition Settings - Cure Elec", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Elec_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Elec = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Elec = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Elec, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Elec = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Elec = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Elec, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Elec_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Elec_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Elec_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Elec_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Elec_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Elec = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Elec = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Elec_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Elec_Save, "OnClick_Condition_Settings_Elec_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Elec)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Elec()
- EndFunc
- Func GUI_ConditionManager_Settings_Elec_Close()
- GUIDelete($GUI_ConditionManager_Settings_Elec)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_Para()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Para = GUICreate("Condition Settings - Cure Para", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Para_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Para = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Para = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Para, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Para = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Para = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Para, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Para_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Para_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Para_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Para_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Para_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Para = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Para = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Para_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Para_Save, "OnClick_Condition_Settings_Para_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Para)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Para()
- EndFunc
- Func GUI_ConditionManager_Settings_Para_Close()
- GUIDelete($GUI_ConditionManager_Settings_Para)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_Haste()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Haste = GUICreate("Condition Settings - Hold Haste", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Haste_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Haste = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Haste = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Haste, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Haste = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Haste = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Haste, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Haste_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Haste_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Haste_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Haste_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Haste_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Haste = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Haste = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Haste_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Haste_Save, "OnClick_Condition_Settings_Haste_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Haste)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Haste()
- EndFunc
- Func GUI_ConditionManager_Settings_Haste_Close()
- GUIDelete($GUI_ConditionManager_Settings_Haste)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_Invisible()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Invisible = GUICreate("Condition Settings - Hold Invisible", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Invisible_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Invisible = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Invisible = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Invisible, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Invisible = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Invisible = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Invisible, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Invisible_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Invisible_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Invisible_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Invisible_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Invisible_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Invisible = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Invisible = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Invisible_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Invisible_Save, "OnClick_Condition_Settings_Invisible_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Invisible)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Invisible()
- EndFunc
- Func GUI_ConditionManager_Settings_Invisible_Close()
- GUIDelete($GUI_ConditionManager_Settings_Invisible)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_MagicShield()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_MagicShield = GUICreate("Condition Settings - Hold Magic Shield", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_MagicShield_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_MagicShield = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_MagicShield = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_MagicShield, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_MagicShield = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_MagicShield = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_MagicShield, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_MagicShield_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_MagicShield_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_MagicShield_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_MagicShield_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_MagicShield_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_MagicShield = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_MagicShield = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_MagicShield_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_MagicShield_Save, "OnClick_Condition_Settings_MagicShield_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_MagicShield)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_MagicShield()
- EndFunc
- Func GUI_ConditionManager_Settings_MagicShield_Close()
- GUIDelete($GUI_ConditionManager_Settings_MagicShield)
- GUI_ConditionManager()
- EndFunc
- Func GUI_ConditionManager_Settings_Recovery()
- GUIDelete($GUI_ConditionManager)
- Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
- Global $GUI_ConditionManager_Settings_Recovery = GUICreate("Condition Settings - Hold Recovery", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
- GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Recovery_Close")
- ;========== CAST ============
- GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cast_Recovery = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_left_ConditionManager_Recovery = GUICtrlCreateButton("<", 165, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Recovery, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $label_CastType_ConditionManager_Recovery = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- Global $btn_swipe_right_ConditionManager_Recovery = GUICtrlCreateButton(">", 265, 22, 20, 20)
- GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Recovery, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- Global $btn_ClickPosition_ConditionManager_Recovery_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Recovery_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- GUICtrlSetState($btn_ClickPosition_ConditionManager_Recovery_Cast,$GUI_HIDE)
- Global $btn_Hotkey_ConditionManager_Recovery_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
- GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Recovery_Cast, "")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x696969)
- ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
- ;========== MANA COST ============
- GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_ManaCost_Recovery = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- ;========== COOLDOWN ============
- GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- Global $input_Text_ConditionManager_Cooldown_Recovery = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
- GUICtrlSetBkColor(-1, $TextBkColor)
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
- GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
- GUICtrlSetColor(-1, $FontColor)
- $btn_ConditionManager_Recovery_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
- GUICtrlSetOnEvent($btn_ConditionManager_Recovery_Save, "OnClick_Condition_Settings_Recovery_Save")
- GUICtrlSetColor(-1, $FontColor)
- GUICtrlSetBkColor(-1, 0x646464)
- GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Recovery)
- GUISetState(@SW_SHOW)
- Load_Condition_Settings_Entry_Recovery()
- EndFunc
- Func GUI_ConditionManager_Settings_Recovery_Close()
- GUIDelete($GUI_ConditionManager_Settings_Recovery)
- GUI_ConditionManager()
- EndFunc
- Func CloseBot()
- Exit
- EndFunc
- ;========= MAIN GUI FUNCTIONS =================
- ;============ MAIN GUI CONTROL CLICKS ==========================
- Func OnClick_chkbox_Support()
- If $FIRST_SCAN == 1 Then
- If GUICtrlRead($chkbox_Support) = $GUI_UNCHECKED Then
- $Support = 0
- ElseIf GUICtrlRead($chkbox_Support) = $GUI_CHECKED Then
- $Support = 1
- $AutoHeal_FirstStart = 1
- EndIf
- Else
- If GUICtrlRead($chkbox_Support) = $GUI_CHECKED Then
- GUICtrlSetState($chkbox_Support, $GUI_UNCHECKED)
- EndIf
- If GUICtrlRead($Label_Status) == "offline" Then
- _GUICtrlEdit_ShowBalloonTip($input_Scan_info, "", "Please login a character first!", $TTI_INFO)
- ElseIf GUICtrlRead($Label_Status) == "" Then
- _GUICtrlEdit_ShowBalloonTip($input_Scan_info, "", "Please scan your Tibia window first!", $TTI_INFO)
- EndIf
- EndIf
- EndFunc ;==>
- Func OnClick_chkbox_DWM()
- If GUICtrlRead($chkbox_DWM) = $GUI_UNCHECKED Then
- DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", 1)
- ElseIf GUICtrlRead($chkbox_DWM) = $GUI_CHECKED Then
- DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", 0)
- EndIf
- EndFunc ;==>
- Func OnClick_chkbox_AntiIdle()
- If GUICtrlRead($chkbox_AntiIdle) = $GUI_UNCHECKED Then
- $AntiIdle = 0
- ElseIf GUICtrlRead($chkbox_AntiIdle) = $GUI_CHECKED Then
- $AntiIdle = 1
- EndIf
- EndFunc ;==>
- Func OnClick_Scan()
- ;~ GUISetState(@SW_HIDE, $GUI_Main)
- If TibiaSelectedWindowExists() And CharacterLogedIn() Then
- TibiaWindowScan()
- $FIRST_SCAN = 1
- ElseIf Not TibiaSelectedWindowExists() Then
- UpdateStatusLabel("client closed")
- _GUICtrlEdit_ShowBalloonTip($input_Scan_info, "", "Your registered client has been closed! Please choose another Tibia client", $TTI_INFO)
- ElseIf Not CharacterLogedIn() Then
- UpdateStatusLabel("offline")
- _GUICtrlEdit_ShowBalloonTip($input_Scan_info, "", "Please login a character first!", $TTI_INFO)
- EndIf
- ;~ GUISetState(@SW_SHOW, $GUI_Main)
- EndFunc ;==>OnClick_Scan
- ;========= MAIN GUI FUNCTIONS =================
- ;============ CONTROL CLICK GUI CLIENT SELECT ==========================
- Func OnClick_ClientSelect_Start()
- ;~ Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_ClientChoice))
- Local $selectedItemIndex = _GUICtrlListView_GetSelectedIndices($list_ClientChoice)
- Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,Int($selectedItemIndex))
- Local $Client_title = $string[1]
- Local $Client_hwnd = $string[2]
- If $selectedItemIndex <> "" Then
- Local $tempArray[1][2]
- $tempArray[0][0] = $Client_title
- $tempArray[0][1] = $Client_hwnd
- $CLIENT_REGISTERED = $tempArray
- $CLIENTS_DETECTED = 0
- ConsoleWrite(@CRLF & "========== CLIENT SELECT INFO ==============")
- ConsoleWrite(@CRLF & "TIBIA TITLE= " & $CLIENT_REGISTERED[0][0] & " TIBIA PID= " & $CLIENT_REGISTERED[0][1])
- ConsoleWrite(@CRLF & "============================================")
- GUIDelete($GUI_ClientSelect)
- GUI_Main()
- ;~ OnClick_Scan()
- Else
- _GUICtrlEdit_ShowBalloonTip($input_ClientSelect_hidedn_infobox, "", "Please select a Tibia Client from the list.", $TTI_INFO)
- EndIf
- EndFunc
- ;============ CONTROL CLICK GUI SELF HEALER ==========================
- Func OnClick_SelfHealer_Settings_New()
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- EndFunc ;==>OnClick_SelfHealer_Settings_New
- Func OnClick_SelfHealer_Settings_Delete()
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- _GUICtrlListView_DeleteItem($list_SelfHealer_Conditions, $selectedItemIndex)
- SaveCurrentConditions()
- EndFunc ;==>OnClick_SelfHealer_Settings_Delete
- Func OnClick_SelfHealer_Settings_Save()
- SaveCurrentConditions()
- GUI_SelfHealer_Settings_Close()
- EndFunc ;==>OnClick_SelfHealer_Settings_Save
- Func OnClick_btn_swipe_left_SelfHealer_Condition_When()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_swipe_left_SelfHealer_Condition_When()
- Else
- Local $temp_current_stat_index = 0
- Local $temp_last_index = (UBound($CURRENT_STAT_INDEX) - 1)
- Local $index = 0
- Local $replace
- For $a = 1 To UBound($CURRENT_STAT_INDEX)
- If $CURRENT_STAT_INDEX[$index] == GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) Then
- $temp_current_stat_index = $index
- EndIf
- $index = $index + 1
- Next
- If $temp_current_stat_index == 0 Then
- GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When, $CURRENT_STAT_INDEX[$temp_last_index])
- Else
- Local $nextIndex = $temp_current_stat_index - 1
- GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When, $CURRENT_STAT_INDEX[$nextIndex])
- EndIf
- ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- If GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) == "Current Health" Then
- $replace = "CurHP"
- ElseIf GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) == "Current Mana" Then
- $replace = "CurMP"
- EndIf
- Local $UpdatedWhenText = $replace & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedWhenText)
- EndIf
- EndFunc ;==>OnClick_btn_swipe_left_SelfHealer_Condition_When
- Func OnClick_btn_swipe_right_SelfHealer_Condition_When()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_swipe_right_SelfHealer_Condition_When()
- Else
- Local $temp_current_stat_index = 0
- Local $temp_last_index = (UBound($CURRENT_STAT_INDEX) - 1)
- Local $index = 0
- Local $replace
- For $a = 1 To UBound($CURRENT_STAT_INDEX)
- If $CURRENT_STAT_INDEX[$index] == GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) Then
- $temp_current_stat_index = $index
- EndIf
- $index = $index + 1
- Next
- If $temp_current_stat_index == $temp_last_index Then
- GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When, $CURRENT_STAT_INDEX[0])
- Else
- Local $nextIndex = $temp_current_stat_index + 1
- GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When, $CURRENT_STAT_INDEX[$nextIndex])
- EndIf
- ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- If GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) == "Current Health" Then
- $replace = "CurHP"
- ElseIf GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) == "Current Mana" Then
- $replace = "CurMP"
- EndIf
- Local $UpdatedWhenText = $replace & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedWhenText)
- EndIf
- EndFunc ;==>OnClick_btn_swipe_right_SelfHealer_Condition_When
- Func OnClick_btn_swipe_left_SelfHealer_Condition_Is()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_swipe_left_SelfHealer_Condition_Is()
- Else
- Local $temp_current_stat_index = 0
- Local $temp_last_index = (UBound($OPERATOR_INDEX) - 1)
- Local $index = 0
- Local $replace
- For $a = 1 To UBound($OPERATOR_INDEX)
- If $OPERATOR_INDEX[$index] == GUICtrlRead($label_Operator_SelfHealer_Condition_Is) Then
- $temp_current_stat_index = $index
- EndIf
- $index = $index + 1
- Next
- If $temp_current_stat_index == 0 Then
- GUICtrlSetData($label_Operator_SelfHealer_Condition_Is, $OPERATOR_INDEX[$temp_last_index])
- Else
- Local $nextIndex = $temp_current_stat_index - 1
- GUICtrlSetData($label_Operator_SelfHealer_Condition_Is, $OPERATOR_INDEX[$nextIndex])
- EndIf
- ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- If GUICtrlRead($label_Operator_SelfHealer_Condition_Is) == "Above" Then
- $replace = ">"
- ElseIf GUICtrlRead($label_Operator_SelfHealer_Condition_Is) == "Below" Then
- $replace = "<"
- EndIf
- Local $UpdatedIsText = $StringSplit[1] & ":" & $replace & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedIsText)
- EndIf
- EndFunc ;==>OnClick_btn_swipe_left_SelfHealer_Condition_Is
- Func OnClick_btn_swipe_right_SelfHealer_Condition_Is()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_swipe_right_SelfHealer_Condition_Is()
- Else
- Local $temp_current_operator_index = 0
- Local $temp_last_index = (UBound($OPERATOR_INDEX) - 1)
- Local $index = 0
- For $a = 1 To UBound($OPERATOR_INDEX)
- If $OPERATOR_INDEX[$index] == GUICtrlRead($label_Operator_SelfHealer_Condition_Is) Then
- $temp_current_stat_index = $index
- EndIf
- $index = $index + 1
- Next
- If $temp_current_stat_index == $temp_last_index Then
- GUICtrlSetData($label_Operator_SelfHealer_Condition_Is, $OPERATOR_INDEX[0])
- Else
- Local $nextIndex = $temp_current_stat_index + 1
- GUICtrlSetData($label_Operator_SelfHealer_Condition_Is, $OPERATOR_INDEX[$nextIndex])
- EndIf
- ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- If GUICtrlRead($label_Operator_SelfHealer_Condition_Is) == "Above" Then
- $replace = ">"
- ElseIf GUICtrlRead($label_Operator_SelfHealer_Condition_Is) == "Below" Then
- $replace = "<"
- EndIf
- Local $UpdatedIsText = $StringSplit[1] & ":" & $replace & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedIsText)
- EndIf
- EndFunc ;==>OnClick_btn_swipe_right_SelfHealer_Condition_Is
- Func OnClick_btn_swipe_left_SelfHealer_Condition_Cast()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_swipe_left_SelfHealer_Condition_Cast()
- Else
- Local $temp_current_operator_index = 0
- Local $temp_last_index = (UBound($CAST_TYPE_INDEX) - 1)
- Local $index = 0
- For $a = 1 To UBound($CAST_TYPE_INDEX)
- If $CAST_TYPE_INDEX[$index] == GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) Then
- $temp_current_stat_index = $index
- EndIf
- $index = $index + 1
- Next
- If $temp_current_stat_index == 0 Then
- GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast, $CAST_TYPE_INDEX[$temp_last_index])
- Else
- Local $nextIndex = $temp_current_stat_index - 1
- GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast, $CAST_TYPE_INDEX[$nextIndex])
- EndIf
- ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- If GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Click" Then
- $replace = "C"
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_SHOW)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- ElseIf GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Hotkey" Then
- $replace = "H"
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_SHOW)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- ElseIf GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Text" Then
- $replace = "T"
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_SHOW)
- EndIf
- Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $replace & ":" & $StringSplit[6] & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
- EndIf
- EndFunc ;==>OnClick_btn_swipe_left_SelfHealer_Condition_Cast
- Func OnClick_btn_swipe_right_SelfHealer_Condition_Cast()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_swipe_right_SelfHealer_Condition_Cast()
- Else
- Local $temp_current_operator_index = 0
- Local $temp_last_index = (UBound($CAST_TYPE_INDEX) - 1)
- Local $index = 0
- For $a = 1 To UBound($CAST_TYPE_INDEX)
- If $CAST_TYPE_INDEX[$index] == GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) Then
- $temp_current_stat_index = $index
- EndIf
- $index = $index + 1
- Next
- If $temp_current_stat_index == $temp_last_index Then
- GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast, $CAST_TYPE_INDEX[0])
- Else
- Local $nextIndex = $temp_current_stat_index + 1
- GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast, $CAST_TYPE_INDEX[$nextIndex])
- EndIf
- ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- If GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Click" Then
- $replace = "C"
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_SHOW)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- ElseIf GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Hotkey" Then
- $replace = "H"
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_SHOW)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- ElseIf GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Text" Then
- $replace = "T"
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_SHOW)
- EndIf
- Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $replace & ":" & $StringSplit[6] & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
- EndIf
- EndFunc ;==>OnClick_btn_swipe_right_SelfHealer_Condition_Cast
- Func OnClick_btn_ClickPosition_SelfHealer_Condition_Cast()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_ClickPosition_SelfHealer_Condition_Cast()
- Else
- GUISetState(@SW_HIDE, $GUI_SelfHealer_Settings)
- ActivateTibiaWindow()
- Local $scan_action_click_hp = 1
- If TibiaWindowIsFocused() Then
- Local $savedMousePos[2] = [-1, -1]
- While $scan_action_click_hp == 1 And TibiaWindowIsFocused()
- Local $currentMousePos = MouseGetPos()
- If $currentMousePos[0] <> $savedMousePos[0] And $currentMousePos[1] <> $savedMousePos[1] Then
- Local $savedMousePos[2] = [$currentMousePos[0], $currentMousePos[1]]
- Local $pixelColor = Hex(PixelGetColor($currentMousePos[0], $currentMousePos[1], WinGetHandle("[CLASS:Qt5QWindowOwnDCIcon]")), 6)
- If $currentMousePos[0] > (@DesktopWidth / 2) Then
- $tooltipPosX = $currentMousePos[0] - 200
- ElseIf $currentMousePos[0] <= (@DesktopWidth / 2) Then
- $tooltipPosX = $currentMousePos[0] + 5
- EndIf
- Local $tooltipPosY = $currentMousePos[1] + 15
- ToolTip("MOVE YOUR CURSOR OVER THE DESIRED POSITION WHERE TO CLICK" & @CRLF & "PRESS [ENTER] WHEN YOU ARE FINISHED" & @CRLF & "[RIGHT CLICK] FOR CANCEL" & @CRLF & "Hex color: 0x" & $pixelColor & @CRLF & "Mouse Position: " _
- & $currentMousePos[0] & "x" & $currentMousePos[1], $tooltipPosX, $tooltipPosY, "CLICK POSITION SCAN")
- EndIf
- If _IsPressed("0D") Then
- $scan_action_click_hp = 0
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- Local $PreviousCastText = $StringSplit[6]
- Local $pos = $currentMousePos[0] & "x" & $currentMousePos[1]
- Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $pos & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
- ElseIf _IsPressed("02") Then
- $scan_action_click_hp = 0
- EndIf
- WEnd
- EndIf
- ToolTip("")
- GUISetState(@SW_SHOW, $GUI_SelfHealer_Settings)
- EndIf
- EndFunc ;==>OnClick_btn_ClickPosition_SelfHealer_Condition_Cast
- Func OnClick_btn_Hotkey_SelfHealer_Condition_Cast()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_Hotkey_SelfHealer_Condition_Cast()
- Else
- GUISetState(@SW_HIDE, $GUI_SelfHealer_Settings)
- ActivateTibiaWindow()
- Local $scan_action_click_hp = 1
- If TibiaWindowIsFocused() Then
- SetBlankFHotkeys()
- Local $savedMousePos[2]
- While $scan_action_click_hp == 1 And TibiaWindowIsFocused()
- Local $currentMousePos = MouseGetPos()
- If $currentMousePos[0] <> $savedMousePos[0] And $currentMousePos[1] <> $savedMousePos[1] Then
- Local $savedMousePos[2] = [$currentMousePos[0], $currentMousePos[1]]
- Local $pixelColor = Hex(PixelGetColor($currentMousePos[0], $currentMousePos[1], WinGetHandle("[CLASS:Qt5QWindowOwnDCIcon]")), 6)
- If $currentMousePos[0] > (@DesktopWidth / 2) Then
- $tooltipPosX = $currentMousePos[0] - 200
- ElseIf $currentMousePos[0] <= (@DesktopWidth / 2) Then
- $tooltipPosX = $currentMousePos[0] + 5
- EndIf
- Local $tooltipPosY = $currentMousePos[1] + 15
- ToolTip("PRESS ANY HOTKEY BETWEEN F1 & F12" & @CRLF & "[RIGHT CLICK] FOR CANCEL" & @CRLF & "Hex color: 0x" & $pixelColor & @CRLF & "Mouse Position: " _
- & $currentMousePos[0] & "x" & $currentMousePos[1], $tooltipPosX, $tooltipPosY, "HOTKEY SCAN")
- EndIf
- Local $hkey
- If _IsPressed("70") Then
- $hkey = "F1"
- ToolTip("")
- ElseIf _IsPressed("71") Then
- $hkey = "F2"
- ToolTip("")
- ElseIf _IsPressed("72") Then
- $hkey = "F3"
- ToolTip("")
- ElseIf _IsPressed("73") Then
- $hkey = "F4"
- ToolTip("")
- ElseIf _IsPressed("74") Then
- $hkey = "F5"
- ToolTip("")
- ElseIf _IsPressed("75") Then
- $hkey = "F6"
- ToolTip("")
- ElseIf _IsPressed("76") Then
- $hkey = "F7"
- ToolTip("")
- ElseIf _IsPressed("77") Then
- $hkey = "F8"
- ToolTip("")
- ElseIf _IsPressed("78") Then
- $hkey = "F9"
- ToolTip("")
- ElseIf _IsPressed("79") Then
- $hkey = "F10"
- ToolTip("")
- ElseIf _IsPressed("7A") Then
- $hkey = "F11"
- ToolTip("")
- ElseIf _IsPressed("7B") Then
- $hkey = "F12"
- ToolTip("")
- ElseIf _IsPressed("02") Then
- $scan_action_click_hp = 0
- EndIf
- If $hkey == "F1" Or $hkey == "F2" Or $hkey == "F3" Or $hkey == "F4" Or $hkey == "F5" Or $hkey == "F6" Or $hkey == "F7" Or $hkey == "F8" _
- Or $hkey == "F9" Or $hkey == "F10" Or $hkey == "F11" Or $hkey == "F12" Then
- $scan_action_click_hp = 0
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- Local $PreviousCastText = $StringSplit[6]
- Local $pos = $currentMousePos[0] & "x" & $currentMousePos[1]
- Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $hkey & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
- EndIf
- WEnd
- EndIf
- ToolTip("")
- ResetFHotkeys()
- GUISetState(@SW_SHOW, $GUI_SelfHealer_Settings)
- EndIf
- EndFunc ;==>OnClick_btn_Hotkey_SelfHealer_Condition_Cast
- Func OnClick_btn_Text_SelfHealer_Condition_Cast()
- If UBound($CONDITIONS) <= 1 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
- SaveCurrentConditions()
- OnClick_btn_Text_SelfHealer_Condition_Cast()
- EndIf
- EndFunc ;==>OnClick_btn_Text_SelfHealer_Condition_Cast
- ;============= CONDITION MANAGER FUNCTIONS ==========================
- Func LoadConditionManagerEntry()
- ConsoleWrite(@CRLF & "=========== LoadConditionManagerEntry ==============")
- If $CURE_POISON == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Pox, $GUI_CHECKED)
- ElseIf $CURE_POISON == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Pox, $GUI_UNCHECKED)
- EndIf
- If $CURE_CURSE == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Curse, $GUI_CHECKED)
- ElseIf $CURE_CURSE == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Curse, $GUI_UNCHECKED)
- EndIf
- If $CURE_BLEED == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Bleed, $GUI_CHECKED)
- ElseIf $CURE_BLEED == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Bleed, $GUI_UNCHECKED)
- EndIf
- If $CURE_BURN == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Burn, $GUI_CHECKED)
- ElseIf $CURE_BURN == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Burn, $GUI_UNCHECKED)
- EndIf
- If $CURE_ELEC == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Elec, $GUI_CHECKED)
- ElseIf $CURE_ELEC == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Elec, $GUI_UNCHECKED)
- EndIf
- If $CURE_PARA == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Para, $GUI_CHECKED)
- ElseIf $CURE_PARA == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Para, $GUI_UNCHECKED)
- EndIf
- If $HOLD_HASTE == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Haste, $GUI_CHECKED)
- ElseIf $HOLD_HASTE == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Haste, $GUI_UNCHECKED)
- EndIf
- If $HOLD_INVISIBLE == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Invisible, $GUI_CHECKED)
- ElseIf $HOLD_INVISIBLE == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Invisible, $GUI_UNCHECKED)
- EndIf
- If $HOLD_MAGICSHIELD == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_MagicShield, $GUI_CHECKED)
- ElseIf $HOLD_MAGICSHIELD == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_MagicShield, $GUI_UNCHECKED)
- EndIf
- If $HOLD_RECOVERY == 1 Then
- GUICtrlSetState($chkbox_ConditionManager_Recovery, $GUI_CHECKED)
- ElseIf $HOLD_RECOVERY == 0 Then
- GUICtrlSetState($chkbox_ConditionManager_Recovery, $GUI_UNCHECKED)
- EndIf
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- ;============ CONDITION MANAGER CONTROL CLICKS ==========================
- Func OnClick_ConditionManager_Save()
- GUI_ConditionManager_Close()
- EndFunc
- Func OnClick_chkbox_CurePox()
- If GUICtrlRead($chkbox_ConditionManager_Pox) = $GUI_UNCHECKED Then
- $CURE_POISON = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Pox) = $GUI_CHECKED Then
- $CURE_POISON = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_CureCurse()
- If GUICtrlRead($chkbox_ConditionManager_Curse) = $GUI_UNCHECKED Then
- $CURE_CURSE = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Curse) = $GUI_CHECKED Then
- $CURE_CURSE = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_CureBleed()
- If GUICtrlRead($chkbox_ConditionManager_Bleed) = $GUI_UNCHECKED Then
- $CURE_BLEED= 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Bleed) = $GUI_CHECKED Then
- $CURE_BLEED = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_CureBurn()
- If GUICtrlRead($chkbox_ConditionManager_Burn) = $GUI_UNCHECKED Then
- $CURE_BURN = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Burn) = $GUI_CHECKED Then
- $CURE_BURN = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_CureElec()
- If GUICtrlRead($chkbox_ConditionManager_Elec) = $GUI_UNCHECKED Then
- $CURE_ELEC = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Elec) = $GUI_CHECKED Then
- $CURE_ELEC = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_CurePara()
- If GUICtrlRead($chkbox_ConditionManager_Para) = $GUI_UNCHECKED Then
- $CURE_PARA = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Para) = $GUI_CHECKED Then
- $CURE_PARA = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_HoldHaste()
- If GUICtrlRead($chkbox_ConditionManager_Haste) = $GUI_UNCHECKED Then
- $HOLD_HASTE = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Haste) = $GUI_CHECKED Then
- $HOLD_HASTE = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_HoldInvisible()
- If GUICtrlRead($chkbox_ConditionManager_Invisible) = $GUI_UNCHECKED Then
- $HOLD_INVISIBLE = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Invisible) = $GUI_CHECKED Then
- $HOLD_INVISIBLE = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_HoldMagicShield()
- If GUICtrlRead($chkbox_ConditionManager_MagicShield) = $GUI_UNCHECKED Then
- $HOLD_MAGICSHIELD = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_MagicShield) = $GUI_CHECKED Then
- $HOLD_MAGICSHIELD = 1
- EndIf
- EndFunc
- Func OnClick_chkbox_HoldRecovery()
- If GUICtrlRead($chkbox_ConditionManager_Recovery) = $GUI_UNCHECKED Then
- $HOLD_RECOVERY = 0
- ElseIf GUICtrlRead($chkbox_ConditionManager_Recovery) = $GUI_CHECKED Then
- $HOLD_RECOVERY = 1
- EndIf
- EndFunc
- ;============= CONDITION SETTINGS FUNCTIONS ==========================
- Func Load_Condition_Settings_Entry_Pox()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Pox ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Pox,$CONDITION_CURE_POX[0])
- GUICtrlSetData($label_CastType_ConditionManager_Pox,$CONDITION_CURE_POX[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Pox,$CONDITION_CURE_POX[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Pox,$CONDITION_CURE_POX[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_Curse()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Curse ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Curse,$CONDITION_CURE_CURSE[0])
- GUICtrlSetData($label_CastType_ConditionManager_Curse,$CONDITION_CURE_CURSE[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Curse,$CONDITION_CURE_CURSE[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Curse,$CONDITION_CURE_CURSE[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_Bleed()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Bleed ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Bleed,$CONDITION_CURE_BLEED[0])
- GUICtrlSetData($label_CastType_ConditionManager_Bleed,$CONDITION_CURE_BLEED[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Bleed,$CONDITION_CURE_BLEED[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Bleed,$CONDITION_CURE_BLEED[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_Burn()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Burn ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Burn,$CONDITION_CURE_BURN[0])
- GUICtrlSetData($label_CastType_ConditionManager_Burn,$CONDITION_CURE_BURN[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Burn,$CONDITION_CURE_BURN[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Burn,$CONDITION_CURE_BURN[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_Elec()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Elec ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Elec,$CONDITION_CURE_ELEC[0])
- GUICtrlSetData($label_CastType_ConditionManager_Elec,$CONDITION_CURE_ELEC[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Elec,$CONDITION_CURE_ELEC[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Elec,$CONDITION_CURE_ELEC[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_Para()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Para ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Para,$CONDITION_CURE_PARA[0])
- GUICtrlSetData($label_CastType_ConditionManager_Para,$CONDITION_CURE_PARA[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Para,$CONDITION_CURE_PARA[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Para,$CONDITION_CURE_PARA[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_Haste()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Haste ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Haste,$CONDITION_HOLD_HASTE[0])
- GUICtrlSetData($label_CastType_ConditionManager_Haste,$CONDITION_HOLD_HASTE[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Haste,$CONDITION_HOLD_HASTE[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Haste,$CONDITION_HOLD_HASTE[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_Invisible()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Invisible ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Invisible,$CONDITION_HOLD_INVISIBLE[0])
- GUICtrlSetData($label_CastType_ConditionManager_Invisible,$CONDITION_HOLD_INVISIBLE[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Invisible,$CONDITION_HOLD_INVISIBLE[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Invisible,$CONDITION_HOLD_INVISIBLE[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_MagicShield()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_MagicShield ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_MagicShield,$CONDITION_HOLD_MAGICSHIELD[0])
- GUICtrlSetData($label_CastType_ConditionManager_MagicShield,$CONDITION_HOLD_MAGICSHIELD[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_MagicShield,$CONDITION_HOLD_MAGICSHIELD[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_MagicShield,$CONDITION_HOLD_MAGICSHIELD[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- Func Load_Condition_Settings_Entry_Recovery()
- ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Recovery ==============")
- GUICtrlSetData($input_Text_ConditionManager_Cast_Recovery,$CONDITION_HOLD_RECOVERY[0])
- GUICtrlSetData($label_CastType_ConditionManager_Recovery,$CONDITION_HOLD_RECOVERY[1])
- GUICtrlSetData($input_Text_ConditionManager_ManaCost_Recovery,$CONDITION_HOLD_RECOVERY[2])
- GUICtrlSetData($input_Text_ConditionManager_Cooldown_Recovery,$CONDITION_HOLD_RECOVERY[3])
- ConsoleWrite(@CRLF & "====================================================")
- EndFunc
- ;============== CONDITION SETTINGS CONTROL CLICKS ==========================
- Func OnClick_Condition_Settings_Pox_Save()
- $CONDITION_CURE_POX[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Pox)
- $CONDITION_CURE_POX[1] = GUICtrlRead($label_CastType_ConditionManager_Pox)
- $CONDITION_CURE_POX[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Pox)
- $CONDITION_CURE_POX[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Pox)
- GUI_ConditionManager_Settings_Pox_Close()
- EndFunc
- Func OnClick_Condition_Settings_Curse_Save()
- $CONDITION_CURE_CURSE[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Curse)
- $CONDITION_CURE_CURSE[1] = GUICtrlRead($label_CastType_ConditionManager_Curse)
- $CONDITION_CURE_CURSE[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Curse)
- $CONDITION_CURE_CURSE[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Curse)
- GUI_ConditionManager_Settings_Curse_Close()
- EndFunc
- Func OnClick_Condition_Settings_Bleed_Save()
- $CONDITION_CURE_BLEED[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Bleed)
- $CONDITION_CURE_BLEED[1] = GUICtrlRead($label_CastType_ConditionManager_Bleed)
- $CONDITION_CURE_BLEED[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Bleed)
- $CONDITION_CURE_BLEED[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Bleed)
- GUI_ConditionManager_Settings_Bleed_Close()
- EndFunc
- Func OnClick_Condition_Settings_Burn_Save()
- $CONDITION_CURE_BURN[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Burn)
- $CONDITION_CURE_BURN[1] = GUICtrlRead($label_CastType_ConditionManager_Burn)
- $CONDITION_CURE_BURN[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Burn)
- $CONDITION_CURE_BURN[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Burn)
- GUI_ConditionManager_Settings_Burn_Close()
- EndFunc
- Func OnClick_Condition_Settings_Elec_Save()
- $CONDITION_CURE_ELEC[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Elec)
- $CONDITION_CURE_ELEC[1] = GUICtrlRead($label_CastType_ConditionManager_Elec)
- $CONDITION_CURE_ELEC[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Elec)
- $CONDITION_CURE_ELEC[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Elec)
- GUI_ConditionManager_Settings_Elec_Close()
- EndFunc
- Func OnClick_Condition_Settings_Para_Save()
- $CONDITION_CURE_PARA[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Para)
- $CONDITION_CURE_PARA[1] = GUICtrlRead($label_CastType_ConditionManager_Para)
- $CONDITION_CURE_PARA[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Para)
- $CONDITION_CURE_PARA[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Para)
- GUI_ConditionManager_Settings_Para_Close()
- EndFunc
- Func OnClick_Condition_Settings_Haste_Save()
- $CONDITION_HOLD_HASTE[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Haste)
- $CONDITION_HOLD_HASTE[1] = GUICtrlRead($label_CastType_ConditionManager_Haste)
- $CONDITION_HOLD_HASTE[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Haste)
- $CONDITION_HOLD_HASTE[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Haste)
- GUI_ConditionManager_Settings_Haste_Close()
- EndFunc
- Func OnClick_Condition_Settings_Invisible_Save()
- $CONDITION_HOLD_INVISIBLE[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Invisible)
- $CONDITION_HOLD_INVISIBLE[1] = GUICtrlRead($label_CastType_ConditionManager_Invisible)
- $CONDITION_HOLD_INVISIBLE[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Invisible)
- $CONDITION_HOLD_INVISIBLE[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Invisible)
- GUI_ConditionManager_Settings_Invisible_Close()
- EndFunc
- Func OnClick_Condition_Settings_MagicShield_Save()
- $CONDITION_HOLD_MAGICSHIELD[0] = GUICtrlRead($input_Text_ConditionManager_Cast_MagicShield)
- $CONDITION_HOLD_MAGICSHIELD[1] = GUICtrlRead($label_CastType_ConditionManager_MagicShield)
- $CONDITION_HOLD_MAGICSHIELD[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_MagicShield)
- $CONDITION_HOLD_MAGICSHIELD[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_MagicShield)
- GUI_ConditionManager_Settings_MagicShield_Close()
- EndFunc
- Func OnClick_Condition_Settings_Recovery_Save()
- $CONDITION_HOLD_RECOVERY[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Recovery)
- $CONDITION_HOLD_RECOVERY[1] = GUICtrlRead($label_CastType_ConditionManager_Recovery)
- $CONDITION_HOLD_RECOVERY[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Recovery)
- $CONDITION_HOLD_RECOVERY[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Recovery)
- GUI_ConditionManager_Settings_Recovery_Close()
- EndFunc
- Func LoadFirstEntryIntoSelfHealerListBox()
- If $CONDITIONS[0] > 0 Then
- ConsoleWrite("---> Item Index 0 has been loaded into input and labels" & @LF)
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, 0)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- Local $CurHPMP = $StringSplit[1]
- Local $Operator = $StringSplit[2]
- Local $Ammount = $StringSplit[3]
- Local $ManaCost = $StringSplit[4]
- Local $CastType = $StringSplit[5]
- Local $CastKey = $StringSplit[6]
- Local $CastDelay = $StringSplit[7]
- If $CurHPMP == "CurHP" Then
- $CurHPMP = "Current Health"
- ElseIf $CurHPMP == "CurMP" Then
- $CurHPMP = "Current Mana"
- EndIf
- If $Operator == ">" Then
- $Operator = "Above"
- ElseIf $Operator == "<" Then
- $Operator = "Below"
- EndIf
- If $CastType == "H" Then
- $CastType = "Hotkey"
- ElseIf $CastType == "T" Then
- $CastType = "Text"
- ElseIf $CastType == "C" Then
- $CastType = "Click"
- EndIf
- GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When,$CurHPMP)
- GUICtrlSetData($label_Operator_SelfHealer_Condition_Is,$Operator)
- GUICtrlSetData($input_SelfHealer_Condition_Is,$Ammount)
- GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast,$CastType)
- GUICtrlSetData($input_SelfHealer_Condition_ManaCost,$ManaCost)
- If $CastType == "Text" Then
- GUICtrlSetData($input_Text_SelfHealer_Condition_Cast,$CastKey)
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_SHOW)
- ElseIf $CastType == "Hotkey" Then
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_SHOW)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- ElseIf $CastType == "Click" Then
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_SHOW)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- EndIf
- EndIf
- EndFunc
- Func Load_SelfHealer_Conditions()
- Local $index = 0
- For $i = 1 To UBound($CONDITIONS)
- If $index > 0 Then
- _GUICtrlListView_AddItem($list_SelfHealer_Conditions, $CONDITIONS[$index])
- EndIf
- $index = $index + 1
- Next
- EndFunc ;==>Load_SelfHealer_Conditions
- Func SaveCurrentConditions()
- Local $countedItems = _GUICtrlListView_GetItemCount($list_SelfHealer_Conditions)
- Local $expandArray[1]
- $expandArray[0] = $countedItems
- For $i = 1 To $countedItems
- Local $ItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, ($i - 1))
- ConsoleWrite(@CRLF & $ItemText)
- _ArrayAdd($expandArray, $ItemText)
- Next
- $CONDITIONS = $expandArray
- ;~ _ArrayDisplay($CONDITIONS,"TEST")
- EndFunc ;==>SaveCurrentConditions
- Func ResetFHotkeys()
- HotKeySet("{F1}")
- HotKeySet("{F2}")
- HotKeySet("{F3}")
- HotKeySet("{F4}")
- HotKeySet("{F5}")
- HotKeySet("{F6}")
- HotKeySet("{F7}")
- HotKeySet("{F8}")
- HotKeySet("{F9}")
- HotKeySet("{F10}")
- HotKeySet("{F11}")
- HotKeySet("{F12}")
- EndFunc ;==>ResetFHotkeys
- Func SetBlankFHotkeys()
- HotKeySet("{F1}", "EMPTY_FUNCTION")
- HotKeySet("{F2}", "EMPTY_FUNCTION")
- HotKeySet("{F3}", "EMPTY_FUNCTION")
- HotKeySet("{F4}", "EMPTY_FUNCTION")
- HotKeySet("{F5}", "EMPTY_FUNCTION")
- HotKeySet("{F6}", "EMPTY_FUNCTION")
- HotKeySet("{F7}", "EMPTY_FUNCTION")
- HotKeySet("{F8}", "EMPTY_FUNCTION")
- HotKeySet("{F9}", "EMPTY_FUNCTION")
- HotKeySet("{F10}", "EMPTY_FUNCTION")
- HotKeySet("{F11}", "EMPTY_FUNCTION")
- HotKeySet("{F12}", "EMPTY_FUNCTION")
- EndFunc ;==>SetBlankFHotkeys
- Func EMPTY_FUNCTION()
- EndFunc ;==>EMPTY_FUNCTION
- ;=========== WIN FUNCTIONS ============================
- Func CheckProcessForTibiaClient()
- If ClientSelectGuiExists() Then
- If TibiaWindowExists() Then
- Local $wins = WinList("[CLASS:Qt5QWindowOwnDCIcon]")
- Local $wins_Taleon = WinList("[CLASS:Dt6VcaddbwOwnDCXyzp]")
- If $wins[0][0] > 0 Then
- If $wins[0][0] > $CLIENTS_DETECTED Then
- If StringInStr($wins[1][0],"Tibia") And StringInStr($wins[1][1],"0x") Then
- For $i=1 To $wins[0][0]
- Local $item_count = _GUICtrlListView_GetItemCount($list_ClientChoice)
- Local $list_match = False
- For $j=0 To $item_count-1
- Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$j)
- If $string[2] == $wins[$i][1] Then
- $list_match = True
- EndIf
- Next
- If $list_match == False Then
- _GUICtrlListView_AddItem($list_ClientChoice, $wins[$i][0])
- _GUICtrlListView_AddSubItem($list_ClientChoice, $CLIENTS_DETECTED,$wins[$i][1], 1)
- ConsoleWrite(@CRLF & "ADDING CLIENT: " & "Row: #END VALUE: " & $wins[$i][0] & " | " & $wins[$i][1])
- $CLIENTS_DETECTED = $CLIENTS_DETECTED + 1
- ExitLoop
- EndIf
- Next
- EndIf
- ElseIf $wins[0][0] < $CLIENTS_DETECTED Then
- For $i=0 To $CLIENTS_DETECTED-1
- Local $client_in_list = False
- Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$i)
- For $j=1 To $wins[0][0]
- If $string[2] == $wins[$j][1] Then
- $client_in_list = True
- EndIf
- Next
- If $client_in_list == False Then
- $CLIENTS_DETECTED = $CLIENTS_DETECTED - 1
- Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$i)
- ConsoleWrite(@CRLF & "DELETE CLIENT: " & "Row: " & $i & " VALUE: " & $string[0] & " | " & $string[1])
- _GUICtrlListView_DeleteItem($list_ClientChoice, $i)
- ExitLoop
- EndIf
- Next
- EndIf
- ElseIf $wins_Taleon[0][0] > 0 Then
- If $wins_Taleon[0][0] > $CLIENTS_DETECTED Then
- If StringInStr($wins_Taleon[1][0],"Tibia") And StringInStr($wins_Taleon[1][1],"0x") Then
- For $i=1 To $wins_Taleon[0][0]
- Local $item_count = _GUICtrlListView_GetItemCount($list_ClientChoice)
- Local $list_match = False
- For $j=0 To $item_count-1
- Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$j)
- If $string[2] == $wins_Taleon[$i][1] Then
- $list_match = True
- EndIf
- Next
- If $list_match == False Then
- _GUICtrlListView_AddItem($list_ClientChoice, $wins_Taleon[$i][0])
- _GUICtrlListView_AddSubItem($list_ClientChoice, $CLIENTS_DETECTED,$wins_Taleon[$i][1], 1)
- ConsoleWrite(@CRLF & "ADDING CLIENT: " & "Row: #END VALUE: " & $wins_Taleon[$i][0] & " | " & $wins_Taleon[$i][1])
- $CLIENTS_DETECTED = $CLIENTS_DETECTED + 1
- ExitLoop
- EndIf
- Next
- EndIf
- ElseIf $wins_Taleon[0][0] < $CLIENTS_DETECTED Then
- For $i=0 To $CLIENTS_DETECTED-1
- Local $client_in_list = False
- Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$i)
- For $j=1 To $wins_Taleon[0][0]
- If $string[2] == $wins_Taleon[$j][1] Then
- $client_in_list = True
- EndIf
- Next
- If $client_in_list == False Then
- $CLIENTS_DETECTED = $CLIENTS_DETECTED - 1
- Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$i)
- ConsoleWrite(@CRLF & "DELETE CLIENT: " & "Row: " & $i & " VALUE: " & $string[0] & " | " & $string[1])
- _GUICtrlListView_DeleteItem($list_ClientChoice, $i)
- ExitLoop
- EndIf
- Next
- EndIf
- EndIf
- Else
- Local $item_count = _GUICtrlListView_GetItemCount($list_ClientChoice)
- If $item_count > 0 Then
- _GUICtrlListView_DeleteItem($list_ClientChoice, 0)
- $CLIENTS_DETECTED = $CLIENTS_DETECTED - 1
- EndIf
- EndIf
- EndIf
- EndFunc
- Func TibiaWindowScan()
- ActivateTibiaWindow()
- If TibiaWindowIsFocused() And CharacterLogedIn() Then
- UpdateStatusLabel("scan...")
- GetCurrentCharacterName()
- SaveCurrentTibiaWindowPos()
- GetCurrentStatusBarPosition() ;========> PixelSearch MP-Bar an save Rectangles as Global Array <$HP_RECTANGLE> & <$MP_RECTANGLE>
- GetCurrentEQCollapsePosition()
- GetCurrentEQCollapseState()
- GetCurrentEQCollapsePixelCheckSum()
- GetCurrentConditionBarPosition()
- GetCurrentConditionBarPixelCheckSum()
- GetCurrentHP() ;========> PixelSearch HP Digits and save as Global Variable <$CHARACTER_HP>
- GetCurrentMP() ;========> PixelSearch MP Digits and save as Global Variable <$CHARACTER_MP>
- GetCurrentHPpixelCheckSum() ;========> Save PixelChecksum from <$HP_RECTANGLE> as Global Variable <$HP_RECTANGLE_CHECKSUM>
- GetCurrentMPpixelCheckSum() ;========> Save PixelChecksum from <$MP_RECTANGLE> as Global Variable <$MP_RECTANGLE_CHECKSUM>
- UpdateCharacterLabel()
- UpdateHPLabel() ;========> Set value <$CHARACTER_HP> to control Label <$Label_HP>
- UpdateMPLabel() ;========> Set value <$CHARACTER_MP> to control Label <$Label_MP>
- UpdateStatusLabel("ready")
- EndIf
- EndFunc ;==>TibiaWindowScan
- Func ActivateTibiaWindow()
- WinActivate(HWnd($CLIENT_REGISTERED[0][1]))
- EndFunc ;==>ActivateTibiaWindow
- Func Donate()
- $PID = ShellExecute("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BJUPXVMQ3DLF6")
- WinWaitActive("")
- EndFunc ;==>Donate
- Func MouseMoved()
- Local $tempMousePos1 = MouseGetPos()
- Sleep(10)
- Local $tempMousePos2 = MouseGetPos()
- If $tempMousePos1[0] == $tempMousePos2[0] And $tempMousePos1[1] == $tempMousePos2[1] Then
- Return False
- EndIf
- Return True
- EndFunc
- ;=========== UPDATE GUI CONTROLS ======================
- Func UpdateStatusLabel($string)
- If MainGuiExists() Then
- GUICtrlSetData($Label_Status,$string)
- EndIf
- EndFunc
- Func UpdateHPLabel()
- If MainGuiExists() Then
- Local $time = TimerInit()
- GUICtrlSetData($Label_HP, $CHARACTER_HP)
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "================UpdateHPLabel===============")
- ConsoleWrite(@CRLF & "Set HPLabel = " & $CHARACTER_HP)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- EndIf
- EndFunc ;==>UpdateHPLabel
- Func UpdateMPLabel()
- If MainGuiExists() Then
- Local $time = TimerInit()
- GUICtrlSetData($Label_MP, $CHARACTER_MP)
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "================UpdateMPLabel===============")
- ConsoleWrite(@CRLF & "Set MPLabel = " & $CHARACTER_MP)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- EndIf
- EndFunc ;==>UpdateMPLabel
- Func UpdateCharacterLabel()
- If MainGuiExists() Then
- Local $time = TimerInit()
- GUICtrlSetData($Label_Character, $CLIENT_CHARACTER_NAME)
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "================UpdateMPLabel===============")
- ConsoleWrite(@CRLF & "Set CharacterLabel = " & $CLIENT_CHARACTER_NAME)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- EndIf
- EndFunc
- ;=========== RETURN VALUES FROM PROCESS ===============
- Func GetCurrentTibiaWindowPos()
- If TibiaSelectedWindowExists() Then
- Local $pos = WinGetPos(HWnd($CLIENT_REGISTERED[0][1]))
- Local $tempPos[4] = [$pos[0], $pos[1], $pos[2], $pos[3]]
- Return $tempPos
- EndIf
- EndFunc ;==>GetCurrentTibiaWindowPos
- Func GetCurrentConditionBarPosition()
- Local $time = TimerInit()
- Local $MP_unique_position_X = $MP_UNIQUE_COLOR_POSITION[0]
- Local $MP_unique_position_Y = $MP_UNIQUE_COLOR_POSITION[1]
- If $EQ_COLLAPSE_STATE == "maximized" Then
- ;************** Calculate Condition Bar Rectangle ******************
- Local $ConditionBarRegionStart_X = $MP_unique_position_X + 1
- Local $ConditionBarRegionStart_Y = $MP_unique_position_Y + 154
- Local $ConditionBarRegionEnd_X = $ConditionBarRegionStart_X + 103
- Local $ConditionBarRegionEnd_Y = $ConditionBarRegionStart_Y + 8
- Local $ConditionBarRegion_Rectangle[4] = [$ConditionBarRegionStart_X, $ConditionBarRegionStart_Y, $ConditionBarRegionEnd_X, $ConditionBarRegionEnd_Y]
- $CONDITION_BAR_RECTANGLE = $ConditionBarRegion_Rectangle
- ElseIf $EQ_COLLAPSE_STATE == "minimized" Then
- ;************** Calculate Condition Bar Rectangle ******************
- Local $ConditionBarRegionStart_X = $MP_unique_position_X + 15
- Local $ConditionBarRegionStart_Y = $MP_unique_position_Y + 54
- Local $ConditionBarRegionEnd_X = $ConditionBarRegionStart_X + 91
- Local $ConditionBarRegionEnd_Y = $ConditionBarRegionStart_Y + 8
- Local $ConditionBarRegion_Rectangle[4] = [$ConditionBarRegionStart_X, $ConditionBarRegionStart_Y, $ConditionBarRegionEnd_X, $ConditionBarRegionEnd_Y]
- $CONDITION_BAR_RECTANGLE = $ConditionBarRegion_Rectangle
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "======Func GetCurrentConditionBarPosition======")
- ConsoleWrite(@CRLF & "CONDITION_BAR_RECTANGLE = " & $CONDITION_BAR_RECTANGLE[0] & "x" & $CONDITION_BAR_RECTANGLE[1] & " => " & $CONDITION_BAR_RECTANGLE[2] & "x" & $CONDITION_BAR_RECTANGLE[3])
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- EndFunc
- Func GetCurrentEQCollapsePosition()
- Local $time = TimerInit()
- Local $startScanX = $TIBIA_WINDOW_X + $TIBIA_WINDOW_WIDTH - 181
- Local $startScanY = $TIBIA_WINDOW_Y
- Local $endScanX = $TIBIA_WINDOW_X + $TIBIA_WINDOW_WIDTH
- Local $endScanY = $TIBIA_WINDOW_Y + $TIBIA_WINDOW_HEIGHT - 25
- Local $StoreInbox_unique_colors_detected = 0
- Local $aCoord = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x193a57) ;0x193a57 unique blue hex color at store button
- If $aCoord <> 0 And PixelSearch($aCoord[0] + 1, $aCoord[1], $aCoord[0] + 1, $aCoord[1], 0x102537) <> 0 Then ;0x102537 2nd unique hex color 1px right from 1st unique hex color
- $StoreInbox_unique_colors_detected = 1
- EndIf
- Local $ManaBarLowPosX = $aCoord[0]
- Local $ManaBarLowPosY = $aCoord[1]
- Local $tempUniquePos[2] = [$ManaBarLowPosX,$ManaBarLowPosY]
- $STOREI_NBOX_UNIQUE_COLOR_POSITION = $tempUniquePos
- If $StoreInbox_unique_colors_detected == 1 Then
- ;************** Calculate EQ Collapse Rectangle ******************
- Local $EQCollapseRegionStart_X = $ManaBarLowPosX - 72
- Local $EQCollapseRegionStart_Y = $ManaBarLowPosY - 11
- Local $EQCollapseRegionEnd_X = $EQCollapseRegionStart_X + 11
- Local $EQCollapseRegionEnd_Y = $EQCollapseRegionStart_Y + 11
- Local $EQCollapseRegion_Rectangle[4] = [$EQCollapseRegionStart_X, $EQCollapseRegionStart_Y, $EQCollapseRegionEnd_X, $EQCollapseRegionEnd_Y]
- $EQ_COLLAPSE_RECTANGLE = $EQCollapseRegion_Rectangle
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "======Func GetCurrentEQCollapsePosition======")
- ConsoleWrite(@CRLF & "EQ_COLLAPSE_RECTANGLE = " & $EQ_COLLAPSE_RECTANGLE[0] & "x" & $EQ_COLLAPSE_RECTANGLE[1] & " => " & $EQ_COLLAPSE_RECTANGLE[2] & "x" & $EQ_COLLAPSE_RECTANGLE[3])
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- EndFunc
- Func GetCurrentStatusBarPosition()
- Local $time = TimerInit()
- Local $startScanX = $TIBIA_WINDOW_X + $TIBIA_WINDOW_WIDTH - 181
- Local $startScanY = $TIBIA_WINDOW_Y
- Local $endScanX = $TIBIA_WINDOW_X + $TIBIA_WINDOW_WIDTH
- Local $endScanY = $TIBIA_WINDOW_Y + $TIBIA_WINDOW_HEIGHT - 25
- ConsoleWrite(@CRLF & "Tibia Window X: " & $TIBIA_WINDOW_X)
- ConsoleWrite(@CRLF & "Tibia Window Y: " & $TIBIA_WINDOW_Y)
- ConsoleWrite(@CRLF & "Tibia Window WIDTH: " & $TIBIA_WINDOW_WIDTH)
- ConsoleWrite(@CRLF & "Tibia Window HEIGHT: " & $TIBIA_WINDOW_HEIGHT)
- ConsoleWrite(@CRLF & "Tibia Window Start Scan X: " & $startScanX)
- ConsoleWrite(@CRLF & "Tibia Window Start Scan Y: " & $startScanY)
- ConsoleWrite(@CRLF & "Tibia Window End Scan X: " & $endScanX)
- ConsoleWrite(@CRLF & "Tibia Window End Scan Y: " & $endScanY)
- Local $MP_unique_colors_detected = 0
- ;~ Local $hDll = DllOpen("gdi32.dll")
- ;~ Local $vDC = _PixelGetColor_CreateDC($hDll)
- ;~ Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
- ;~ For $x = $startScanX To $endScanX
- ;~ For $y = $startScanY To $endScanY
- ;~ Local $sColor = _PixelGetColor_GetPixel($vDC, $x,$y, $hDll)
- ;~ If $sColor == "42415C" Then
- ;~ $sColor = _PixelGetColor_GetPixel($vDC, $x+1,$y, $hDll)
- ;~ If $sColor == "434349" Then
- ;~ Local $aCoord[2] = [$x,$y]
- ;~ $MP_unique_colors_detected = 1
- ;~ EndIf
- ;~ EndIf
- ;~ Next
- ;~ Next
- ;~ _PixelGetColor_ReleaseRegion($vRegion)
- ;~ _PixelGetColor_ReleaseDC($vDC,$hDll)
- ;~ DllClose($hDll)
- Local $aCoord = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x42415c) ;0x42415c unique blue hex color at mana bar
- If $aCoord <> 0 And PixelSearch($aCoord[0] + 1, $aCoord[1], $aCoord[0] + 1, $aCoord[1], 0x434349) <> 0 Then ;0x434349 2nd unique hex color 1px right from 1st unique hex color
- $MP_unique_colors_detected = 1
- EndIf
- If $MP_unique_colors_detected == 1 Then
- Local $ManaBarLowPosX = $aCoord[0]
- Local $ManaBarLowPosY = $aCoord[1]
- Local $tempUniquePos[2] = [$ManaBarLowPosX,$ManaBarLowPosY]
- $MP_UNIQUE_COLOR_POSITION = $tempUniquePos
- ;************** Calculate HP Rectangle ******************
- Local $NumbersRegionStartHP_X = $ManaBarLowPosX + 119
- Local $NumbersRegionStartHP_Y = $ManaBarLowPosY - 21
- Local $NumbersRegionEndHP_X = $NumbersRegionStartHP_X + 37
- Local $NumbersRegionEndHP_Y = $NumbersRegionStartHP_Y + 7
- Local $NumberRegionHP_Rectangle[4] = [$NumbersRegionStartHP_X, $NumbersRegionStartHP_Y, $NumbersRegionEndHP_X, $NumbersRegionEndHP_Y]
- $HP_RECTANGLE = $NumberRegionHP_Rectangle
- ;************** Calculate MP Rectangle ******************
- Local $NumbersRegionStartMP_X = $ManaBarLowPosX + 119
- Local $NumbersRegionStartMP_Y = $ManaBarLowPosY - 8
- Local $NumbersRegionEndMP_X = $NumbersRegionStartMP_X + 37
- Local $NumbersRegionEndMP_Y = $NumbersRegionStartMP_Y + 7
- Local $NumberRegionMP_Rectangle[4] = [$NumbersRegionStartMP_X, $NumbersRegionStartMP_Y, $NumbersRegionEndMP_X, $NumbersRegionEndMP_Y]
- $MP_RECTANGLE = $NumberRegionMP_Rectangle
- ;************** Calculate EQ Collapse Rectangle ******************
- Local $EQCollapseRegionStart_X = $ManaBarLowPosX
- Local $EQCollapseRegionStart_Y = $ManaBarLowPosY + 8
- Local $EQCollapseRegionEnd_X = $EQCollapseRegionStart_X + 11
- Local $EQCollapseRegionEnd_Y = $EQCollapseRegionStart_Y + 11
- Local $EQCollapseRegion_Rectangle[4] = [$EQCollapseRegionStart_X, $EQCollapseRegionStart_Y, $EQCollapseRegionEnd_X, $EQCollapseRegionEnd_Y]
- $EQ_COLLAPSE_RECTANGLE = $EQCollapseRegion_Rectangle
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "======Func GetCurrentStatusBarPosition======")
- ConsoleWrite(@CRLF & "HP_RECTANGLE = " & $HP_RECTANGLE[0] & "x" & $HP_RECTANGLE[1] & " => " & $HP_RECTANGLE[2] & "x" & $HP_RECTANGLE[3])
- ConsoleWrite(@CRLF & "MP_RECTANGLE = " & $MP_RECTANGLE[0] & "x" & $MP_RECTANGLE[1] & " => " & $MP_RECTANGLE[2] & "x" & $MP_RECTANGLE[3])
- ;~ ConsoleWrite(@CRLF & "EQ_COLLAPSE_RECTANGLE = " & $EQ_COLLAPSE_RECTANGLE[0] & "x" & $EQ_COLLAPSE_RECTANGLE[1] & " => " & $EQ_COLLAPSE_RECTANGLE[2] & "x" & $EQ_COLLAPSE_RECTANGLE[3])
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- EndIf
- EndFunc ;==>GetCurrentStatusBarPosition
- Func GetCurrentHP()
- Local $NumbersStartBlock1_X = $HP_RECTANGLE[0]
- Local $NumbersStartBlock1_Y = $HP_RECTANGLE[1]
- Local $NumbersStartBlock2_X = $HP_RECTANGLE[0] + 8
- Local $NumbersStartBlock2_Y = $HP_RECTANGLE[1]
- Local $NumbersStartBlock3_X = $HP_RECTANGLE[0] + 16
- Local $NumbersStartBlock3_Y = $HP_RECTANGLE[1]
- Local $NumbersStartBlock4_X = $HP_RECTANGLE[0] + 24
- Local $NumbersStartBlock4_Y = $HP_RECTANGLE[1]
- Local $NumbersStartBlock5_X = $HP_RECTANGLE[0] + 32
- Local $NumbersStartBlock5_Y = $HP_RECTANGLE[1]
- Local $Number = ""
- ;===============START TIMER SCAN===============================================================================
- Local $time = TimerInit()
- Local $hDll = DllOpen("gdi32.dll")
- Local $vDC = _PixelGetColor_CreateDC($hDll)
- Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
- Local $sColor
- ;NUMBER BLOCK 1
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+3,$NumbersStartBlock1_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+1,$NumbersStartBlock1_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+3,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- ;NUMBER BLOCK 2
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+3,$NumbersStartBlock2_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+1,$NumbersStartBlock2_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+3,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- ;NUMBER BLOCK 3
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+3,$NumbersStartBlock3_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+1,$NumbersStartBlock3_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+3,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- ;NUMBER BLOCK 4
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+3,$NumbersStartBlock4_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+1,$NumbersStartBlock4_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+3,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- ;NUMBER BLOCK 5
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+3,$NumbersStartBlock5_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+1,$NumbersStartBlock5_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+3,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- $CHARACTER_HP = $Number
- _PixelGetColor_ReleaseRegion($vRegion)
- _PixelGetColor_ReleaseDC($vDC,$hDll)
- DllClose($hDll)
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "================GetCurrentHP================")
- ConsoleWrite(@CRLF & "CurrentHP = " & $CHARACTER_HP)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return $Number
- EndFunc ;==>GetCurrentHP
- Func GetCurrentMP()
- Local $NumbersStartBlock1_X = $MP_RECTANGLE[0]
- Local $NumbersStartBlock1_Y = $MP_RECTANGLE[1]
- Local $NumbersStartBlock2_X = $MP_RECTANGLE[0] + 8
- Local $NumbersStartBlock2_Y = $MP_RECTANGLE[1]
- Local $NumbersStartBlock3_X = $MP_RECTANGLE[0] + 16
- Local $NumbersStartBlock3_Y = $MP_RECTANGLE[1]
- Local $NumbersStartBlock4_X = $MP_RECTANGLE[0] + 24
- Local $NumbersStartBlock4_Y = $MP_RECTANGLE[1]
- Local $NumbersStartBlock5_X = $MP_RECTANGLE[0] + 32
- Local $NumbersStartBlock5_Y = $MP_RECTANGLE[1]
- Local $Number = ""
- ;===============START TIMER SCAN===============================================================================
- Local $time = TimerInit()
- Local $hDll = DllOpen("gdi32.dll")
- Local $vDC = _PixelGetColor_CreateDC($hDll)
- Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
- Local $sColor
- ;NUMBER BLOCK 1
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+3,$NumbersStartBlock1_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+1,$NumbersStartBlock1_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+3,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- ;NUMBER BLOCK 2
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+3,$NumbersStartBlock2_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+1,$NumbersStartBlock2_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+3,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- ;NUMBER BLOCK 3
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+3,$NumbersStartBlock3_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+1,$NumbersStartBlock3_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+3,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- ;NUMBER BLOCK 4
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+3,$NumbersStartBlock4_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+1,$NumbersStartBlock4_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+3,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- ;NUMBER BLOCK 5
- If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+5, $hDll) == "C0C0C0" Then
- $Number = $Number & "0"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+3,$NumbersStartBlock5_Y+7, $hDll) == "C0C0C0" Then
- $Number = $Number & "1"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+7, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+4, $hDll) == "C0C0C0" Then
- $Number = $Number & "2"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+1,$NumbersStartBlock5_Y+3, $hDll) <> "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "3"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+5, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+2, $hDll) == "C0C0C0" Then
- $Number = $Number & "4"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "5"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" Then
- $Number = $Number & "6"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" Then
- $Number = $Number & "7"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+4, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" Then
- $Number = $Number & "8"
- ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" And _
- _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+3,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" Then
- $Number = $Number & "9"
- EndIf
- $CHARACTER_MP = $Number
- _PixelGetColor_ReleaseRegion($vRegion)
- _PixelGetColor_ReleaseDC($vDC,$hDll)
- DllClose($hDll)
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "================GetCurrentMP================")
- ConsoleWrite(@CRLF & "CurrentMP = " & $CHARACTER_MP)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return $Number
- EndFunc ;==>GetCurrentMP
- Func GetCurrentEQCollapseState()
- Local $EQCollapseStateStart_X = $EQ_COLLAPSE_RECTANGLE[0]+2
- Local $EQCollapseStateStart_Y = $EQ_COLLAPSE_RECTANGLE[1]+2
- Local $State = ""
- ;===============START TIMER SCAN===============================================================================
- Local $time = TimerInit()
- Local $hDll = DllOpen("gdi32.dll")
- Local $vDC = _PixelGetColor_CreateDC($hDll)
- Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
- Local $sColor
- ;COLLAPSE STATE
- If _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+2, $EQCollapseStateStart_Y, $hDll) == "636364" And _
- _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+3, $EQCollapseStateStart_Y, $hDll) == "868686" And _
- _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+4, $EQCollapseStateStart_Y, $hDll) == "636364" Then
- $State = "minimized"
- ElseIf _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+2, $EQCollapseStateStart_Y, $hDll) == "2F3030" And _
- _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+3, $EQCollapseStateStart_Y, $hDll) == "272727" And _
- _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+4, $EQCollapseStateStart_Y, $hDll) == "242424" Then
- $State = "maximized"
- EndIf
- $EQ_COLLAPSE_STATE = $State
- _PixelGetColor_ReleaseRegion($vRegion)
- _PixelGetColor_ReleaseDC($vDC,$hDll)
- DllClose($hDll)
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "================GetCurrentEQCollapseState================")
- ConsoleWrite(@CRLF & "CurrentEQCollapseState = " & $EQ_COLLAPSE_STATE)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return $State
- EndFunc
- Func GetCurrentHPpixelCheckSum()
- Local $time = TimerInit()
- Local $temp = PixelChecksum($HP_RECTANGLE[0], $HP_RECTANGLE[1], $HP_RECTANGLE[2], $HP_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- $HP_RECTANGLE_CHECKSUM = $temp
- ConsoleWrite(@CRLF & "=========GetCurrentHPpixelCheckSum==========")
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $HP_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return $temp
- EndFunc ;==>GetCurrentHPpixelCheckSum
- Func GetCurrentMPpixelCheckSum()
- Local $time = TimerInit()
- Local $temp = PixelChecksum($MP_RECTANGLE[0], $MP_RECTANGLE[1], $MP_RECTANGLE[2], $MP_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- $MP_RECTANGLE_CHECKSUM = $temp
- ConsoleWrite(@CRLF & "=========GetCurrentMPpixelCheckSum==========")
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $MP_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return $temp
- EndFunc ;==>GetCurrentMPpixelCheckSum
- Func GetCurrentEQCollapsePixelCheckSum()
- Local $time = TimerInit()
- Local $temp = PixelChecksum($EQ_COLLAPSE_RECTANGLE[0], $EQ_COLLAPSE_RECTANGLE[1], $EQ_COLLAPSE_RECTANGLE[2], $EQ_COLLAPSE_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- $EQ_COLLAPSE_RECTANGLE_CHECKSUM = $temp
- ConsoleWrite(@CRLF & "=========GetCurrentEQCollapsePixelCheckSum==========")
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $EQ_COLLAPSE_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return $temp
- EndFunc
- Func GetCurrentConditionBarPixelCheckSum()
- Local $time = TimerInit()
- Local $temp = PixelChecksum($CONDITION_BAR_RECTANGLE[0], $CONDITION_BAR_RECTANGLE[1], $CONDITION_BAR_RECTANGLE[2], $CONDITION_BAR_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- $CONDITION_BAR_RECTANGLE_CHECKSUM = $temp
- ConsoleWrite(@CRLF & "=========GetCurrentConditionBarPixelCheckSum==========")
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $CONDITION_BAR_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return $temp
- EndFunc
- Func GetTibiaIdleTime()
- If _IsArrowKeyPressed() == 1 Then
- $TIBIA_IDLE_TIME = TimerInit()
- EndIf
- EndFunc
- Func GetCurrentCharacterName()
- Local $tempTitle = WinGetTitle(HWnd($CLIENT_REGISTERED[0][1]))
- Local $split = StringSplit($tempTitle," - ",1)
- $CLIENT_CHARACTER_NAME = $split[2]
- EndFunc
- ;=========== UPDATE GLOBAL STATES ====================
- Func SaveCurrentTibiaWindowPos()
- If TibiaSelectedWindowExists() Then
- Local $pos = GetCurrentTibiaWindowPos()
- $TIBIA_WINDOW_X = $pos[0]
- $TIBIA_WINDOW_Y = $pos[1]
- $TIBIA_WINDOW_WIDTH = $pos[2]
- $TIBIA_WINDOW_HEIGHT = $pos[3]
- EndIf
- EndFunc ;==>SaveCurrentTibiaWindowPos
- Func StopSupport()
- GUICtrlSetState($chkbox_Support, $GUI_UNCHECKED)
- $Support = 0
- EndFunc ;==>StopAutoHeal
- Func SaveCurrentHP()
- Local $temp = GetCurrentHP()
- $CHARACTER_HP = $temp
- EndFunc ;==>SaveCurrentHP
- Func SaveCurrentMP()
- Local $temp = GetCurrentMP()
- $CHARACTER_MP = $temp
- EndFunc ;==>SaveCurrentMP
- ;========== CHECK GLOBAL VARIABLES ===================
- Func SupportActive()
- If $Support == 1 Then
- Return True
- EndIf
- Return False
- EndFunc ;==>SupportActive
- Func HPPixelsChanged()
- Local $time = TimerInit()
- Local $tempSum = PixelChecksum($HP_RECTANGLE[0], $HP_RECTANGLE[1], $HP_RECTANGLE[2], $HP_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- If $HP_RECTANGLE_CHECKSUM <> $tempSum Then
- ConsoleWrite(@CRLF & "============Func HPPixelsCHanged============")
- ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $HP_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return True
- EndIf
- Return False
- EndFunc ;==>HPPixelsChanged
- Func MPPixelsChanged()
- Local $time = TimerInit()
- Local $tempSum = PixelChecksum($MP_RECTANGLE[0], $MP_RECTANGLE[1], $MP_RECTANGLE[2], $MP_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- If $MP_RECTANGLE_CHECKSUM <> $tempSum Then
- ConsoleWrite(@CRLF & "============Func MPPixelsCHanged============")
- ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $MP_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return True
- EndIf
- Return False
- EndFunc ;==>MPPixelsChanged
- Func EQCollapsePixelsChanged()
- Local $time = TimerInit()
- Local $tempSum = PixelChecksum($EQ_COLLAPSE_RECTANGLE[0], $EQ_COLLAPSE_RECTANGLE[1], $EQ_COLLAPSE_RECTANGLE[2], $EQ_COLLAPSE_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- If $EQ_COLLAPSE_RECTANGLE_CHECKSUM <> $tempSum Then
- ConsoleWrite(@CRLF & "============Func EQCollapsePixelsChanged============")
- ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $EQ_COLLAPSE_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return True
- EndIf
- Return False
- EndFunc
- Func ConditionBarPixelsChanged()
- Local $time = TimerInit()
- Local $tempSum = PixelChecksum($CONDITION_BAR_RECTANGLE[0], $CONDITION_BAR_RECTANGLE[1], $CONDITION_BAR_RECTANGLE[2], $CONDITION_BAR_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- If $CONDITION_BAR_RECTANGLE_CHECKSUM <> $tempSum Then
- ConsoleWrite(@CRLF & "============Func ConditionBarPixelsChanged============")
- ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $CONDITION_BAR_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return True
- EndIf
- Return False
- EndFunc
- Func HPPixelsChangedCastTiming()
- Local $time = TimerInit()
- Local $tempSum = PixelChecksum($HP_RECTANGLE[0], $HP_RECTANGLE[1], $HP_RECTANGLE[2], $HP_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- If $HP_RECTANGLE_CHECKSUM_CAST_TIMING <> $tempSum Then
- ConsoleWrite(@CRLF & "============Func HPPixelsCHanged============")
- ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $HP_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return True
- EndIf
- Return False
- EndFunc ;==>HPPixelsChanged
- Func MPPixelsChangedCastTiming()
- Local $time = TimerInit()
- Local $tempSum = PixelChecksum($MP_RECTANGLE[0], $MP_RECTANGLE[1], $MP_RECTANGLE[2], $MP_RECTANGLE[3])
- Local $diff = TimerDiff($time)
- If $MP_RECTANGLE_CHECKSUM_CAST_TIMING <> $tempSum Then
- ConsoleWrite(@CRLF & "============Func MPPixelsCHanged============")
- ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $MP_RECTANGLE_CHECKSUM)
- ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- Return True
- EndIf
- Return False
- EndFunc ;==>MPPixelsChanged
- ;============ CHECK WINDOW STATES ====================
- Func ClientSelectGuiExists()
- If WinExists("ZeroBot Client Select", "") Then
- Return True
- EndIf
- Return False
- EndFunc
- Func MainGuiExists()
- If WinExists("ZeroBot Menu", "") Then
- Return True
- EndIf
- Return False
- EndFunc ;==>MainGuiExists
- Func TibiaWindowChangedPos()
- If TibiaWindowExists() And TibiaWindowPositionIsSaved() Then
- Local $tempTibiaWinPos = GetCurrentTibiaWindowPos()
- If $tempTibiaWinPos[0] <> $TIBIA_WINDOW_X Or _
- $tempTibiaWinPos[1] <> $TIBIA_WINDOW_Y Or _
- $tempTibiaWinPos[2] <> $TIBIA_WINDOW_WIDTH Or _
- $tempTibiaWinPos[3] <> $TIBIA_WINDOW_HEIGHT Then
- Return True
- EndIf
- EndIf
- Return False
- EndFunc ;==>TibiaWindowChangedPos
- Func TibiaWindowExists()
- If WinExists("[CLASS:Qt5QWindowOwnDCIcon]", "") Or WinExists("[CLASS:Dt6VcaddbwOwnDCXyzp]", "") Then
- Return True
- EndIf
- Return False
- EndFunc ;==>TibiaWindowExists
- Func TibiaSelectedWindowExists()
- If WinExists(HWnd($CLIENT_REGISTERED[0][1]), "") Then
- Return True
- EndIf
- Return False
- EndFunc ;==>TibiaWindowExists
- Func TibiaWindowPositionIsSaved()
- If $TIBIA_WINDOW_X <> "" And $TIBIA_WINDOW_Y <> "" And $TIBIA_WINDOW_WIDTH <> "" And $TIBIA_WINDOW_HEIGHT <> "" Then
- Return True
- EndIf
- Return False
- EndFunc
- Func TibiaWindowIsMaximized()
- If BitAND(WinGetState(HWnd($CLIENT_REGISTERED[0][1])),32) Then
- Return True
- EndIf
- Return False
- EndFunc
- Func TibiaWindowIsMinimized()
- If BitAND(WinGetState(HWnd($CLIENT_REGISTERED[0][1])),16) Then
- Return True
- EndIf
- Return False
- EndFunc
- Func TibiaWindowIsFocused()
- If WinActive(HWnd($CLIENT_REGISTERED[0][1])) Then
- Return True
- EndIf
- Return False
- EndFunc ;==>TibiaWindowIsFocused
- Func CharacterLogedIn()
- If WinGetTitle(HWnd($CLIENT_REGISTERED[0][1])) <> "Tibia" Then
- Return True
- EndIf
- Return False
- EndFunc ;==>CharacterLogedIn
- Func CharacterIsPoisoned()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $Poison_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x48f861) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x48fc62) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $Poison_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsPoisoned==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $Poison_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsCursed()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $Cursed_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x101010) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x686868) <> 0 And _
- PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x464646) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $Cursed_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsCursed==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $Cursed_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsBleeding()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $Bleeding_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x4C2121) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0xDF2E03) <> 0 And _ ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0xF77700) <> 0 Then
- $Bleeding_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsBleeding==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $Bleeding_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsBurning()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $Burning_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x4c2121) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0xdf2e03) <> 0 And _ ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0xf77700) <> 0 Then
- $Burning_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsBurning==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $Burning_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsElectrified()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $Electrified_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x7272c5) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x6061a1) <> 0 And _
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0x3838cb) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $Electrified_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsElectrified==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $Electrified_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsParalyzed()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $Paralyzed_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x811817) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x901414) <> 0 And _
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0x6d1b1b) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $Paralyzed_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsParalyzed==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $Paralyzed_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsHaste()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $Haste_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x917b5b) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0xd2bc9b) <> 0 And _
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0xd6c1a0) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $Haste_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsHaste==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $Haste_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsMagicShield()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $MagicShield_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x292d94) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x5c6adc) <> 0 And _
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0x404ad4) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $MagicShield_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsMagicShield==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $MagicShield_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsBattle()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $Battle_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x926852) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0xa87659) <> 0 And _
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0x706863) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $Battle_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsBattle==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $Battle_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsPZ()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $PZ_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0xc9d9f4) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0xffffff) <> 0 And _
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0xffffff) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $PZ_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsPZ==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $PZ_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- Func CharacterIsRestingAreaBonus()
- Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
- Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
- Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
- Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
- Local $RestingAreaBonus_unique_colors_detected = 0
- Local $time = TimerInit()
- Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x659d65) ;0x48f861 unique green hex color at poison icon
- If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x1a2d1b) <> 0 And _
- PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0x49494e) <> 0 Then ;0x48fc62 2nd unique hex color 1px right from 1st unique hex color
- $RestingAreaBonus_unique_colors_detected = 1
- EndIf
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=========Func CharacterIsRestingAreaBonus==========")
- ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
- ConsoleWrite(@CRLF & "===========================================")
- If $RestingAreaBonus_unique_colors_detected == 1 Then
- Return True
- EndIf
- Return False
- EndFunc
- ;============ MULTIPLEX FUNCTIONS =============================
- Func AntiIdle()
- If $AntiIdle == 1 Then
- If TibiaWindowExists() And TibiaWindowIsFocused() And CharacterLogedIn() Then
- GetTibiaIdleTime()
- EndIf
- ConsoleWrite(@CRLF & "IDLE TIME: " & TimerDiff($TIBIA_IDLE_TIME))
- If TimerDiff($TIBIA_IDLE_TIME) >= $ANTI_IDLE_TIME Then
- $TIBIA_IDLE_TIME = TimerInit()
- If TibiaWindowExists() And CharacterLogedIn() Then
- ActivateTibiaWindow()
- CharacterLook("North")
- Sleep(500)
- CharacterLook("East")
- Sleep(500)
- CharacterLook("South")
- Sleep(500)
- CharacterLook("West")
- Sleep(500)
- CharacterLook("North")
- Sleep(500)
- EndIf
- EndIf
- EndIf
- EndFunc
- Func AutoCondition()
- If EQCollapsePixelsChanged() Then
- GetCurrentEQCollapseState()
- GetCurrentEQCollapsePixelCheckSum()
- GetCurrentConditionBarPosition()
- GetCurrentConditionBarPixelCheckSum()
- Else
- ;~ ConditionBarPixelsChanged()
- If $CURE_POISON == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_POX[2]) And $LAST_CURE_POX_CAST >= Number($CONDITION_CURE_POX[3]) Then
- If CharacterIsPoisoned() Then
- ActionCureText($CONDITION_CURE_POX[0])
- If Not CharacterIsPoisoned() Then
- $LAST_CURE_POX_CAST = TimerInit()
- EndIf
- EndIf
- EndIf
- If $CURE_CURSE == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_CURSE[2]) And $LAST_CURE_CURSE_CAST >= Number($CONDITION_CURE_CURSE[3]) Then
- If CharacterIsCursed() Then
- ActionCureText($CONDITION_CURE_CURSE[0])
- If Not CharacterIsCursed() Then
- $LAST_CURE_CURSE_CAST = TimerInit()
- EndIf
- EndIf
- EndIf
- ;~ If $CURE_BLEED == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_BLEED[2]) And $LAST_CURE_BLEED_CAST >= Number($CONDITION_CURE_BLEED[3]) Then
- ;~ If CharacterIsBleeding() Then
- ;~ ActionCureText($CONDITION_CURE_BLEED[0])
- ;~ $LAST_CURE_BLEED_CAST = TimerInit()
- ;~ EndIf
- ;~ EndIf
- If $CURE_BURN == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_BURN[2]) And $LAST_CURE_BURN_CAST >= Number($CONDITION_CURE_BURN[3]) Then
- If CharacterIsBurning() Then
- ActionCureText($CONDITION_CURE_BURN[0])
- If Not CharacterIsBurning() Then
- $LAST_CURE_BURN_CAST = TimerInit()
- EndIf
- EndIf
- EndIf
- If $CURE_ELEC == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_ELEC[2]) And $LAST_CURE_ELEC_CAST >= Number($CONDITION_CURE_ELEC[3]) Then
- If CharacterIsElectrified() Then
- ActionCureText($CONDITION_CURE_ELEC[0])
- If Not CharacterIsElectrified() Then
- $LAST_CURE_ELEC_CAST = TimerInit()
- EndIf
- EndIf
- EndIf
- If $CURE_PARA == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_PARA[2]) And $LAST_CURE_PARA_CAST >= Number($CONDITION_CURE_PARA[3]) Then
- If CharacterIsParalyzed() Then
- ActionCureText($CONDITION_CURE_PARA[0])
- If Not CharacterIsParalyzed() Then
- $LAST_CURE_PARA_CAST = TimerInit()
- EndIf
- EndIf
- EndIf
- If $HOLD_HASTE == 1 And $CHARACTER_MP >= Number($CONDITION_HOLD_HASTE[2]) And $LAST_HOLD_HASTE_CAST >= Number($CONDITION_HOLD_HASTE[3]) Then
- If Not CharacterIsHaste() Then
- ActionCureText($CONDITION_HOLD_HASTE[0])
- If CharacterIsHaste() Then
- $LAST_HOLD_HASTE_CAST = TimerInit()
- EndIf
- EndIf
- EndIf
- ;~ If $HOLD_INVISIBLE == 1 And $CHARACTER_MP >= Number($CONDITION_HOLD_INVISIBLE[2]) And $LAST_HOLD_INVISIBLE_CAST >= Number($CONDITION_HOLD_INVISIBLE[3]) Then
- ;~ If Not CharacterIsHaste() Then
- ;~ ActionCureText($CONDITION_HOLD_INVISIBLE[0])
- ;~ $LAST_HOLD_INVISIBLE_CAST = TimerInit()
- ;~ EndIf
- ;~ EndIf
- If $HOLD_MAGICSHIELD == 1 And $CHARACTER_MP >= Number($CONDITION_HOLD_MAGICSHIELD[2]) And $LAST_HOLD_MAGICSHIELD_CAST >= Number($CONDITION_HOLD_MAGICSHIELD[3]) Then
- If Not CharacterIsMagicShield() Then
- ActionCureText($CONDITION_HOLD_MAGICSHIELD[0])
- If CharacterIsMagicShield() Then
- $LAST_HOLD_MAGICSHIELD_CAST = TimerInit()
- EndIf
- EndIf
- EndIf
- ;~ If $HOLD_RECOVERY == 1 And $CHARACTER_MP >= Number($CONDITION_HOLD_RECOVERY[2]) And $LAST_HOLD_RECOVERY_CAST >= Number($CONDITION_HOLD_RECOVERY[3]) Then
- ;~ If Not CharacterIsHaste() Then
- ;~ ActionCureText($CONDITION_HOLD_RECOVERY[0])
- ;~ $LAST_HOLD_RECOVERY_CAST = TimerInit()
- ;~ EndIf
- ;~ EndIf
- EndIf
- EndFunc
- Func AutoHeal()
- If TibiaWindowChangedPos() Then
- If TibiaWindowIsFocused() Then
- TibiaWindowScan()
- EndIf
- ElseIf TibiaWindowIsFocused() Then
- HotKeySet("^{DEL}", "StopSupport")
- ;============= UPDATE CURRENT HP & MP ===========
- Local $StatusBarChanged = 0
- If HPPixelsChanged() Then
- GetCurrentHPpixelCheckSum()
- GetCurrentHP()
- UpdateHPLabel()
- $StatusBarChanged = 1
- EndIf
- If MPPixelsChanged() Then
- GetCurrentMPpixelCheckSum()
- GetCurrentMP()
- UpdateMPLabel()
- $StatusBarChanged = 1
- EndIf
- ;=================================================
- If $CONDITIONS[0] > 0 Then
- ;============ GET PRIORITY LEVEL ===============
- Local $prioLevel[$CONDITIONS[0]][2]
- Local $tempPrioLevelIndex = 0
- ;~ _ArrayDisplay($CONDITIONS)
- For $i = 1 To $CONDITIONS[0]
- Local $tempSplit = StringSplit($CONDITIONS[$i], ":", 1)
- Local $tempCur = $tempSplit[1]
- Local $tempAmmount = $tempSplit[3]
- If $tempCur == "CurHP" Then
- $prioLevel[$tempPrioLevelIndex][0] = $CONDITIONS[$i]
- $prioLevel[$tempPrioLevelIndex][1] = Number($tempAmmount)
- $tempPrioLevelIndex = $tempPrioLevelIndex + 1
- EndIf
- Next
- Local $tempCountCurHP = $tempPrioLevelIndex
- If $tempPrioLevelIndex > 1 Then
- _ArraySort($prioLevel,1,0,0,$tempPrioLevelIndex-1,1)
- EndIf
- ;~ _ArrayDisplay($prioLevel)
- For $i = 1 To $CONDITIONS[0]
- Local $tempSplit = StringSplit($CONDITIONS[$i], ":", 1)
- Local $tempCur = $tempSplit[1]
- Local $tempAmmount = $tempSplit[3]
- If $tempCur == "CurMP" Then
- $prioLevel[$tempPrioLevelIndex][0] = $CONDITIONS[$i]
- $prioLevel[$tempPrioLevelIndex][1] = Number($tempAmmount)
- $tempPrioLevelIndex = $tempPrioLevelIndex + 1
- EndIf
- Next
- _ArraySort($prioLevel,0,($tempPrioLevelIndex),0,1)
- _ArraySort($prioLevel,0,0,$tempCountCurHP,1)
- ;~ _ArrayDisplay($prioLevel)
- Local $tempConditions[UBound($prioLevel)]
- For $i=0 To (UBound($prioLevel)-1)
- $tempConditions[$i] = $prioLevel[$i][0]
- Next
- ;~ _ArrayDisplay($tempConditions)
- ;===============================================
- For $i=0 To (UBound($tempConditions)-1)
- ConsoleWrite(@CRLF & "DEBUG##########################################")
- ConsoleWrite(@CRLF & "CURRENT_HP = " & $CHARACTER_HP)
- ConsoleWrite(@CRLF & "CURRENT_MP = " & $CHARACTER_MP)
- Local $tempSplit = StringSplit($tempConditions[$i], ":", 1)
- ConsoleWrite(@CRLF & "RETURNED SPLITS = " & $tempSplit[0])
- Local $cond_CurStat = $tempSplit[1]
- Local $cond_Operator = $tempSplit[2]
- Local $cond_Ammount = $tempSplit[3]
- Local $cond_MP_Cost = $tempSplit[4]
- Local $cond_Cast_Type = $tempSplit[5]
- Local $cond_Cast_Keyword = $tempSplit[6]
- Local $cond_Cast_Delay = $tempSplit[7]
- ConsoleWrite(@CRLF & "$cond_CurStat = " & $tempSplit[1])
- ConsoleWrite(@CRLF & "$cond_Operator = " & $tempSplit[2])
- ConsoleWrite(@CRLF & "$cond_Ammount = " & $tempSplit[3])
- ConsoleWrite(@CRLF & "$cond_MP_Cost = " & $tempSplit[4])
- ConsoleWrite(@CRLF & "$cond_Cast_Type = " & $tempSplit[5])
- ConsoleWrite(@CRLF & "$cond_Cast_Keyword = " & $tempSplit[6])
- ConsoleWrite(@CRLF & "$cond_Cast_Delay = " & $tempSplit[7])
- ConsoleWrite(@CRLF & "TimerDif($LAST_HEAL_CAST) = " & TimerDiff($LAST_HEAL_CAST))
- ConsoleWrite(@CRLF & "$CAST_DELAY = " & $CAST_DELAY)
- ConsoleWrite(@CRLF & "DEBUG##########################################")
- Local $StartHeal = 0
- ;~ If $AutoHeal_FirstStart == 1 Then
- ;~ $AutoHeal_FirstStart = 0
- ;~ $StatusBarChanged = 1
- ;~ EndIf
- If TimerDiff($LAST_HEAL_CAST) >= $CAST_DELAY Then ;And $StatusBarChanged == 1 Then
- $StartHeal = 1
- EndIf
- If $StartHeal == 1 Then
- Local $tempCurStat
- If $cond_CurStat == "CurHP" Then
- $tempCurStat = $CHARACTER_HP
- ElseIf $cond_CurStat == "CurMP" Then
- $tempCurStat = $CHARACTER_MP
- EndIf
- If $cond_Operator == ">" Then
- ConsoleWrite(@CRLF & $tempCurStat & " > " & $cond_Ammount & " AND " & $CHARACTER_MP & " >= " & $cond_MP_Cost)
- If Number($tempCurStat) > Number($cond_Ammount) And Number($CHARACTER_MP) >= Number($cond_MP_Cost) Then
- If $cond_Cast_Type == "C" Then
- ConsoleWrite(@CRLF & "ActionClick(" & $cond_Cast_Keyword & ")")
- ActionClick($cond_Cast_Keyword)
- ElseIf $cond_Cast_Type == "H" Then
- ConsoleWrite(@CRLF & "ActionHotkey(" & $cond_Cast_Keyword & ")")
- ActionHotkey($cond_Cast_Keyword)
- ElseIf $cond_Cast_Type == "T" Then
- ConsoleWrite(@CRLF & "ActionText(" & $cond_Cast_Keyword & ")")
- ActionText($cond_Cast_Keyword)
- EndIf
- EndIf
- ElseIf $cond_Operator == "<" Then
- ConsoleWrite(@CRLF & $tempCurStat & " < " & $cond_Ammount & " AND " & $CHARACTER_MP & " >= " & $cond_MP_Cost)
- If Number($tempCurStat) < Number($cond_Ammount) And Number($CHARACTER_MP) >= Number($cond_MP_Cost) Then
- If $cond_Cast_Type == "C" Then
- ConsoleWrite(@CRLF & "ActionClick(" & $cond_Cast_Keyword & ")")
- ActionClick($cond_Cast_Keyword)
- ElseIf $cond_Cast_Type == "H" Then
- ConsoleWrite(@CRLF & "ActionHotkey(" & $cond_Cast_Keyword & ")")
- ActionHotkey($cond_Cast_Keyword)
- ElseIf $cond_Cast_Type == "T" Then
- ConsoleWrite(@CRLF & "ActionText(" & $cond_Cast_Keyword & ")")
- ActionText($cond_Cast_Keyword)
- EndIf
- EndIf
- EndIf
- EndIf
- Next
- EndIf
- EndIf
- EndFunc ;==>AutoHeal
- Func CharacterLook($direction)
- If TibiaWindowExists() And TibiaWindowIsFocused() And CharacterLogedIn() Then
- If $direction == "North" Then
- ;~ ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","^{UP}")
- Send("^{UP}")
- ElseIf $direction == "East" Then
- ;~ ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","^{RIGHT}")
- Send("^{RIGHT}")
- ElseIf $direction == "South" Then
- ;~ ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","^{DOWN}")
- Send("^{DOWN}")
- ElseIf $direction == "West" Then
- ;~ ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","^{LEFT}")
- Send("^{LEFT}")
- EndIf
- EndIf
- EndFunc
- Func ActionClick($XYposition)
- Local $time = TimerInit()
- Local $XY_CCPosition = StringSplit($XYposition, "x", 1)
- Local $X_CCPosition = $XY_CCPosition[1]
- Local $Y_CCPosition = $XY_CCPosition[2]
- ;~ Local $tempMousePos1 = MouseGetPos()
- ;~ Sleep(10)
- Local $tempMousePos2 = MouseGetPos()
- If _Timer_GetIdleTime() > 10 Then
- ConsoleWrite(@CRLF & $XYposition & @CRLF & "SPLITED X: " & Number($X_CCPosition) & @CRLF & "SPLITED Y: " & Number($Y_CCPosition))
- ConsoleWrite(@CRLF & _Timer_GetIdleTime())
- ConsoleWrite(@CRLF & "HWND RAW: " & $CLIENT_REGISTERED[0][1])
- ConsoleWrite(@CRLF & "HWND CONV: " & HWnd($CLIENT_REGISTERED[0][1]))
- ;~ If $tempMousePos1[0] == $tempMousePos2[0] And $tempMousePos1[1] == $tempMousePos2[1] Then
- BlockInput($BI_DISABLE)
- MouseClick($MOUSE_CLICK_LEFT, $X_CCPosition, $Y_CCPosition, 1, 1)
- ;~ ControlClick(HWnd($CLIENT_REGISTERED[0][1]), "", "", "left", 1, Number($X_CCPosition), Number($Y_CCPosition))
- BlockInput($BI_ENABLE)
- MouseMove($tempMousePos2[0], $tempMousePos2[1], 1)
- $LAST_HEAL_CAST = TimerInit()
- Local $diff = TimerDiff($time)
- ConsoleWrite(@CRLF & "=============Func ActionClickHP=============")
- ConsoleWrite(@CRLF & "MouseClickPosition = " & $X_CCPosition & "x" & $Y_CCPosition)
- ConsoleWrite(@CRLF & "Process Time: " & $diff)
- ConsoleWrite(@CRLF & "============================================")
- EndIf
- ;ControlClick(WinGetHandle("[CLASS:Qt5QWindowOwnDCIcon]"),"",0,"left",1,215,713)
- EndFunc ;==>ActionClick
- Func ActionHotkey($Hotkey)
- ConsoleWrite(@CRLF & "Press Hotkey: {" & $Hotkey & "}")
- If $Hotkey == "F1" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F1}")
- ElseIf $Hotkey == "F2" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F2}")
- ElseIf $Hotkey == "F3" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F3}")
- ElseIf $Hotkey == "F4" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F4}")
- ElseIf $Hotkey == "F5" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F5}")
- ElseIf $Hotkey == "F6" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F6}")
- ElseIf $Hotkey == "F7" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F7}")
- ElseIf $Hotkey == "F8" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F8}")
- ElseIf $Hotkey == "F9" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F9}")
- ElseIf $Hotkey == "F10" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F10}")
- ElseIf $Hotkey == "F11" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F11}")
- ElseIf $Hotkey == "F12" Then
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F12}")
- EndIf
- $LAST_HEAL_CAST = TimerInit()
- EndFunc ;==>ActionHotkey
- Func ActionText($Text)
- ConsoleWrite(@CRLF & "Send Text: {" & $Text & "}")
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "",$Text)
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{ENTER}")
- $LAST_HEAL_CAST = TimerInit()
- EndFunc ;==>ActionHotkey
- Func ActionCureText($Text)
- ConsoleWrite(@CRLF & "Send Cure/Hold Text: {" & $Text & "}")
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "",$Text)
- ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{ENTER}")
- $LAST_CURE_CAST = TimerInit()
- EndFunc
- Func My_WM_COMMAND($hWnd, $imsg, $iwParam, $ilParam)
- If WinExists($GUI_SelfHealer_Settings) And BitAND(WinGetState($GUI_SelfHealer_Settings), 2) Then
- Local $setHK = False
- $nNotifyCode = BitShift($iwParam, 16)
- $nID = BitAND($iwParam, 0x0000FFFF)
- $hCtrl = $ilParam
- If $nNotifyCode = $EN_CHANGE Then
- If $hCtrl = GUICtrlGetHandle($input_SelfHealer_Condition_Is) Then
- If GUICtrlRead($input_SelfHealer_Condition_Is) <> "" Then
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- Local $PreviousIsText = $StringSplit[3]
- Local $UpdatedIsText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & GUICtrlRead($input_SelfHealer_Condition_Is) & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedIsText)
- EndIf
- ElseIf $hCtrl = GUICtrlGetHandle($input_SelfHealer_Condition_ManaCost) Then
- If GUICtrlRead($input_SelfHealer_Condition_ManaCost) <> "" Then
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- Local $PreviousManaCostText = $StringSplit[4]
- Local $UpdatedManaCostText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & GUICtrlRead($input_SelfHealer_Condition_ManaCost) & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedManaCostText)
- EndIf
- ElseIf $hCtrl = GUICtrlGetHandle($input_Text_SelfHealer_Condition_Cast) Then
- If GUICtrlRead($input_Text_SelfHealer_Condition_Cast) <> "" Then
- Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- Local $PreviousCastText = $StringSplit[6]
- Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & GUICtrlRead($input_Text_SelfHealer_Condition_Cast) & ":" & $StringSplit[7]
- _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
- EndIf
- EndIf
- EndIf
- Return $GUI_RUNDEFMSG
- EndIf
- EndFunc ;==>My_WM_COMMAND
- Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam)
- Local $hListView, $tNMHDR, $hWndFrom, $iCode
- $hListView = $list_SelfHealer_Conditions
- If Not IsHWnd($hListView) Then $hListView = GUICtrlGetHandle($list_SelfHealer_Conditions)
- $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
- $hWndFrom = HWnd(DllStructGetData($tNMHDR, "HwndFrom"))
- $iCode = DllStructGetData($tNMHDR, "Code")
- Switch $hWndFrom
- Case $hListView
- Switch $iCode
- Case $LVN_ITEMCHANGED
- Local $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
- Local $iItem = DllStructGetData($tInfo, "Item")
- If $iItem == Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions)) Then
- ;ConsoleWrite("---> Item " & $iItem + 1 & " has been selected" & @LF)
- EndIf
- If _GUICtrlListView_GetItemChecked($hListView, $iItem) = True Then
- ConsoleWrite("---> Item " & $iItem + 1 & " has checked" & @LF)
- EndIf
- Case $NM_CLICK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
- $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
- $clickedItemIndex = DllStructGetData($tInfo, "Index")
- ConsoleWrite("---> Item " & $clickedItemIndex & " has been clicked and selected" & @LF)
- Local $selected = _GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions)
- If $clickedItemIndex >= 0 And $selected == $clickedItemIndex Then
- Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $clickedItemIndex)
- Local $StringSplit = StringSplit($selectedItemText, ":", 1)
- Local $CurHPMP = $StringSplit[1]
- Local $Operator = $StringSplit[2]
- Local $Ammount = $StringSplit[3]
- Local $ManaCost = $StringSplit[4]
- Local $CastType = $StringSplit[5]
- Local $CastKey = $StringSplit[6]
- Local $CastDelay = $StringSplit[7]
- If $CurHPMP == "CurHP" Then
- $CurHPMP = "Current Health"
- ElseIf $CurHPMP == "CurMP" Then
- $CurHPMP = "Current Mana"
- EndIf
- If $Operator == ">" Then
- $Operator = "Above"
- ElseIf $Operator == "<" Then
- $Operator = "Below"
- EndIf
- If $CastType == "H" Then
- $CastType = "Hotkey"
- ElseIf $CastType == "T" Then
- $CastType = "Text"
- ElseIf $CastType == "C" Then
- $CastType = "Click"
- EndIf
- GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When,$CurHPMP)
- GUICtrlSetData($label_Operator_SelfHealer_Condition_Is,$Operator)
- GUICtrlSetData($input_SelfHealer_Condition_Is,$Ammount)
- GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast,$CastType)
- GUICtrlSetData($input_SelfHealer_Condition_ManaCost,$ManaCost)
- If $CastType == "Text" Then
- GUICtrlSetData($input_Text_SelfHealer_Condition_Cast,$CastKey)
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_SHOW)
- ElseIf $CastType == "Hotkey" Then
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_SHOW)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- ElseIf $CastType == "Click" Then
- GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_SHOW)
- GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
- GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
- EndIf
- EndIf
- Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
- $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
- ConsoleWrite("---> Item " & DllStructGetData($tInfo, "Index") & " has been double clicked" & @LF)
- EndSwitch
- EndSwitch
- Return $GUI_RUNDEFMSG
- EndFunc ;==>WM_NOTIFY
- Func _Login()
- _GUICtrlEdit_ShowBalloonTip($input_Login_info, "", "Under construction...", $TTI_INFO)
- Return
- Local $sUsername = "test", $sPassword = "And!o1991"
- If Not StringStripWS($sUsername, 8) Or Not StringStripWS($sPassword, 8) Then ; no username and/or password entered
- MsgBox(262192, "Warning", "You must enter a username and password")
- Return
- EndIf
- Switch _LoginCheck($sUsername, $sPassword, $wsLoginURL)
- Case $WL_RESULT_ERROR ; remote errror
- MsgBox(262160, "Error", "The server encountered an error, please try again later.")
- Case $WL_RESULT_FAILED ; login failed
- MsgBox(262192, "Failed", "Invalid username and/or password")
- Case $WL_RESULT_SUCCESS ; login was successfull
- MsgBox(262208, "Success", "Your credentials seem to be valid.")
- ; here you can set a var to true or something to check in the rest of the script
- Case Else ; unexpected return
- MsgBox(262160, "Unexpected Result", "Something went wrong")
- EndSwitch
- EndFunc ;==>_Login
- Func _LoginCheck($sUsername, $sPassword, $sURL)
- Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") ; create HTTP object
- $oHTTP.Open("POST", $sURL, False) ; set method (POST) and URL
- $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
- $oHTTP.SetRequestHeader("Connection", "keep-alive")
- $oHTTP.SetRequestHeader("User-Agent", "MyApp/1.0")
- $oHTTP.Send("username=" & $sUsername & "&password=" & $sPassword) ; set username and password then send the request
- If $oHTTP.Status == 200 Then Return SetError(0, 0, $oHTTP.ResponseText) ; return response text
- Return SetError(1, $oHTTP.Status, 0)
- EndFunc ;==>_LoginCheck
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement