Advertisement
Dommaster

Zerobot

Feb 19th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 194.78 KB | None | 0 0
  1. #RequireAdmin
  2. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  3. #AutoIt3Wrapper_Icon=..\Desktop\Healbot.ico
  4. #AutoIt3Wrapper_Outfile=ZeroBot Self Healer _Taleon_[BSE].Exe
  5. #AutoIt3Wrapper_Res_Fileversion=0.0.0.94
  6. #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
  7. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  8. #include <IE.au3>
  9. #include <Inet.au3>
  10. #include <InetConstants.au3>
  11. ;************FOR GUI***********
  12. #include <GUIConstantsEx.au3>
  13. #include <GuiListBox.au3>
  14. #include <WindowsConstants.au3>
  15. #include <WinAPIFiles.au3>
  16. ;**********FOR BUTTON **********
  17. #include <ButtonConstants.au3>
  18. #include <StaticConstants.au3>
  19. ;**********FOR STRINGS **********
  20. #include <StringConstants.au3>
  21. #include <String.au3>
  22. ;**********FOR COMBOBOX **********
  23. #include <StringConstants.au3>
  24. #include <EditConstants.au3>
  25. #include <GuiEdit.au3>
  26. #include <GuiComboBox.au3>
  27. ;***********FOR LISTVIEW**********
  28. #include <ListviewConstants.au3>
  29. #include <GuiListView.au3>
  30.  
  31. ;**********FOR FONTS **********
  32. #include <FontConstants.au3>
  33. ;**********FOR PROCESS **********
  34. #include <Process.au3>
  35. #include <SendMessage.au3>
  36.  
  37. #include <Array.au3>
  38.  
  39. #include <Timers.au3>
  40.  
  41. #include <TabConstants.au3>
  42. #include <ButtonConstants.au3>
  43.  
  44.  
  45.  
  46. #include <GDIPlus.au3>
  47. #include <WinAPIDiag.au3>
  48. #include <Misc.au3>
  49. #include <ScreenCapture.au3>
  50.  
  51. #include <ColorConstants.au3>
  52.  
  53. #include <IsPressed_UDF.au3>
  54.  
  55. #include <_PixelGetColor.au3>
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. ;~ If Not IsAdmin() Then
  63. ;~ Exit
  64. ;~ EndIf
  65.  
  66.  
  67.  
  68. Global Const $WL_RESULT_ERROR = 'e' ; this will be the page output on error (unable to connect to db)
  69. Global Const $WL_RESULT_FAILED = 'f' ; this will be the page output on failure (invalid username/password)
  70. Global Const $WL_RESULT_SUCCESS = 's' ; ; this will be the page output on success (valid username/password)
  71.  
  72. ;~ Global $wsLoginURL = 'http://localhost/app_login.php' ; the URL to the PHP login page
  73. Global $wsLoginURL = 'http://localhost/app_login.php' ; the URL to the PHP login page
  74.  
  75.  
  76.  
  77. ;============ C L I E N T I N F O ===========================
  78. Global $CLIENTS_DETECTED = 0
  79. Global $CLIENT_REGISTERED
  80. Global $CLIENT_CHARACTER_NAME
  81.  
  82. Global $FIRST_SCAN = 0
  83.  
  84. ;============ C H A R A C T E R I N F O ===========================
  85. Global $CHARACTER_HP, $CHARACTER_MP
  86. Global $EQ_COLLAPSE_STATE
  87. ;=======================================
  88.  
  89.  
  90.  
  91. ;=========== S U P P O R T G L O B A L S T A T E S =================
  92. Global $AntiIdle = 0
  93.  
  94. Global $CURE_POISON = 0
  95. Global $CURE_CURSE = 0
  96. Global $CURE_BLEED = 0
  97. Global $CURE_BURN = 0
  98. Global $CURE_ELEC = 0
  99. Global $CURE_PARA = 0
  100. Global $HOLD_HASTE = 0
  101. Global $HOLD_INVISIBLE = 0
  102. Global $HOLD_MAGICSHIELD = 0
  103. Global $HOLD_RECOVERY = 0
  104.  
  105. Global $CONDITION_CURE_POX[4] = ["exana pox","Text",20,6000]
  106. Global $CONDITION_CURE_CURSE[4] = ["exana mort","Text",40,6000]
  107. Global $CONDITION_CURE_BLEED[4] = ["exana kor","Text",30,6000]
  108. Global $CONDITION_CURE_BURN[4] = ["exana flam","Text",30,6000]
  109. Global $CONDITION_CURE_ELEC[4] = ["exana vis","Text",30,6000]
  110. Global $CONDITION_CURE_PARA[4] = ["exura","Text",20,6000]
  111. Global $CONDITION_HOLD_HASTE[4] = ["utani hur","Text", 60, 2000]
  112. Global $CONDITION_HOLD_INVISIBLE[4] = ["utana vid","Text",440,2000]
  113. Global $CONDITION_HOLD_MAGICSHIELD[4] = ["utamo vita","Text",50,2000]
  114. Global $CONDITION_HOLD_RECOVERY[4] = ["utura","Text",65,2000]
  115.  
  116. Global $LAST_CURE_POX_CAST = TimerInit()
  117. Global $LAST_CURE_CURSE_CAST = TimerInit()
  118. Global $LAST_CURE_BLEED_CAST = TimerInit()
  119. Global $LAST_CURE_BURN_CAST = TimerInit()
  120. Global $LAST_CURE_ELEC_CAST = TimerInit()
  121. Global $LAST_CURE_PARA_CAST = TimerInit()
  122. Global $LAST_HOLD_HASTE_CAST = TimerInit()
  123. Global $LAST_HOLD_INVISIBLE_CAST = TimerInit()
  124. Global $LAST_HOLD_MAGICSHIELD_CAST = TimerInit()
  125. Global $LAST_HOLD_RECOVERY_CAST = TimerInit()
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132. ;============ Tibia Client Positions ================
  133. Global $TIBIA_WINDOW_X
  134. Global $TIBIA_WINDOW_Y
  135. Global $TIBIA_WINDOW_WIDTH
  136. Global $TIBIA_WINDOW_HEIGHT
  137.  
  138. Global $MP_UNIQUE_COLOR_POSITION
  139. Global $STOREI_NBOX_UNIQUE_COLOR_POSITION
  140.  
  141. Global $EQ_COLLAPSE_RECTANGLE[4], $EQ_COLLAPSE_RECTANGLE_CHECKSUM
  142. Global $CONDITION_BAR_RECTANGLE[4], $CONDITION_BAR_RECTANGLE_CHECKSUM
  143.  
  144. Global $HP_RECTANGLE[4], $HP_RECTANGLE_CHECKSUM, $HP_RECTANGLE_CHECKSUM_CAST_TIMING
  145. Global $MP_RECTANGLE[4], $MP_RECTANGLE_CHECKSUM, $MP_RECTANGLE_CHECKSUM_CAST_TIMING
  146. ;====================================================
  147.  
  148.  
  149. ;====== Tibia Window States ======
  150. Global $TibiaWindowScan = 0
  151. ;=================================
  152.  
  153.  
  154.  
  155. ;====== Support Settings ======
  156. Global $Support = 0
  157. Global $AutoHeal_FirstStart = 0
  158. Global $HP_CONDITION, $MP_CONDITION
  159. Global $HP_CONDITION_ACTION_POS, $MP_CONDITION_ACTION_POS
  160. Global $HP_CONDITION_HOTKEY = 0, $MP_CONDITION_HOTKEY = 0
  161.  
  162. Global $HOTKEY_HEX_INDEX[12] = ["70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7A", "7B"]
  163.  
  164. Global $CONDITIONS[2] = ["1", "CurHP:<:300:20:H:F2:500"]
  165.  
  166. Global $CAST_DELAY = 900
  167. Global $LAST_HEAL_CAST = TimerInit()
  168.  
  169. Global $CURE_CAST_DELAY = 1000
  170. Global $LAST_CURE_CAST = TimerInit()
  171.  
  172. Global $CURRENT_STAT_INDEX[2] = ["Current Health", "Current Mana"]
  173. Global $OPERATOR_INDEX[2] = ["Below", "Above"]
  174. Global $CAST_TYPE_INDEX[3] = ["Click", "Hotkey", "Text"]
  175. ;=================================
  176.  
  177. ;========== A N T I I D L E ===============
  178. Global $TIBIA_IDLE_TIME = TimerInit()
  179. Global $ANTI_IDLE_TIME = (1000 * 60) * 10
  180.  
  181.  
  182.  
  183.  
  184.  
  185. ;===== TEMP INITIALIZED GUI VARIABLES =======
  186. Global $GUI_TibiaPixelReader
  187. ;============================================
  188.  
  189. Global $Label_Status
  190. ;~ ConsoleWrite(@CRLF & "#############################################")
  191. ;~ ConsoleWrite(@CRLF & "#############################################")
  192. ;~ ConsoleWrite(@CRLF & "########## PIXEL DIAGNOSE TEST ##############")
  193. ;~ ConsoleWrite(@CRLF & "#############################################")
  194. ;~ Local $time = TimerInit()
  195. ;~ Local $result = PixelGetColor(1057,358,"[CLASS:Qt5QWindowOwnDCIcon]")
  196. ;~ Local $result = PixelSearch(1057,358,@DesktopWidth,@DesktopHeight,0x42415c,0,2,"[CLASS:Qt5QWindowOwnDCIcon]")
  197. ;~ Local $diff = TimerDiff($time)
  198. ;~ ConsoleWrite(@CRLF & "PROCESS TIME: " & $diff)
  199. ;~ If $result == -1 Then
  200. ;~ ConsoleWrite(@CRLF & "COLOR NOT FOUND: Error Code[" & $result & "]")
  201. ;~ Else
  202. ;~ ConsoleWrite(@CRLF & "COLOR FOUND: Hex[" & Hex($result,6) & "]")
  203. ;~ EndIf
  204. ;~ ConsoleWrite(@CRLF & "#############################################")
  205. ;~ ConsoleWrite(@CRLF & "########## PIXEL DIAGNOSE TEST ##############")
  206. ;~ ConsoleWrite(@CRLF & "#############################################")
  207. ;~ ConsoleWrite(@CRLF & "#############################################")
  208.  
  209.  
  210. ;~ ActivateTibiaWindow()
  211.  
  212. ;~ If TibiaWindowIsFocused() Then
  213. ;~ Local $iCheckSum
  214.  
  215. ;~ $iCheckSum = PixelChecksum(1631, 156, 1636, 163)
  216. ;~ ConsoleWrite(@CRLF & "CHECKSUM = " & $iCheckSum)
  217.  
  218. ;~ Sleep(9000)
  219. ;~ ActivateTibiaWindow()
  220. ;~ Sleep(2000)
  221. ;~ _PixelSetColor(1631,156,0x000000,0)
  222. ;~ _PixelSetColor(1632,156,0x000000,0)
  223. ;~ _PixelSetColor(1633,156,0x000000,0)
  224. ;~ Sleep(2000)
  225. ;~ Exit
  226.  
  227. ;~ $iCheckSum = PixelChecksum(1631, 156, 1636, 163)
  228. ;~ ConsoleWrite(@CRLF & "CHECKSUM = " & $iCheckSum)
  229. ;~ EndIf
  230.  
  231.  
  232. ;~ ActivateTibiaWindow()
  233.  
  234.  
  235. ;~ If TibiaWindowIsFocused() Then
  236. ;~ Local $time = TimerInit()
  237.  
  238. ;~ Local $hDll = DllOpen("gdi32.dll")
  239.  
  240. ;~ Local $vDC = _PixelGetColor_CreateDC($hDll)
  241.  
  242. ;~ Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
  243.  
  244. ;~ For $x = 1632 To 1636
  245. ;~ For $y = 156 To 163
  246. ;~ Local $sColor = _PixelGetColor_GetPixel($vDC, $x,$y, $hDll)
  247. ;~ Local $sColor = PixelGetColor($x,$y)
  248. ;~ ConsoleWrite(@CRLF & "Color: " & $sColor)
  249. ;~ Next
  250. ;~ Next
  251.  
  252. ;~ _PixelGetColor_ReleaseRegion($vRegion)
  253.  
  254. ;~ _PixelGetColor_ReleaseDC($vDC,$hDll)
  255.  
  256. ;~ DllClose($hDll)
  257.  
  258. ;~ Local $diff = TimerDiff($time)
  259.  
  260. ;~ ConsoleWrite(@CRLF & "COLOR: " & $sColor)
  261. ;~ ConsoleWrite(@CRLF & "TIME: " & $diff)
  262. ;~ EndIf
  263.  
  264.  
  265. ;========== DISABLE DWM ON WIN7 & VISTA =========================
  266. ;DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", 0)
  267. ;================================================================
  268. ;Run(@ComSpec & " /c cd net stop uxsms", "", @SW_SHOW) --- Stop DWM
  269. ;Run(@ComSpec & " /c cd net start uxsms", "", @SW_SHOW) --- Start DWM
  270.  
  271. Opt("GUIOnEventMode", 1)
  272.  
  273.  
  274.  
  275. GUI_ClientSelect()
  276. ;~ GUI_ConditionManager()
  277. ;~ GUI_Main()
  278.  
  279.  
  280. While 1
  281. Sleep(10)
  282. CheckProcessForTibiaClient()
  283. AntiIdle()
  284.  
  285. If TibiaWindowChangedPos() And TibiaWindowIsFocused() Then
  286. UpdateStatusLabel("rescan...")
  287. TibiaWindowScan()
  288. Else
  289. If SupportActive() And TibiaWindowIsFocused() And CharacterLogedIn() Then
  290. AutoHeal()
  291. AutoCondition()
  292. Else
  293. ToolTip("")
  294. HotKeySet("^{DEL}")
  295. EndIf
  296. EndIf
  297. WEnd
  298.  
  299. ;========== GUI =========================================
  300.  
  301. Func GUI_ClientSelect()
  302. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  303.  
  304. Global $GUI_ClientSelect = GUICreate("ZeroBot Client Select", 320, 150, -1, -1, -1, $WS_EX_TOPMOST)
  305. GUISetOnEvent($GUI_EVENT_CLOSE, "CloseBot")
  306.  
  307. Global $list_ClientChoice = GUICtrlCreateListView("", 25, 15, 270, 100)
  308. _GUICtrlListView_SetExtendedListViewStyle($list_ClientChoice, BitOR($LVS_EX_GRIDLINES, $LVS_NOCOLUMNHEADER, $LVS_EX_FULLROWSELECT, $LVS_EX_FLATSB))
  309.  
  310. _GUICtrlListView_SetBkColor($list_ClientChoice, 0x595959)
  311. _GUICtrlListView_SetTextColor($list_ClientChoice, 0xFFFFFF)
  312. _GUICtrlListView_SetTextBkColor($list_ClientChoice, 0x595959)
  313.  
  314. _GUICtrlListView_InsertColumn($list_ClientChoice, 0, "Client", 123)
  315. _GUICtrlListView_InsertColumn($list_ClientChoice, 1, "HWND", 123)
  316.  
  317. Global $input_ClientSelect_hidedn_infobox = GUICtrlCreateInput("",25,15)
  318. GUICtrlSetState(-1,$GUI_HIDE)
  319.  
  320. GUICtrlCreateButton("Start",25,120,60,20)
  321. GUICtrlSetBkColor(-1, $TextBkColor)
  322. GUICtrlSetColor(-1, $FontColor)
  323. GUICtrlSetOnEvent(-1,"OnClick_ClientSelect_Start")
  324.  
  325. GUICtrlCreateButton("Login",90,120,60,20)
  326. GUICtrlSetBkColor(-1, $TextBkColor)
  327. GUICtrlSetColor(-1, $FontColor)
  328. GUICtrlSetOnEvent(-1,"_Login")
  329.  
  330. Global $input_Login_info = GUICtrlCreateInput("", 90, 120)
  331. GUICtrlSetState($input_Login_info,$GUI_HIDE)
  332.  
  333.  
  334. GUISetBkColor(0x4c4c4c, $GUI_ClientSelect)
  335. GUISetState(@SW_SHOW, $GUI_ClientSelect)
  336. ;~ _Vista_EnableBlurBehind($GUI_ClientChoice)
  337. EndFunc
  338.  
  339. Func GUI_Main()
  340. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  341.  
  342. Global $GUI_Main = GUICreate("ZeroBot Menu", 370, 120, -1, -1, -1, $WS_EX_TOPMOST)
  343. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Close")
  344.  
  345. GUICtrlCreateLabel("Status:", 25, 10, 150)
  346. GUICtrlSetColor(-1, $FontColor)
  347.  
  348. Global $Label_Status = GUICtrlCreateLabel("", 100, 10, 50, 20)
  349. GUICtrlSetColor(-1, $FontColor)
  350.  
  351. GUICtrlCreateLabel("Character:", 25, 30, 100)
  352. GUICtrlSetColor(-1, $FontColor)
  353.  
  354. Global $Label_Character = GUICtrlCreateLabel("", 100, 30, 100, 20)
  355. GUICtrlSetColor(-1, $FontColor)
  356.  
  357. GUICtrlCreateLabel("Hitpoints:", 25, 50)
  358. GUICtrlSetColor(-1, $FontColor)
  359.  
  360. Global $Label_HP = GUICtrlCreateLabel("", 100, 50, 60, 20)
  361. GUICtrlSetColor(-1, $FontColor)
  362.  
  363. GUICtrlCreateLabel("Manapoints:", 25, 70)
  364. GUICtrlSetColor(-1, $FontColor)
  365.  
  366. Global $Label_MP = GUICtrlCreateLabel("", 100, 70, 60, 20)
  367. GUICtrlSetColor(-1, $FontColor)
  368.  
  369. ;~ GUICtrlCreateLabel("Support", 194, 12)
  370. ;~ GUICtrlSetColor(-1, $FontColor)
  371.  
  372.  
  373.  
  374. GUICtrlCreateLabel("Anti-Idle", 45, 95)
  375. GUICtrlSetColor(-1, $FontColor)
  376.  
  377. Global $chkbox_AntiIdle = GUICtrlCreateCheckbox("", 25, 95, 15, 15)
  378. GUICtrlSetOnEvent($chkbox_AntiIdle, "OnClick_chkbox_AntiIdle")
  379. GUICtrlSetColor(-1, $FontColor)
  380.  
  381. GUICtrlCreateLabel("Turn Off DWM", 130, 95)
  382. GUICtrlSetColor(-1, $FontColor)
  383.  
  384. Global $chkbox_DWM = GUICtrlCreateCheckbox("", 110, 95, 15, 15)
  385. GUICtrlSetOnEvent($chkbox_DWM, "OnClick_chkbox_DWM")
  386. GUICtrlSetColor(-1, $FontColor)
  387.  
  388.  
  389.  
  390.  
  391. ;==================== TOOLS CHECKBOX & BUTTON ===============================
  392. ;~ Global $chkbox_Tools = GUICtrlCreateCheckbox("", 210, 10, 15, 15)
  393. ;~ GUICtrlSetOnEvent($chkbox_Tools, "")
  394. ;~ GUICtrlSetColor(-1, $FontColor)
  395.  
  396. GUICtrlCreateButton("Scan", 285, 10, 80, 20)
  397. GUICtrlSetOnEvent(-1, "OnClick_Scan")
  398. GUICtrlSetColor(-1, $FontColor)
  399. GUICtrlSetBkColor(-1, 0x696969)
  400.  
  401. Global $input_Scan_info = GUICtrlCreateInput("", 285, 10)
  402. GUICtrlSetState($input_Scan_info,$GUI_HIDE)
  403. ;==================== SUPPORT CHECKBOX & BUTTON ===============================
  404. Global $chkbox_Support = GUICtrlCreateCheckbox("", 265, 30, 15, 15)
  405. GUICtrlSetOnEvent($chkbox_Support, "OnClick_chkbox_Support")
  406. GUICtrlSetColor(-1, $FontColor)
  407.  
  408. GUICtrlCreateButton("Support", 285, 30, 80, 20)
  409. GUICtrlSetOnEvent(-1, "GUI_Support")
  410. GUICtrlSetColor(-1, $FontColor)
  411. GUICtrlSetBkColor(-1, 0x696969)
  412. ;==================== TARGETING CHECKBOX & BUTTON ===============================
  413. Global $chkbox_Targeting = GUICtrlCreateCheckbox("", 265, 50, 15, 15)
  414. GUICtrlSetOnEvent($chkbox_Targeting, "")
  415. GUICtrlSetColor(-1, $FontColor)
  416.  
  417. GUICtrlCreateButton("Targeting", 285, 50, 80, 20)
  418. GUICtrlSetOnEvent(-1, "")
  419. GUICtrlSetColor(-1, $FontColor)
  420. GUICtrlSetBkColor(-1, 0x696969)
  421. ;==================== WALKER CHECKBOX & BUTTON ===============================
  422. Global $chkbox_Walker = GUICtrlCreateCheckbox("", 265, 70, 15, 15)
  423. GUICtrlSetOnEvent($chkbox_Walker, "")
  424. GUICtrlSetColor(-1, $FontColor)
  425.  
  426. GUICtrlCreateButton("Walker", 285, 70, 80, 20)
  427. GUICtrlSetOnEvent(-1, "GUI_Walker")
  428. GUICtrlSetColor(-1, $FontColor)
  429. GUICtrlSetBkColor(-1, 0x696969)
  430. ;==================== LOOTER CHECKBOX & BUTTON ===============================
  431. Global $chkbox_Looter = GUICtrlCreateCheckbox("", 265, 90, 15, 15)
  432. GUICtrlSetOnEvent($chkbox_Looter, "")
  433. GUICtrlSetColor(-1, $FontColor)
  434.  
  435. GUICtrlCreateButton("Looter", 285, 90, 80, 20)
  436. GUICtrlSetOnEvent(-1, "")
  437. GUICtrlSetColor(-1, $FontColor)
  438. GUICtrlSetBkColor(-1, 0x696969)
  439.  
  440.  
  441.  
  442. ;==================== DONATE BUTTON ===============================
  443. GUICtrlCreateButton("DONATE", 9315, 90, 50, 20)
  444. GUICtrlSetOnEvent(-1, "Donate")
  445. GUICtrlSetColor(-1, $FontColor)
  446. GUICtrlSetBkColor(-1, 0x696969)
  447.  
  448. GUISetBkColor(0x4c4c4c, $GUI_Main)
  449. GUISetState(@SW_SHOW, $GUI_Main)
  450. EndFunc ;==>GUI_Main
  451. Func GUI_Close()
  452. ;~ DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", 1)
  453. GUIDelete($GUI_Main)
  454. GUI_ClientSelect()
  455. EndFunc ;==>GUI_Close
  456.  
  457.  
  458. Func GUI_Support()
  459. GUISetState(@SW_HIDE, $GUI_Main)
  460.  
  461. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  462.  
  463. Global $GUI_Support = GUICreate("ZeroBot Support", 250, 75, -1, -1, -1, $WS_EX_TOPMOST)
  464. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Support_Close")
  465.  
  466.  
  467.  
  468. ;==================== SELF HEALER BUTTON ===============================
  469. GUICtrlCreateButton("Self Healer", 25, 10, 100, 25)
  470. GUICtrlSetOnEvent(-1, "GUI_SelfHealer_Settings")
  471. GUICtrlSetColor(-1, $FontColor)
  472. GUICtrlSetBkColor(-1, 0x696969)
  473.  
  474. ;==================== CONDITION MANAGER BUTTON ===============================
  475. GUICtrlCreateButton("Condition Manager", 25, 40, 100, 25)
  476. GUICtrlSetOnEvent(-1, "GUI_ConditionManager")
  477. GUICtrlSetColor(-1, $FontColor)
  478. GUICtrlSetBkColor(-1, 0x696969)
  479. ;==================== EQ MANAGER BUTTON ===============================
  480. GUICtrlCreateButton("EQ Manager", 130, 40, 100, 25)
  481. GUICtrlSetOnEvent(-1, "")
  482. GUICtrlSetColor(-1, $FontColor)
  483. GUICtrlSetBkColor(-1, 0x696969)
  484.  
  485.  
  486.  
  487. GUISetBkColor(0x4c4c4c, $GUI_Support)
  488. GUISetState(@SW_SHOW, $GUI_Support)
  489. EndFunc
  490. Func GUI_Support_Close()
  491. GUIDelete($GUI_Support)
  492. GUISetState(@SW_SHOW, $GUI_Main)
  493. EndFunc
  494.  
  495. Func GUI_Walker()
  496.  
  497. Local $initTime = TimerInit()
  498.  
  499. Local $hDll = DllOpen("gdi32.dll")
  500. Local $vDC = _PixelGetColor_CreateDC($hDll)
  501. Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
  502.  
  503. Local $tempArray
  504. Local $color
  505.  
  506. For $x = 1513 To 1617
  507. For $y = 28 To 132
  508. $color = _PixelGetColor_GetPixel($vDC, 1513,28, $hDll)
  509. _ArrayAdd($tempArray, $color)
  510. Next
  511. Next
  512.  
  513. Local $diffTime = TimerDiff($initTime)
  514.  
  515. _PixelGetColor_ReleaseRegion($vRegion)
  516. _PixelGetColor_ReleaseDC($vDC,$hDll)
  517. DllClose($hDll)
  518.  
  519. MouseClick($MOUSE_CLICK_LEFT, 1558, 85, 1, 1)
  520.  
  521. EndFunc
  522.  
  523. Func GUI_SelfHealer_Settings()
  524. GUISetState(@SW_HIDE, $GUI_Support)
  525.  
  526. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  527.  
  528. Global $GUI_SelfHealer_Settings = GUICreate("Self Healer", 565, 200, -1, -1, -1, $WS_EX_TOPMOST)
  529. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_SelfHealer_Settings_Close")
  530.  
  531. ;====================== S E C T I O N S P E L L H E A L I N G ================================
  532.  
  533.  
  534. $label_title_SpellHealing = GUICtrlCreateLabel("Spell && Item Healing", 25, 15, 100, 17)
  535. GUICtrlSetColor(-1, $FontColor)
  536.  
  537. Global $list_SelfHealer_Conditions = GUICtrlCreateListView("", 25, 35, 215, 140)
  538. _GUICtrlListView_SetExtendedListViewStyle($list_SelfHealer_Conditions, BitOR($LVS_EX_GRIDLINES, $LVS_NOCOLUMNHEADER, $LVS_EX_FULLROWSELECT, $LVS_EX_FLATSB)) ;, $LVS_EX_CHECKBOXES
  539.  
  540. _GUICtrlListView_SetBkColor($list_SelfHealer_Conditions, 0x363636)
  541. _GUICtrlListView_SetTextColor($list_SelfHealer_Conditions, 0xFFFFFF)
  542. _GUICtrlListView_SetTextBkColor($list_SelfHealer_Conditions, 0x363636)
  543.  
  544.  
  545.  
  546.  
  547. _GUICtrlListView_InsertColumn($list_SelfHealer_Conditions, 0, "Heal String", 193)
  548. ;~ _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:200:20:F:F1:500")
  549.  
  550. Load_SelfHealer_Conditions()
  551. ;=========== WHEN
  552. $label_SelfHealer_Condition_When = GUICtrlCreateLabel("When", 255, 35, 33, 17)
  553. GUICtrlSetColor(-1, $FontColor)
  554.  
  555. Global $btn_swipe_left_SelfHealer_Condition_When = GUICtrlCreateButton("<", 335, 35, 20, 20)
  556. GUICtrlSetOnEvent($btn_swipe_left_SelfHealer_Condition_When, "OnClick_btn_swipe_left_SelfHealer_Condition_When")
  557. GUICtrlSetColor(-1, $FontColor)
  558. GUICtrlSetBkColor(-1, 0x696969)
  559.  
  560. Global $label_CurrentStat_SelfHealer_Condition_When = GUICtrlCreateLabel("Current Health", 360, 35, 155, 17, $SS_CENTER)
  561. GUICtrlSetBkColor(-1, $TextBkColor)
  562. GUICtrlSetColor(-1, $FontColor)
  563.  
  564. Global $btn_swipe_right_SelfHealer_Condition_When = GUICtrlCreateButton(">", 520, 35, 20, 20)
  565. GUICtrlSetOnEvent($btn_swipe_right_SelfHealer_Condition_When, "OnClick_btn_swipe_right_SelfHealer_Condition_When")
  566. GUICtrlSetColor(-1, $FontColor)
  567. GUICtrlSetBkColor(-1, 0x646464)
  568.  
  569.  
  570.  
  571. ;=========== IS
  572. $label_SpellHealing_Is = GUICtrlCreateLabel("Is", 255, 60, 12, 17)
  573. GUICtrlSetColor(-1, $FontColor)
  574.  
  575. Global $btn_swipe_left_SelfHealer_Condition_Is = GUICtrlCreateButton("<", 335, 60, 20, 20)
  576. GUICtrlSetOnEvent($btn_swipe_left_SelfHealer_Condition_Is, "OnClick_btn_swipe_left_SelfHealer_Condition_Is")
  577. GUICtrlSetColor(-1, $FontColor)
  578. GUICtrlSetBkColor(-1, 0x696969)
  579.  
  580. Global $label_Operator_SelfHealer_Condition_Is = GUICtrlCreateLabel("Below", 360, 60, 110, 17, $SS_CENTER)
  581. GUICtrlSetBkColor(-1, $TextBkColor)
  582. GUICtrlSetColor(-1, $FontColor)
  583.  
  584. Global $btn_swipe_right_SelfHealer_Condition_Is = GUICtrlCreateButton(">", 475, 60, 20, 20)
  585. GUICtrlSetOnEvent($btn_swipe_right_SelfHealer_Condition_Is, "OnClick_btn_swipe_right_SelfHealer_Condition_Is")
  586. GUICtrlSetColor(-1, $FontColor)
  587. GUICtrlSetBkColor(-1, 0x646464)
  588.  
  589. Global $input_SelfHealer_Condition_Is = GUICtrlCreateInput("300", 500, 60, 40, 17, $ES_NUMBER, $TCS_BUTTONS)
  590. GUICtrlSetBkColor(-1, $TextBkColor)
  591. GUICtrlSetColor(-1, $FontColor)
  592.  
  593.  
  594.  
  595.  
  596.  
  597. ;=========== CAST
  598. $label_SpellHealing_Cast = GUICtrlCreateLabel("Cast", 255, 85, 25, 17)
  599. GUICtrlSetColor(-1, $FontColor)
  600.  
  601.  
  602. Global $btn_swipe_left_SelfHealer_Condition_Cast = GUICtrlCreateButton("<", 335, 85, 20, 20)
  603. GUICtrlSetOnEvent($btn_swipe_left_SelfHealer_Condition_Cast, "OnClick_btn_swipe_left_SelfHealer_Condition_Cast")
  604. GUICtrlSetColor(-1, $FontColor)
  605. GUICtrlSetBkColor(-1, 0x696969)
  606.  
  607.  
  608. Global $label_CastType_SelfHealer_Condition_Cast = GUICtrlCreateLabel("Hotkey", 360, 85, 80, 17, $SS_CENTER)
  609. GUICtrlSetBkColor(-1, $TextBkColor)
  610. GUICtrlSetColor(-1, $FontColor)
  611.  
  612. Global $btn_swipe_right_SelfHealer_Condition_Cast = GUICtrlCreateButton(">", 445, 85, 20, 20)
  613. GUICtrlSetOnEvent($btn_swipe_right_SelfHealer_Condition_Cast, "OnClick_btn_swipe_right_SelfHealer_Condition_Cast")
  614. GUICtrlSetColor(-1, $FontColor)
  615. GUICtrlSetBkColor(-1, 0x696969)
  616.  
  617. Global $btn_ClickPosition_SelfHealer_Condition_Cast = GUICtrlCreateButton("Position", 470, 85, 70, 20)
  618. GUICtrlSetOnEvent($btn_ClickPosition_SelfHealer_Condition_Cast, "OnClick_btn_ClickPosition_SelfHealer_Condition_Cast")
  619. GUICtrlSetColor(-1, $FontColor)
  620. GUICtrlSetBkColor(-1, 0x696969)
  621. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast,$GUI_HIDE)
  622.  
  623. Global $btn_Hotkey_SelfHealer_Condition_Cast = GUICtrlCreateButton("Hotkey", 470, 85, 70, 20)
  624. GUICtrlSetOnEvent($btn_Hotkey_SelfHealer_Condition_Cast, "OnClick_btn_Hotkey_SelfHealer_Condition_Cast")
  625. GUICtrlSetColor(-1, $FontColor)
  626. GUICtrlSetBkColor(-1, 0x696969)
  627. ;~ GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  628.  
  629. Global $input_Text_SelfHealer_Condition_Cast = GUICtrlCreateInput("exura", 470, 85, 70, 17, -1, $TCS_BUTTONS)
  630. GUICtrlSetBkColor(-1, $TextBkColor)
  631. GUICtrlSetColor(-1, $FontColor)
  632. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639. ;============= MANA COST
  640. $label_SpellHealing_ManaCost = GUICtrlCreateLabel("Mana Cost", 255, 110, 55, 17)
  641. GUICtrlSetColor(-1, $FontColor)
  642.  
  643. Global $input_SelfHealer_Condition_ManaCost = GUICtrlCreateInput("20", 335, 110, 40, 17, $ES_NUMBER, $TCS_BUTTONS)
  644. GUICtrlSetBkColor(-1, $TextBkColor)
  645. GUICtrlSetColor(-1, $FontColor)
  646.  
  647. $chkbox_SpellHealing_Randomize = GUICtrlCreateCheckbox("Randomize", 380, 110, 81, 17)
  648. GUICtrlSetColor(-1, $FontColor)
  649.  
  650.  
  651.  
  652.  
  653.  
  654. ;=========== CONTROLS
  655. $btn_SelfHealer_Settings_Delete = GUICtrlCreateButton("Delete", 305, 160, 75, 25)
  656. GUICtrlSetOnEvent($btn_SelfHealer_Settings_Delete, "OnClick_SelfHealer_Settings_Delete")
  657. GUICtrlSetColor(-1, $FontColor)
  658. GUICtrlSetBkColor(-1, 0x646464)
  659.  
  660. $btn_SelfHealer_Settings_New = GUICtrlCreateButton("New", 385, 160, 75, 25)
  661. GUICtrlSetOnEvent($btn_SelfHealer_Settings_New, "OnClick_SelfHealer_Settings_New")
  662. GUICtrlSetColor(-1, $FontColor)
  663. GUICtrlSetBkColor(-1, 0x646464)
  664.  
  665. $btn_SelfHealer_Settings_Save = GUICtrlCreateButton("OK", 465, 160, 75, 25)
  666. GUICtrlSetOnEvent($btn_SelfHealer_Settings_Save, "OnClick_SelfHealer_Settings_Save")
  667. GUICtrlSetColor(-1, $FontColor)
  668. GUICtrlSetBkColor(-1, 0x646464)
  669.  
  670.  
  671. GUISetBkColor(0x4c4c4c, $GUI_SelfHealer_Settings)
  672. GUISetState(@SW_SHOW)
  673.  
  674. LoadFirstEntryIntoSelfHealerListBox()
  675.  
  676. GUIRegisterMsg($WM_COMMAND, "My_WM_COMMAND")
  677. GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
  678. EndFunc ;==>GUI_SelfHealer_Settings
  679. Func GUI_SelfHealer_Settings_Close()
  680. GUIDelete($GUI_SelfHealer_Settings)
  681. GUISetState(@SW_SHOW, $GUI_Support)
  682. EndFunc ;==>GUI_SelfHealer_Settings_Close
  683.  
  684.  
  685. Func GUI_ConditionManager()
  686. GUISetState(@SW_HIDE, $GUI_Support)
  687.  
  688.  
  689. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  690.  
  691. Global $GUI_ConditionManager = GUICreate("Condition Manager", 480, 225, -1, -1, -1, $WS_EX_TOPMOST)
  692. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Close")
  693.  
  694. GUICtrlCreateLabel("Cure Conditions", 25, 25)
  695. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  696. GUICtrlSetColor(-1, 0xAEEDED)
  697.  
  698. ;========= CURE POX ====================================================
  699. GUICtrlCreateLabel("[pox]", 25, 45)
  700. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  701. GUICtrlSetColor(-1, $FontColor)
  702.  
  703.  
  704.  
  705. Global $btn_Hotkey_ConditionManager_Cast_Pox = GUICtrlCreateButton("Settings", 75, 42, 90, 20)
  706. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Pox, "GUI_ConditionManager_Settings_Pox")
  707. GUICtrlSetColor(-1, $FontColor)
  708. GUICtrlSetBkColor(-1, 0x696969)
  709.  
  710. Global $chkbox_ConditionManager_Pox = GUICtrlCreateCheckbox("", 185, 45, 15, 14)
  711. GUICtrlSetOnEvent($chkbox_ConditionManager_Pox, "OnClick_chkbox_CurePox")
  712. GUICtrlSetColor(-1, $FontColor)
  713.  
  714.  
  715. ;========= CURE CURSE ====================================================
  716. GUICtrlCreateLabel("[curse]", 25, 65)
  717. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  718. GUICtrlSetColor(-1, $FontColor)
  719.  
  720.  
  721. Global $btn_Hotkey_ConditionManager_Cast_Curse = GUICtrlCreateButton("Settings", 75, 62, 90, 20)
  722. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Curse, "GUI_ConditionManager_Settings_Curse")
  723. GUICtrlSetColor(-1, $FontColor)
  724. GUICtrlSetBkColor(-1, 0x696969)
  725.  
  726. Global $chkbox_ConditionManager_Curse = GUICtrlCreateCheckbox("", 185, 65, 15, 14)
  727. GUICtrlSetOnEvent($chkbox_ConditionManager_Curse, "OnClick_chkbox_CureCurse")
  728. GUICtrlSetColor(-1, $FontColor)
  729.  
  730.  
  731. ;========= CURE BLEEDING ====================================================
  732. GUICtrlCreateLabel("[bleed]", 25, 85)
  733. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  734. GUICtrlSetColor(-1, $FontColor)
  735.  
  736. Global $btn_Hotkey_ConditionManager_Cast_Curse = GUICtrlCreateButton("Settings", 75, 82, 90, 20)
  737. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Curse, "GUI_ConditionManager_Settings_Bleed")
  738. GUICtrlSetColor(-1, $FontColor)
  739. GUICtrlSetBkColor(-1, 0x696969)
  740.  
  741. Global $chkbox_ConditionManager_Bleed = GUICtrlCreateCheckbox("", 185, 85, 15, 14)
  742. GUICtrlSetOnEvent($chkbox_ConditionManager_Bleed, "OnClick_chkbox_CureBleed")
  743. GUICtrlSetColor(-1, $FontColor)
  744.  
  745.  
  746. ;========= CURE BURNING ====================================================
  747. GUICtrlCreateLabel("[burn]", 25, 105)
  748. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  749. GUICtrlSetColor(-1, $FontColor)
  750.  
  751. Global $btn_Hotkey_ConditionManager_Cast_Burn = GUICtrlCreateButton("Settings", 75, 102, 90, 20)
  752. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Burn, "GUI_ConditionManager_Settings_Burn")
  753. GUICtrlSetColor(-1, $FontColor)
  754. GUICtrlSetBkColor(-1, 0x696969)
  755.  
  756. Global $chkbox_ConditionManager_Burn = GUICtrlCreateCheckbox("", 185, 105, 15, 14)
  757. GUICtrlSetOnEvent($chkbox_ConditionManager_Burn, "OnClick_chkbox_CureBurn")
  758. GUICtrlSetColor(-1, $FontColor)
  759.  
  760.  
  761. ;========= CURE ELECTRICITY ====================================================
  762. GUICtrlCreateLabel("[elec]", 25, 125)
  763. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  764. GUICtrlSetColor(-1, $FontColor)
  765.  
  766. Global $btn_Hotkey_ConditionManager_Cast_Elec = GUICtrlCreateButton("Settings", 75, 122, 90, 20)
  767. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Elec, "GUI_ConditionManager_Settings_Elec")
  768. GUICtrlSetColor(-1, $FontColor)
  769. GUICtrlSetBkColor(-1, 0x696969)
  770.  
  771. Global $chkbox_ConditionManager_Elec = GUICtrlCreateCheckbox("", 185, 125, 15, 14)
  772. GUICtrlSetOnEvent($chkbox_ConditionManager_Elec, "OnClick_chkbox_CureElec")
  773. GUICtrlSetColor(-1, $FontColor)
  774.  
  775.  
  776. ;========= CURE PARALYZE====================================================
  777. GUICtrlCreateLabel("[para]", 25, 145)
  778. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  779. GUICtrlSetColor(-1, $FontColor)
  780.  
  781. Global $btn_Hotkey_ConditionManager_Cast_Para = GUICtrlCreateButton("Settings", 75, 142, 90, 20)
  782. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Para, "GUI_ConditionManager_Settings_Para")
  783. GUICtrlSetColor(-1, $FontColor)
  784. GUICtrlSetBkColor(-1, 0x696969)
  785.  
  786. Global $chkbox_ConditionManager_Para = GUICtrlCreateCheckbox("", 185, 145, 15, 14)
  787. GUICtrlSetOnEvent($chkbox_ConditionManager_Para, "OnClick_chkbox_CurePara")
  788. GUICtrlSetColor(-1, $FontColor)
  789.  
  790.  
  791. ;========= HOLD HASTE====================================================
  792. GUICtrlCreateLabel("Hold Conditions", 225, 25)
  793. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  794. GUICtrlSetColor(-1, 0xAEEDED)
  795.  
  796.  
  797. GUICtrlCreateLabel("[Haste]", 225, 45)
  798. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  799. GUICtrlSetColor(-1, $FontColor)
  800.  
  801.  
  802. Global $btn_Hotkey_ConditionManager_Cast_Haste = GUICtrlCreateButton("Settings", 275, 42, 90, 20)
  803. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Haste, "GUI_ConditionManager_Settings_Haste")
  804. GUICtrlSetColor(-1, $FontColor)
  805. GUICtrlSetBkColor(-1, 0x696969)
  806.  
  807. Global $chkbox_ConditionManager_Haste = GUICtrlCreateCheckbox("", 385, 45, 15, 14)
  808. GUICtrlSetOnEvent($chkbox_ConditionManager_Haste, "OnClick_chkbox_HoldHaste")
  809. GUICtrlSetColor(-1, $FontColor)
  810.  
  811.  
  812. ;========= HOLD INVISIBLE ====================================================
  813. GUICtrlCreateLabel("[UVid]", 225, 65)
  814. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  815. GUICtrlSetColor(-1, $FontColor)
  816.  
  817.  
  818. Global $btn_Hotkey_ConditionManager_Cast_Invisible = GUICtrlCreateButton("Settings", 275, 62, 90, 20)
  819. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Invisible, "GUI_ConditionManager_Settings_Invisible")
  820. GUICtrlSetColor(-1, $FontColor)
  821. GUICtrlSetBkColor(-1, 0x696969)
  822.  
  823. Global $chkbox_ConditionManager_Invisible = GUICtrlCreateCheckbox("", 385, 65, 15, 14)
  824. GUICtrlSetOnEvent($chkbox_ConditionManager_Invisible, "OnClick_chkbox_HoldInvisible")
  825. GUICtrlSetColor(-1, $FontColor)
  826.  
  827. ;========= HOLD MSHIELD ====================================================
  828. GUICtrlCreateLabel("[UVita]", 225, 85)
  829. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  830. GUICtrlSetColor(-1, $FontColor)
  831.  
  832.  
  833. Global $btn_Hotkey_ConditionManager_Cast_MagicShield = GUICtrlCreateButton("Settings", 275, 82, 90, 20)
  834. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_MagicShield, "GUI_ConditionManager_Settings_MagicShield")
  835. GUICtrlSetColor(-1, $FontColor)
  836. GUICtrlSetBkColor(-1, 0x696969)
  837.  
  838. Global $chkbox_ConditionManager_MagicShield = GUICtrlCreateCheckbox("", 385, 85, 15, 14)
  839. GUICtrlSetOnEvent($chkbox_ConditionManager_MagicShield, "OnClick_chkbox_HoldMagicShield")
  840. GUICtrlSetColor(-1, $FontColor)
  841.  
  842. ;========= HOLD RECOVERY ====================================================
  843. GUICtrlCreateLabel("[Recover]", 225, 105)
  844. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  845. GUICtrlSetColor(-1, $FontColor)
  846.  
  847.  
  848. Global $btn_Hotkey_ConditionManager_Cast_Recovery = GUICtrlCreateButton("Settings", 275, 102, 90, 20)
  849. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Cast_Recovery, "GUI_ConditionManager_Settings_Recovery")
  850. GUICtrlSetColor(-1, $FontColor)
  851. GUICtrlSetBkColor(-1, 0x696969)
  852.  
  853. Global $chkbox_ConditionManager_Recovery = GUICtrlCreateCheckbox("", 385, 105, 15, 14)
  854. GUICtrlSetOnEvent($chkbox_ConditionManager_Recovery, "OnClick_chkbox_HoldRecovery")
  855. GUICtrlSetColor(-1, $FontColor)
  856.  
  857.  
  858.  
  859.  
  860.  
  861. $btn_SelfHealer_Settings_Save = GUICtrlCreateButton("OK", 385, 185, 75, 25)
  862. GUICtrlSetOnEvent($btn_SelfHealer_Settings_Save, "OnClick_ConditionManager_Save")
  863. GUICtrlSetColor(-1, $FontColor)
  864. GUICtrlSetBkColor(-1, 0x646464)
  865.  
  866.  
  867.  
  868. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager)
  869. GUISetState(@SW_SHOW)
  870.  
  871. LoadConditionManagerEntry()
  872. EndFunc
  873. Func GUI_ConditionManager_Close()
  874. GUIDelete($GUI_ConditionManager)
  875. GUISetState(@SW_SHOW, $GUI_Support)
  876. EndFunc
  877.  
  878.  
  879.  
  880. Func GUI_ConditionManager_Settings_Pox()
  881. GUIDelete($GUI_ConditionManager)
  882.  
  883.  
  884. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  885.  
  886. Global $GUI_ConditionManager_Settings_Pox = GUICreate("Condition Settings - Cure Poison", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  887. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Pox_Close")
  888.  
  889.  
  890. ;========== CAST ============
  891. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  892. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  893. GUICtrlSetColor(-1, $FontColor)
  894.  
  895.  
  896. Global $input_Text_ConditionManager_Cast_Pox = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  897. GUICtrlSetBkColor(-1, $TextBkColor)
  898. GUICtrlSetColor(-1, $FontColor)
  899.  
  900. Global $btn_swipe_left_ConditionManager_Pox = GUICtrlCreateButton("<", 165, 22, 20, 20)
  901. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Pox, "")
  902. GUICtrlSetColor(-1, $FontColor)
  903. GUICtrlSetBkColor(-1, 0x696969)
  904.  
  905. Global $label_CastType_ConditionManager_Pox = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  906. GUICtrlSetBkColor(-1, $TextBkColor)
  907. GUICtrlSetColor(-1, $FontColor)
  908.  
  909. Global $btn_swipe_right_ConditionManager_Pox = GUICtrlCreateButton(">", 265, 22, 20, 20)
  910. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Pox, "")
  911. GUICtrlSetColor(-1, $FontColor)
  912. GUICtrlSetBkColor(-1, 0x696969)
  913.  
  914.  
  915.  
  916. Global $btn_ClickPosition_ConditionManager_Pox_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  917. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Pox_Cast, "")
  918. GUICtrlSetColor(-1, $FontColor)
  919. GUICtrlSetBkColor(-1, 0x696969)
  920. GUICtrlSetState($btn_ClickPosition_ConditionManager_Pox_Cast,$GUI_HIDE)
  921.  
  922. Global $btn_Hotkey_ConditionManager_Pox_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  923. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Pox_Cast, "")
  924. GUICtrlSetColor(-1, $FontColor)
  925. GUICtrlSetBkColor(-1, 0x696969)
  926. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  927.  
  928.  
  929. ;========== MANA COST ============
  930. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  931. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  932. GUICtrlSetColor(-1, $FontColor)
  933.  
  934. Global $input_Text_ConditionManager_ManaCost_Pox = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  935. GUICtrlSetBkColor(-1, $TextBkColor)
  936. GUICtrlSetColor(-1, $FontColor)
  937. ;========== COOLDOWN ============
  938. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  939. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  940. GUICtrlSetColor(-1, $FontColor)
  941.  
  942. Global $input_Text_ConditionManager_Cooldown_Pox = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  943. GUICtrlSetBkColor(-1, $TextBkColor)
  944. GUICtrlSetColor(-1, $FontColor)
  945.  
  946. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  947. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  948. GUICtrlSetColor(-1, $FontColor)
  949.  
  950.  
  951.  
  952.  
  953.  
  954. $btn_ConditionManager_Pox_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  955. GUICtrlSetOnEvent($btn_ConditionManager_Pox_Save, "OnClick_Condition_Settings_Pox_Save")
  956. GUICtrlSetColor(-1, $FontColor)
  957. GUICtrlSetBkColor(-1, 0x646464)
  958.  
  959.  
  960.  
  961. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Pox)
  962. GUISetState(@SW_SHOW)
  963.  
  964. Load_Condition_Settings_Entry_Pox()
  965. EndFunc
  966. Func GUI_ConditionManager_Settings_Pox_Close()
  967. GUIDelete($GUI_ConditionManager_Settings_Pox)
  968. GUI_ConditionManager()
  969. EndFunc
  970.  
  971. Func GUI_ConditionManager_Settings_Curse()
  972. GUIDelete($GUI_ConditionManager)
  973.  
  974.  
  975. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  976.  
  977. Global $GUI_ConditionManager_Settings_Curse = GUICreate("Condition Settings - Cure Curse", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  978. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Curse_Close")
  979.  
  980.  
  981. ;========== CAST ============
  982. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  983. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  984. GUICtrlSetColor(-1, $FontColor)
  985.  
  986. Global $input_Text_ConditionManager_Cast_Curse = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  987. GUICtrlSetBkColor(-1, $TextBkColor)
  988. GUICtrlSetColor(-1, $FontColor)
  989.  
  990. Global $btn_swipe_left_ConditionManager_Curse = GUICtrlCreateButton("<", 165, 22, 20, 20)
  991. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Curse, "")
  992. GUICtrlSetColor(-1, $FontColor)
  993. GUICtrlSetBkColor(-1, 0x696969)
  994.  
  995. Global $label_CastType_ConditionManager_Curse = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  996. GUICtrlSetBkColor(-1, $TextBkColor)
  997. GUICtrlSetColor(-1, $FontColor)
  998.  
  999. Global $btn_swipe_right_ConditionManager_Curse = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1000. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Curse, "")
  1001. GUICtrlSetColor(-1, $FontColor)
  1002. GUICtrlSetBkColor(-1, 0x696969)
  1003.  
  1004.  
  1005.  
  1006. Global $btn_ClickPosition_ConditionManager_Curse_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1007. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Curse_Cast, "")
  1008. GUICtrlSetColor(-1, $FontColor)
  1009. GUICtrlSetBkColor(-1, 0x696969)
  1010. GUICtrlSetState($btn_ClickPosition_ConditionManager_Curse_Cast,$GUI_HIDE)
  1011.  
  1012. Global $btn_Hotkey_ConditionManager_Curse_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1013. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Curse_Cast, "")
  1014. GUICtrlSetColor(-1, $FontColor)
  1015. GUICtrlSetBkColor(-1, 0x696969)
  1016. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Curse_Cast, $GUI_HIDE)
  1017.  
  1018.  
  1019. ;========== MANA COST ============
  1020. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1021. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1022. GUICtrlSetColor(-1, $FontColor)
  1023.  
  1024. Global $input_Text_ConditionManager_ManaCost_Curse = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1025. GUICtrlSetBkColor(-1, $TextBkColor)
  1026. GUICtrlSetColor(-1, $FontColor)
  1027. ;========== COOLDOWN ============
  1028. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1029. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1030. GUICtrlSetColor(-1, $FontColor)
  1031.  
  1032. Global $input_Text_ConditionManager_Cooldown_Curse = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1033. GUICtrlSetBkColor(-1, $TextBkColor)
  1034. GUICtrlSetColor(-1, $FontColor)
  1035.  
  1036. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1037. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1038. GUICtrlSetColor(-1, $FontColor)
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044. $btn_ConditionManager_Curse_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1045. GUICtrlSetOnEvent($btn_ConditionManager_Curse_Save, "OnClick_Condition_Settings_Curse_Save")
  1046. GUICtrlSetColor(-1, $FontColor)
  1047. GUICtrlSetBkColor(-1, 0x646464)
  1048.  
  1049.  
  1050.  
  1051. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Curse)
  1052. GUISetState(@SW_SHOW)
  1053.  
  1054. Load_Condition_Settings_Entry_Curse()
  1055. EndFunc
  1056. Func GUI_ConditionManager_Settings_Curse_Close()
  1057. GUIDelete($GUI_ConditionManager_Settings_Curse)
  1058. GUI_ConditionManager()
  1059. EndFunc
  1060.  
  1061. Func GUI_ConditionManager_Settings_Bleed()
  1062. GUIDelete($GUI_ConditionManager)
  1063.  
  1064.  
  1065. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  1066.  
  1067. Global $GUI_ConditionManager_Settings_Bleed = GUICreate("Condition Settings - Cure Bleed", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  1068. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Bleed_Close")
  1069.  
  1070.  
  1071. ;========== CAST ============
  1072. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  1073. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1074. GUICtrlSetColor(-1, $FontColor)
  1075.  
  1076. Global $input_Text_ConditionManager_Cast_Bleed = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1077. GUICtrlSetBkColor(-1, $TextBkColor)
  1078. GUICtrlSetColor(-1, $FontColor)
  1079.  
  1080. Global $btn_swipe_left_ConditionManager_Bleed = GUICtrlCreateButton("<", 165, 22, 20, 20)
  1081. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Bleed, "")
  1082. GUICtrlSetColor(-1, $FontColor)
  1083. GUICtrlSetBkColor(-1, 0x696969)
  1084.  
  1085. Global $label_CastType_ConditionManager_Bleed = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  1086. GUICtrlSetBkColor(-1, $TextBkColor)
  1087. GUICtrlSetColor(-1, $FontColor)
  1088.  
  1089. Global $btn_swipe_right_ConditionManager_Bleed = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1090. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Bleed, "")
  1091. GUICtrlSetColor(-1, $FontColor)
  1092. GUICtrlSetBkColor(-1, 0x696969)
  1093.  
  1094.  
  1095.  
  1096. Global $btn_ClickPosition_ConditionManager_Bleed_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1097. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Bleed_Cast, "")
  1098. GUICtrlSetColor(-1, $FontColor)
  1099. GUICtrlSetBkColor(-1, 0x696969)
  1100. GUICtrlSetState($btn_ClickPosition_ConditionManager_Bleed_Cast,$GUI_HIDE)
  1101.  
  1102. Global $btn_Hotkey_ConditionManager_Bleed_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1103. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Bleed_Cast, "")
  1104. GUICtrlSetColor(-1, $FontColor)
  1105. GUICtrlSetBkColor(-1, 0x696969)
  1106. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  1107.  
  1108.  
  1109. ;========== MANA COST ============
  1110. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1111. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1112. GUICtrlSetColor(-1, $FontColor)
  1113.  
  1114. Global $input_Text_ConditionManager_ManaCost_Bleed = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1115. GUICtrlSetBkColor(-1, $TextBkColor)
  1116. GUICtrlSetColor(-1, $FontColor)
  1117. ;========== COOLDOWN ============
  1118. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1119. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1120. GUICtrlSetColor(-1, $FontColor)
  1121.  
  1122. Global $input_Text_ConditionManager_Cooldown_Bleed = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1123. GUICtrlSetBkColor(-1, $TextBkColor)
  1124. GUICtrlSetColor(-1, $FontColor)
  1125.  
  1126. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1127. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1128. GUICtrlSetColor(-1, $FontColor)
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134. $btn_ConditionManager_Bleed_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1135. GUICtrlSetOnEvent($btn_ConditionManager_Bleed_Save, "OnClick_Condition_Settings_Bleed_Save")
  1136. GUICtrlSetColor(-1, $FontColor)
  1137. GUICtrlSetBkColor(-1, 0x646464)
  1138.  
  1139.  
  1140.  
  1141. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Bleed)
  1142. GUISetState(@SW_SHOW)
  1143.  
  1144. Load_Condition_Settings_Entry_Bleed()
  1145. EndFunc
  1146. Func GUI_ConditionManager_Settings_Bleed_Close()
  1147. GUIDelete($GUI_ConditionManager_Settings_Bleed)
  1148. GUI_ConditionManager()
  1149. EndFunc
  1150.  
  1151. Func GUI_ConditionManager_Settings_Burn()
  1152. GUIDelete($GUI_ConditionManager)
  1153.  
  1154.  
  1155. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  1156.  
  1157. Global $GUI_ConditionManager_Settings_Burn = GUICreate("Condition Settings - Cure Burn", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  1158. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Burn_Close")
  1159.  
  1160.  
  1161. ;========== CAST ============
  1162. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  1163. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1164. GUICtrlSetColor(-1, $FontColor)
  1165.  
  1166. Global $input_Text_ConditionManager_Cast_Burn = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1167. GUICtrlSetBkColor(-1, $TextBkColor)
  1168. GUICtrlSetColor(-1, $FontColor)
  1169.  
  1170. Global $btn_swipe_left_ConditionManager_Burn = GUICtrlCreateButton("<", 165, 22, 20, 20)
  1171. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Burn, "")
  1172. GUICtrlSetColor(-1, $FontColor)
  1173. GUICtrlSetBkColor(-1, 0x696969)
  1174.  
  1175. Global $label_CastType_ConditionManager_Burn = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  1176. GUICtrlSetBkColor(-1, $TextBkColor)
  1177. GUICtrlSetColor(-1, $FontColor)
  1178.  
  1179. Global $btn_swipe_right_ConditionManager_Burn = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1180. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Burn, "")
  1181. GUICtrlSetColor(-1, $FontColor)
  1182. GUICtrlSetBkColor(-1, 0x696969)
  1183.  
  1184.  
  1185.  
  1186. Global $btn_ClickPosition_ConditionManager_Burn_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1187. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Burn_Cast, "")
  1188. GUICtrlSetColor(-1, $FontColor)
  1189. GUICtrlSetBkColor(-1, 0x696969)
  1190. GUICtrlSetState($btn_ClickPosition_ConditionManager_Burn_Cast,$GUI_HIDE)
  1191.  
  1192. Global $btn_Hotkey_ConditionManager_Burn_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1193. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Burn_Cast, "")
  1194. GUICtrlSetColor(-1, $FontColor)
  1195. GUICtrlSetBkColor(-1, 0x696969)
  1196. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  1197.  
  1198.  
  1199. ;========== MANA COST ============
  1200. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1201. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1202. GUICtrlSetColor(-1, $FontColor)
  1203.  
  1204. Global $input_Text_ConditionManager_ManaCost_Burn = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1205. GUICtrlSetBkColor(-1, $TextBkColor)
  1206. GUICtrlSetColor(-1, $FontColor)
  1207. ;========== COOLDOWN ============
  1208. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1209. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1210. GUICtrlSetColor(-1, $FontColor)
  1211.  
  1212. Global $input_Text_ConditionManager_Cooldown_Burn = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1213. GUICtrlSetBkColor(-1, $TextBkColor)
  1214. GUICtrlSetColor(-1, $FontColor)
  1215.  
  1216. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1217. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1218. GUICtrlSetColor(-1, $FontColor)
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224. $btn_ConditionManager_Burn_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1225. GUICtrlSetOnEvent($btn_ConditionManager_Burn_Save, "OnClick_Condition_Settings_Burn_Save")
  1226. GUICtrlSetColor(-1, $FontColor)
  1227. GUICtrlSetBkColor(-1, 0x646464)
  1228.  
  1229.  
  1230.  
  1231. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Burn)
  1232. GUISetState(@SW_SHOW)
  1233.  
  1234. Load_Condition_Settings_Entry_Burn()
  1235. EndFunc
  1236. Func GUI_ConditionManager_Settings_Burn_Close()
  1237. GUIDelete($GUI_ConditionManager_Settings_Burn)
  1238. GUI_ConditionManager()
  1239. EndFunc
  1240.  
  1241. Func GUI_ConditionManager_Settings_Elec()
  1242. GUIDelete($GUI_ConditionManager)
  1243.  
  1244.  
  1245. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  1246.  
  1247. Global $GUI_ConditionManager_Settings_Elec = GUICreate("Condition Settings - Cure Elec", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  1248. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Elec_Close")
  1249.  
  1250.  
  1251. ;========== CAST ============
  1252. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  1253. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1254. GUICtrlSetColor(-1, $FontColor)
  1255.  
  1256. Global $input_Text_ConditionManager_Cast_Elec = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1257. GUICtrlSetBkColor(-1, $TextBkColor)
  1258. GUICtrlSetColor(-1, $FontColor)
  1259.  
  1260. Global $btn_swipe_left_ConditionManager_Elec = GUICtrlCreateButton("<", 165, 22, 20, 20)
  1261. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Elec, "")
  1262. GUICtrlSetColor(-1, $FontColor)
  1263. GUICtrlSetBkColor(-1, 0x696969)
  1264.  
  1265. Global $label_CastType_ConditionManager_Elec = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  1266. GUICtrlSetBkColor(-1, $TextBkColor)
  1267. GUICtrlSetColor(-1, $FontColor)
  1268.  
  1269. Global $btn_swipe_right_ConditionManager_Elec = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1270. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Elec, "")
  1271. GUICtrlSetColor(-1, $FontColor)
  1272. GUICtrlSetBkColor(-1, 0x696969)
  1273.  
  1274.  
  1275.  
  1276. Global $btn_ClickPosition_ConditionManager_Elec_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1277. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Elec_Cast, "")
  1278. GUICtrlSetColor(-1, $FontColor)
  1279. GUICtrlSetBkColor(-1, 0x696969)
  1280. GUICtrlSetState($btn_ClickPosition_ConditionManager_Elec_Cast,$GUI_HIDE)
  1281.  
  1282. Global $btn_Hotkey_ConditionManager_Elec_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1283. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Elec_Cast, "")
  1284. GUICtrlSetColor(-1, $FontColor)
  1285. GUICtrlSetBkColor(-1, 0x696969)
  1286. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  1287.  
  1288.  
  1289. ;========== MANA COST ============
  1290. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1291. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1292. GUICtrlSetColor(-1, $FontColor)
  1293.  
  1294. Global $input_Text_ConditionManager_ManaCost_Elec = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1295. GUICtrlSetBkColor(-1, $TextBkColor)
  1296. GUICtrlSetColor(-1, $FontColor)
  1297. ;========== COOLDOWN ============
  1298. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1299. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1300. GUICtrlSetColor(-1, $FontColor)
  1301.  
  1302. Global $input_Text_ConditionManager_Cooldown_Elec = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1303. GUICtrlSetBkColor(-1, $TextBkColor)
  1304. GUICtrlSetColor(-1, $FontColor)
  1305.  
  1306. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1307. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1308. GUICtrlSetColor(-1, $FontColor)
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314. $btn_ConditionManager_Elec_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1315. GUICtrlSetOnEvent($btn_ConditionManager_Elec_Save, "OnClick_Condition_Settings_Elec_Save")
  1316. GUICtrlSetColor(-1, $FontColor)
  1317. GUICtrlSetBkColor(-1, 0x646464)
  1318.  
  1319.  
  1320.  
  1321. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Elec)
  1322. GUISetState(@SW_SHOW)
  1323.  
  1324. Load_Condition_Settings_Entry_Elec()
  1325. EndFunc
  1326. Func GUI_ConditionManager_Settings_Elec_Close()
  1327. GUIDelete($GUI_ConditionManager_Settings_Elec)
  1328. GUI_ConditionManager()
  1329. EndFunc
  1330.  
  1331. Func GUI_ConditionManager_Settings_Para()
  1332. GUIDelete($GUI_ConditionManager)
  1333.  
  1334.  
  1335. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  1336.  
  1337. Global $GUI_ConditionManager_Settings_Para = GUICreate("Condition Settings - Cure Para", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  1338. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Para_Close")
  1339.  
  1340.  
  1341. ;========== CAST ============
  1342. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  1343. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1344. GUICtrlSetColor(-1, $FontColor)
  1345.  
  1346. Global $input_Text_ConditionManager_Cast_Para = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1347. GUICtrlSetBkColor(-1, $TextBkColor)
  1348. GUICtrlSetColor(-1, $FontColor)
  1349.  
  1350. Global $btn_swipe_left_ConditionManager_Para = GUICtrlCreateButton("<", 165, 22, 20, 20)
  1351. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Para, "")
  1352. GUICtrlSetColor(-1, $FontColor)
  1353. GUICtrlSetBkColor(-1, 0x696969)
  1354.  
  1355. Global $label_CastType_ConditionManager_Para = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  1356. GUICtrlSetBkColor(-1, $TextBkColor)
  1357. GUICtrlSetColor(-1, $FontColor)
  1358.  
  1359. Global $btn_swipe_right_ConditionManager_Para = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1360. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Para, "")
  1361. GUICtrlSetColor(-1, $FontColor)
  1362. GUICtrlSetBkColor(-1, 0x696969)
  1363.  
  1364.  
  1365.  
  1366. Global $btn_ClickPosition_ConditionManager_Para_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1367. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Para_Cast, "")
  1368. GUICtrlSetColor(-1, $FontColor)
  1369. GUICtrlSetBkColor(-1, 0x696969)
  1370. GUICtrlSetState($btn_ClickPosition_ConditionManager_Para_Cast,$GUI_HIDE)
  1371.  
  1372. Global $btn_Hotkey_ConditionManager_Para_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1373. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Para_Cast, "")
  1374. GUICtrlSetColor(-1, $FontColor)
  1375. GUICtrlSetBkColor(-1, 0x696969)
  1376. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  1377.  
  1378.  
  1379. ;========== MANA COST ============
  1380. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1381. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1382. GUICtrlSetColor(-1, $FontColor)
  1383.  
  1384. Global $input_Text_ConditionManager_ManaCost_Para = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1385. GUICtrlSetBkColor(-1, $TextBkColor)
  1386. GUICtrlSetColor(-1, $FontColor)
  1387. ;========== COOLDOWN ============
  1388. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1389. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1390. GUICtrlSetColor(-1, $FontColor)
  1391.  
  1392. Global $input_Text_ConditionManager_Cooldown_Para = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1393. GUICtrlSetBkColor(-1, $TextBkColor)
  1394. GUICtrlSetColor(-1, $FontColor)
  1395.  
  1396. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1397. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1398. GUICtrlSetColor(-1, $FontColor)
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404. $btn_ConditionManager_Para_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1405. GUICtrlSetOnEvent($btn_ConditionManager_Para_Save, "OnClick_Condition_Settings_Para_Save")
  1406. GUICtrlSetColor(-1, $FontColor)
  1407. GUICtrlSetBkColor(-1, 0x646464)
  1408.  
  1409.  
  1410.  
  1411. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Para)
  1412. GUISetState(@SW_SHOW)
  1413.  
  1414. Load_Condition_Settings_Entry_Para()
  1415. EndFunc
  1416. Func GUI_ConditionManager_Settings_Para_Close()
  1417. GUIDelete($GUI_ConditionManager_Settings_Para)
  1418. GUI_ConditionManager()
  1419. EndFunc
  1420.  
  1421. Func GUI_ConditionManager_Settings_Haste()
  1422. GUIDelete($GUI_ConditionManager)
  1423.  
  1424.  
  1425. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  1426.  
  1427. Global $GUI_ConditionManager_Settings_Haste = GUICreate("Condition Settings - Hold Haste", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  1428. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Haste_Close")
  1429.  
  1430.  
  1431. ;========== CAST ============
  1432. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  1433. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1434. GUICtrlSetColor(-1, $FontColor)
  1435.  
  1436. Global $input_Text_ConditionManager_Cast_Haste = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1437. GUICtrlSetBkColor(-1, $TextBkColor)
  1438. GUICtrlSetColor(-1, $FontColor)
  1439.  
  1440. Global $btn_swipe_left_ConditionManager_Haste = GUICtrlCreateButton("<", 165, 22, 20, 20)
  1441. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Haste, "")
  1442. GUICtrlSetColor(-1, $FontColor)
  1443. GUICtrlSetBkColor(-1, 0x696969)
  1444.  
  1445. Global $label_CastType_ConditionManager_Haste = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  1446. GUICtrlSetBkColor(-1, $TextBkColor)
  1447. GUICtrlSetColor(-1, $FontColor)
  1448.  
  1449. Global $btn_swipe_right_ConditionManager_Haste = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1450. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Haste, "")
  1451. GUICtrlSetColor(-1, $FontColor)
  1452. GUICtrlSetBkColor(-1, 0x696969)
  1453.  
  1454.  
  1455.  
  1456. Global $btn_ClickPosition_ConditionManager_Haste_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1457. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Haste_Cast, "")
  1458. GUICtrlSetColor(-1, $FontColor)
  1459. GUICtrlSetBkColor(-1, 0x696969)
  1460. GUICtrlSetState($btn_ClickPosition_ConditionManager_Haste_Cast,$GUI_HIDE)
  1461.  
  1462. Global $btn_Hotkey_ConditionManager_Haste_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1463. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Haste_Cast, "")
  1464. GUICtrlSetColor(-1, $FontColor)
  1465. GUICtrlSetBkColor(-1, 0x696969)
  1466. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  1467.  
  1468.  
  1469. ;========== MANA COST ============
  1470. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1471. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1472. GUICtrlSetColor(-1, $FontColor)
  1473.  
  1474. Global $input_Text_ConditionManager_ManaCost_Haste = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1475. GUICtrlSetBkColor(-1, $TextBkColor)
  1476. GUICtrlSetColor(-1, $FontColor)
  1477. ;========== COOLDOWN ============
  1478. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1479. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1480. GUICtrlSetColor(-1, $FontColor)
  1481.  
  1482. Global $input_Text_ConditionManager_Cooldown_Haste = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1483. GUICtrlSetBkColor(-1, $TextBkColor)
  1484. GUICtrlSetColor(-1, $FontColor)
  1485.  
  1486. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1487. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1488. GUICtrlSetColor(-1, $FontColor)
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494. $btn_ConditionManager_Haste_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1495. GUICtrlSetOnEvent($btn_ConditionManager_Haste_Save, "OnClick_Condition_Settings_Haste_Save")
  1496. GUICtrlSetColor(-1, $FontColor)
  1497. GUICtrlSetBkColor(-1, 0x646464)
  1498.  
  1499.  
  1500.  
  1501. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Haste)
  1502. GUISetState(@SW_SHOW)
  1503.  
  1504. Load_Condition_Settings_Entry_Haste()
  1505. EndFunc
  1506. Func GUI_ConditionManager_Settings_Haste_Close()
  1507. GUIDelete($GUI_ConditionManager_Settings_Haste)
  1508. GUI_ConditionManager()
  1509. EndFunc
  1510.  
  1511. Func GUI_ConditionManager_Settings_Invisible()
  1512. GUIDelete($GUI_ConditionManager)
  1513.  
  1514.  
  1515. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  1516.  
  1517. Global $GUI_ConditionManager_Settings_Invisible = GUICreate("Condition Settings - Hold Invisible", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  1518. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Invisible_Close")
  1519.  
  1520.  
  1521. ;========== CAST ============
  1522. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  1523. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1524. GUICtrlSetColor(-1, $FontColor)
  1525.  
  1526. Global $input_Text_ConditionManager_Cast_Invisible = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1527. GUICtrlSetBkColor(-1, $TextBkColor)
  1528. GUICtrlSetColor(-1, $FontColor)
  1529.  
  1530. Global $btn_swipe_left_ConditionManager_Invisible = GUICtrlCreateButton("<", 165, 22, 20, 20)
  1531. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Invisible, "")
  1532. GUICtrlSetColor(-1, $FontColor)
  1533. GUICtrlSetBkColor(-1, 0x696969)
  1534.  
  1535. Global $label_CastType_ConditionManager_Invisible = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  1536. GUICtrlSetBkColor(-1, $TextBkColor)
  1537. GUICtrlSetColor(-1, $FontColor)
  1538.  
  1539. Global $btn_swipe_right_ConditionManager_Invisible = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1540. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Invisible, "")
  1541. GUICtrlSetColor(-1, $FontColor)
  1542. GUICtrlSetBkColor(-1, 0x696969)
  1543.  
  1544.  
  1545.  
  1546. Global $btn_ClickPosition_ConditionManager_Invisible_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1547. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Invisible_Cast, "")
  1548. GUICtrlSetColor(-1, $FontColor)
  1549. GUICtrlSetBkColor(-1, 0x696969)
  1550. GUICtrlSetState($btn_ClickPosition_ConditionManager_Invisible_Cast,$GUI_HIDE)
  1551.  
  1552. Global $btn_Hotkey_ConditionManager_Invisible_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1553. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Invisible_Cast, "")
  1554. GUICtrlSetColor(-1, $FontColor)
  1555. GUICtrlSetBkColor(-1, 0x696969)
  1556. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  1557.  
  1558.  
  1559. ;========== MANA COST ============
  1560. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1561. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1562. GUICtrlSetColor(-1, $FontColor)
  1563.  
  1564. Global $input_Text_ConditionManager_ManaCost_Invisible = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1565. GUICtrlSetBkColor(-1, $TextBkColor)
  1566. GUICtrlSetColor(-1, $FontColor)
  1567. ;========== COOLDOWN ============
  1568. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1569. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1570. GUICtrlSetColor(-1, $FontColor)
  1571.  
  1572. Global $input_Text_ConditionManager_Cooldown_Invisible = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1573. GUICtrlSetBkColor(-1, $TextBkColor)
  1574. GUICtrlSetColor(-1, $FontColor)
  1575.  
  1576. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1577. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1578. GUICtrlSetColor(-1, $FontColor)
  1579.  
  1580.  
  1581.  
  1582.  
  1583. $btn_ConditionManager_Invisible_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1584. GUICtrlSetOnEvent($btn_ConditionManager_Invisible_Save, "OnClick_Condition_Settings_Invisible_Save")
  1585. GUICtrlSetColor(-1, $FontColor)
  1586. GUICtrlSetBkColor(-1, 0x646464)
  1587.  
  1588.  
  1589.  
  1590. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Invisible)
  1591. GUISetState(@SW_SHOW)
  1592.  
  1593. Load_Condition_Settings_Entry_Invisible()
  1594. EndFunc
  1595. Func GUI_ConditionManager_Settings_Invisible_Close()
  1596. GUIDelete($GUI_ConditionManager_Settings_Invisible)
  1597. GUI_ConditionManager()
  1598. EndFunc
  1599.  
  1600. Func GUI_ConditionManager_Settings_MagicShield()
  1601. GUIDelete($GUI_ConditionManager)
  1602.  
  1603.  
  1604. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  1605.  
  1606. Global $GUI_ConditionManager_Settings_MagicShield = GUICreate("Condition Settings - Hold Magic Shield", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  1607. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_MagicShield_Close")
  1608.  
  1609.  
  1610. ;========== CAST ============
  1611. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  1612. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1613. GUICtrlSetColor(-1, $FontColor)
  1614.  
  1615. Global $input_Text_ConditionManager_Cast_MagicShield = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1616. GUICtrlSetBkColor(-1, $TextBkColor)
  1617. GUICtrlSetColor(-1, $FontColor)
  1618.  
  1619. Global $btn_swipe_left_ConditionManager_MagicShield = GUICtrlCreateButton("<", 165, 22, 20, 20)
  1620. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_MagicShield, "")
  1621. GUICtrlSetColor(-1, $FontColor)
  1622. GUICtrlSetBkColor(-1, 0x696969)
  1623.  
  1624. Global $label_CastType_ConditionManager_MagicShield = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  1625. GUICtrlSetBkColor(-1, $TextBkColor)
  1626. GUICtrlSetColor(-1, $FontColor)
  1627.  
  1628. Global $btn_swipe_right_ConditionManager_MagicShield = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1629. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_MagicShield, "")
  1630. GUICtrlSetColor(-1, $FontColor)
  1631. GUICtrlSetBkColor(-1, 0x696969)
  1632.  
  1633.  
  1634.  
  1635. Global $btn_ClickPosition_ConditionManager_MagicShield_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1636. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_MagicShield_Cast, "")
  1637. GUICtrlSetColor(-1, $FontColor)
  1638. GUICtrlSetBkColor(-1, 0x696969)
  1639. GUICtrlSetState($btn_ClickPosition_ConditionManager_MagicShield_Cast,$GUI_HIDE)
  1640.  
  1641. Global $btn_Hotkey_ConditionManager_MagicShield_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1642. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_MagicShield_Cast, "")
  1643. GUICtrlSetColor(-1, $FontColor)
  1644. GUICtrlSetBkColor(-1, 0x696969)
  1645. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  1646.  
  1647.  
  1648. ;========== MANA COST ============
  1649. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1650. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1651. GUICtrlSetColor(-1, $FontColor)
  1652.  
  1653. Global $input_Text_ConditionManager_ManaCost_MagicShield = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1654. GUICtrlSetBkColor(-1, $TextBkColor)
  1655. GUICtrlSetColor(-1, $FontColor)
  1656. ;========== COOLDOWN ============
  1657. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1658. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1659. GUICtrlSetColor(-1, $FontColor)
  1660.  
  1661. Global $input_Text_ConditionManager_Cooldown_MagicShield = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1662. GUICtrlSetBkColor(-1, $TextBkColor)
  1663. GUICtrlSetColor(-1, $FontColor)
  1664.  
  1665. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1666. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1667. GUICtrlSetColor(-1, $FontColor)
  1668.  
  1669.  
  1670.  
  1671.  
  1672. $btn_ConditionManager_MagicShield_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1673. GUICtrlSetOnEvent($btn_ConditionManager_MagicShield_Save, "OnClick_Condition_Settings_MagicShield_Save")
  1674. GUICtrlSetColor(-1, $FontColor)
  1675. GUICtrlSetBkColor(-1, 0x646464)
  1676.  
  1677.  
  1678.  
  1679. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_MagicShield)
  1680. GUISetState(@SW_SHOW)
  1681.  
  1682. Load_Condition_Settings_Entry_MagicShield()
  1683. EndFunc
  1684. Func GUI_ConditionManager_Settings_MagicShield_Close()
  1685. GUIDelete($GUI_ConditionManager_Settings_MagicShield)
  1686. GUI_ConditionManager()
  1687. EndFunc
  1688.  
  1689. Func GUI_ConditionManager_Settings_Recovery()
  1690. GUIDelete($GUI_ConditionManager)
  1691.  
  1692.  
  1693. Local $FontColor = "0xfefefe", $TextBkColor = "0x363636"
  1694.  
  1695. Global $GUI_ConditionManager_Settings_Recovery = GUICreate("Condition Settings - Hold Recovery", 390, 120, -1, -1, -1, $WS_EX_TOPMOST)
  1696. GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_ConditionManager_Settings_Recovery_Close")
  1697.  
  1698.  
  1699. ;========== CAST ============
  1700. GUICtrlCreateLabel("Cast:", 25, 25 ,23, 14)
  1701. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1702. GUICtrlSetColor(-1, $FontColor)
  1703.  
  1704. Global $input_Text_ConditionManager_Cast_Recovery = GUICtrlCreateInput("F2", 90, 25, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1705. GUICtrlSetBkColor(-1, $TextBkColor)
  1706. GUICtrlSetColor(-1, $FontColor)
  1707.  
  1708. Global $btn_swipe_left_ConditionManager_Recovery = GUICtrlCreateButton("<", 165, 22, 20, 20)
  1709. GUICtrlSetOnEvent($btn_swipe_left_ConditionManager_Recovery, "")
  1710. GUICtrlSetColor(-1, $FontColor)
  1711. GUICtrlSetBkColor(-1, 0x696969)
  1712.  
  1713. Global $label_CastType_ConditionManager_Recovery = GUICtrlCreateLabel("Hotkey", 185, 25, 80, 14, $SS_CENTER)
  1714. GUICtrlSetBkColor(-1, $TextBkColor)
  1715. GUICtrlSetColor(-1, $FontColor)
  1716.  
  1717. Global $btn_swipe_right_ConditionManager_Recovery = GUICtrlCreateButton(">", 265, 22, 20, 20)
  1718. GUICtrlSetOnEvent($btn_swipe_right_ConditionManager_Recovery, "")
  1719. GUICtrlSetColor(-1, $FontColor)
  1720. GUICtrlSetBkColor(-1, 0x696969)
  1721.  
  1722.  
  1723.  
  1724. Global $btn_ClickPosition_ConditionManager_Recovery_Cast = GUICtrlCreateButton("Position", 290, 22, 75, 20)
  1725. GUICtrlSetOnEvent($btn_ClickPosition_ConditionManager_Recovery_Cast, "")
  1726. GUICtrlSetColor(-1, $FontColor)
  1727. GUICtrlSetBkColor(-1, 0x696969)
  1728. GUICtrlSetState($btn_ClickPosition_ConditionManager_Recovery_Cast,$GUI_HIDE)
  1729.  
  1730. Global $btn_Hotkey_ConditionManager_Recovery_Cast = GUICtrlCreateButton("Hotkey", 290, 22, 75, 20)
  1731. GUICtrlSetOnEvent($btn_Hotkey_ConditionManager_Recovery_Cast, "")
  1732. GUICtrlSetColor(-1, $FontColor)
  1733. GUICtrlSetBkColor(-1, 0x696969)
  1734. ;~ GUICtrlSetState($btn_Hotkey_ConditionManager_Pox_Cast, $GUI_HIDE)
  1735.  
  1736.  
  1737. ;========== MANA COST ============
  1738. GUICtrlCreateLabel("Mana Cost:", 25, 45 ,60, 14)
  1739. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1740. GUICtrlSetColor(-1, $FontColor)
  1741.  
  1742. Global $input_Text_ConditionManager_ManaCost_Recovery = GUICtrlCreateInput("20", 90, 45, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1743. GUICtrlSetBkColor(-1, $TextBkColor)
  1744. GUICtrlSetColor(-1, $FontColor)
  1745. ;========== COOLDOWN ============
  1746. GUICtrlCreateLabel("Cooldown:", 25, 65 ,60, 14)
  1747. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1748. GUICtrlSetColor(-1, $FontColor)
  1749.  
  1750. Global $input_Text_ConditionManager_Cooldown_Recovery = GUICtrlCreateInput("1000", 90, 65, 70, 14, $SS_CENTER, $TCS_BUTTONS)
  1751. GUICtrlSetBkColor(-1, $TextBkColor)
  1752. GUICtrlSetColor(-1, $FontColor)
  1753.  
  1754. GUICtrlCreateLabel("ms:", 165, 65 ,14, 14)
  1755. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1756. GUICtrlSetColor(-1, $FontColor)
  1757.  
  1758.  
  1759.  
  1760.  
  1761. $btn_ConditionManager_Recovery_Save = GUICtrlCreateButton("OK", 290, 85, 75, 25)
  1762. GUICtrlSetOnEvent($btn_ConditionManager_Recovery_Save, "OnClick_Condition_Settings_Recovery_Save")
  1763. GUICtrlSetColor(-1, $FontColor)
  1764. GUICtrlSetBkColor(-1, 0x646464)
  1765.  
  1766.  
  1767.  
  1768. GUISetBkColor(0x4c4c4c, $GUI_ConditionManager_Settings_Recovery)
  1769. GUISetState(@SW_SHOW)
  1770.  
  1771. Load_Condition_Settings_Entry_Recovery()
  1772. EndFunc
  1773. Func GUI_ConditionManager_Settings_Recovery_Close()
  1774. GUIDelete($GUI_ConditionManager_Settings_Recovery)
  1775. GUI_ConditionManager()
  1776. EndFunc
  1777.  
  1778.  
  1779.  
  1780.  
  1781. Func CloseBot()
  1782. Exit
  1783. EndFunc
  1784.  
  1785. ;========= MAIN GUI FUNCTIONS =================
  1786. ;============ MAIN GUI CONTROL CLICKS ==========================
  1787. Func OnClick_chkbox_Support()
  1788. If $FIRST_SCAN == 1 Then
  1789. If GUICtrlRead($chkbox_Support) = $GUI_UNCHECKED Then
  1790. $Support = 0
  1791. ElseIf GUICtrlRead($chkbox_Support) = $GUI_CHECKED Then
  1792. $Support = 1
  1793. $AutoHeal_FirstStart = 1
  1794. EndIf
  1795. Else
  1796. If GUICtrlRead($chkbox_Support) = $GUI_CHECKED Then
  1797. GUICtrlSetState($chkbox_Support, $GUI_UNCHECKED)
  1798. EndIf
  1799.  
  1800. If GUICtrlRead($Label_Status) == "offline" Then
  1801. _GUICtrlEdit_ShowBalloonTip($input_Scan_info, "", "Please login a character first!", $TTI_INFO)
  1802. ElseIf GUICtrlRead($Label_Status) == "" Then
  1803. _GUICtrlEdit_ShowBalloonTip($input_Scan_info, "", "Please scan your Tibia window first!", $TTI_INFO)
  1804. EndIf
  1805. EndIf
  1806. EndFunc ;==>
  1807. Func OnClick_chkbox_DWM()
  1808. If GUICtrlRead($chkbox_DWM) = $GUI_UNCHECKED Then
  1809. DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", 1)
  1810. ElseIf GUICtrlRead($chkbox_DWM) = $GUI_CHECKED Then
  1811. DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", 0)
  1812. EndIf
  1813. EndFunc ;==>
  1814. Func OnClick_chkbox_AntiIdle()
  1815. If GUICtrlRead($chkbox_AntiIdle) = $GUI_UNCHECKED Then
  1816. $AntiIdle = 0
  1817. ElseIf GUICtrlRead($chkbox_AntiIdle) = $GUI_CHECKED Then
  1818. $AntiIdle = 1
  1819. EndIf
  1820. EndFunc ;==>
  1821. Func OnClick_Scan()
  1822. ;~ GUISetState(@SW_HIDE, $GUI_Main)
  1823. If TibiaSelectedWindowExists() And CharacterLogedIn() Then
  1824. TibiaWindowScan()
  1825. $FIRST_SCAN = 1
  1826. ElseIf Not TibiaSelectedWindowExists() Then
  1827. UpdateStatusLabel("client closed")
  1828. _GUICtrlEdit_ShowBalloonTip($input_Scan_info, "", "Your registered client has been closed! Please choose another Tibia client", $TTI_INFO)
  1829. ElseIf Not CharacterLogedIn() Then
  1830. UpdateStatusLabel("offline")
  1831. _GUICtrlEdit_ShowBalloonTip($input_Scan_info, "", "Please login a character first!", $TTI_INFO)
  1832. EndIf
  1833. ;~ GUISetState(@SW_SHOW, $GUI_Main)
  1834. EndFunc ;==>OnClick_Scan
  1835.  
  1836.  
  1837. ;========= MAIN GUI FUNCTIONS =================
  1838. ;============ CONTROL CLICK GUI CLIENT SELECT ==========================
  1839. Func OnClick_ClientSelect_Start()
  1840. ;~ Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_ClientChoice))
  1841.  
  1842. Local $selectedItemIndex = _GUICtrlListView_GetSelectedIndices($list_ClientChoice)
  1843. Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,Int($selectedItemIndex))
  1844.  
  1845. Local $Client_title = $string[1]
  1846. Local $Client_hwnd = $string[2]
  1847.  
  1848.  
  1849. If $selectedItemIndex <> "" Then
  1850. Local $tempArray[1][2]
  1851.  
  1852. $tempArray[0][0] = $Client_title
  1853. $tempArray[0][1] = $Client_hwnd
  1854.  
  1855. $CLIENT_REGISTERED = $tempArray
  1856. $CLIENTS_DETECTED = 0
  1857.  
  1858. ConsoleWrite(@CRLF & "========== CLIENT SELECT INFO ==============")
  1859. ConsoleWrite(@CRLF & "TIBIA TITLE= " & $CLIENT_REGISTERED[0][0] & " TIBIA PID= " & $CLIENT_REGISTERED[0][1])
  1860. ConsoleWrite(@CRLF & "============================================")
  1861.  
  1862. GUIDelete($GUI_ClientSelect)
  1863. GUI_Main()
  1864. ;~ OnClick_Scan()
  1865. Else
  1866. _GUICtrlEdit_ShowBalloonTip($input_ClientSelect_hidedn_infobox, "", "Please select a Tibia Client from the list.", $TTI_INFO)
  1867. EndIf
  1868. EndFunc
  1869.  
  1870.  
  1871. ;============ CONTROL CLICK GUI SELF HEALER ==========================
  1872. Func OnClick_SelfHealer_Settings_New()
  1873. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  1874. SaveCurrentConditions()
  1875. EndFunc ;==>OnClick_SelfHealer_Settings_New
  1876. Func OnClick_SelfHealer_Settings_Delete()
  1877. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  1878. _GUICtrlListView_DeleteItem($list_SelfHealer_Conditions, $selectedItemIndex)
  1879.  
  1880. SaveCurrentConditions()
  1881. EndFunc ;==>OnClick_SelfHealer_Settings_Delete
  1882. Func OnClick_SelfHealer_Settings_Save()
  1883. SaveCurrentConditions()
  1884. GUI_SelfHealer_Settings_Close()
  1885. EndFunc ;==>OnClick_SelfHealer_Settings_Save
  1886.  
  1887. Func OnClick_btn_swipe_left_SelfHealer_Condition_When()
  1888. If UBound($CONDITIONS) <= 1 Then
  1889. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  1890. SaveCurrentConditions()
  1891. OnClick_btn_swipe_left_SelfHealer_Condition_When()
  1892. Else
  1893. Local $temp_current_stat_index = 0
  1894. Local $temp_last_index = (UBound($CURRENT_STAT_INDEX) - 1)
  1895. Local $index = 0
  1896. Local $replace
  1897.  
  1898. For $a = 1 To UBound($CURRENT_STAT_INDEX)
  1899. If $CURRENT_STAT_INDEX[$index] == GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) Then
  1900. $temp_current_stat_index = $index
  1901. EndIf
  1902. $index = $index + 1
  1903. Next
  1904.  
  1905. If $temp_current_stat_index == 0 Then
  1906. GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When, $CURRENT_STAT_INDEX[$temp_last_index])
  1907. Else
  1908. Local $nextIndex = $temp_current_stat_index - 1
  1909. GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When, $CURRENT_STAT_INDEX[$nextIndex])
  1910. EndIf
  1911.  
  1912. ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
  1913. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  1914. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  1915. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  1916.  
  1917. If GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) == "Current Health" Then
  1918. $replace = "CurHP"
  1919. ElseIf GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) == "Current Mana" Then
  1920. $replace = "CurMP"
  1921. EndIf
  1922.  
  1923. Local $UpdatedWhenText = $replace & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
  1924.  
  1925. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedWhenText)
  1926. EndIf
  1927. EndFunc ;==>OnClick_btn_swipe_left_SelfHealer_Condition_When
  1928. Func OnClick_btn_swipe_right_SelfHealer_Condition_When()
  1929. If UBound($CONDITIONS) <= 1 Then
  1930. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  1931. SaveCurrentConditions()
  1932. OnClick_btn_swipe_right_SelfHealer_Condition_When()
  1933. Else
  1934. Local $temp_current_stat_index = 0
  1935. Local $temp_last_index = (UBound($CURRENT_STAT_INDEX) - 1)
  1936. Local $index = 0
  1937. Local $replace
  1938.  
  1939. For $a = 1 To UBound($CURRENT_STAT_INDEX)
  1940. If $CURRENT_STAT_INDEX[$index] == GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) Then
  1941. $temp_current_stat_index = $index
  1942. EndIf
  1943. $index = $index + 1
  1944. Next
  1945.  
  1946. If $temp_current_stat_index == $temp_last_index Then
  1947. GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When, $CURRENT_STAT_INDEX[0])
  1948. Else
  1949. Local $nextIndex = $temp_current_stat_index + 1
  1950. GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When, $CURRENT_STAT_INDEX[$nextIndex])
  1951. EndIf
  1952.  
  1953. ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
  1954. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  1955. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  1956. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  1957.  
  1958. If GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) == "Current Health" Then
  1959. $replace = "CurHP"
  1960. ElseIf GUICtrlRead($label_CurrentStat_SelfHealer_Condition_When) == "Current Mana" Then
  1961. $replace = "CurMP"
  1962. EndIf
  1963.  
  1964. Local $UpdatedWhenText = $replace & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
  1965.  
  1966. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedWhenText)
  1967. EndIf
  1968. EndFunc ;==>OnClick_btn_swipe_right_SelfHealer_Condition_When
  1969.  
  1970. Func OnClick_btn_swipe_left_SelfHealer_Condition_Is()
  1971. If UBound($CONDITIONS) <= 1 Then
  1972. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  1973. SaveCurrentConditions()
  1974. OnClick_btn_swipe_left_SelfHealer_Condition_Is()
  1975. Else
  1976. Local $temp_current_stat_index = 0
  1977. Local $temp_last_index = (UBound($OPERATOR_INDEX) - 1)
  1978. Local $index = 0
  1979. Local $replace
  1980.  
  1981. For $a = 1 To UBound($OPERATOR_INDEX)
  1982. If $OPERATOR_INDEX[$index] == GUICtrlRead($label_Operator_SelfHealer_Condition_Is) Then
  1983. $temp_current_stat_index = $index
  1984. EndIf
  1985. $index = $index + 1
  1986. Next
  1987.  
  1988. If $temp_current_stat_index == 0 Then
  1989. GUICtrlSetData($label_Operator_SelfHealer_Condition_Is, $OPERATOR_INDEX[$temp_last_index])
  1990. Else
  1991. Local $nextIndex = $temp_current_stat_index - 1
  1992. GUICtrlSetData($label_Operator_SelfHealer_Condition_Is, $OPERATOR_INDEX[$nextIndex])
  1993. EndIf
  1994.  
  1995.  
  1996. ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
  1997. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  1998. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  1999. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  2000.  
  2001. If GUICtrlRead($label_Operator_SelfHealer_Condition_Is) == "Above" Then
  2002. $replace = ">"
  2003. ElseIf GUICtrlRead($label_Operator_SelfHealer_Condition_Is) == "Below" Then
  2004. $replace = "<"
  2005. EndIf
  2006.  
  2007. Local $UpdatedIsText = $StringSplit[1] & ":" & $replace & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
  2008.  
  2009. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedIsText)
  2010. EndIf
  2011. EndFunc ;==>OnClick_btn_swipe_left_SelfHealer_Condition_Is
  2012. Func OnClick_btn_swipe_right_SelfHealer_Condition_Is()
  2013. If UBound($CONDITIONS) <= 1 Then
  2014. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  2015. SaveCurrentConditions()
  2016. OnClick_btn_swipe_right_SelfHealer_Condition_Is()
  2017. Else
  2018. Local $temp_current_operator_index = 0
  2019. Local $temp_last_index = (UBound($OPERATOR_INDEX) - 1)
  2020. Local $index = 0
  2021.  
  2022. For $a = 1 To UBound($OPERATOR_INDEX)
  2023. If $OPERATOR_INDEX[$index] == GUICtrlRead($label_Operator_SelfHealer_Condition_Is) Then
  2024. $temp_current_stat_index = $index
  2025. EndIf
  2026. $index = $index + 1
  2027. Next
  2028.  
  2029. If $temp_current_stat_index == $temp_last_index Then
  2030. GUICtrlSetData($label_Operator_SelfHealer_Condition_Is, $OPERATOR_INDEX[0])
  2031. Else
  2032. Local $nextIndex = $temp_current_stat_index + 1
  2033. GUICtrlSetData($label_Operator_SelfHealer_Condition_Is, $OPERATOR_INDEX[$nextIndex])
  2034. EndIf
  2035.  
  2036.  
  2037. ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
  2038. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  2039. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  2040. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  2041.  
  2042. If GUICtrlRead($label_Operator_SelfHealer_Condition_Is) == "Above" Then
  2043. $replace = ">"
  2044. ElseIf GUICtrlRead($label_Operator_SelfHealer_Condition_Is) == "Below" Then
  2045. $replace = "<"
  2046. EndIf
  2047.  
  2048. Local $UpdatedIsText = $StringSplit[1] & ":" & $replace & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
  2049.  
  2050. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedIsText)
  2051. EndIf
  2052. EndFunc ;==>OnClick_btn_swipe_right_SelfHealer_Condition_Is
  2053.  
  2054. Func OnClick_btn_swipe_left_SelfHealer_Condition_Cast()
  2055. If UBound($CONDITIONS) <= 1 Then
  2056. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  2057. SaveCurrentConditions()
  2058. OnClick_btn_swipe_left_SelfHealer_Condition_Cast()
  2059. Else
  2060. Local $temp_current_operator_index = 0
  2061. Local $temp_last_index = (UBound($CAST_TYPE_INDEX) - 1)
  2062. Local $index = 0
  2063.  
  2064. For $a = 1 To UBound($CAST_TYPE_INDEX)
  2065. If $CAST_TYPE_INDEX[$index] == GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) Then
  2066. $temp_current_stat_index = $index
  2067. EndIf
  2068. $index = $index + 1
  2069. Next
  2070.  
  2071. If $temp_current_stat_index == 0 Then
  2072. GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast, $CAST_TYPE_INDEX[$temp_last_index])
  2073. Else
  2074. Local $nextIndex = $temp_current_stat_index - 1
  2075. GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast, $CAST_TYPE_INDEX[$nextIndex])
  2076. EndIf
  2077.  
  2078.  
  2079. ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
  2080. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  2081. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  2082. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  2083.  
  2084. If GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Click" Then
  2085. $replace = "C"
  2086. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_SHOW)
  2087. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  2088. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  2089. ElseIf GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Hotkey" Then
  2090. $replace = "H"
  2091. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
  2092. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_SHOW)
  2093. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  2094. ElseIf GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Text" Then
  2095. $replace = "T"
  2096. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
  2097. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  2098. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_SHOW)
  2099. EndIf
  2100.  
  2101. Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $replace & ":" & $StringSplit[6] & ":" & $StringSplit[7]
  2102.  
  2103. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
  2104. EndIf
  2105. EndFunc ;==>OnClick_btn_swipe_left_SelfHealer_Condition_Cast
  2106. Func OnClick_btn_swipe_right_SelfHealer_Condition_Cast()
  2107. If UBound($CONDITIONS) <= 1 Then
  2108. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  2109. SaveCurrentConditions()
  2110. OnClick_btn_swipe_right_SelfHealer_Condition_Cast()
  2111. Else
  2112. Local $temp_current_operator_index = 0
  2113. Local $temp_last_index = (UBound($CAST_TYPE_INDEX) - 1)
  2114. Local $index = 0
  2115.  
  2116. For $a = 1 To UBound($CAST_TYPE_INDEX)
  2117. If $CAST_TYPE_INDEX[$index] == GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) Then
  2118. $temp_current_stat_index = $index
  2119. EndIf
  2120. $index = $index + 1
  2121. Next
  2122.  
  2123. If $temp_current_stat_index == $temp_last_index Then
  2124. GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast, $CAST_TYPE_INDEX[0])
  2125. Else
  2126. Local $nextIndex = $temp_current_stat_index + 1
  2127. GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast, $CAST_TYPE_INDEX[$nextIndex])
  2128. EndIf
  2129.  
  2130.  
  2131. ;========= UPDATE CURRENT SELECTED LISTVIEW ITEM
  2132. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  2133. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  2134. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  2135.  
  2136. If GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Click" Then
  2137. $replace = "C"
  2138. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_SHOW)
  2139. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  2140. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  2141. ElseIf GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Hotkey" Then
  2142. $replace = "H"
  2143. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
  2144. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_SHOW)
  2145. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  2146. ElseIf GUICtrlRead($label_CastType_SelfHealer_Condition_Cast) == "Text" Then
  2147. $replace = "T"
  2148. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
  2149. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  2150. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_SHOW)
  2151. EndIf
  2152.  
  2153. Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $replace & ":" & $StringSplit[6] & ":" & $StringSplit[7]
  2154.  
  2155. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
  2156. EndIf
  2157. EndFunc ;==>OnClick_btn_swipe_right_SelfHealer_Condition_Cast
  2158.  
  2159. Func OnClick_btn_ClickPosition_SelfHealer_Condition_Cast()
  2160. If UBound($CONDITIONS) <= 1 Then
  2161. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  2162. SaveCurrentConditions()
  2163. OnClick_btn_ClickPosition_SelfHealer_Condition_Cast()
  2164. Else
  2165. GUISetState(@SW_HIDE, $GUI_SelfHealer_Settings)
  2166. ActivateTibiaWindow()
  2167.  
  2168. Local $scan_action_click_hp = 1
  2169.  
  2170. If TibiaWindowIsFocused() Then
  2171.  
  2172. Local $savedMousePos[2] = [-1, -1]
  2173.  
  2174. While $scan_action_click_hp == 1 And TibiaWindowIsFocused()
  2175.  
  2176. Local $currentMousePos = MouseGetPos()
  2177.  
  2178. If $currentMousePos[0] <> $savedMousePos[0] And $currentMousePos[1] <> $savedMousePos[1] Then
  2179. Local $savedMousePos[2] = [$currentMousePos[0], $currentMousePos[1]]
  2180.  
  2181. Local $pixelColor = Hex(PixelGetColor($currentMousePos[0], $currentMousePos[1], WinGetHandle("[CLASS:Qt5QWindowOwnDCIcon]")), 6)
  2182.  
  2183. If $currentMousePos[0] > (@DesktopWidth / 2) Then
  2184. $tooltipPosX = $currentMousePos[0] - 200
  2185. ElseIf $currentMousePos[0] <= (@DesktopWidth / 2) Then
  2186. $tooltipPosX = $currentMousePos[0] + 5
  2187. EndIf
  2188.  
  2189. Local $tooltipPosY = $currentMousePos[1] + 15
  2190.  
  2191. 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: " _
  2192. & $currentMousePos[0] & "x" & $currentMousePos[1], $tooltipPosX, $tooltipPosY, "CLICK POSITION SCAN")
  2193. EndIf
  2194.  
  2195. If _IsPressed("0D") Then
  2196. $scan_action_click_hp = 0
  2197.  
  2198. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  2199. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  2200. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  2201. Local $PreviousCastText = $StringSplit[6]
  2202. Local $pos = $currentMousePos[0] & "x" & $currentMousePos[1]
  2203.  
  2204. Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $pos & ":" & $StringSplit[7]
  2205.  
  2206. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
  2207. ElseIf _IsPressed("02") Then
  2208. $scan_action_click_hp = 0
  2209. EndIf
  2210.  
  2211. WEnd
  2212. EndIf
  2213.  
  2214. ToolTip("")
  2215. GUISetState(@SW_SHOW, $GUI_SelfHealer_Settings)
  2216. EndIf
  2217. EndFunc ;==>OnClick_btn_ClickPosition_SelfHealer_Condition_Cast
  2218. Func OnClick_btn_Hotkey_SelfHealer_Condition_Cast()
  2219. If UBound($CONDITIONS) <= 1 Then
  2220. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  2221. SaveCurrentConditions()
  2222. OnClick_btn_Hotkey_SelfHealer_Condition_Cast()
  2223. Else
  2224. GUISetState(@SW_HIDE, $GUI_SelfHealer_Settings)
  2225.  
  2226. ActivateTibiaWindow()
  2227.  
  2228. Local $scan_action_click_hp = 1
  2229.  
  2230. If TibiaWindowIsFocused() Then
  2231.  
  2232. SetBlankFHotkeys()
  2233. Local $savedMousePos[2]
  2234.  
  2235. While $scan_action_click_hp == 1 And TibiaWindowIsFocused()
  2236.  
  2237. Local $currentMousePos = MouseGetPos()
  2238.  
  2239. If $currentMousePos[0] <> $savedMousePos[0] And $currentMousePos[1] <> $savedMousePos[1] Then
  2240. Local $savedMousePos[2] = [$currentMousePos[0], $currentMousePos[1]]
  2241.  
  2242. Local $pixelColor = Hex(PixelGetColor($currentMousePos[0], $currentMousePos[1], WinGetHandle("[CLASS:Qt5QWindowOwnDCIcon]")), 6)
  2243.  
  2244. If $currentMousePos[0] > (@DesktopWidth / 2) Then
  2245. $tooltipPosX = $currentMousePos[0] - 200
  2246. ElseIf $currentMousePos[0] <= (@DesktopWidth / 2) Then
  2247. $tooltipPosX = $currentMousePos[0] + 5
  2248. EndIf
  2249.  
  2250. Local $tooltipPosY = $currentMousePos[1] + 15
  2251.  
  2252. ToolTip("PRESS ANY HOTKEY BETWEEN F1 & F12" & @CRLF & "[RIGHT CLICK] FOR CANCEL" & @CRLF & "Hex color: 0x" & $pixelColor & @CRLF & "Mouse Position: " _
  2253. & $currentMousePos[0] & "x" & $currentMousePos[1], $tooltipPosX, $tooltipPosY, "HOTKEY SCAN")
  2254. EndIf
  2255.  
  2256. Local $hkey
  2257.  
  2258. If _IsPressed("70") Then
  2259. $hkey = "F1"
  2260. ToolTip("")
  2261. ElseIf _IsPressed("71") Then
  2262. $hkey = "F2"
  2263. ToolTip("")
  2264. ElseIf _IsPressed("72") Then
  2265. $hkey = "F3"
  2266. ToolTip("")
  2267. ElseIf _IsPressed("73") Then
  2268. $hkey = "F4"
  2269. ToolTip("")
  2270. ElseIf _IsPressed("74") Then
  2271. $hkey = "F5"
  2272. ToolTip("")
  2273. ElseIf _IsPressed("75") Then
  2274. $hkey = "F6"
  2275. ToolTip("")
  2276. ElseIf _IsPressed("76") Then
  2277. $hkey = "F7"
  2278. ToolTip("")
  2279. ElseIf _IsPressed("77") Then
  2280. $hkey = "F8"
  2281. ToolTip("")
  2282. ElseIf _IsPressed("78") Then
  2283. $hkey = "F9"
  2284. ToolTip("")
  2285. ElseIf _IsPressed("79") Then
  2286. $hkey = "F10"
  2287. ToolTip("")
  2288. ElseIf _IsPressed("7A") Then
  2289. $hkey = "F11"
  2290. ToolTip("")
  2291. ElseIf _IsPressed("7B") Then
  2292. $hkey = "F12"
  2293. ToolTip("")
  2294. ElseIf _IsPressed("02") Then
  2295. $scan_action_click_hp = 0
  2296. EndIf
  2297.  
  2298.  
  2299. If $hkey == "F1" Or $hkey == "F2" Or $hkey == "F3" Or $hkey == "F4" Or $hkey == "F5" Or $hkey == "F6" Or $hkey == "F7" Or $hkey == "F8" _
  2300. Or $hkey == "F9" Or $hkey == "F10" Or $hkey == "F11" Or $hkey == "F12" Then
  2301. $scan_action_click_hp = 0
  2302. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  2303. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  2304. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  2305. Local $PreviousCastText = $StringSplit[6]
  2306. Local $pos = $currentMousePos[0] & "x" & $currentMousePos[1]
  2307.  
  2308. Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $hkey & ":" & $StringSplit[7]
  2309.  
  2310. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
  2311. EndIf
  2312.  
  2313. WEnd
  2314. EndIf
  2315.  
  2316. ToolTip("")
  2317. ResetFHotkeys()
  2318. GUISetState(@SW_SHOW, $GUI_SelfHealer_Settings)
  2319. EndIf
  2320. EndFunc ;==>OnClick_btn_Hotkey_SelfHealer_Condition_Cast
  2321. Func OnClick_btn_Text_SelfHealer_Condition_Cast()
  2322. If UBound($CONDITIONS) <= 1 Then
  2323. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, "CurHP:<:300:20:H:F2:500")
  2324. SaveCurrentConditions()
  2325. OnClick_btn_Text_SelfHealer_Condition_Cast()
  2326. EndIf
  2327. EndFunc ;==>OnClick_btn_Text_SelfHealer_Condition_Cast
  2328.  
  2329.  
  2330. ;============= CONDITION MANAGER FUNCTIONS ==========================
  2331. Func LoadConditionManagerEntry()
  2332. ConsoleWrite(@CRLF & "=========== LoadConditionManagerEntry ==============")
  2333. If $CURE_POISON == 1 Then
  2334. GUICtrlSetState($chkbox_ConditionManager_Pox, $GUI_CHECKED)
  2335. ElseIf $CURE_POISON == 0 Then
  2336. GUICtrlSetState($chkbox_ConditionManager_Pox, $GUI_UNCHECKED)
  2337. EndIf
  2338. If $CURE_CURSE == 1 Then
  2339. GUICtrlSetState($chkbox_ConditionManager_Curse, $GUI_CHECKED)
  2340. ElseIf $CURE_CURSE == 0 Then
  2341. GUICtrlSetState($chkbox_ConditionManager_Curse, $GUI_UNCHECKED)
  2342. EndIf
  2343. If $CURE_BLEED == 1 Then
  2344. GUICtrlSetState($chkbox_ConditionManager_Bleed, $GUI_CHECKED)
  2345. ElseIf $CURE_BLEED == 0 Then
  2346. GUICtrlSetState($chkbox_ConditionManager_Bleed, $GUI_UNCHECKED)
  2347. EndIf
  2348. If $CURE_BURN == 1 Then
  2349. GUICtrlSetState($chkbox_ConditionManager_Burn, $GUI_CHECKED)
  2350. ElseIf $CURE_BURN == 0 Then
  2351. GUICtrlSetState($chkbox_ConditionManager_Burn, $GUI_UNCHECKED)
  2352. EndIf
  2353. If $CURE_ELEC == 1 Then
  2354. GUICtrlSetState($chkbox_ConditionManager_Elec, $GUI_CHECKED)
  2355. ElseIf $CURE_ELEC == 0 Then
  2356. GUICtrlSetState($chkbox_ConditionManager_Elec, $GUI_UNCHECKED)
  2357. EndIf
  2358. If $CURE_PARA == 1 Then
  2359. GUICtrlSetState($chkbox_ConditionManager_Para, $GUI_CHECKED)
  2360. ElseIf $CURE_PARA == 0 Then
  2361. GUICtrlSetState($chkbox_ConditionManager_Para, $GUI_UNCHECKED)
  2362. EndIf
  2363. If $HOLD_HASTE == 1 Then
  2364. GUICtrlSetState($chkbox_ConditionManager_Haste, $GUI_CHECKED)
  2365. ElseIf $HOLD_HASTE == 0 Then
  2366. GUICtrlSetState($chkbox_ConditionManager_Haste, $GUI_UNCHECKED)
  2367. EndIf
  2368. If $HOLD_INVISIBLE == 1 Then
  2369. GUICtrlSetState($chkbox_ConditionManager_Invisible, $GUI_CHECKED)
  2370. ElseIf $HOLD_INVISIBLE == 0 Then
  2371. GUICtrlSetState($chkbox_ConditionManager_Invisible, $GUI_UNCHECKED)
  2372. EndIf
  2373. If $HOLD_MAGICSHIELD == 1 Then
  2374. GUICtrlSetState($chkbox_ConditionManager_MagicShield, $GUI_CHECKED)
  2375. ElseIf $HOLD_MAGICSHIELD == 0 Then
  2376. GUICtrlSetState($chkbox_ConditionManager_MagicShield, $GUI_UNCHECKED)
  2377. EndIf
  2378. If $HOLD_RECOVERY == 1 Then
  2379. GUICtrlSetState($chkbox_ConditionManager_Recovery, $GUI_CHECKED)
  2380. ElseIf $HOLD_RECOVERY == 0 Then
  2381. GUICtrlSetState($chkbox_ConditionManager_Recovery, $GUI_UNCHECKED)
  2382. EndIf
  2383.  
  2384. ConsoleWrite(@CRLF & "====================================================")
  2385. EndFunc
  2386. ;============ CONDITION MANAGER CONTROL CLICKS ==========================
  2387. Func OnClick_ConditionManager_Save()
  2388. GUI_ConditionManager_Close()
  2389. EndFunc
  2390. Func OnClick_chkbox_CurePox()
  2391. If GUICtrlRead($chkbox_ConditionManager_Pox) = $GUI_UNCHECKED Then
  2392. $CURE_POISON = 0
  2393. ElseIf GUICtrlRead($chkbox_ConditionManager_Pox) = $GUI_CHECKED Then
  2394. $CURE_POISON = 1
  2395. EndIf
  2396. EndFunc
  2397. Func OnClick_chkbox_CureCurse()
  2398. If GUICtrlRead($chkbox_ConditionManager_Curse) = $GUI_UNCHECKED Then
  2399. $CURE_CURSE = 0
  2400. ElseIf GUICtrlRead($chkbox_ConditionManager_Curse) = $GUI_CHECKED Then
  2401. $CURE_CURSE = 1
  2402. EndIf
  2403. EndFunc
  2404. Func OnClick_chkbox_CureBleed()
  2405. If GUICtrlRead($chkbox_ConditionManager_Bleed) = $GUI_UNCHECKED Then
  2406. $CURE_BLEED= 0
  2407. ElseIf GUICtrlRead($chkbox_ConditionManager_Bleed) = $GUI_CHECKED Then
  2408. $CURE_BLEED = 1
  2409. EndIf
  2410. EndFunc
  2411. Func OnClick_chkbox_CureBurn()
  2412. If GUICtrlRead($chkbox_ConditionManager_Burn) = $GUI_UNCHECKED Then
  2413. $CURE_BURN = 0
  2414. ElseIf GUICtrlRead($chkbox_ConditionManager_Burn) = $GUI_CHECKED Then
  2415. $CURE_BURN = 1
  2416. EndIf
  2417. EndFunc
  2418. Func OnClick_chkbox_CureElec()
  2419. If GUICtrlRead($chkbox_ConditionManager_Elec) = $GUI_UNCHECKED Then
  2420. $CURE_ELEC = 0
  2421. ElseIf GUICtrlRead($chkbox_ConditionManager_Elec) = $GUI_CHECKED Then
  2422. $CURE_ELEC = 1
  2423. EndIf
  2424. EndFunc
  2425. Func OnClick_chkbox_CurePara()
  2426. If GUICtrlRead($chkbox_ConditionManager_Para) = $GUI_UNCHECKED Then
  2427. $CURE_PARA = 0
  2428. ElseIf GUICtrlRead($chkbox_ConditionManager_Para) = $GUI_CHECKED Then
  2429. $CURE_PARA = 1
  2430. EndIf
  2431. EndFunc
  2432. Func OnClick_chkbox_HoldHaste()
  2433. If GUICtrlRead($chkbox_ConditionManager_Haste) = $GUI_UNCHECKED Then
  2434. $HOLD_HASTE = 0
  2435. ElseIf GUICtrlRead($chkbox_ConditionManager_Haste) = $GUI_CHECKED Then
  2436. $HOLD_HASTE = 1
  2437. EndIf
  2438. EndFunc
  2439. Func OnClick_chkbox_HoldInvisible()
  2440. If GUICtrlRead($chkbox_ConditionManager_Invisible) = $GUI_UNCHECKED Then
  2441. $HOLD_INVISIBLE = 0
  2442. ElseIf GUICtrlRead($chkbox_ConditionManager_Invisible) = $GUI_CHECKED Then
  2443. $HOLD_INVISIBLE = 1
  2444. EndIf
  2445. EndFunc
  2446. Func OnClick_chkbox_HoldMagicShield()
  2447. If GUICtrlRead($chkbox_ConditionManager_MagicShield) = $GUI_UNCHECKED Then
  2448. $HOLD_MAGICSHIELD = 0
  2449. ElseIf GUICtrlRead($chkbox_ConditionManager_MagicShield) = $GUI_CHECKED Then
  2450. $HOLD_MAGICSHIELD = 1
  2451. EndIf
  2452. EndFunc
  2453. Func OnClick_chkbox_HoldRecovery()
  2454. If GUICtrlRead($chkbox_ConditionManager_Recovery) = $GUI_UNCHECKED Then
  2455. $HOLD_RECOVERY = 0
  2456. ElseIf GUICtrlRead($chkbox_ConditionManager_Recovery) = $GUI_CHECKED Then
  2457. $HOLD_RECOVERY = 1
  2458. EndIf
  2459. EndFunc
  2460.  
  2461.  
  2462.  
  2463.  
  2464. ;============= CONDITION SETTINGS FUNCTIONS ==========================
  2465. Func Load_Condition_Settings_Entry_Pox()
  2466. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Pox ==============")
  2467. GUICtrlSetData($input_Text_ConditionManager_Cast_Pox,$CONDITION_CURE_POX[0])
  2468. GUICtrlSetData($label_CastType_ConditionManager_Pox,$CONDITION_CURE_POX[1])
  2469. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Pox,$CONDITION_CURE_POX[2])
  2470. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Pox,$CONDITION_CURE_POX[3])
  2471. ConsoleWrite(@CRLF & "====================================================")
  2472. EndFunc
  2473. Func Load_Condition_Settings_Entry_Curse()
  2474. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Curse ==============")
  2475. GUICtrlSetData($input_Text_ConditionManager_Cast_Curse,$CONDITION_CURE_CURSE[0])
  2476. GUICtrlSetData($label_CastType_ConditionManager_Curse,$CONDITION_CURE_CURSE[1])
  2477. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Curse,$CONDITION_CURE_CURSE[2])
  2478. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Curse,$CONDITION_CURE_CURSE[3])
  2479. ConsoleWrite(@CRLF & "====================================================")
  2480. EndFunc
  2481. Func Load_Condition_Settings_Entry_Bleed()
  2482. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Bleed ==============")
  2483. GUICtrlSetData($input_Text_ConditionManager_Cast_Bleed,$CONDITION_CURE_BLEED[0])
  2484. GUICtrlSetData($label_CastType_ConditionManager_Bleed,$CONDITION_CURE_BLEED[1])
  2485. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Bleed,$CONDITION_CURE_BLEED[2])
  2486. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Bleed,$CONDITION_CURE_BLEED[3])
  2487. ConsoleWrite(@CRLF & "====================================================")
  2488. EndFunc
  2489. Func Load_Condition_Settings_Entry_Burn()
  2490. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Burn ==============")
  2491. GUICtrlSetData($input_Text_ConditionManager_Cast_Burn,$CONDITION_CURE_BURN[0])
  2492. GUICtrlSetData($label_CastType_ConditionManager_Burn,$CONDITION_CURE_BURN[1])
  2493. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Burn,$CONDITION_CURE_BURN[2])
  2494. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Burn,$CONDITION_CURE_BURN[3])
  2495. ConsoleWrite(@CRLF & "====================================================")
  2496. EndFunc
  2497. Func Load_Condition_Settings_Entry_Elec()
  2498. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Elec ==============")
  2499. GUICtrlSetData($input_Text_ConditionManager_Cast_Elec,$CONDITION_CURE_ELEC[0])
  2500. GUICtrlSetData($label_CastType_ConditionManager_Elec,$CONDITION_CURE_ELEC[1])
  2501. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Elec,$CONDITION_CURE_ELEC[2])
  2502. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Elec,$CONDITION_CURE_ELEC[3])
  2503. ConsoleWrite(@CRLF & "====================================================")
  2504. EndFunc
  2505. Func Load_Condition_Settings_Entry_Para()
  2506. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Para ==============")
  2507. GUICtrlSetData($input_Text_ConditionManager_Cast_Para,$CONDITION_CURE_PARA[0])
  2508. GUICtrlSetData($label_CastType_ConditionManager_Para,$CONDITION_CURE_PARA[1])
  2509. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Para,$CONDITION_CURE_PARA[2])
  2510. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Para,$CONDITION_CURE_PARA[3])
  2511. ConsoleWrite(@CRLF & "====================================================")
  2512. EndFunc
  2513. Func Load_Condition_Settings_Entry_Haste()
  2514. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Haste ==============")
  2515. GUICtrlSetData($input_Text_ConditionManager_Cast_Haste,$CONDITION_HOLD_HASTE[0])
  2516. GUICtrlSetData($label_CastType_ConditionManager_Haste,$CONDITION_HOLD_HASTE[1])
  2517. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Haste,$CONDITION_HOLD_HASTE[2])
  2518. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Haste,$CONDITION_HOLD_HASTE[3])
  2519. ConsoleWrite(@CRLF & "====================================================")
  2520. EndFunc
  2521. Func Load_Condition_Settings_Entry_Invisible()
  2522. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Invisible ==============")
  2523. GUICtrlSetData($input_Text_ConditionManager_Cast_Invisible,$CONDITION_HOLD_INVISIBLE[0])
  2524. GUICtrlSetData($label_CastType_ConditionManager_Invisible,$CONDITION_HOLD_INVISIBLE[1])
  2525. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Invisible,$CONDITION_HOLD_INVISIBLE[2])
  2526. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Invisible,$CONDITION_HOLD_INVISIBLE[3])
  2527. ConsoleWrite(@CRLF & "====================================================")
  2528. EndFunc
  2529. Func Load_Condition_Settings_Entry_MagicShield()
  2530. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_MagicShield ==============")
  2531. GUICtrlSetData($input_Text_ConditionManager_Cast_MagicShield,$CONDITION_HOLD_MAGICSHIELD[0])
  2532. GUICtrlSetData($label_CastType_ConditionManager_MagicShield,$CONDITION_HOLD_MAGICSHIELD[1])
  2533. GUICtrlSetData($input_Text_ConditionManager_ManaCost_MagicShield,$CONDITION_HOLD_MAGICSHIELD[2])
  2534. GUICtrlSetData($input_Text_ConditionManager_Cooldown_MagicShield,$CONDITION_HOLD_MAGICSHIELD[3])
  2535. ConsoleWrite(@CRLF & "====================================================")
  2536. EndFunc
  2537. Func Load_Condition_Settings_Entry_Recovery()
  2538. ConsoleWrite(@CRLF & "=========== Load_Condition_Settings_Entry_Recovery ==============")
  2539. GUICtrlSetData($input_Text_ConditionManager_Cast_Recovery,$CONDITION_HOLD_RECOVERY[0])
  2540. GUICtrlSetData($label_CastType_ConditionManager_Recovery,$CONDITION_HOLD_RECOVERY[1])
  2541. GUICtrlSetData($input_Text_ConditionManager_ManaCost_Recovery,$CONDITION_HOLD_RECOVERY[2])
  2542. GUICtrlSetData($input_Text_ConditionManager_Cooldown_Recovery,$CONDITION_HOLD_RECOVERY[3])
  2543. ConsoleWrite(@CRLF & "====================================================")
  2544. EndFunc
  2545. ;============== CONDITION SETTINGS CONTROL CLICKS ==========================
  2546. Func OnClick_Condition_Settings_Pox_Save()
  2547. $CONDITION_CURE_POX[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Pox)
  2548. $CONDITION_CURE_POX[1] = GUICtrlRead($label_CastType_ConditionManager_Pox)
  2549. $CONDITION_CURE_POX[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Pox)
  2550. $CONDITION_CURE_POX[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Pox)
  2551. GUI_ConditionManager_Settings_Pox_Close()
  2552. EndFunc
  2553. Func OnClick_Condition_Settings_Curse_Save()
  2554. $CONDITION_CURE_CURSE[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Curse)
  2555. $CONDITION_CURE_CURSE[1] = GUICtrlRead($label_CastType_ConditionManager_Curse)
  2556. $CONDITION_CURE_CURSE[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Curse)
  2557. $CONDITION_CURE_CURSE[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Curse)
  2558. GUI_ConditionManager_Settings_Curse_Close()
  2559. EndFunc
  2560. Func OnClick_Condition_Settings_Bleed_Save()
  2561. $CONDITION_CURE_BLEED[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Bleed)
  2562. $CONDITION_CURE_BLEED[1] = GUICtrlRead($label_CastType_ConditionManager_Bleed)
  2563. $CONDITION_CURE_BLEED[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Bleed)
  2564. $CONDITION_CURE_BLEED[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Bleed)
  2565. GUI_ConditionManager_Settings_Bleed_Close()
  2566. EndFunc
  2567. Func OnClick_Condition_Settings_Burn_Save()
  2568. $CONDITION_CURE_BURN[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Burn)
  2569. $CONDITION_CURE_BURN[1] = GUICtrlRead($label_CastType_ConditionManager_Burn)
  2570. $CONDITION_CURE_BURN[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Burn)
  2571. $CONDITION_CURE_BURN[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Burn)
  2572. GUI_ConditionManager_Settings_Burn_Close()
  2573. EndFunc
  2574. Func OnClick_Condition_Settings_Elec_Save()
  2575. $CONDITION_CURE_ELEC[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Elec)
  2576. $CONDITION_CURE_ELEC[1] = GUICtrlRead($label_CastType_ConditionManager_Elec)
  2577. $CONDITION_CURE_ELEC[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Elec)
  2578. $CONDITION_CURE_ELEC[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Elec)
  2579. GUI_ConditionManager_Settings_Elec_Close()
  2580. EndFunc
  2581. Func OnClick_Condition_Settings_Para_Save()
  2582. $CONDITION_CURE_PARA[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Para)
  2583. $CONDITION_CURE_PARA[1] = GUICtrlRead($label_CastType_ConditionManager_Para)
  2584. $CONDITION_CURE_PARA[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Para)
  2585. $CONDITION_CURE_PARA[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Para)
  2586. GUI_ConditionManager_Settings_Para_Close()
  2587. EndFunc
  2588. Func OnClick_Condition_Settings_Haste_Save()
  2589. $CONDITION_HOLD_HASTE[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Haste)
  2590. $CONDITION_HOLD_HASTE[1] = GUICtrlRead($label_CastType_ConditionManager_Haste)
  2591. $CONDITION_HOLD_HASTE[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Haste)
  2592. $CONDITION_HOLD_HASTE[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Haste)
  2593. GUI_ConditionManager_Settings_Haste_Close()
  2594. EndFunc
  2595. Func OnClick_Condition_Settings_Invisible_Save()
  2596. $CONDITION_HOLD_INVISIBLE[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Invisible)
  2597. $CONDITION_HOLD_INVISIBLE[1] = GUICtrlRead($label_CastType_ConditionManager_Invisible)
  2598. $CONDITION_HOLD_INVISIBLE[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Invisible)
  2599. $CONDITION_HOLD_INVISIBLE[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Invisible)
  2600. GUI_ConditionManager_Settings_Invisible_Close()
  2601. EndFunc
  2602. Func OnClick_Condition_Settings_MagicShield_Save()
  2603. $CONDITION_HOLD_MAGICSHIELD[0] = GUICtrlRead($input_Text_ConditionManager_Cast_MagicShield)
  2604. $CONDITION_HOLD_MAGICSHIELD[1] = GUICtrlRead($label_CastType_ConditionManager_MagicShield)
  2605. $CONDITION_HOLD_MAGICSHIELD[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_MagicShield)
  2606. $CONDITION_HOLD_MAGICSHIELD[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_MagicShield)
  2607. GUI_ConditionManager_Settings_MagicShield_Close()
  2608. EndFunc
  2609. Func OnClick_Condition_Settings_Recovery_Save()
  2610. $CONDITION_HOLD_RECOVERY[0] = GUICtrlRead($input_Text_ConditionManager_Cast_Recovery)
  2611. $CONDITION_HOLD_RECOVERY[1] = GUICtrlRead($label_CastType_ConditionManager_Recovery)
  2612. $CONDITION_HOLD_RECOVERY[2] = GUICtrlRead($input_Text_ConditionManager_ManaCost_Recovery)
  2613. $CONDITION_HOLD_RECOVERY[3] = GUICtrlRead($input_Text_ConditionManager_Cooldown_Recovery)
  2614. GUI_ConditionManager_Settings_Recovery_Close()
  2615. EndFunc
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621. Func LoadFirstEntryIntoSelfHealerListBox()
  2622. If $CONDITIONS[0] > 0 Then
  2623. ConsoleWrite("---> Item Index 0 has been loaded into input and labels" & @LF)
  2624. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, 0)
  2625. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  2626. Local $CurHPMP = $StringSplit[1]
  2627. Local $Operator = $StringSplit[2]
  2628. Local $Ammount = $StringSplit[3]
  2629. Local $ManaCost = $StringSplit[4]
  2630. Local $CastType = $StringSplit[5]
  2631. Local $CastKey = $StringSplit[6]
  2632. Local $CastDelay = $StringSplit[7]
  2633.  
  2634. If $CurHPMP == "CurHP" Then
  2635. $CurHPMP = "Current Health"
  2636. ElseIf $CurHPMP == "CurMP" Then
  2637. $CurHPMP = "Current Mana"
  2638. EndIf
  2639. If $Operator == ">" Then
  2640. $Operator = "Above"
  2641. ElseIf $Operator == "<" Then
  2642. $Operator = "Below"
  2643. EndIf
  2644. If $CastType == "H" Then
  2645. $CastType = "Hotkey"
  2646. ElseIf $CastType == "T" Then
  2647. $CastType = "Text"
  2648. ElseIf $CastType == "C" Then
  2649. $CastType = "Click"
  2650. EndIf
  2651.  
  2652. GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When,$CurHPMP)
  2653. GUICtrlSetData($label_Operator_SelfHealer_Condition_Is,$Operator)
  2654. GUICtrlSetData($input_SelfHealer_Condition_Is,$Ammount)
  2655. GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast,$CastType)
  2656. GUICtrlSetData($input_SelfHealer_Condition_ManaCost,$ManaCost)
  2657.  
  2658. If $CastType == "Text" Then
  2659. GUICtrlSetData($input_Text_SelfHealer_Condition_Cast,$CastKey)
  2660. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
  2661. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  2662. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_SHOW)
  2663. ElseIf $CastType == "Hotkey" Then
  2664. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
  2665. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_SHOW)
  2666. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  2667. ElseIf $CastType == "Click" Then
  2668. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_SHOW)
  2669. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  2670. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  2671. EndIf
  2672. EndIf
  2673. EndFunc
  2674. Func Load_SelfHealer_Conditions()
  2675. Local $index = 0
  2676.  
  2677. For $i = 1 To UBound($CONDITIONS)
  2678. If $index > 0 Then
  2679. _GUICtrlListView_AddItem($list_SelfHealer_Conditions, $CONDITIONS[$index])
  2680. EndIf
  2681. $index = $index + 1
  2682. Next
  2683.  
  2684.  
  2685. EndFunc ;==>Load_SelfHealer_Conditions
  2686. Func SaveCurrentConditions()
  2687. Local $countedItems = _GUICtrlListView_GetItemCount($list_SelfHealer_Conditions)
  2688.  
  2689.  
  2690. Local $expandArray[1]
  2691. $expandArray[0] = $countedItems
  2692.  
  2693. For $i = 1 To $countedItems
  2694. Local $ItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, ($i - 1))
  2695. ConsoleWrite(@CRLF & $ItemText)
  2696. _ArrayAdd($expandArray, $ItemText)
  2697. Next
  2698.  
  2699.  
  2700. $CONDITIONS = $expandArray
  2701. ;~ _ArrayDisplay($CONDITIONS,"TEST")
  2702. EndFunc ;==>SaveCurrentConditions
  2703.  
  2704.  
  2705. Func ResetFHotkeys()
  2706. HotKeySet("{F1}")
  2707. HotKeySet("{F2}")
  2708. HotKeySet("{F3}")
  2709. HotKeySet("{F4}")
  2710. HotKeySet("{F5}")
  2711. HotKeySet("{F6}")
  2712. HotKeySet("{F7}")
  2713. HotKeySet("{F8}")
  2714. HotKeySet("{F9}")
  2715. HotKeySet("{F10}")
  2716. HotKeySet("{F11}")
  2717. HotKeySet("{F12}")
  2718. EndFunc ;==>ResetFHotkeys
  2719. Func SetBlankFHotkeys()
  2720. HotKeySet("{F1}", "EMPTY_FUNCTION")
  2721. HotKeySet("{F2}", "EMPTY_FUNCTION")
  2722. HotKeySet("{F3}", "EMPTY_FUNCTION")
  2723. HotKeySet("{F4}", "EMPTY_FUNCTION")
  2724. HotKeySet("{F5}", "EMPTY_FUNCTION")
  2725. HotKeySet("{F6}", "EMPTY_FUNCTION")
  2726. HotKeySet("{F7}", "EMPTY_FUNCTION")
  2727. HotKeySet("{F8}", "EMPTY_FUNCTION")
  2728. HotKeySet("{F9}", "EMPTY_FUNCTION")
  2729. HotKeySet("{F10}", "EMPTY_FUNCTION")
  2730. HotKeySet("{F11}", "EMPTY_FUNCTION")
  2731. HotKeySet("{F12}", "EMPTY_FUNCTION")
  2732. EndFunc ;==>SetBlankFHotkeys
  2733. Func EMPTY_FUNCTION()
  2734.  
  2735. EndFunc ;==>EMPTY_FUNCTION
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742. ;=========== WIN FUNCTIONS ============================
  2743. Func CheckProcessForTibiaClient()
  2744. If ClientSelectGuiExists() Then
  2745. If TibiaWindowExists() Then
  2746. Local $wins = WinList("[CLASS:Qt5QWindowOwnDCIcon]")
  2747. Local $wins_Taleon = WinList("[CLASS:Dt6VcaddbwOwnDCXyzp]")
  2748.  
  2749. If $wins[0][0] > 0 Then
  2750. If $wins[0][0] > $CLIENTS_DETECTED Then
  2751. If StringInStr($wins[1][0],"Tibia") And StringInStr($wins[1][1],"0x") Then
  2752.  
  2753.  
  2754. For $i=1 To $wins[0][0]
  2755. Local $item_count = _GUICtrlListView_GetItemCount($list_ClientChoice)
  2756. Local $list_match = False
  2757. For $j=0 To $item_count-1
  2758. Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$j)
  2759. If $string[2] == $wins[$i][1] Then
  2760. $list_match = True
  2761. EndIf
  2762. Next
  2763. If $list_match == False Then
  2764. _GUICtrlListView_AddItem($list_ClientChoice, $wins[$i][0])
  2765. _GUICtrlListView_AddSubItem($list_ClientChoice, $CLIENTS_DETECTED,$wins[$i][1], 1)
  2766. ConsoleWrite(@CRLF & "ADDING CLIENT: " & "Row: #END VALUE: " & $wins[$i][0] & " | " & $wins[$i][1])
  2767. $CLIENTS_DETECTED = $CLIENTS_DETECTED + 1
  2768. ExitLoop
  2769. EndIf
  2770. Next
  2771. EndIf
  2772. ElseIf $wins[0][0] < $CLIENTS_DETECTED Then
  2773. For $i=0 To $CLIENTS_DETECTED-1
  2774. Local $client_in_list = False
  2775. Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$i)
  2776. For $j=1 To $wins[0][0]
  2777. If $string[2] == $wins[$j][1] Then
  2778. $client_in_list = True
  2779. EndIf
  2780. Next
  2781. If $client_in_list == False Then
  2782. $CLIENTS_DETECTED = $CLIENTS_DETECTED - 1
  2783. Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$i)
  2784. ConsoleWrite(@CRLF & "DELETE CLIENT: " & "Row: " & $i & " VALUE: " & $string[0] & " | " & $string[1])
  2785. _GUICtrlListView_DeleteItem($list_ClientChoice, $i)
  2786. ExitLoop
  2787. EndIf
  2788. Next
  2789. EndIf
  2790.  
  2791. ElseIf $wins_Taleon[0][0] > 0 Then
  2792. If $wins_Taleon[0][0] > $CLIENTS_DETECTED Then
  2793. If StringInStr($wins_Taleon[1][0],"Tibia") And StringInStr($wins_Taleon[1][1],"0x") Then
  2794.  
  2795.  
  2796. For $i=1 To $wins_Taleon[0][0]
  2797. Local $item_count = _GUICtrlListView_GetItemCount($list_ClientChoice)
  2798. Local $list_match = False
  2799. For $j=0 To $item_count-1
  2800. Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$j)
  2801. If $string[2] == $wins_Taleon[$i][1] Then
  2802. $list_match = True
  2803. EndIf
  2804. Next
  2805. If $list_match == False Then
  2806. _GUICtrlListView_AddItem($list_ClientChoice, $wins_Taleon[$i][0])
  2807. _GUICtrlListView_AddSubItem($list_ClientChoice, $CLIENTS_DETECTED,$wins_Taleon[$i][1], 1)
  2808. ConsoleWrite(@CRLF & "ADDING CLIENT: " & "Row: #END VALUE: " & $wins_Taleon[$i][0] & " | " & $wins_Taleon[$i][1])
  2809. $CLIENTS_DETECTED = $CLIENTS_DETECTED + 1
  2810. ExitLoop
  2811. EndIf
  2812. Next
  2813. EndIf
  2814. ElseIf $wins_Taleon[0][0] < $CLIENTS_DETECTED Then
  2815. For $i=0 To $CLIENTS_DETECTED-1
  2816. Local $client_in_list = False
  2817. Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$i)
  2818. For $j=1 To $wins_Taleon[0][0]
  2819. If $string[2] == $wins_Taleon[$j][1] Then
  2820. $client_in_list = True
  2821. EndIf
  2822. Next
  2823. If $client_in_list == False Then
  2824. $CLIENTS_DETECTED = $CLIENTS_DETECTED - 1
  2825. Local $string = _GUICtrlListView_GetItemTextArray($list_ClientChoice,$i)
  2826. ConsoleWrite(@CRLF & "DELETE CLIENT: " & "Row: " & $i & " VALUE: " & $string[0] & " | " & $string[1])
  2827. _GUICtrlListView_DeleteItem($list_ClientChoice, $i)
  2828. ExitLoop
  2829. EndIf
  2830. Next
  2831. EndIf
  2832. EndIf
  2833.  
  2834. Else
  2835. Local $item_count = _GUICtrlListView_GetItemCount($list_ClientChoice)
  2836. If $item_count > 0 Then
  2837. _GUICtrlListView_DeleteItem($list_ClientChoice, 0)
  2838. $CLIENTS_DETECTED = $CLIENTS_DETECTED - 1
  2839. EndIf
  2840. EndIf
  2841. EndIf
  2842. EndFunc
  2843. Func TibiaWindowScan()
  2844. ActivateTibiaWindow()
  2845. If TibiaWindowIsFocused() And CharacterLogedIn() Then
  2846. UpdateStatusLabel("scan...")
  2847.  
  2848. GetCurrentCharacterName()
  2849.  
  2850. SaveCurrentTibiaWindowPos()
  2851. GetCurrentStatusBarPosition() ;========> PixelSearch MP-Bar an save Rectangles as Global Array <$HP_RECTANGLE> & <$MP_RECTANGLE>
  2852.  
  2853. GetCurrentEQCollapsePosition()
  2854.  
  2855. GetCurrentEQCollapseState()
  2856. GetCurrentEQCollapsePixelCheckSum()
  2857.  
  2858. GetCurrentConditionBarPosition()
  2859. GetCurrentConditionBarPixelCheckSum()
  2860.  
  2861.  
  2862.  
  2863. GetCurrentHP() ;========> PixelSearch HP Digits and save as Global Variable <$CHARACTER_HP>
  2864. GetCurrentMP() ;========> PixelSearch MP Digits and save as Global Variable <$CHARACTER_MP>
  2865.  
  2866.  
  2867. GetCurrentHPpixelCheckSum() ;========> Save PixelChecksum from <$HP_RECTANGLE> as Global Variable <$HP_RECTANGLE_CHECKSUM>
  2868. GetCurrentMPpixelCheckSum() ;========> Save PixelChecksum from <$MP_RECTANGLE> as Global Variable <$MP_RECTANGLE_CHECKSUM>
  2869.  
  2870.  
  2871.  
  2872.  
  2873. UpdateCharacterLabel()
  2874. UpdateHPLabel() ;========> Set value <$CHARACTER_HP> to control Label <$Label_HP>
  2875. UpdateMPLabel() ;========> Set value <$CHARACTER_MP> to control Label <$Label_MP>
  2876.  
  2877. UpdateStatusLabel("ready")
  2878. EndIf
  2879. EndFunc ;==>TibiaWindowScan
  2880. Func ActivateTibiaWindow()
  2881. WinActivate(HWnd($CLIENT_REGISTERED[0][1]))
  2882. EndFunc ;==>ActivateTibiaWindow
  2883. Func Donate()
  2884. $PID = ShellExecute("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BJUPXVMQ3DLF6")
  2885. WinWaitActive("")
  2886. EndFunc ;==>Donate
  2887. Func MouseMoved()
  2888. Local $tempMousePos1 = MouseGetPos()
  2889. Sleep(10)
  2890. Local $tempMousePos2 = MouseGetPos()
  2891.  
  2892. If $tempMousePos1[0] == $tempMousePos2[0] And $tempMousePos1[1] == $tempMousePos2[1] Then
  2893. Return False
  2894. EndIf
  2895. Return True
  2896. EndFunc
  2897.  
  2898.  
  2899.  
  2900. ;=========== UPDATE GUI CONTROLS ======================
  2901. Func UpdateStatusLabel($string)
  2902. If MainGuiExists() Then
  2903. GUICtrlSetData($Label_Status,$string)
  2904. EndIf
  2905. EndFunc
  2906. Func UpdateHPLabel()
  2907. If MainGuiExists() Then
  2908. Local $time = TimerInit()
  2909. GUICtrlSetData($Label_HP, $CHARACTER_HP)
  2910. Local $diff = TimerDiff($time)
  2911. ConsoleWrite(@CRLF & "================UpdateHPLabel===============")
  2912. ConsoleWrite(@CRLF & "Set HPLabel = " & $CHARACTER_HP)
  2913. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  2914. ConsoleWrite(@CRLF & "============================================")
  2915. EndIf
  2916. EndFunc ;==>UpdateHPLabel
  2917. Func UpdateMPLabel()
  2918. If MainGuiExists() Then
  2919. Local $time = TimerInit()
  2920. GUICtrlSetData($Label_MP, $CHARACTER_MP)
  2921. Local $diff = TimerDiff($time)
  2922. ConsoleWrite(@CRLF & "================UpdateMPLabel===============")
  2923. ConsoleWrite(@CRLF & "Set MPLabel = " & $CHARACTER_MP)
  2924. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  2925. ConsoleWrite(@CRLF & "============================================")
  2926. EndIf
  2927. EndFunc ;==>UpdateMPLabel
  2928. Func UpdateCharacterLabel()
  2929. If MainGuiExists() Then
  2930. Local $time = TimerInit()
  2931. GUICtrlSetData($Label_Character, $CLIENT_CHARACTER_NAME)
  2932. Local $diff = TimerDiff($time)
  2933. ConsoleWrite(@CRLF & "================UpdateMPLabel===============")
  2934. ConsoleWrite(@CRLF & "Set CharacterLabel = " & $CLIENT_CHARACTER_NAME)
  2935. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  2936. ConsoleWrite(@CRLF & "============================================")
  2937. EndIf
  2938. EndFunc
  2939.  
  2940.  
  2941. ;=========== RETURN VALUES FROM PROCESS ===============
  2942. Func GetCurrentTibiaWindowPos()
  2943.  
  2944. If TibiaSelectedWindowExists() Then
  2945. Local $pos = WinGetPos(HWnd($CLIENT_REGISTERED[0][1]))
  2946.  
  2947. Local $tempPos[4] = [$pos[0], $pos[1], $pos[2], $pos[3]]
  2948. Return $tempPos
  2949. EndIf
  2950.  
  2951. EndFunc ;==>GetCurrentTibiaWindowPos
  2952. Func GetCurrentConditionBarPosition()
  2953. Local $time = TimerInit()
  2954.  
  2955. Local $MP_unique_position_X = $MP_UNIQUE_COLOR_POSITION[0]
  2956. Local $MP_unique_position_Y = $MP_UNIQUE_COLOR_POSITION[1]
  2957.  
  2958. If $EQ_COLLAPSE_STATE == "maximized" Then
  2959. ;************** Calculate Condition Bar Rectangle ******************
  2960. Local $ConditionBarRegionStart_X = $MP_unique_position_X + 1
  2961. Local $ConditionBarRegionStart_Y = $MP_unique_position_Y + 154
  2962.  
  2963. Local $ConditionBarRegionEnd_X = $ConditionBarRegionStart_X + 103
  2964. Local $ConditionBarRegionEnd_Y = $ConditionBarRegionStart_Y + 8
  2965.  
  2966. Local $ConditionBarRegion_Rectangle[4] = [$ConditionBarRegionStart_X, $ConditionBarRegionStart_Y, $ConditionBarRegionEnd_X, $ConditionBarRegionEnd_Y]
  2967.  
  2968. $CONDITION_BAR_RECTANGLE = $ConditionBarRegion_Rectangle
  2969. ElseIf $EQ_COLLAPSE_STATE == "minimized" Then
  2970. ;************** Calculate Condition Bar Rectangle ******************
  2971. Local $ConditionBarRegionStart_X = $MP_unique_position_X + 15
  2972. Local $ConditionBarRegionStart_Y = $MP_unique_position_Y + 54
  2973.  
  2974. Local $ConditionBarRegionEnd_X = $ConditionBarRegionStart_X + 91
  2975. Local $ConditionBarRegionEnd_Y = $ConditionBarRegionStart_Y + 8
  2976.  
  2977. Local $ConditionBarRegion_Rectangle[4] = [$ConditionBarRegionStart_X, $ConditionBarRegionStart_Y, $ConditionBarRegionEnd_X, $ConditionBarRegionEnd_Y]
  2978.  
  2979. $CONDITION_BAR_RECTANGLE = $ConditionBarRegion_Rectangle
  2980. EndIf
  2981.  
  2982. Local $diff = TimerDiff($time)
  2983. ConsoleWrite(@CRLF & "======Func GetCurrentConditionBarPosition======")
  2984. ConsoleWrite(@CRLF & "CONDITION_BAR_RECTANGLE = " & $CONDITION_BAR_RECTANGLE[0] & "x" & $CONDITION_BAR_RECTANGLE[1] & " => " & $CONDITION_BAR_RECTANGLE[2] & "x" & $CONDITION_BAR_RECTANGLE[3])
  2985. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  2986. ConsoleWrite(@CRLF & "============================================")
  2987.  
  2988. EndFunc
  2989. Func GetCurrentEQCollapsePosition()
  2990. Local $time = TimerInit()
  2991.  
  2992. Local $startScanX = $TIBIA_WINDOW_X + $TIBIA_WINDOW_WIDTH - 181
  2993. Local $startScanY = $TIBIA_WINDOW_Y
  2994. Local $endScanX = $TIBIA_WINDOW_X + $TIBIA_WINDOW_WIDTH
  2995. Local $endScanY = $TIBIA_WINDOW_Y + $TIBIA_WINDOW_HEIGHT - 25
  2996.  
  2997. Local $StoreInbox_unique_colors_detected = 0
  2998.  
  2999. Local $aCoord = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x193a57) ;0x193a57 unique blue hex color at store button
  3000. 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
  3001. $StoreInbox_unique_colors_detected = 1
  3002. EndIf
  3003.  
  3004. Local $ManaBarLowPosX = $aCoord[0]
  3005. Local $ManaBarLowPosY = $aCoord[1]
  3006.  
  3007. Local $tempUniquePos[2] = [$ManaBarLowPosX,$ManaBarLowPosY]
  3008.  
  3009. $STOREI_NBOX_UNIQUE_COLOR_POSITION = $tempUniquePos
  3010.  
  3011. If $StoreInbox_unique_colors_detected == 1 Then
  3012. ;************** Calculate EQ Collapse Rectangle ******************
  3013. Local $EQCollapseRegionStart_X = $ManaBarLowPosX - 72
  3014. Local $EQCollapseRegionStart_Y = $ManaBarLowPosY - 11
  3015.  
  3016. Local $EQCollapseRegionEnd_X = $EQCollapseRegionStart_X + 11
  3017. Local $EQCollapseRegionEnd_Y = $EQCollapseRegionStart_Y + 11
  3018.  
  3019. Local $EQCollapseRegion_Rectangle[4] = [$EQCollapseRegionStart_X, $EQCollapseRegionStart_Y, $EQCollapseRegionEnd_X, $EQCollapseRegionEnd_Y]
  3020.  
  3021. $EQ_COLLAPSE_RECTANGLE = $EQCollapseRegion_Rectangle
  3022. EndIf
  3023.  
  3024. Local $diff = TimerDiff($time)
  3025. ConsoleWrite(@CRLF & "======Func GetCurrentEQCollapsePosition======")
  3026. ConsoleWrite(@CRLF & "EQ_COLLAPSE_RECTANGLE = " & $EQ_COLLAPSE_RECTANGLE[0] & "x" & $EQ_COLLAPSE_RECTANGLE[1] & " => " & $EQ_COLLAPSE_RECTANGLE[2] & "x" & $EQ_COLLAPSE_RECTANGLE[3])
  3027. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3028. ConsoleWrite(@CRLF & "============================================")
  3029. EndFunc
  3030.  
  3031. Func GetCurrentStatusBarPosition()
  3032. Local $time = TimerInit()
  3033.  
  3034. Local $startScanX = $TIBIA_WINDOW_X + $TIBIA_WINDOW_WIDTH - 181
  3035. Local $startScanY = $TIBIA_WINDOW_Y
  3036. Local $endScanX = $TIBIA_WINDOW_X + $TIBIA_WINDOW_WIDTH
  3037. Local $endScanY = $TIBIA_WINDOW_Y + $TIBIA_WINDOW_HEIGHT - 25
  3038.  
  3039. ConsoleWrite(@CRLF & "Tibia Window X: " & $TIBIA_WINDOW_X)
  3040. ConsoleWrite(@CRLF & "Tibia Window Y: " & $TIBIA_WINDOW_Y)
  3041. ConsoleWrite(@CRLF & "Tibia Window WIDTH: " & $TIBIA_WINDOW_WIDTH)
  3042. ConsoleWrite(@CRLF & "Tibia Window HEIGHT: " & $TIBIA_WINDOW_HEIGHT)
  3043.  
  3044. ConsoleWrite(@CRLF & "Tibia Window Start Scan X: " & $startScanX)
  3045. ConsoleWrite(@CRLF & "Tibia Window Start Scan Y: " & $startScanY)
  3046. ConsoleWrite(@CRLF & "Tibia Window End Scan X: " & $endScanX)
  3047. ConsoleWrite(@CRLF & "Tibia Window End Scan Y: " & $endScanY)
  3048.  
  3049. Local $MP_unique_colors_detected = 0
  3050.  
  3051.  
  3052.  
  3053. ;~ Local $hDll = DllOpen("gdi32.dll")
  3054.  
  3055. ;~ Local $vDC = _PixelGetColor_CreateDC($hDll)
  3056.  
  3057. ;~ Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
  3058.  
  3059. ;~ For $x = $startScanX To $endScanX
  3060. ;~ For $y = $startScanY To $endScanY
  3061. ;~ Local $sColor = _PixelGetColor_GetPixel($vDC, $x,$y, $hDll)
  3062. ;~ If $sColor == "42415C" Then
  3063. ;~ $sColor = _PixelGetColor_GetPixel($vDC, $x+1,$y, $hDll)
  3064. ;~ If $sColor == "434349" Then
  3065. ;~ Local $aCoord[2] = [$x,$y]
  3066. ;~ $MP_unique_colors_detected = 1
  3067. ;~ EndIf
  3068. ;~ EndIf
  3069. ;~ Next
  3070. ;~ Next
  3071.  
  3072. ;~ _PixelGetColor_ReleaseRegion($vRegion)
  3073.  
  3074. ;~ _PixelGetColor_ReleaseDC($vDC,$hDll)
  3075.  
  3076. ;~ DllClose($hDll)
  3077.  
  3078.  
  3079.  
  3080. Local $aCoord = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x42415c) ;0x42415c unique blue hex color at mana bar
  3081. 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
  3082. $MP_unique_colors_detected = 1
  3083. EndIf
  3084.  
  3085. If $MP_unique_colors_detected == 1 Then
  3086.  
  3087. Local $ManaBarLowPosX = $aCoord[0]
  3088. Local $ManaBarLowPosY = $aCoord[1]
  3089.  
  3090. Local $tempUniquePos[2] = [$ManaBarLowPosX,$ManaBarLowPosY]
  3091.  
  3092. $MP_UNIQUE_COLOR_POSITION = $tempUniquePos
  3093.  
  3094. ;************** Calculate HP Rectangle ******************
  3095. Local $NumbersRegionStartHP_X = $ManaBarLowPosX + 119
  3096. Local $NumbersRegionStartHP_Y = $ManaBarLowPosY - 21
  3097.  
  3098. Local $NumbersRegionEndHP_X = $NumbersRegionStartHP_X + 37
  3099. Local $NumbersRegionEndHP_Y = $NumbersRegionStartHP_Y + 7
  3100.  
  3101. Local $NumberRegionHP_Rectangle[4] = [$NumbersRegionStartHP_X, $NumbersRegionStartHP_Y, $NumbersRegionEndHP_X, $NumbersRegionEndHP_Y]
  3102.  
  3103. $HP_RECTANGLE = $NumberRegionHP_Rectangle
  3104.  
  3105.  
  3106. ;************** Calculate MP Rectangle ******************
  3107. Local $NumbersRegionStartMP_X = $ManaBarLowPosX + 119
  3108. Local $NumbersRegionStartMP_Y = $ManaBarLowPosY - 8
  3109.  
  3110. Local $NumbersRegionEndMP_X = $NumbersRegionStartMP_X + 37
  3111. Local $NumbersRegionEndMP_Y = $NumbersRegionStartMP_Y + 7
  3112.  
  3113. Local $NumberRegionMP_Rectangle[4] = [$NumbersRegionStartMP_X, $NumbersRegionStartMP_Y, $NumbersRegionEndMP_X, $NumbersRegionEndMP_Y]
  3114.  
  3115. $MP_RECTANGLE = $NumberRegionMP_Rectangle
  3116.  
  3117.  
  3118. ;************** Calculate EQ Collapse Rectangle ******************
  3119. Local $EQCollapseRegionStart_X = $ManaBarLowPosX
  3120. Local $EQCollapseRegionStart_Y = $ManaBarLowPosY + 8
  3121.  
  3122. Local $EQCollapseRegionEnd_X = $EQCollapseRegionStart_X + 11
  3123. Local $EQCollapseRegionEnd_Y = $EQCollapseRegionStart_Y + 11
  3124.  
  3125. Local $EQCollapseRegion_Rectangle[4] = [$EQCollapseRegionStart_X, $EQCollapseRegionStart_Y, $EQCollapseRegionEnd_X, $EQCollapseRegionEnd_Y]
  3126.  
  3127. $EQ_COLLAPSE_RECTANGLE = $EQCollapseRegion_Rectangle
  3128.  
  3129.  
  3130. Local $diff = TimerDiff($time)
  3131. ConsoleWrite(@CRLF & "======Func GetCurrentStatusBarPosition======")
  3132. ConsoleWrite(@CRLF & "HP_RECTANGLE = " & $HP_RECTANGLE[0] & "x" & $HP_RECTANGLE[1] & " => " & $HP_RECTANGLE[2] & "x" & $HP_RECTANGLE[3])
  3133. ConsoleWrite(@CRLF & "MP_RECTANGLE = " & $MP_RECTANGLE[0] & "x" & $MP_RECTANGLE[1] & " => " & $MP_RECTANGLE[2] & "x" & $MP_RECTANGLE[3])
  3134. ;~ ConsoleWrite(@CRLF & "EQ_COLLAPSE_RECTANGLE = " & $EQ_COLLAPSE_RECTANGLE[0] & "x" & $EQ_COLLAPSE_RECTANGLE[1] & " => " & $EQ_COLLAPSE_RECTANGLE[2] & "x" & $EQ_COLLAPSE_RECTANGLE[3])
  3135. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3136. ConsoleWrite(@CRLF & "============================================")
  3137. EndIf
  3138.  
  3139. EndFunc ;==>GetCurrentStatusBarPosition
  3140. Func GetCurrentHP()
  3141.  
  3142. Local $NumbersStartBlock1_X = $HP_RECTANGLE[0]
  3143. Local $NumbersStartBlock1_Y = $HP_RECTANGLE[1]
  3144.  
  3145. Local $NumbersStartBlock2_X = $HP_RECTANGLE[0] + 8
  3146. Local $NumbersStartBlock2_Y = $HP_RECTANGLE[1]
  3147.  
  3148. Local $NumbersStartBlock3_X = $HP_RECTANGLE[0] + 16
  3149. Local $NumbersStartBlock3_Y = $HP_RECTANGLE[1]
  3150.  
  3151. Local $NumbersStartBlock4_X = $HP_RECTANGLE[0] + 24
  3152. Local $NumbersStartBlock4_Y = $HP_RECTANGLE[1]
  3153.  
  3154. Local $NumbersStartBlock5_X = $HP_RECTANGLE[0] + 32
  3155. Local $NumbersStartBlock5_Y = $HP_RECTANGLE[1]
  3156.  
  3157.  
  3158. Local $Number = ""
  3159.  
  3160. ;===============START TIMER SCAN===============================================================================
  3161. Local $time = TimerInit()
  3162.  
  3163. Local $hDll = DllOpen("gdi32.dll")
  3164. Local $vDC = _PixelGetColor_CreateDC($hDll)
  3165. Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
  3166. Local $sColor
  3167.  
  3168.  
  3169. ;NUMBER BLOCK 1
  3170. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" And _
  3171. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
  3172. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+5, $hDll) == "C0C0C0" Then
  3173. $Number = $Number & "0"
  3174. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" And _
  3175. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+3,$NumbersStartBlock1_Y+7, $hDll) == "C0C0C0" Then
  3176. $Number = $Number & "1"
  3177. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+7, $hDll) == "C0C0C0" And _
  3178. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+4, $hDll) == "C0C0C0" Then
  3179. $Number = $Number & "2"
  3180. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+1,$NumbersStartBlock1_Y+3, $hDll) <> "C0C0C0" And _
  3181. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
  3182. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y+2, $hDll) == "C0C0C0" Then
  3183. $Number = $Number & "3"
  3184. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+5, $hDll) == "C0C0C0" And _
  3185. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+2, $hDll) == "C0C0C0" Then
  3186. $Number = $Number & "4"
  3187. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" And _
  3188. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" Then
  3189. $Number = $Number & "5"
  3190. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
  3191. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" And _
  3192. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" Then
  3193. $Number = $Number & "6"
  3194. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" And _
  3195. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" Then
  3196. $Number = $Number & "7"
  3197. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+4, $hDll) == "C0C0C0" And _
  3198. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
  3199. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" Then
  3200. $Number = $Number & "8"
  3201. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" And _
  3202. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+3,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" Then
  3203. $Number = $Number & "9"
  3204. EndIf
  3205.  
  3206. ;NUMBER BLOCK 2
  3207. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" And _
  3208. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
  3209. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+5, $hDll) == "C0C0C0" Then
  3210. $Number = $Number & "0"
  3211. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" And _
  3212. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+3,$NumbersStartBlock2_Y+7, $hDll) == "C0C0C0" Then
  3213. $Number = $Number & "1"
  3214. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+7, $hDll) == "C0C0C0" And _
  3215. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+4, $hDll) == "C0C0C0" Then
  3216. $Number = $Number & "2"
  3217. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+1,$NumbersStartBlock2_Y+3, $hDll) <> "C0C0C0" And _
  3218. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
  3219. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y+2, $hDll) == "C0C0C0" Then
  3220. $Number = $Number & "3"
  3221. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+5, $hDll) == "C0C0C0" And _
  3222. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+2, $hDll) == "C0C0C0" Then
  3223. $Number = $Number & "4"
  3224. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" And _
  3225. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" Then
  3226. $Number = $Number & "5"
  3227. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
  3228. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" And _
  3229. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" Then
  3230. $Number = $Number & "6"
  3231. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" And _
  3232. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" Then
  3233. $Number = $Number & "7"
  3234. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+4, $hDll) == "C0C0C0" And _
  3235. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
  3236. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" Then
  3237. $Number = $Number & "8"
  3238. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" And _
  3239. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+3,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" Then
  3240. $Number = $Number & "9"
  3241. EndIf
  3242.  
  3243. ;NUMBER BLOCK 3
  3244. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" And _
  3245. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
  3246. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+5, $hDll) == "C0C0C0" Then
  3247. $Number = $Number & "0"
  3248. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" And _
  3249. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+3,$NumbersStartBlock3_Y+7, $hDll) == "C0C0C0" Then
  3250. $Number = $Number & "1"
  3251. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+7, $hDll) == "C0C0C0" And _
  3252. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+4, $hDll) == "C0C0C0" Then
  3253. $Number = $Number & "2"
  3254. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+1,$NumbersStartBlock3_Y+3, $hDll) <> "C0C0C0" And _
  3255. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
  3256. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y+2, $hDll) == "C0C0C0" Then
  3257. $Number = $Number & "3"
  3258. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+5, $hDll) == "C0C0C0" And _
  3259. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+2, $hDll) == "C0C0C0" Then
  3260. $Number = $Number & "4"
  3261. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" And _
  3262. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" Then
  3263. $Number = $Number & "5"
  3264. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
  3265. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" And _
  3266. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" Then
  3267. $Number = $Number & "6"
  3268. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" And _
  3269. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" Then
  3270. $Number = $Number & "7"
  3271. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+4, $hDll) == "C0C0C0" And _
  3272. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
  3273. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" Then
  3274. $Number = $Number & "8"
  3275. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" And _
  3276. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+3,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" Then
  3277. $Number = $Number & "9"
  3278. EndIf
  3279.  
  3280. ;NUMBER BLOCK 4
  3281. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" And _
  3282. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
  3283. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+5, $hDll) == "C0C0C0" Then
  3284. $Number = $Number & "0"
  3285. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" And _
  3286. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+3,$NumbersStartBlock4_Y+7, $hDll) == "C0C0C0" Then
  3287. $Number = $Number & "1"
  3288. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+7, $hDll) == "C0C0C0" And _
  3289. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+4, $hDll) == "C0C0C0" Then
  3290. $Number = $Number & "2"
  3291. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+1,$NumbersStartBlock4_Y+3, $hDll) <> "C0C0C0" And _
  3292. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
  3293. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y+2, $hDll) == "C0C0C0" Then
  3294. $Number = $Number & "3"
  3295. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+5, $hDll) == "C0C0C0" And _
  3296. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+2, $hDll) == "C0C0C0" Then
  3297. $Number = $Number & "4"
  3298. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" And _
  3299. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" Then
  3300. $Number = $Number & "5"
  3301. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
  3302. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" And _
  3303. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" Then
  3304. $Number = $Number & "6"
  3305. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" And _
  3306. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" Then
  3307. $Number = $Number & "7"
  3308. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+4, $hDll) == "C0C0C0" And _
  3309. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
  3310. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" Then
  3311. $Number = $Number & "8"
  3312. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" And _
  3313. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+3,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" Then
  3314. $Number = $Number & "9"
  3315. EndIf
  3316.  
  3317. ;NUMBER BLOCK 5
  3318. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" And _
  3319. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
  3320. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+5, $hDll) == "C0C0C0" Then
  3321. $Number = $Number & "0"
  3322. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" And _
  3323. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+3,$NumbersStartBlock5_Y+7, $hDll) == "C0C0C0" Then
  3324. $Number = $Number & "1"
  3325. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+7, $hDll) == "C0C0C0" And _
  3326. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+4, $hDll) == "C0C0C0" Then
  3327. $Number = $Number & "2"
  3328. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+1,$NumbersStartBlock5_Y+3, $hDll) <> "C0C0C0" And _
  3329. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
  3330. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y+2, $hDll) == "C0C0C0" Then
  3331. $Number = $Number & "3"
  3332. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+5, $hDll) == "C0C0C0" And _
  3333. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+2, $hDll) == "C0C0C0" Then
  3334. $Number = $Number & "4"
  3335. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" And _
  3336. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" Then
  3337. $Number = $Number & "5"
  3338. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
  3339. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" And _
  3340. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" Then
  3341. $Number = $Number & "6"
  3342. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" And _
  3343. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" Then
  3344. $Number = $Number & "7"
  3345. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+4, $hDll) == "C0C0C0" And _
  3346. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
  3347. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" Then
  3348. $Number = $Number & "8"
  3349. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" And _
  3350. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+3,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" Then
  3351. $Number = $Number & "9"
  3352. EndIf
  3353.  
  3354. $CHARACTER_HP = $Number
  3355.  
  3356. _PixelGetColor_ReleaseRegion($vRegion)
  3357. _PixelGetColor_ReleaseDC($vDC,$hDll)
  3358. DllClose($hDll)
  3359.  
  3360. Local $diff = TimerDiff($time)
  3361. ConsoleWrite(@CRLF & "================GetCurrentHP================")
  3362. ConsoleWrite(@CRLF & "CurrentHP = " & $CHARACTER_HP)
  3363. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3364. ConsoleWrite(@CRLF & "============================================")
  3365.  
  3366. Return $Number
  3367. EndFunc ;==>GetCurrentHP
  3368. Func GetCurrentMP()
  3369.  
  3370. Local $NumbersStartBlock1_X = $MP_RECTANGLE[0]
  3371. Local $NumbersStartBlock1_Y = $MP_RECTANGLE[1]
  3372.  
  3373. Local $NumbersStartBlock2_X = $MP_RECTANGLE[0] + 8
  3374. Local $NumbersStartBlock2_Y = $MP_RECTANGLE[1]
  3375.  
  3376. Local $NumbersStartBlock3_X = $MP_RECTANGLE[0] + 16
  3377. Local $NumbersStartBlock3_Y = $MP_RECTANGLE[1]
  3378.  
  3379. Local $NumbersStartBlock4_X = $MP_RECTANGLE[0] + 24
  3380. Local $NumbersStartBlock4_Y = $MP_RECTANGLE[1]
  3381.  
  3382. Local $NumbersStartBlock5_X = $MP_RECTANGLE[0] + 32
  3383. Local $NumbersStartBlock5_Y = $MP_RECTANGLE[1]
  3384.  
  3385.  
  3386. Local $Number = ""
  3387.  
  3388. ;===============START TIMER SCAN===============================================================================
  3389. Local $time = TimerInit()
  3390.  
  3391. Local $hDll = DllOpen("gdi32.dll")
  3392.  
  3393. Local $vDC = _PixelGetColor_CreateDC($hDll)
  3394.  
  3395. Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
  3396.  
  3397. Local $sColor
  3398.  
  3399. ;NUMBER BLOCK 1
  3400. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" And _
  3401. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
  3402. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+5, $hDll) == "C0C0C0" Then
  3403. $Number = $Number & "0"
  3404. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" And _
  3405. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+3,$NumbersStartBlock1_Y+7, $hDll) == "C0C0C0" Then
  3406. $Number = $Number & "1"
  3407. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+7, $hDll) == "C0C0C0" And _
  3408. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+4, $hDll) == "C0C0C0" Then
  3409. $Number = $Number & "2"
  3410. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+1,$NumbersStartBlock1_Y+3, $hDll) <> "C0C0C0" And _
  3411. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
  3412. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y+2, $hDll) == "C0C0C0" Then
  3413. $Number = $Number & "3"
  3414. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+5, $hDll) == "C0C0C0" And _
  3415. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+2, $hDll) == "C0C0C0" Then
  3416. $Number = $Number & "4"
  3417. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" And _
  3418. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" Then
  3419. $Number = $Number & "5"
  3420. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
  3421. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" And _
  3422. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" Then
  3423. $Number = $Number & "6"
  3424. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" And _
  3425. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y, $hDll) == "C0C0C0" Then
  3426. $Number = $Number & "7"
  3427. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+4, $hDll) == "C0C0C0" And _
  3428. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+2,$NumbersStartBlock1_Y+3, $hDll) == "C0C0C0" And _
  3429. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+5,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" Then
  3430. $Number = $Number & "8"
  3431. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X,$NumbersStartBlock1_Y+1, $hDll) == "C0C0C0" And _
  3432. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock1_X+3,$NumbersStartBlock1_Y+6, $hDll) == "C0C0C0" Then
  3433. $Number = $Number & "9"
  3434. EndIf
  3435.  
  3436. ;NUMBER BLOCK 2
  3437. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" And _
  3438. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
  3439. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+5, $hDll) == "C0C0C0" Then
  3440. $Number = $Number & "0"
  3441. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" And _
  3442. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+3,$NumbersStartBlock2_Y+7, $hDll) == "C0C0C0" Then
  3443. $Number = $Number & "1"
  3444. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+7, $hDll) == "C0C0C0" And _
  3445. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+4, $hDll) == "C0C0C0" Then
  3446. $Number = $Number & "2"
  3447. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+1,$NumbersStartBlock2_Y+3, $hDll) <> "C0C0C0" And _
  3448. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
  3449. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y+2, $hDll) == "C0C0C0" Then
  3450. $Number = $Number & "3"
  3451. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+5, $hDll) == "C0C0C0" And _
  3452. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+2, $hDll) == "C0C0C0" Then
  3453. $Number = $Number & "4"
  3454. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" And _
  3455. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" Then
  3456. $Number = $Number & "5"
  3457. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
  3458. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" And _
  3459. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" Then
  3460. $Number = $Number & "6"
  3461. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" And _
  3462. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y, $hDll) == "C0C0C0" Then
  3463. $Number = $Number & "7"
  3464. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+4, $hDll) == "C0C0C0" And _
  3465. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+2,$NumbersStartBlock2_Y+3, $hDll) == "C0C0C0" And _
  3466. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+5,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" Then
  3467. $Number = $Number & "8"
  3468. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X,$NumbersStartBlock2_Y+1, $hDll) == "C0C0C0" And _
  3469. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock2_X+3,$NumbersStartBlock2_Y+6, $hDll) == "C0C0C0" Then
  3470. $Number = $Number & "9"
  3471. EndIf
  3472.  
  3473. ;NUMBER BLOCK 3
  3474. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" And _
  3475. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
  3476. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+5, $hDll) == "C0C0C0" Then
  3477. $Number = $Number & "0"
  3478. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" And _
  3479. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+3,$NumbersStartBlock3_Y+7, $hDll) == "C0C0C0" Then
  3480. $Number = $Number & "1"
  3481. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+7, $hDll) == "C0C0C0" And _
  3482. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+4, $hDll) == "C0C0C0" Then
  3483. $Number = $Number & "2"
  3484. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+1,$NumbersStartBlock3_Y+3, $hDll) <> "C0C0C0" And _
  3485. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
  3486. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y+2, $hDll) == "C0C0C0" Then
  3487. $Number = $Number & "3"
  3488. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+5, $hDll) == "C0C0C0" And _
  3489. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+2, $hDll) == "C0C0C0" Then
  3490. $Number = $Number & "4"
  3491. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" And _
  3492. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" Then
  3493. $Number = $Number & "5"
  3494. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
  3495. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" And _
  3496. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" Then
  3497. $Number = $Number & "6"
  3498. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" And _
  3499. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y, $hDll) == "C0C0C0" Then
  3500. $Number = $Number & "7"
  3501. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+4, $hDll) == "C0C0C0" And _
  3502. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+2,$NumbersStartBlock3_Y+3, $hDll) == "C0C0C0" And _
  3503. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+5,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" Then
  3504. $Number = $Number & "8"
  3505. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X,$NumbersStartBlock3_Y+1, $hDll) == "C0C0C0" And _
  3506. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock3_X+3,$NumbersStartBlock3_Y+6, $hDll) == "C0C0C0" Then
  3507. $Number = $Number & "9"
  3508. EndIf
  3509.  
  3510. ;NUMBER BLOCK 4
  3511. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" And _
  3512. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
  3513. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+5, $hDll) == "C0C0C0" Then
  3514. $Number = $Number & "0"
  3515. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" And _
  3516. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+3,$NumbersStartBlock4_Y+7, $hDll) == "C0C0C0" Then
  3517. $Number = $Number & "1"
  3518. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+7, $hDll) == "C0C0C0" And _
  3519. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+4, $hDll) == "C0C0C0" Then
  3520. $Number = $Number & "2"
  3521. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+1,$NumbersStartBlock4_Y+3, $hDll) <> "C0C0C0" And _
  3522. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
  3523. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y+2, $hDll) == "C0C0C0" Then
  3524. $Number = $Number & "3"
  3525. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+5, $hDll) == "C0C0C0" And _
  3526. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+2, $hDll) == "C0C0C0" Then
  3527. $Number = $Number & "4"
  3528. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" And _
  3529. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" Then
  3530. $Number = $Number & "5"
  3531. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
  3532. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" And _
  3533. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" Then
  3534. $Number = $Number & "6"
  3535. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" And _
  3536. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y, $hDll) == "C0C0C0" Then
  3537. $Number = $Number & "7"
  3538. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+4, $hDll) == "C0C0C0" And _
  3539. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+2,$NumbersStartBlock4_Y+3, $hDll) == "C0C0C0" And _
  3540. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+5,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" Then
  3541. $Number = $Number & "8"
  3542. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X,$NumbersStartBlock4_Y+1, $hDll) == "C0C0C0" And _
  3543. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock4_X+3,$NumbersStartBlock4_Y+6, $hDll) == "C0C0C0" Then
  3544. $Number = $Number & "9"
  3545. EndIf
  3546.  
  3547. ;NUMBER BLOCK 5
  3548. If _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" And _
  3549. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
  3550. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+5, $hDll) == "C0C0C0" Then
  3551. $Number = $Number & "0"
  3552. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" And _
  3553. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+3,$NumbersStartBlock5_Y+7, $hDll) == "C0C0C0" Then
  3554. $Number = $Number & "1"
  3555. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+7, $hDll) == "C0C0C0" And _
  3556. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+4, $hDll) == "C0C0C0" Then
  3557. $Number = $Number & "2"
  3558. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+1,$NumbersStartBlock5_Y+3, $hDll) <> "C0C0C0" And _
  3559. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
  3560. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y+2, $hDll) == "C0C0C0" Then
  3561. $Number = $Number & "3"
  3562. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+5, $hDll) == "C0C0C0" And _
  3563. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+2, $hDll) == "C0C0C0" Then
  3564. $Number = $Number & "4"
  3565. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" And _
  3566. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" Then
  3567. $Number = $Number & "5"
  3568. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
  3569. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" And _
  3570. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" Then
  3571. $Number = $Number & "6"
  3572. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" And _
  3573. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y, $hDll) == "C0C0C0" Then
  3574. $Number = $Number & "7"
  3575. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+4, $hDll) == "C0C0C0" And _
  3576. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+2,$NumbersStartBlock5_Y+3, $hDll) == "C0C0C0" And _
  3577. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+5,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" Then
  3578. $Number = $Number & "8"
  3579. ElseIf _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X,$NumbersStartBlock5_Y+1, $hDll) == "C0C0C0" And _
  3580. _PixelGetColor_GetPixel($vDC, $NumbersStartBlock5_X+3,$NumbersStartBlock5_Y+6, $hDll) == "C0C0C0" Then
  3581. $Number = $Number & "9"
  3582. EndIf
  3583.  
  3584. $CHARACTER_MP = $Number
  3585.  
  3586. _PixelGetColor_ReleaseRegion($vRegion)
  3587.  
  3588. _PixelGetColor_ReleaseDC($vDC,$hDll)
  3589.  
  3590. DllClose($hDll)
  3591.  
  3592. Local $diff = TimerDiff($time)
  3593. ConsoleWrite(@CRLF & "================GetCurrentMP================")
  3594. ConsoleWrite(@CRLF & "CurrentMP = " & $CHARACTER_MP)
  3595. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3596. ConsoleWrite(@CRLF & "============================================")
  3597.  
  3598. Return $Number
  3599.  
  3600. EndFunc ;==>GetCurrentMP
  3601. Func GetCurrentEQCollapseState()
  3602. Local $EQCollapseStateStart_X = $EQ_COLLAPSE_RECTANGLE[0]+2
  3603. Local $EQCollapseStateStart_Y = $EQ_COLLAPSE_RECTANGLE[1]+2
  3604.  
  3605. Local $State = ""
  3606.  
  3607. ;===============START TIMER SCAN===============================================================================
  3608. Local $time = TimerInit()
  3609.  
  3610. Local $hDll = DllOpen("gdi32.dll")
  3611.  
  3612. Local $vDC = _PixelGetColor_CreateDC($hDll)
  3613.  
  3614. Local $vRegion = _PixelGetColor_CaptureRegion($vDC, 0,0,@DesktopWidth,@DesktopHeight,$hDll)
  3615.  
  3616. Local $sColor
  3617.  
  3618.  
  3619. ;COLLAPSE STATE
  3620. If _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+2, $EQCollapseStateStart_Y, $hDll) == "636364" And _
  3621. _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+3, $EQCollapseStateStart_Y, $hDll) == "868686" And _
  3622. _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+4, $EQCollapseStateStart_Y, $hDll) == "636364" Then
  3623. $State = "minimized"
  3624. ElseIf _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+2, $EQCollapseStateStart_Y, $hDll) == "2F3030" And _
  3625. _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+3, $EQCollapseStateStart_Y, $hDll) == "272727" And _
  3626. _PixelGetColor_GetPixel($vDC, $EQCollapseStateStart_X+4, $EQCollapseStateStart_Y, $hDll) == "242424" Then
  3627. $State = "maximized"
  3628. EndIf
  3629.  
  3630. $EQ_COLLAPSE_STATE = $State
  3631.  
  3632. _PixelGetColor_ReleaseRegion($vRegion)
  3633.  
  3634. _PixelGetColor_ReleaseDC($vDC,$hDll)
  3635.  
  3636. DllClose($hDll)
  3637.  
  3638. Local $diff = TimerDiff($time)
  3639. ConsoleWrite(@CRLF & "================GetCurrentEQCollapseState================")
  3640. ConsoleWrite(@CRLF & "CurrentEQCollapseState = " & $EQ_COLLAPSE_STATE)
  3641. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3642. ConsoleWrite(@CRLF & "============================================")
  3643.  
  3644. Return $State
  3645. EndFunc
  3646. Func GetCurrentHPpixelCheckSum()
  3647. Local $time = TimerInit()
  3648. Local $temp = PixelChecksum($HP_RECTANGLE[0], $HP_RECTANGLE[1], $HP_RECTANGLE[2], $HP_RECTANGLE[3])
  3649. Local $diff = TimerDiff($time)
  3650. $HP_RECTANGLE_CHECKSUM = $temp
  3651. ConsoleWrite(@CRLF & "=========GetCurrentHPpixelCheckSum==========")
  3652. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $HP_RECTANGLE_CHECKSUM)
  3653. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3654. ConsoleWrite(@CRLF & "============================================")
  3655. Return $temp
  3656. EndFunc ;==>GetCurrentHPpixelCheckSum
  3657. Func GetCurrentMPpixelCheckSum()
  3658. Local $time = TimerInit()
  3659. Local $temp = PixelChecksum($MP_RECTANGLE[0], $MP_RECTANGLE[1], $MP_RECTANGLE[2], $MP_RECTANGLE[3])
  3660. Local $diff = TimerDiff($time)
  3661. $MP_RECTANGLE_CHECKSUM = $temp
  3662. ConsoleWrite(@CRLF & "=========GetCurrentMPpixelCheckSum==========")
  3663. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $MP_RECTANGLE_CHECKSUM)
  3664. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3665. ConsoleWrite(@CRLF & "============================================")
  3666. Return $temp
  3667. EndFunc ;==>GetCurrentMPpixelCheckSum
  3668. Func GetCurrentEQCollapsePixelCheckSum()
  3669. Local $time = TimerInit()
  3670. Local $temp = PixelChecksum($EQ_COLLAPSE_RECTANGLE[0], $EQ_COLLAPSE_RECTANGLE[1], $EQ_COLLAPSE_RECTANGLE[2], $EQ_COLLAPSE_RECTANGLE[3])
  3671. Local $diff = TimerDiff($time)
  3672. $EQ_COLLAPSE_RECTANGLE_CHECKSUM = $temp
  3673. ConsoleWrite(@CRLF & "=========GetCurrentEQCollapsePixelCheckSum==========")
  3674. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $EQ_COLLAPSE_RECTANGLE_CHECKSUM)
  3675. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3676. ConsoleWrite(@CRLF & "============================================")
  3677. Return $temp
  3678. EndFunc
  3679. Func GetCurrentConditionBarPixelCheckSum()
  3680. Local $time = TimerInit()
  3681. Local $temp = PixelChecksum($CONDITION_BAR_RECTANGLE[0], $CONDITION_BAR_RECTANGLE[1], $CONDITION_BAR_RECTANGLE[2], $CONDITION_BAR_RECTANGLE[3])
  3682. Local $diff = TimerDiff($time)
  3683. $CONDITION_BAR_RECTANGLE_CHECKSUM = $temp
  3684. ConsoleWrite(@CRLF & "=========GetCurrentConditionBarPixelCheckSum==========")
  3685. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $CONDITION_BAR_RECTANGLE_CHECKSUM)
  3686. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3687. ConsoleWrite(@CRLF & "============================================")
  3688. Return $temp
  3689. EndFunc
  3690. Func GetTibiaIdleTime()
  3691. If _IsArrowKeyPressed() == 1 Then
  3692. $TIBIA_IDLE_TIME = TimerInit()
  3693. EndIf
  3694. EndFunc
  3695. Func GetCurrentCharacterName()
  3696. Local $tempTitle = WinGetTitle(HWnd($CLIENT_REGISTERED[0][1]))
  3697. Local $split = StringSplit($tempTitle," - ",1)
  3698. $CLIENT_CHARACTER_NAME = $split[2]
  3699. EndFunc
  3700.  
  3701.  
  3702. ;=========== UPDATE GLOBAL STATES ====================
  3703. Func SaveCurrentTibiaWindowPos()
  3704.  
  3705. If TibiaSelectedWindowExists() Then
  3706. Local $pos = GetCurrentTibiaWindowPos()
  3707.  
  3708. $TIBIA_WINDOW_X = $pos[0]
  3709. $TIBIA_WINDOW_Y = $pos[1]
  3710. $TIBIA_WINDOW_WIDTH = $pos[2]
  3711. $TIBIA_WINDOW_HEIGHT = $pos[3]
  3712. EndIf
  3713.  
  3714. EndFunc ;==>SaveCurrentTibiaWindowPos
  3715. Func StopSupport()
  3716. GUICtrlSetState($chkbox_Support, $GUI_UNCHECKED)
  3717. $Support = 0
  3718. EndFunc ;==>StopAutoHeal
  3719. Func SaveCurrentHP()
  3720. Local $temp = GetCurrentHP()
  3721.  
  3722. $CHARACTER_HP = $temp
  3723. EndFunc ;==>SaveCurrentHP
  3724. Func SaveCurrentMP()
  3725. Local $temp = GetCurrentMP()
  3726.  
  3727. $CHARACTER_MP = $temp
  3728. EndFunc ;==>SaveCurrentMP
  3729.  
  3730.  
  3731.  
  3732.  
  3733. ;========== CHECK GLOBAL VARIABLES ===================
  3734. Func SupportActive()
  3735. If $Support == 1 Then
  3736. Return True
  3737. EndIf
  3738. Return False
  3739. EndFunc ;==>SupportActive
  3740. Func HPPixelsChanged()
  3741. Local $time = TimerInit()
  3742. Local $tempSum = PixelChecksum($HP_RECTANGLE[0], $HP_RECTANGLE[1], $HP_RECTANGLE[2], $HP_RECTANGLE[3])
  3743. Local $diff = TimerDiff($time)
  3744.  
  3745. If $HP_RECTANGLE_CHECKSUM <> $tempSum Then
  3746. ConsoleWrite(@CRLF & "============Func HPPixelsCHanged============")
  3747. ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $HP_RECTANGLE_CHECKSUM)
  3748. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
  3749. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3750. ConsoleWrite(@CRLF & "============================================")
  3751. Return True
  3752. EndIf
  3753.  
  3754. Return False
  3755. EndFunc ;==>HPPixelsChanged
  3756. Func MPPixelsChanged()
  3757. Local $time = TimerInit()
  3758. Local $tempSum = PixelChecksum($MP_RECTANGLE[0], $MP_RECTANGLE[1], $MP_RECTANGLE[2], $MP_RECTANGLE[3])
  3759. Local $diff = TimerDiff($time)
  3760.  
  3761. If $MP_RECTANGLE_CHECKSUM <> $tempSum Then
  3762. ConsoleWrite(@CRLF & "============Func MPPixelsCHanged============")
  3763. ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $MP_RECTANGLE_CHECKSUM)
  3764. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
  3765. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3766. ConsoleWrite(@CRLF & "============================================")
  3767. Return True
  3768. EndIf
  3769.  
  3770. Return False
  3771. EndFunc ;==>MPPixelsChanged
  3772. Func EQCollapsePixelsChanged()
  3773. Local $time = TimerInit()
  3774. Local $tempSum = PixelChecksum($EQ_COLLAPSE_RECTANGLE[0], $EQ_COLLAPSE_RECTANGLE[1], $EQ_COLLAPSE_RECTANGLE[2], $EQ_COLLAPSE_RECTANGLE[3])
  3775. Local $diff = TimerDiff($time)
  3776.  
  3777. If $EQ_COLLAPSE_RECTANGLE_CHECKSUM <> $tempSum Then
  3778. ConsoleWrite(@CRLF & "============Func EQCollapsePixelsChanged============")
  3779. ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $EQ_COLLAPSE_RECTANGLE_CHECKSUM)
  3780. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
  3781. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3782. ConsoleWrite(@CRLF & "============================================")
  3783. Return True
  3784. EndIf
  3785.  
  3786. Return False
  3787. EndFunc
  3788. Func ConditionBarPixelsChanged()
  3789. Local $time = TimerInit()
  3790. Local $tempSum = PixelChecksum($CONDITION_BAR_RECTANGLE[0], $CONDITION_BAR_RECTANGLE[1], $CONDITION_BAR_RECTANGLE[2], $CONDITION_BAR_RECTANGLE[3])
  3791. Local $diff = TimerDiff($time)
  3792.  
  3793. If $CONDITION_BAR_RECTANGLE_CHECKSUM <> $tempSum Then
  3794. ConsoleWrite(@CRLF & "============Func ConditionBarPixelsChanged============")
  3795. ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $CONDITION_BAR_RECTANGLE_CHECKSUM)
  3796. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
  3797. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3798. ConsoleWrite(@CRLF & "============================================")
  3799. Return True
  3800. EndIf
  3801.  
  3802. Return False
  3803. EndFunc
  3804.  
  3805. Func HPPixelsChangedCastTiming()
  3806. Local $time = TimerInit()
  3807. Local $tempSum = PixelChecksum($HP_RECTANGLE[0], $HP_RECTANGLE[1], $HP_RECTANGLE[2], $HP_RECTANGLE[3])
  3808. Local $diff = TimerDiff($time)
  3809.  
  3810. If $HP_RECTANGLE_CHECKSUM_CAST_TIMING <> $tempSum Then
  3811. ConsoleWrite(@CRLF & "============Func HPPixelsCHanged============")
  3812. ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $HP_RECTANGLE_CHECKSUM)
  3813. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
  3814. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3815. ConsoleWrite(@CRLF & "============================================")
  3816. Return True
  3817. EndIf
  3818.  
  3819. Return False
  3820. EndFunc ;==>HPPixelsChanged
  3821. Func MPPixelsChangedCastTiming()
  3822. Local $time = TimerInit()
  3823. Local $tempSum = PixelChecksum($MP_RECTANGLE[0], $MP_RECTANGLE[1], $MP_RECTANGLE[2], $MP_RECTANGLE[3])
  3824. Local $diff = TimerDiff($time)
  3825.  
  3826. If $MP_RECTANGLE_CHECKSUM_CAST_TIMING <> $tempSum Then
  3827. ConsoleWrite(@CRLF & "============Func MPPixelsCHanged============")
  3828. ConsoleWrite(@CRLF & "LastSavedCheckSum = " & $MP_RECTANGLE_CHECKSUM)
  3829. ConsoleWrite(@CRLF & "CurrentCheckSum = " & $tempSum)
  3830. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  3831. ConsoleWrite(@CRLF & "============================================")
  3832. Return True
  3833. EndIf
  3834.  
  3835. Return False
  3836. EndFunc ;==>MPPixelsChanged
  3837.  
  3838.  
  3839.  
  3840.  
  3841. ;============ CHECK WINDOW STATES ====================
  3842. Func ClientSelectGuiExists()
  3843. If WinExists("ZeroBot Client Select", "") Then
  3844. Return True
  3845. EndIf
  3846. Return False
  3847. EndFunc
  3848. Func MainGuiExists()
  3849. If WinExists("ZeroBot Menu", "") Then
  3850. Return True
  3851. EndIf
  3852. Return False
  3853. EndFunc ;==>MainGuiExists
  3854. Func TibiaWindowChangedPos()
  3855. If TibiaWindowExists() And TibiaWindowPositionIsSaved() Then
  3856. Local $tempTibiaWinPos = GetCurrentTibiaWindowPos()
  3857.  
  3858. If $tempTibiaWinPos[0] <> $TIBIA_WINDOW_X Or _
  3859. $tempTibiaWinPos[1] <> $TIBIA_WINDOW_Y Or _
  3860. $tempTibiaWinPos[2] <> $TIBIA_WINDOW_WIDTH Or _
  3861. $tempTibiaWinPos[3] <> $TIBIA_WINDOW_HEIGHT Then
  3862. Return True
  3863. EndIf
  3864. EndIf
  3865. Return False
  3866.  
  3867. EndFunc ;==>TibiaWindowChangedPos
  3868. Func TibiaWindowExists()
  3869. If WinExists("[CLASS:Qt5QWindowOwnDCIcon]", "") Or WinExists("[CLASS:Dt6VcaddbwOwnDCXyzp]", "") Then
  3870. Return True
  3871. EndIf
  3872. Return False
  3873. EndFunc ;==>TibiaWindowExists
  3874. Func TibiaSelectedWindowExists()
  3875. If WinExists(HWnd($CLIENT_REGISTERED[0][1]), "") Then
  3876. Return True
  3877. EndIf
  3878. Return False
  3879. EndFunc ;==>TibiaWindowExists
  3880. Func TibiaWindowPositionIsSaved()
  3881. If $TIBIA_WINDOW_X <> "" And $TIBIA_WINDOW_Y <> "" And $TIBIA_WINDOW_WIDTH <> "" And $TIBIA_WINDOW_HEIGHT <> "" Then
  3882. Return True
  3883. EndIf
  3884. Return False
  3885. EndFunc
  3886.  
  3887.  
  3888. Func TibiaWindowIsMaximized()
  3889. If BitAND(WinGetState(HWnd($CLIENT_REGISTERED[0][1])),32) Then
  3890. Return True
  3891. EndIf
  3892. Return False
  3893. EndFunc
  3894. Func TibiaWindowIsMinimized()
  3895. If BitAND(WinGetState(HWnd($CLIENT_REGISTERED[0][1])),16) Then
  3896. Return True
  3897. EndIf
  3898. Return False
  3899. EndFunc
  3900. Func TibiaWindowIsFocused()
  3901. If WinActive(HWnd($CLIENT_REGISTERED[0][1])) Then
  3902. Return True
  3903. EndIf
  3904. Return False
  3905. EndFunc ;==>TibiaWindowIsFocused
  3906. Func CharacterLogedIn()
  3907. If WinGetTitle(HWnd($CLIENT_REGISTERED[0][1])) <> "Tibia" Then
  3908. Return True
  3909. EndIf
  3910. Return False
  3911. EndFunc ;==>CharacterLogedIn
  3912. Func CharacterIsPoisoned()
  3913. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  3914. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  3915. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  3916. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  3917.  
  3918. Local $Poison_unique_colors_detected = 0
  3919.  
  3920. Local $time = TimerInit()
  3921.  
  3922.  
  3923. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x48f861) ;0x48f861 unique green hex color at poison icon
  3924. 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
  3925. $Poison_unique_colors_detected = 1
  3926. EndIf
  3927.  
  3928.  
  3929.  
  3930. Local $diff = TimerDiff($time)
  3931. ConsoleWrite(@CRLF & "=========Func CharacterIsPoisoned==========")
  3932. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  3933. ConsoleWrite(@CRLF & "===========================================")
  3934. If $Poison_unique_colors_detected == 1 Then
  3935. Return True
  3936. EndIf
  3937. Return False
  3938. EndFunc
  3939. Func CharacterIsCursed()
  3940. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  3941. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  3942. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  3943. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  3944.  
  3945. Local $Cursed_unique_colors_detected = 0
  3946.  
  3947. Local $time = TimerInit()
  3948.  
  3949.  
  3950. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x101010) ;0x48f861 unique green hex color at poison icon
  3951. If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x686868) <> 0 And _
  3952. 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
  3953. $Cursed_unique_colors_detected = 1
  3954. EndIf
  3955.  
  3956.  
  3957.  
  3958. Local $diff = TimerDiff($time)
  3959. ConsoleWrite(@CRLF & "=========Func CharacterIsCursed==========")
  3960. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  3961. ConsoleWrite(@CRLF & "===========================================")
  3962. If $Cursed_unique_colors_detected == 1 Then
  3963. Return True
  3964. EndIf
  3965. Return False
  3966. EndFunc
  3967. Func CharacterIsBleeding()
  3968. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  3969. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  3970. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  3971. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  3972.  
  3973. Local $Bleeding_unique_colors_detected = 0
  3974.  
  3975. Local $time = TimerInit()
  3976.  
  3977.  
  3978. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x4C2121) ;0x48f861 unique green hex color at poison icon
  3979. 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
  3980. PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0xF77700) <> 0 Then
  3981. $Bleeding_unique_colors_detected = 1
  3982. EndIf
  3983.  
  3984.  
  3985.  
  3986. Local $diff = TimerDiff($time)
  3987. ConsoleWrite(@CRLF & "=========Func CharacterIsBleeding==========")
  3988. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  3989. ConsoleWrite(@CRLF & "===========================================")
  3990. If $Bleeding_unique_colors_detected == 1 Then
  3991. Return True
  3992. EndIf
  3993. Return False
  3994. EndFunc
  3995. Func CharacterIsBurning()
  3996. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  3997. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  3998. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  3999. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  4000.  
  4001. Local $Burning_unique_colors_detected = 0
  4002.  
  4003. Local $time = TimerInit()
  4004.  
  4005.  
  4006. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x4c2121) ;0x48f861 unique green hex color at poison icon
  4007. 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
  4008. PixelSearch($statusIcon[0] + 2, $statusIcon[1], $statusIcon[0] + 2, $statusIcon[1], 0xf77700) <> 0 Then
  4009. $Burning_unique_colors_detected = 1
  4010. EndIf
  4011.  
  4012.  
  4013.  
  4014. Local $diff = TimerDiff($time)
  4015. ConsoleWrite(@CRLF & "=========Func CharacterIsBurning==========")
  4016. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  4017. ConsoleWrite(@CRLF & "===========================================")
  4018. If $Burning_unique_colors_detected == 1 Then
  4019. Return True
  4020. EndIf
  4021. Return False
  4022. EndFunc
  4023. Func CharacterIsElectrified()
  4024. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  4025. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  4026. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  4027. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  4028.  
  4029. Local $Electrified_unique_colors_detected = 0
  4030.  
  4031. Local $time = TimerInit()
  4032.  
  4033.  
  4034. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x7272c5) ;0x48f861 unique green hex color at poison icon
  4035. If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x6061a1) <> 0 And _
  4036. 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
  4037. $Electrified_unique_colors_detected = 1
  4038. EndIf
  4039.  
  4040.  
  4041.  
  4042. Local $diff = TimerDiff($time)
  4043. ConsoleWrite(@CRLF & "=========Func CharacterIsElectrified==========")
  4044. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  4045. ConsoleWrite(@CRLF & "===========================================")
  4046. If $Electrified_unique_colors_detected == 1 Then
  4047. Return True
  4048. EndIf
  4049. Return False
  4050. EndFunc
  4051. Func CharacterIsParalyzed()
  4052. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  4053. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  4054. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  4055. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  4056.  
  4057. Local $Paralyzed_unique_colors_detected = 0
  4058.  
  4059. Local $time = TimerInit()
  4060.  
  4061.  
  4062. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x811817) ;0x48f861 unique green hex color at poison icon
  4063. If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x901414) <> 0 And _
  4064. 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
  4065. $Paralyzed_unique_colors_detected = 1
  4066. EndIf
  4067.  
  4068.  
  4069.  
  4070. Local $diff = TimerDiff($time)
  4071. ConsoleWrite(@CRLF & "=========Func CharacterIsParalyzed==========")
  4072. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  4073. ConsoleWrite(@CRLF & "===========================================")
  4074. If $Paralyzed_unique_colors_detected == 1 Then
  4075. Return True
  4076. EndIf
  4077. Return False
  4078. EndFunc
  4079. Func CharacterIsHaste()
  4080. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  4081. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  4082. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  4083. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  4084.  
  4085. Local $Haste_unique_colors_detected = 0
  4086.  
  4087. Local $time = TimerInit()
  4088.  
  4089.  
  4090. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x917b5b) ;0x48f861 unique green hex color at poison icon
  4091. If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0xd2bc9b) <> 0 And _
  4092. 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
  4093. $Haste_unique_colors_detected = 1
  4094. EndIf
  4095.  
  4096.  
  4097.  
  4098. Local $diff = TimerDiff($time)
  4099. ConsoleWrite(@CRLF & "=========Func CharacterIsHaste==========")
  4100. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  4101. ConsoleWrite(@CRLF & "===========================================")
  4102.  
  4103. If $Haste_unique_colors_detected == 1 Then
  4104. Return True
  4105. EndIf
  4106. Return False
  4107. EndFunc
  4108. Func CharacterIsMagicShield()
  4109. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  4110. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  4111. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  4112. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  4113.  
  4114. Local $MagicShield_unique_colors_detected = 0
  4115.  
  4116. Local $time = TimerInit()
  4117.  
  4118.  
  4119. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x292d94) ;0x48f861 unique green hex color at poison icon
  4120. If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x5c6adc) <> 0 And _
  4121. 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
  4122. $MagicShield_unique_colors_detected = 1
  4123. EndIf
  4124.  
  4125.  
  4126.  
  4127. Local $diff = TimerDiff($time)
  4128. ConsoleWrite(@CRLF & "=========Func CharacterIsMagicShield==========")
  4129. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  4130. ConsoleWrite(@CRLF & "===========================================")
  4131.  
  4132. If $MagicShield_unique_colors_detected == 1 Then
  4133. Return True
  4134. EndIf
  4135. Return False
  4136. EndFunc
  4137. Func CharacterIsBattle()
  4138. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  4139. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  4140. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  4141. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  4142.  
  4143. Local $Battle_unique_colors_detected = 0
  4144.  
  4145. Local $time = TimerInit()
  4146.  
  4147.  
  4148. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x926852) ;0x48f861 unique green hex color at poison icon
  4149. If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0xa87659) <> 0 And _
  4150. 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
  4151. $Battle_unique_colors_detected = 1
  4152. EndIf
  4153.  
  4154.  
  4155.  
  4156. Local $diff = TimerDiff($time)
  4157. ConsoleWrite(@CRLF & "=========Func CharacterIsBattle==========")
  4158. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  4159. ConsoleWrite(@CRLF & "===========================================")
  4160.  
  4161. If $Battle_unique_colors_detected == 1 Then
  4162. Return True
  4163. EndIf
  4164. Return False
  4165. EndFunc
  4166. Func CharacterIsPZ()
  4167. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  4168. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  4169. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  4170. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  4171.  
  4172. Local $PZ_unique_colors_detected = 0
  4173.  
  4174. Local $time = TimerInit()
  4175.  
  4176.  
  4177. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0xc9d9f4) ;0x48f861 unique green hex color at poison icon
  4178. If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0xffffff) <> 0 And _
  4179. 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
  4180. $PZ_unique_colors_detected = 1
  4181. EndIf
  4182.  
  4183.  
  4184.  
  4185. Local $diff = TimerDiff($time)
  4186. ConsoleWrite(@CRLF & "=========Func CharacterIsPZ==========")
  4187. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  4188. ConsoleWrite(@CRLF & "===========================================")
  4189.  
  4190. If $PZ_unique_colors_detected == 1 Then
  4191. Return True
  4192. EndIf
  4193. Return False
  4194. EndFunc
  4195. Func CharacterIsRestingAreaBonus()
  4196. Local $startScanX = $CONDITION_BAR_RECTANGLE[0]
  4197. Local $startScanY = $CONDITION_BAR_RECTANGLE[1]
  4198. Local $endScanX = $CONDITION_BAR_RECTANGLE[2]
  4199. Local $endScanY = $CONDITION_BAR_RECTANGLE[3]
  4200.  
  4201. Local $RestingAreaBonus_unique_colors_detected = 0
  4202.  
  4203. Local $time = TimerInit()
  4204.  
  4205.  
  4206. Local $statusIcon = PixelSearch($startScanX, $startScanY, $endScanX, $endScanY, 0x659d65) ;0x48f861 unique green hex color at poison icon
  4207. If $statusIcon <> 0 And PixelSearch($statusIcon[0] + 1, $statusIcon[1], $statusIcon[0] + 1, $statusIcon[1], 0x1a2d1b) <> 0 And _
  4208. 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
  4209. $RestingAreaBonus_unique_colors_detected = 1
  4210. EndIf
  4211.  
  4212.  
  4213.  
  4214. Local $diff = TimerDiff($time)
  4215. ConsoleWrite(@CRLF & "=========Func CharacterIsRestingAreaBonus==========")
  4216. ConsoleWrite(@CRLF & "TIMER PROCESS: " & $diff)
  4217. ConsoleWrite(@CRLF & "===========================================")
  4218.  
  4219. If $RestingAreaBonus_unique_colors_detected == 1 Then
  4220. Return True
  4221. EndIf
  4222. Return False
  4223. EndFunc
  4224.  
  4225.  
  4226.  
  4227.  
  4228. ;============ MULTIPLEX FUNCTIONS =============================
  4229. Func AntiIdle()
  4230.  
  4231. If $AntiIdle == 1 Then
  4232.  
  4233. If TibiaWindowExists() And TibiaWindowIsFocused() And CharacterLogedIn() Then
  4234. GetTibiaIdleTime()
  4235. EndIf
  4236.  
  4237. ConsoleWrite(@CRLF & "IDLE TIME: " & TimerDiff($TIBIA_IDLE_TIME))
  4238.  
  4239. If TimerDiff($TIBIA_IDLE_TIME) >= $ANTI_IDLE_TIME Then
  4240. $TIBIA_IDLE_TIME = TimerInit()
  4241. If TibiaWindowExists() And CharacterLogedIn() Then
  4242. ActivateTibiaWindow()
  4243. CharacterLook("North")
  4244. Sleep(500)
  4245. CharacterLook("East")
  4246. Sleep(500)
  4247. CharacterLook("South")
  4248. Sleep(500)
  4249. CharacterLook("West")
  4250. Sleep(500)
  4251. CharacterLook("North")
  4252. Sleep(500)
  4253. EndIf
  4254. EndIf
  4255. EndIf
  4256.  
  4257. EndFunc
  4258. Func AutoCondition()
  4259.  
  4260. If EQCollapsePixelsChanged() Then
  4261. GetCurrentEQCollapseState()
  4262. GetCurrentEQCollapsePixelCheckSum()
  4263.  
  4264. GetCurrentConditionBarPosition()
  4265. GetCurrentConditionBarPixelCheckSum()
  4266. Else
  4267. ;~ ConditionBarPixelsChanged()
  4268. If $CURE_POISON == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_POX[2]) And $LAST_CURE_POX_CAST >= Number($CONDITION_CURE_POX[3]) Then
  4269. If CharacterIsPoisoned() Then
  4270. ActionCureText($CONDITION_CURE_POX[0])
  4271. If Not CharacterIsPoisoned() Then
  4272. $LAST_CURE_POX_CAST = TimerInit()
  4273. EndIf
  4274. EndIf
  4275. EndIf
  4276. If $CURE_CURSE == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_CURSE[2]) And $LAST_CURE_CURSE_CAST >= Number($CONDITION_CURE_CURSE[3]) Then
  4277. If CharacterIsCursed() Then
  4278. ActionCureText($CONDITION_CURE_CURSE[0])
  4279. If Not CharacterIsCursed() Then
  4280. $LAST_CURE_CURSE_CAST = TimerInit()
  4281. EndIf
  4282. EndIf
  4283. EndIf
  4284. ;~ If $CURE_BLEED == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_BLEED[2]) And $LAST_CURE_BLEED_CAST >= Number($CONDITION_CURE_BLEED[3]) Then
  4285. ;~ If CharacterIsBleeding() Then
  4286. ;~ ActionCureText($CONDITION_CURE_BLEED[0])
  4287. ;~ $LAST_CURE_BLEED_CAST = TimerInit()
  4288. ;~ EndIf
  4289. ;~ EndIf
  4290. If $CURE_BURN == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_BURN[2]) And $LAST_CURE_BURN_CAST >= Number($CONDITION_CURE_BURN[3]) Then
  4291. If CharacterIsBurning() Then
  4292. ActionCureText($CONDITION_CURE_BURN[0])
  4293. If Not CharacterIsBurning() Then
  4294. $LAST_CURE_BURN_CAST = TimerInit()
  4295. EndIf
  4296. EndIf
  4297. EndIf
  4298. If $CURE_ELEC == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_ELEC[2]) And $LAST_CURE_ELEC_CAST >= Number($CONDITION_CURE_ELEC[3]) Then
  4299. If CharacterIsElectrified() Then
  4300. ActionCureText($CONDITION_CURE_ELEC[0])
  4301. If Not CharacterIsElectrified() Then
  4302. $LAST_CURE_ELEC_CAST = TimerInit()
  4303. EndIf
  4304. EndIf
  4305. EndIf
  4306. If $CURE_PARA == 1 And $CHARACTER_MP >= Number($CONDITION_CURE_PARA[2]) And $LAST_CURE_PARA_CAST >= Number($CONDITION_CURE_PARA[3]) Then
  4307. If CharacterIsParalyzed() Then
  4308. ActionCureText($CONDITION_CURE_PARA[0])
  4309. If Not CharacterIsParalyzed() Then
  4310. $LAST_CURE_PARA_CAST = TimerInit()
  4311. EndIf
  4312. EndIf
  4313. EndIf
  4314. If $HOLD_HASTE == 1 And $CHARACTER_MP >= Number($CONDITION_HOLD_HASTE[2]) And $LAST_HOLD_HASTE_CAST >= Number($CONDITION_HOLD_HASTE[3]) Then
  4315. If Not CharacterIsHaste() Then
  4316. ActionCureText($CONDITION_HOLD_HASTE[0])
  4317. If CharacterIsHaste() Then
  4318. $LAST_HOLD_HASTE_CAST = TimerInit()
  4319. EndIf
  4320. EndIf
  4321. EndIf
  4322. ;~ If $HOLD_INVISIBLE == 1 And $CHARACTER_MP >= Number($CONDITION_HOLD_INVISIBLE[2]) And $LAST_HOLD_INVISIBLE_CAST >= Number($CONDITION_HOLD_INVISIBLE[3]) Then
  4323. ;~ If Not CharacterIsHaste() Then
  4324. ;~ ActionCureText($CONDITION_HOLD_INVISIBLE[0])
  4325. ;~ $LAST_HOLD_INVISIBLE_CAST = TimerInit()
  4326. ;~ EndIf
  4327. ;~ EndIf
  4328. If $HOLD_MAGICSHIELD == 1 And $CHARACTER_MP >= Number($CONDITION_HOLD_MAGICSHIELD[2]) And $LAST_HOLD_MAGICSHIELD_CAST >= Number($CONDITION_HOLD_MAGICSHIELD[3]) Then
  4329. If Not CharacterIsMagicShield() Then
  4330. ActionCureText($CONDITION_HOLD_MAGICSHIELD[0])
  4331. If CharacterIsMagicShield() Then
  4332. $LAST_HOLD_MAGICSHIELD_CAST = TimerInit()
  4333. EndIf
  4334. EndIf
  4335. EndIf
  4336. ;~ If $HOLD_RECOVERY == 1 And $CHARACTER_MP >= Number($CONDITION_HOLD_RECOVERY[2]) And $LAST_HOLD_RECOVERY_CAST >= Number($CONDITION_HOLD_RECOVERY[3]) Then
  4337. ;~ If Not CharacterIsHaste() Then
  4338. ;~ ActionCureText($CONDITION_HOLD_RECOVERY[0])
  4339. ;~ $LAST_HOLD_RECOVERY_CAST = TimerInit()
  4340. ;~ EndIf
  4341. ;~ EndIf
  4342. EndIf
  4343.  
  4344.  
  4345. EndFunc
  4346. Func AutoHeal()
  4347. If TibiaWindowChangedPos() Then
  4348. If TibiaWindowIsFocused() Then
  4349. TibiaWindowScan()
  4350. EndIf
  4351. ElseIf TibiaWindowIsFocused() Then
  4352. HotKeySet("^{DEL}", "StopSupport")
  4353.  
  4354. ;============= UPDATE CURRENT HP & MP ===========
  4355. Local $StatusBarChanged = 0
  4356. If HPPixelsChanged() Then
  4357. GetCurrentHPpixelCheckSum()
  4358. GetCurrentHP()
  4359. UpdateHPLabel()
  4360. $StatusBarChanged = 1
  4361. EndIf
  4362. If MPPixelsChanged() Then
  4363. GetCurrentMPpixelCheckSum()
  4364. GetCurrentMP()
  4365. UpdateMPLabel()
  4366. $StatusBarChanged = 1
  4367. EndIf
  4368. ;=================================================
  4369.  
  4370. If $CONDITIONS[0] > 0 Then
  4371. ;============ GET PRIORITY LEVEL ===============
  4372. Local $prioLevel[$CONDITIONS[0]][2]
  4373. Local $tempPrioLevelIndex = 0
  4374.  
  4375. ;~ _ArrayDisplay($CONDITIONS)
  4376. For $i = 1 To $CONDITIONS[0]
  4377. Local $tempSplit = StringSplit($CONDITIONS[$i], ":", 1)
  4378. Local $tempCur = $tempSplit[1]
  4379. Local $tempAmmount = $tempSplit[3]
  4380.  
  4381. If $tempCur == "CurHP" Then
  4382. $prioLevel[$tempPrioLevelIndex][0] = $CONDITIONS[$i]
  4383. $prioLevel[$tempPrioLevelIndex][1] = Number($tempAmmount)
  4384. $tempPrioLevelIndex = $tempPrioLevelIndex + 1
  4385. EndIf
  4386. Next
  4387. Local $tempCountCurHP = $tempPrioLevelIndex
  4388. If $tempPrioLevelIndex > 1 Then
  4389. _ArraySort($prioLevel,1,0,0,$tempPrioLevelIndex-1,1)
  4390. EndIf
  4391.  
  4392. ;~ _ArrayDisplay($prioLevel)
  4393. For $i = 1 To $CONDITIONS[0]
  4394. Local $tempSplit = StringSplit($CONDITIONS[$i], ":", 1)
  4395. Local $tempCur = $tempSplit[1]
  4396. Local $tempAmmount = $tempSplit[3]
  4397.  
  4398. If $tempCur == "CurMP" Then
  4399. $prioLevel[$tempPrioLevelIndex][0] = $CONDITIONS[$i]
  4400. $prioLevel[$tempPrioLevelIndex][1] = Number($tempAmmount)
  4401. $tempPrioLevelIndex = $tempPrioLevelIndex + 1
  4402. EndIf
  4403. Next
  4404.  
  4405. _ArraySort($prioLevel,0,($tempPrioLevelIndex),0,1)
  4406.  
  4407. _ArraySort($prioLevel,0,0,$tempCountCurHP,1)
  4408. ;~ _ArrayDisplay($prioLevel)
  4409.  
  4410. Local $tempConditions[UBound($prioLevel)]
  4411. For $i=0 To (UBound($prioLevel)-1)
  4412. $tempConditions[$i] = $prioLevel[$i][0]
  4413. Next
  4414.  
  4415.  
  4416. ;~ _ArrayDisplay($tempConditions)
  4417. ;===============================================
  4418.  
  4419. For $i=0 To (UBound($tempConditions)-1)
  4420. ConsoleWrite(@CRLF & "DEBUG##########################################")
  4421. ConsoleWrite(@CRLF & "CURRENT_HP = " & $CHARACTER_HP)
  4422. ConsoleWrite(@CRLF & "CURRENT_MP = " & $CHARACTER_MP)
  4423. Local $tempSplit = StringSplit($tempConditions[$i], ":", 1)
  4424.  
  4425. ConsoleWrite(@CRLF & "RETURNED SPLITS = " & $tempSplit[0])
  4426.  
  4427. Local $cond_CurStat = $tempSplit[1]
  4428. Local $cond_Operator = $tempSplit[2]
  4429. Local $cond_Ammount = $tempSplit[3]
  4430. Local $cond_MP_Cost = $tempSplit[4]
  4431. Local $cond_Cast_Type = $tempSplit[5]
  4432. Local $cond_Cast_Keyword = $tempSplit[6]
  4433. Local $cond_Cast_Delay = $tempSplit[7]
  4434.  
  4435. ConsoleWrite(@CRLF & "$cond_CurStat = " & $tempSplit[1])
  4436. ConsoleWrite(@CRLF & "$cond_Operator = " & $tempSplit[2])
  4437. ConsoleWrite(@CRLF & "$cond_Ammount = " & $tempSplit[3])
  4438. ConsoleWrite(@CRLF & "$cond_MP_Cost = " & $tempSplit[4])
  4439. ConsoleWrite(@CRLF & "$cond_Cast_Type = " & $tempSplit[5])
  4440. ConsoleWrite(@CRLF & "$cond_Cast_Keyword = " & $tempSplit[6])
  4441. ConsoleWrite(@CRLF & "$cond_Cast_Delay = " & $tempSplit[7])
  4442. ConsoleWrite(@CRLF & "TimerDif($LAST_HEAL_CAST) = " & TimerDiff($LAST_HEAL_CAST))
  4443. ConsoleWrite(@CRLF & "$CAST_DELAY = " & $CAST_DELAY)
  4444. ConsoleWrite(@CRLF & "DEBUG##########################################")
  4445.  
  4446. Local $StartHeal = 0
  4447.  
  4448. ;~ If $AutoHeal_FirstStart == 1 Then
  4449. ;~ $AutoHeal_FirstStart = 0
  4450. ;~ $StatusBarChanged = 1
  4451. ;~ EndIf
  4452.  
  4453. If TimerDiff($LAST_HEAL_CAST) >= $CAST_DELAY Then ;And $StatusBarChanged == 1 Then
  4454. $StartHeal = 1
  4455. EndIf
  4456.  
  4457. If $StartHeal == 1 Then
  4458. Local $tempCurStat
  4459.  
  4460. If $cond_CurStat == "CurHP" Then
  4461. $tempCurStat = $CHARACTER_HP
  4462. ElseIf $cond_CurStat == "CurMP" Then
  4463. $tempCurStat = $CHARACTER_MP
  4464. EndIf
  4465.  
  4466. If $cond_Operator == ">" Then
  4467. ConsoleWrite(@CRLF & $tempCurStat & " > " & $cond_Ammount & " AND " & $CHARACTER_MP & " >= " & $cond_MP_Cost)
  4468. If Number($tempCurStat) > Number($cond_Ammount) And Number($CHARACTER_MP) >= Number($cond_MP_Cost) Then
  4469. If $cond_Cast_Type == "C" Then
  4470. ConsoleWrite(@CRLF & "ActionClick(" & $cond_Cast_Keyword & ")")
  4471. ActionClick($cond_Cast_Keyword)
  4472. ElseIf $cond_Cast_Type == "H" Then
  4473. ConsoleWrite(@CRLF & "ActionHotkey(" & $cond_Cast_Keyword & ")")
  4474. ActionHotkey($cond_Cast_Keyword)
  4475. ElseIf $cond_Cast_Type == "T" Then
  4476. ConsoleWrite(@CRLF & "ActionText(" & $cond_Cast_Keyword & ")")
  4477. ActionText($cond_Cast_Keyword)
  4478. EndIf
  4479. EndIf
  4480. ElseIf $cond_Operator == "<" Then
  4481. ConsoleWrite(@CRLF & $tempCurStat & " < " & $cond_Ammount & " AND " & $CHARACTER_MP & " >= " & $cond_MP_Cost)
  4482. If Number($tempCurStat) < Number($cond_Ammount) And Number($CHARACTER_MP) >= Number($cond_MP_Cost) Then
  4483. If $cond_Cast_Type == "C" Then
  4484. ConsoleWrite(@CRLF & "ActionClick(" & $cond_Cast_Keyword & ")")
  4485. ActionClick($cond_Cast_Keyword)
  4486. ElseIf $cond_Cast_Type == "H" Then
  4487. ConsoleWrite(@CRLF & "ActionHotkey(" & $cond_Cast_Keyword & ")")
  4488. ActionHotkey($cond_Cast_Keyword)
  4489. ElseIf $cond_Cast_Type == "T" Then
  4490. ConsoleWrite(@CRLF & "ActionText(" & $cond_Cast_Keyword & ")")
  4491. ActionText($cond_Cast_Keyword)
  4492. EndIf
  4493. EndIf
  4494. EndIf
  4495. EndIf
  4496. Next
  4497. EndIf
  4498. EndIf
  4499.  
  4500.  
  4501. EndFunc ;==>AutoHeal
  4502.  
  4503.  
  4504.  
  4505.  
  4506. Func CharacterLook($direction)
  4507.  
  4508. If TibiaWindowExists() And TibiaWindowIsFocused() And CharacterLogedIn() Then
  4509.  
  4510. If $direction == "North" Then
  4511. ;~ ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","^{UP}")
  4512. Send("^{UP}")
  4513. ElseIf $direction == "East" Then
  4514. ;~ ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","^{RIGHT}")
  4515. Send("^{RIGHT}")
  4516. ElseIf $direction == "South" Then
  4517. ;~ ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","^{DOWN}")
  4518. Send("^{DOWN}")
  4519. ElseIf $direction == "West" Then
  4520. ;~ ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","^{LEFT}")
  4521. Send("^{LEFT}")
  4522. EndIf
  4523.  
  4524. EndIf
  4525.  
  4526. EndFunc
  4527.  
  4528. Func ActionClick($XYposition)
  4529. Local $time = TimerInit()
  4530.  
  4531. Local $XY_CCPosition = StringSplit($XYposition, "x", 1)
  4532. Local $X_CCPosition = $XY_CCPosition[1]
  4533. Local $Y_CCPosition = $XY_CCPosition[2]
  4534.  
  4535. ;~ Local $tempMousePos1 = MouseGetPos()
  4536. ;~ Sleep(10)
  4537. Local $tempMousePos2 = MouseGetPos()
  4538.  
  4539.  
  4540. If _Timer_GetIdleTime() > 10 Then
  4541. ConsoleWrite(@CRLF & $XYposition & @CRLF & "SPLITED X: " & Number($X_CCPosition) & @CRLF & "SPLITED Y: " & Number($Y_CCPosition))
  4542. ConsoleWrite(@CRLF & _Timer_GetIdleTime())
  4543. ConsoleWrite(@CRLF & "HWND RAW: " & $CLIENT_REGISTERED[0][1])
  4544. ConsoleWrite(@CRLF & "HWND CONV: " & HWnd($CLIENT_REGISTERED[0][1]))
  4545. ;~ If $tempMousePos1[0] == $tempMousePos2[0] And $tempMousePos1[1] == $tempMousePos2[1] Then
  4546. BlockInput($BI_DISABLE)
  4547.  
  4548. MouseClick($MOUSE_CLICK_LEFT, $X_CCPosition, $Y_CCPosition, 1, 1)
  4549. ;~ ControlClick(HWnd($CLIENT_REGISTERED[0][1]), "", "", "left", 1, Number($X_CCPosition), Number($Y_CCPosition))
  4550.  
  4551. BlockInput($BI_ENABLE)
  4552. MouseMove($tempMousePos2[0], $tempMousePos2[1], 1)
  4553. $LAST_HEAL_CAST = TimerInit()
  4554.  
  4555. Local $diff = TimerDiff($time)
  4556. ConsoleWrite(@CRLF & "=============Func ActionClickHP=============")
  4557. ConsoleWrite(@CRLF & "MouseClickPosition = " & $X_CCPosition & "x" & $Y_CCPosition)
  4558. ConsoleWrite(@CRLF & "Process Time: " & $diff)
  4559. ConsoleWrite(@CRLF & "============================================")
  4560. EndIf
  4561.  
  4562. ;ControlClick(WinGetHandle("[CLASS:Qt5QWindowOwnDCIcon]"),"",0,"left",1,215,713)
  4563.  
  4564. EndFunc ;==>ActionClick
  4565. Func ActionHotkey($Hotkey)
  4566. ConsoleWrite(@CRLF & "Press Hotkey: {" & $Hotkey & "}")
  4567. If $Hotkey == "F1" Then
  4568. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F1}")
  4569. ElseIf $Hotkey == "F2" Then
  4570. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F2}")
  4571. ElseIf $Hotkey == "F3" Then
  4572. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F3}")
  4573. ElseIf $Hotkey == "F4" Then
  4574. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F4}")
  4575. ElseIf $Hotkey == "F5" Then
  4576. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F5}")
  4577. ElseIf $Hotkey == "F6" Then
  4578. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F6}")
  4579. ElseIf $Hotkey == "F7" Then
  4580. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F7}")
  4581. ElseIf $Hotkey == "F8" Then
  4582. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F8}")
  4583. ElseIf $Hotkey == "F9" Then
  4584. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F9}")
  4585. ElseIf $Hotkey == "F10" Then
  4586. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F10}")
  4587. ElseIf $Hotkey == "F11" Then
  4588. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F11}")
  4589. ElseIf $Hotkey == "F12" Then
  4590. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{F12}")
  4591. EndIf
  4592.  
  4593. $LAST_HEAL_CAST = TimerInit()
  4594. EndFunc ;==>ActionHotkey
  4595. Func ActionText($Text)
  4596. ConsoleWrite(@CRLF & "Send Text: {" & $Text & "}")
  4597. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "",$Text)
  4598. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{ENTER}")
  4599. $LAST_HEAL_CAST = TimerInit()
  4600. EndFunc ;==>ActionHotkey
  4601. Func ActionCureText($Text)
  4602. ConsoleWrite(@CRLF & "Send Cure/Hold Text: {" & $Text & "}")
  4603. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "",$Text)
  4604. ControlSend(HWnd($CLIENT_REGISTERED[0][1]),"", "","{ENTER}")
  4605. $LAST_CURE_CAST = TimerInit()
  4606. EndFunc
  4607.  
  4608.  
  4609. Func My_WM_COMMAND($hWnd, $imsg, $iwParam, $ilParam)
  4610. If WinExists($GUI_SelfHealer_Settings) And BitAND(WinGetState($GUI_SelfHealer_Settings), 2) Then
  4611. Local $setHK = False
  4612. $nNotifyCode = BitShift($iwParam, 16)
  4613. $nID = BitAND($iwParam, 0x0000FFFF)
  4614. $hCtrl = $ilParam
  4615.  
  4616. If $nNotifyCode = $EN_CHANGE Then
  4617. If $hCtrl = GUICtrlGetHandle($input_SelfHealer_Condition_Is) Then
  4618. If GUICtrlRead($input_SelfHealer_Condition_Is) <> "" Then
  4619. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  4620. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  4621. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  4622. Local $PreviousIsText = $StringSplit[3]
  4623.  
  4624. Local $UpdatedIsText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & GUICtrlRead($input_SelfHealer_Condition_Is) & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
  4625.  
  4626. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedIsText)
  4627. EndIf
  4628. ElseIf $hCtrl = GUICtrlGetHandle($input_SelfHealer_Condition_ManaCost) Then
  4629. If GUICtrlRead($input_SelfHealer_Condition_ManaCost) <> "" Then
  4630. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  4631. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  4632. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  4633. Local $PreviousManaCostText = $StringSplit[4]
  4634.  
  4635. Local $UpdatedManaCostText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & GUICtrlRead($input_SelfHealer_Condition_ManaCost) & ":" & $StringSplit[5] & ":" & $StringSplit[6] & ":" & $StringSplit[7]
  4636.  
  4637. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedManaCostText)
  4638. EndIf
  4639. ElseIf $hCtrl = GUICtrlGetHandle($input_Text_SelfHealer_Condition_Cast) Then
  4640. If GUICtrlRead($input_Text_SelfHealer_Condition_Cast) <> "" Then
  4641. Local $selectedItemIndex = Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions))
  4642. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $selectedItemIndex)
  4643. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  4644. Local $PreviousCastText = $StringSplit[6]
  4645.  
  4646. Local $UpdatedCastText = $StringSplit[1] & ":" & $StringSplit[2] & ":" & $StringSplit[3] & ":" & $StringSplit[4] & ":" & $StringSplit[5] & ":" & GUICtrlRead($input_Text_SelfHealer_Condition_Cast) & ":" & $StringSplit[7]
  4647.  
  4648. _GUICtrlListView_SetItemText($list_SelfHealer_Conditions, $selectedItemIndex, $UpdatedCastText)
  4649. EndIf
  4650. EndIf
  4651.  
  4652. EndIf
  4653.  
  4654. Return $GUI_RUNDEFMSG
  4655. EndIf
  4656.  
  4657. EndFunc ;==>My_WM_COMMAND
  4658. Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam)
  4659. Local $hListView, $tNMHDR, $hWndFrom, $iCode
  4660.  
  4661. $hListView = $list_SelfHealer_Conditions
  4662. If Not IsHWnd($hListView) Then $hListView = GUICtrlGetHandle($list_SelfHealer_Conditions)
  4663.  
  4664. $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
  4665. $hWndFrom = HWnd(DllStructGetData($tNMHDR, "HwndFrom"))
  4666. $iCode = DllStructGetData($tNMHDR, "Code")
  4667.  
  4668. Switch $hWndFrom
  4669. Case $hListView
  4670. Switch $iCode
  4671. Case $LVN_ITEMCHANGED
  4672. Local $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
  4673. Local $iItem = DllStructGetData($tInfo, "Item")
  4674. If $iItem == Int(_GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions)) Then
  4675. ;ConsoleWrite("---> Item " & $iItem + 1 & " has been selected" & @LF)
  4676. EndIf
  4677. If _GUICtrlListView_GetItemChecked($hListView, $iItem) = True Then
  4678. ConsoleWrite("---> Item " & $iItem + 1 & " has checked" & @LF)
  4679. EndIf
  4680. Case $NM_CLICK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
  4681. $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
  4682. $clickedItemIndex = DllStructGetData($tInfo, "Index")
  4683. ConsoleWrite("---> Item " & $clickedItemIndex & " has been clicked and selected" & @LF)
  4684. Local $selected = _GUICtrlListView_GetSelectedIndices($list_SelfHealer_Conditions)
  4685. If $clickedItemIndex >= 0 And $selected == $clickedItemIndex Then
  4686. Local $selectedItemText = _GUICtrlListView_GetItemText($list_SelfHealer_Conditions, $clickedItemIndex)
  4687. Local $StringSplit = StringSplit($selectedItemText, ":", 1)
  4688. Local $CurHPMP = $StringSplit[1]
  4689. Local $Operator = $StringSplit[2]
  4690. Local $Ammount = $StringSplit[3]
  4691. Local $ManaCost = $StringSplit[4]
  4692. Local $CastType = $StringSplit[5]
  4693. Local $CastKey = $StringSplit[6]
  4694. Local $CastDelay = $StringSplit[7]
  4695.  
  4696. If $CurHPMP == "CurHP" Then
  4697. $CurHPMP = "Current Health"
  4698. ElseIf $CurHPMP == "CurMP" Then
  4699. $CurHPMP = "Current Mana"
  4700. EndIf
  4701. If $Operator == ">" Then
  4702. $Operator = "Above"
  4703. ElseIf $Operator == "<" Then
  4704. $Operator = "Below"
  4705. EndIf
  4706. If $CastType == "H" Then
  4707. $CastType = "Hotkey"
  4708. ElseIf $CastType == "T" Then
  4709. $CastType = "Text"
  4710. ElseIf $CastType == "C" Then
  4711. $CastType = "Click"
  4712. EndIf
  4713.  
  4714. GUICtrlSetData($label_CurrentStat_SelfHealer_Condition_When,$CurHPMP)
  4715. GUICtrlSetData($label_Operator_SelfHealer_Condition_Is,$Operator)
  4716. GUICtrlSetData($input_SelfHealer_Condition_Is,$Ammount)
  4717. GUICtrlSetData($label_CastType_SelfHealer_Condition_Cast,$CastType)
  4718. GUICtrlSetData($input_SelfHealer_Condition_ManaCost,$ManaCost)
  4719.  
  4720. If $CastType == "Text" Then
  4721. GUICtrlSetData($input_Text_SelfHealer_Condition_Cast,$CastKey)
  4722. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
  4723. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  4724. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_SHOW)
  4725. ElseIf $CastType == "Hotkey" Then
  4726. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_HIDE)
  4727. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_SHOW)
  4728. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  4729. ElseIf $CastType == "Click" Then
  4730. GUICtrlSetState($btn_ClickPosition_SelfHealer_Condition_Cast, $GUI_SHOW)
  4731. GUICtrlSetState($btn_Hotkey_SelfHealer_Condition_Cast, $GUI_HIDE)
  4732. GUICtrlSetState($input_Text_SelfHealer_Condition_Cast, $GUI_HIDE)
  4733. EndIf
  4734.  
  4735. EndIf
  4736. Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
  4737. $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
  4738. ConsoleWrite("---> Item " & DllStructGetData($tInfo, "Index") & " has been double clicked" & @LF)
  4739. EndSwitch
  4740. EndSwitch
  4741.  
  4742. Return $GUI_RUNDEFMSG
  4743. EndFunc ;==>WM_NOTIFY
  4744.  
  4745.  
  4746. Func _Login()
  4747. _GUICtrlEdit_ShowBalloonTip($input_Login_info, "", "Under construction...", $TTI_INFO)
  4748.  
  4749. Return
  4750.  
  4751. Local $sUsername = "test", $sPassword = "And!o1991"
  4752. If Not StringStripWS($sUsername, 8) Or Not StringStripWS($sPassword, 8) Then ; no username and/or password entered
  4753. MsgBox(262192, "Warning", "You must enter a username and password")
  4754. Return
  4755. EndIf
  4756.  
  4757. Switch _LoginCheck($sUsername, $sPassword, $wsLoginURL)
  4758. Case $WL_RESULT_ERROR ; remote errror
  4759. MsgBox(262160, "Error", "The server encountered an error, please try again later.")
  4760. Case $WL_RESULT_FAILED ; login failed
  4761. MsgBox(262192, "Failed", "Invalid username and/or password")
  4762. Case $WL_RESULT_SUCCESS ; login was successfull
  4763. MsgBox(262208, "Success", "Your credentials seem to be valid.")
  4764. ; here you can set a var to true or something to check in the rest of the script
  4765. Case Else ; unexpected return
  4766. MsgBox(262160, "Unexpected Result", "Something went wrong")
  4767. EndSwitch
  4768. EndFunc ;==>_Login
  4769. Func _LoginCheck($sUsername, $sPassword, $sURL)
  4770. Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") ; create HTTP object
  4771. $oHTTP.Open("POST", $sURL, False) ; set method (POST) and URL
  4772. $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
  4773. $oHTTP.SetRequestHeader("Connection", "keep-alive")
  4774. $oHTTP.SetRequestHeader("User-Agent", "MyApp/1.0")
  4775. $oHTTP.Send("username=" & $sUsername & "&password=" & $sPassword) ; set username and password then send the request
  4776.  
  4777. If $oHTTP.Status == 200 Then Return SetError(0, 0, $oHTTP.ResponseText) ; return response text
  4778. Return SetError(1, $oHTTP.Status, 0)
  4779. EndFunc ;==>_LoginCheck
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement