Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.73 KB | None | 0 0
  1. ;; QuickLooks - Poe Pickit
  2.  
  3. #include <Misc.au3>
  4. #include <MsgBoxConstants.au3>
  5. #include <TrayConstants.au3>
  6. #include <WinAPIFiles.au3>
  7. #include <Timers.au3>
  8.  
  9. ;----------------------------------------------------------------------------------------------------------
  10.  
  11. ; Start Options Section
  12.  
  13. AutoItSetOption ("TrayMenuMode", 0); ; Show Checkmarks In Tray
  14. AutoItSetOption ("TrayAutoPause", 0); ; Do Not Auto Pause When Tray Icon Is Clicked
  15. AutoItSetOption ("TrayIconDebug", 1); ; Show Debug Info In Tray
  16. AutoItSetOption ("WinTextMatchMode", 2); ; Quick Mode
  17. AutoItSetOption ("WinTitleMatchMode", 3); ; Exact Title Match
  18. AutoItSetOption ("MouseClickDelay", 50); ; Number of ms to pause between each mouse click - default 10ms
  19. AutoItSetOption ("MouseClickDownDelay", 1); ; Number of ms to hold down mouse button after clicking - default 10ms - decreased to hinder the amount autoloot interferes with the user
  20. AutoItSetOption ("SendKeyDelay", 1); ; Number of ms to pause between each key press - default 5ms
  21. AutoItSetOption ("SendKeyDownDelay", 1); ; Number of ms to hold down each key after pressing - default 5ms
  22. AutoItSetOption ("PixelCoordMode", 0); ; Coordinates of a found pixel. [ 0 = window ] [ 1 = screen ] [ 2 = client ]
  23. AutoItSetOption ("MouseCoordMode", 0); ; Coordinates used for mouse clicks. [ 0 = window ] [ 1 = screen ] [ 2 = client ]
  24. AutoItSetOption("MustDeclareVars", 1); ;0=no, 1=require pre-declaration
  25.  
  26. TraySetIcon("Images\QuickLooksIcon.ico")
  27. TraySetState($TRAY_ICONSTATE_SHOW)
  28. TraySetToolTip("QuickLooks - Written By Naut")
  29. TrayTip("QuickLooks", "Written By Naut", 10)
  30.  
  31. ; End Options Section
  32.  
  33. ;----------------------------------------------------------------------------------------------------------
  34.  
  35. ; Start Window Section
  36.  
  37. Local $handle = WinGetHandle ( "Path of Exile" )
  38. Local $window = WinGetPos ( $handle )
  39. Local $x1 = $window[0]
  40. Local $y1 = $window[1]
  41. Local $x2 = ($window[0] + $window[2])
  42. Local $y2 = ($window[1] + $window[3])
  43. Local $xresolution = ($x2 - $x1)
  44. Local $yresolution = ($y2 - $y1)
  45.  
  46. ; End Window Section
  47.  
  48. ;----------------------------------------------------------------------------------------------------------
  49.  
  50. ; Start Variables Section
  51.  
  52. Global $Pause
  53. Global $Autoloot
  54. Global $Alteration
  55. Global $Jeweller
  56. Global $Fusing
  57. Global $Chromatic
  58. Global $Chisel
  59. Global $ArmorScrap
  60. Global $Whetstone
  61.  
  62. Global $HealthCheck = IniRead ( "QuickLooks.ini", "Health", "HealthHexColorCode", 0xA41F29 )
  63. Global $HealthCheck2
  64. Global $xHealthHexCoordinate = IniRead ( "QuickLooks.ini", "Health", "HealthCoordinateX", 70 )
  65. Global $yHealthHexCoordinate = IniRead ( "QuickLooks.ini", "Health", "HealthCoordinateY", 536 )
  66.  
  67. Global $ChatColorCheck = IniRead ( "QuickLooks.ini", "Health", "ChatHexColorCode", 0x901A23 )
  68. Global $ChatColorCheck2
  69. Global $xChatCoordinate = IniRead ( "QuickLooks.ini", "Health", "ChatCoordinateX", 70 )
  70. Global $yChatCoordinate = IniRead ( "QuickLooks.ini", "Health", "ChatCoordinateX", 564 )
  71.  
  72. Global $QuickSilverFlask = IniRead ( "QuickLooks.ini", "Flasks", "QuickSilverFlask", 5 )
  73. Global $QuickSilverDuration = IniRead ( "QuickLooks.ini", "Flasks", "QuickSilverDuration", 4800 )
  74. Global $QuickSilverTimerA
  75. Global $QuickSilverTimerB
  76. Global $QuickSilverTimerDiffA
  77. Global $QuickSilverTimerDiffB
  78. Local $QuickSilverCheckA = 0
  79. Local $QuickSilverCheckB = 0
  80. Local $QuickSilverCheckC = 0
  81. Local $QuickSilverCheckD = 0
  82.  
  83. Global $FlaskOne = IniRead ( "QuickLooks.ini", "Flasks", "FlaskOne", 1 )
  84. Global $FlaskOneDuration = IniRead ( "QuickLooks.ini", "Flasks", "FlaskOneDuration", 6000 )
  85. Global $FlaskOneTimer
  86. Global $FlaskOneTimerDiff
  87. Local $FlaskOneCheck = 0
  88.  
  89. Global $FlaskTwo = IniRead ( "QuickLooks.ini", "Flasks", "FlaskTwo", 2 )
  90. Global $FlaskTwoDuration = IniRead ( "QuickLooks.ini", "Flasks", "FlaskTwoDuration", 6000 )
  91. Global $FlaskTwoTimer
  92. Global $FlaskTwoTimerDiff
  93. Local $FlaskTwoCheck = 0
  94.  
  95. Global $FlaskThree = IniRead ( "QuickLooks.ini", "Flasks", "FlaskThree", 3 )
  96. Global $FlaskThreeDuration = IniRead ( "QuickLooks.ini", "Flasks", "FlaskThreeDuration", 6000 )
  97. Global $FlaskThreeTimer
  98. Global $FlaskThreeTimerDiff
  99. Local $FlaskThreeCheck = 0
  100.  
  101. Global $FlaskFour = IniRead ( "QuickLooks.ini", "Flasks", "FlaskFour", 4 )
  102. Global $FlaskFourDuration = IniRead ( "QuickLooks.ini", "Flasks", "FlaskFourDuration", 6000 )
  103. Global $FlaskFourTimer
  104. Global $FlaskFourTimerDiff
  105. Local $FlaskFourCheck = 0
  106.  
  107. Global $ColorPath = IniRead ( "QuickLooks.ini", "ColorPath", "HexColorCode", 0xABCDEF )
  108. Global $Frequency = IniRead ( "QuickLooks.ini", "ClickSpeed", "Frequency", 50 )
  109. Global $WeaponSwapHotkey = IniRead ( "QuickLooks.ini", "CullingStrike", "WeaponSwapHotkey", "x" )
  110. Global $CullingSkillHotkey = IniRead ( "QuickLooks.ini", "CullingStrike", "CullingSkillHotkey", "q" )
  111.  
  112. Global $WisdomScrollX = IniRead ( "QuickLooks.ini", "ClickCoords", "WisdomScrollX", 0 )
  113. Global $WisdomScrollY = IniRead ( "QuickLooks.ini", "ClickCoords", "WisdomScrollY", 0 )
  114.  
  115.  
  116. ;Global $ClickCounter
  117. ;$ClickCounter = 0
  118. ;$ClickCounter += 1
  119.  
  120.  
  121. ; End Variables Section
  122.  
  123. ;----------------------------------------------------------------------------------------------------------
  124.  
  125. ; Start Hotkeys Section
  126.  
  127. HotKeySet("^{END}", "Terminate")
  128. HotKeySet("^{PAUSE}", "Pause")
  129. HotKeySet("^{HOME}", "CheckLatency")
  130. HotKeySet("^{ENTER}", "ChatPause")
  131. HotKeySet("^{SPACE}", "Autoloot")
  132. HotKeySet("^{F1}", "FindTargetItem")
  133. HotKeySet("^{F2}", "FindWisdomScroll")
  134. HotKeySet("^{F3}", "FindPortalScroll")
  135. HotKeySet("^{F4}", "FindPortalPosition")
  136. HotKeySet("^{F5}", "FindAlteration")
  137. HotKeySet("+{F5}", "Alteration")
  138. HotKeySet("^{F6}", "FindJeweller")
  139. HotKeySet("+{F6}", "Jeweller")
  140. HotKeySet("^{F7}", "FindFusing")
  141. HotKeySet("+{F7}", "Fusing")
  142. HotKeySet("^{F8}", "FindChromatic")
  143. HotKeySet("+{F8}", "Chromatic")
  144. HotKeySet("^{F9}", "FindChisel")
  145. HotKeySet("+{F9}", "Chisel")
  146. HotKeySet("^{F10}", "FindArmorScrap")
  147. HotKeySet("+{F10}", "ArmorScrap")
  148. HotKeySet("^{F11}", "FindWhetstone")
  149. HotKeySet("+{F11}", "Whetstone")
  150. HotKeySet("^{F12}", "SetColor")
  151. HotKeySet("^{INSERT}", "SetHealthCoordinates")
  152. HotKeySet("+{INSERT}", "FindHealthColorCode")
  153. HotKeySet("^{DEL}", "SetChatCoordinates")
  154. HotKeySet("+{DEL}", "FindChatColorCode")
  155. HotKeySet("f", "CullingStrike")
  156. HotKeySet("j", "IdInventory")
  157. HotKeySet("^j", "IdInventorySell")
  158.  
  159. ; End Hotkeys Section
  160.  
  161. ;----------------------------------------------------------------------------------------------------------
  162.  
  163. ; Start Script Section
  164.  
  165. SendKeepActive ( $handle )
  166.  
  167. While WinExists ( $handle )
  168.  
  169. If WinActive ( $handle ) Then
  170. $HealthCheck2 = PixelGetColor( $xHealthHexCoordinate, $yHealthHexCoordinate, $handle )
  171. $ChatColorCheck2 = PixelGetColor( $xChatCoordinate, $yChatCoordinate, $handle )
  172.  
  173. If ( $HealthCheck <> $HealthCheck2 ) And ( $ChatColorCheck = $ChatColorCheck2 ) Then
  174. If $FlaskOneCheck = 0 Then
  175. Send($FlaskOne)
  176. sleep($Frequency)
  177. $FlaskOneCheck = 1
  178. $FlaskOneTimer = TimerInit()
  179. Else
  180. $FlaskOneTimerDiff = TimerDiff($FlaskOneTimer)
  181. If $FlaskOneTimerDiff >= $FlaskOneDuration Then
  182. $FlaskOneCheck = 0
  183. EndIf
  184. EndIf
  185. EndIf
  186.  
  187. If ( $HealthCheck <> $HealthCheck2 ) And ( $ChatColorCheck = $ChatColorCheck2 ) Then
  188. If $FlaskTwoCheck = 0 Then
  189. Send($FlaskTwo)
  190. sleep($Frequency)
  191. $FlaskTwoCheck = 1
  192. $FlaskTwoTimer = TimerInit()
  193. Else
  194. $FlaskTwoTimerDiff = TimerDiff($FlaskTwoTimer)
  195. If $FlaskTwoTimerDiff >= $FlaskTwoDuration Then
  196. $FlaskTwoCheck = 0
  197. EndIf
  198. EndIf
  199. EndIf
  200.  
  201. If ( $HealthCheck <> $HealthCheck2 ) And ( $ChatColorCheck = $ChatColorCheck2 ) Then
  202. If $FlaskThreeCheck = 0 Then
  203. Send($FlaskThree)
  204. sleep($Frequency)
  205. $FlaskThreeCheck = 1
  206. $FlaskThreeTimer = TimerInit()
  207. Else
  208. $FlaskThreeTimerDiff = TimerDiff($FlaskThreeTimer)
  209. If $FlaskThreeTimerDiff >= $FlaskThreeDuration Then
  210. $FlaskThreeCheck = 0
  211. EndIf
  212. EndIf
  213. EndIf
  214.  
  215. If ( $HealthCheck <> $HealthCheck2 ) And ( $ChatColorCheck = $ChatColorCheck2 ) Then
  216. If $FlaskFourCheck = 0 Then
  217. Send($FlaskFour)
  218. sleep($Frequency)
  219. $FlaskFourCheck = 1
  220. $FlaskFourTimer = TimerInit()
  221. Else
  222. $FlaskFourTimerDiff = TimerDiff($FlaskFourTimer)
  223. If $FlaskFourTimerDiff >= $FlaskFourDuration Then
  224. $FlaskFourCheck = 0
  225. EndIf
  226. EndIf
  227. EndIf
  228.  
  229. If _IsPressed ( "01" ) And $QuickSilverCheckA = 0 Then
  230. $QuickSilverTimerA = TimerInit()
  231. $QuickSilverCheckA = 1
  232. EndIf
  233.  
  234. $QuickSilverTimerDiffA = TimerDiff($QuickSilverTimerA)
  235.  
  236. If _IsPressed ( "01" ) And $QuickSilverTimerDiffA > 500 Then
  237. If $QuickSilverCheckB = 0 Then
  238. Send($QuickSilverFlask)
  239. sleep($Frequency)
  240. $QuickSilverTimerB = TimerInit()
  241. sleep($Frequency)
  242. $QuickSilverCheckB = 1
  243. EndIf
  244. EndIf
  245.  
  246. $QuickSilverTimerDiffB = TimerDiff($QuickSilverTimerB)
  247.  
  248. If $QuickSilverCheckB = 1 And $QuickSilverTimerDiffB >= $QuickSilverDuration Then
  249. $QuickSilverCheckA = 0
  250. $QuickSilverCheckB = 0
  251. EndIf
  252.  
  253. If _IsPressed ( "20" ) Then
  254. Call("Loot")
  255. EndIf
  256.  
  257. If _IsPressed ( "4A" ) Then
  258. Call("IdInventory")
  259. EndIf
  260.  
  261. If _IsPressed ( "54" ) Then
  262. Call("TownPortal")
  263. EndIf
  264.  
  265. EndIf
  266.  
  267. WEnd
  268.  
  269. ; End Script Section
  270.  
  271. ;----------------------------------------------------------------------------------------------------------
  272.  
  273. ; Start Core Functions Section
  274.  
  275. Func Terminate()
  276. Exit
  277. EndFunc
  278.  
  279. Func Pause()
  280. If NOT $Pause Then
  281. TrayTip("QuickLooks", "Script Paused.", 10)
  282. EndIf
  283. $Pause = NOT $Pause
  284. While $Pause
  285. sleep(100)
  286. WEnd
  287. TrayTip("QuickLooks", "Script Unpaused.", 10)
  288. EndFunc
  289.  
  290. Func ChatPause()
  291. If NOT $Pause Then
  292. TrayTip("QuickLooks", "Script Paused.", 10)
  293. EndIf
  294. WinActivate ( $handle )
  295. Send("{ENTER}")
  296. $Pause = NOT $Pause
  297. While $Pause
  298. sleep(100)
  299. WEnd
  300. TrayTip("QuickLooks", "Script Unpaused.", 10)
  301. EndFunc
  302.  
  303. Func SetHealthCoordinates()
  304. Local $xHealthCoordinate = MouseGetPos ( 0 )
  305. Local $yHealthCoordinate = MouseGetPos ( 1 )
  306. IniWrite ( "QuickLooks.ini", "Health", "HealthCoordinateX", $xHealthCoordinate )
  307. IniWrite ( "QuickLooks.ini", "Health", "HealthCoordinateY", $yHealthCoordinate )
  308. TrayTip("QuickLooks", "Health Coordinates Changed In QuickLooks.ini", 10)
  309. EndFunc
  310.  
  311. Func FindHealthColorCode()
  312. Local $HealthColor = PixelGetColor( $xHealthHexCoordinate, $yHealthHexCoordinate, $handle )
  313. Local $HealthHexColor = Hex($HealthColor, 6)
  314. IniWrite ( "QuickLooks.ini", "Health", "HealthHexColorCode", "0x" & $HealthHexColor & "")
  315. TrayTip("QuickLooks", "HealthHexColorCode Changed In QuickLooks.ini", 10)
  316. EndFunc
  317.  
  318. Func SetChatCoordinates()
  319. Local $xChatButtonCoordinate = MouseGetPos ( 0 )
  320. Local $yChatButtonCoordinate = MouseGetPos ( 1 )
  321. IniWrite ( "QuickLooks.ini", "Health", "ChatCoordinateX", $xChatButtonCoordinate )
  322. IniWrite ( "QuickLooks.ini", "Health", "ChatCoordinateY", $yChatButtonCoordinate )
  323. TrayTip("QuickLooks", "Chat Button Coordinates Changed In QuickLooks.ini", 10)
  324. EndFunc
  325.  
  326. Func FindChatColorCode()
  327. Local $ChatColor = PixelGetColor( $xChatCoordinate, $yChatCoordinate, $handle )
  328. Local $ChatHexColor = Hex($ChatColor, 6)
  329. IniWrite ( "QuickLooks.ini", "Health", "ChatHexColorCode", "0x" & $ChatHexColor & "")
  330. TrayTip("QuickLooks", "ChatHexColorCode Changed In QuickLooks.ini", 10)
  331. EndFunc
  332.  
  333. Func SetColor()
  334. Local $xcolor = MouseGetPos ( 0 )
  335. Local $ycolor = MouseGetPos ( 1 )
  336. Local $mycolor = PixelGetColor ( $xcolor , $ycolor )
  337. Local $myhex = Hex($mycolor, 6)
  338. IniWrite ( "QuickLooks.ini", "ColorPath", "HexColorCode", "0x" & $myhex & "")
  339. MsgBox("0", "Hex Color Info", "Hex Color Code: 0x" & $myhex & ". Value changed in QuickLooks.ini.")
  340. EndFunc
  341.  
  342. Func CheckLatency()
  343. Local $iPing = Ping("www.pathofexile.com", 250)
  344. If not @error Then
  345. If $iPing<100 Then
  346. IniWrite ( "QuickLooks.ini", "ClickSpeed", "Frequency", 50 )
  347. MsgBox("0", "Ping Info", "Latency: " & $iPing & "ms. Setting Click Frequency to 50ms in QuickLooks.ini.")
  348. Else
  349. IniWrite ( "QuickLooks.ini", "ClickSpeed", "Frequency", 200 )
  350. MsgBox("0", "Ping Info", "Latency: " & $iPing & "ms. Setting Click Frequency to 200ms in QuickLooks.ini.")
  351. EndIf
  352. Else
  353. Local $pingfail = MsgBox("1", "Ping Error", "Error attempting to ping PoE servers. Click OK to continue anyway or Cancel to exit the script.")
  354. If $pingfail = 1 Then
  355. IniWrite ( "QuickLooks.ini", "ClickSpeed", "Frequency", 200 )
  356. Else
  357. Exit
  358. EndIf
  359. EndIf
  360. EndFunc
  361.  
  362. Func CullingStrike()
  363. If WinActive ( $handle ) Then
  364. Send ($WeaponSwapHotkey)
  365. sleep($Frequency*3)
  366. Send ($CullingSkillHotkey)
  367. sleep($Frequency*8)
  368. Send ($WeaponSwapHotkey)
  369. sleep($Frequency)
  370. EndIf
  371. EndFunc
  372.  
  373. ; End Core Functions Section
  374.  
  375. ;----------------------------------------------------------------------------------------------------------
  376.  
  377. ; Start Loot Functions Section
  378.  
  379. Func Loot()
  380. If WinActive ( $handle ) Then
  381. Local $bCoord = PixelSearch(0, 0, $xresolution, $yresolution, $ColorPath, 1, 1, $handle)
  382. If not @error Then
  383. If _IsPressed ( "02" ) Then
  384. Else
  385. MouseClick($MOUSE_CLICK_LEFT, ($bCoord[0] + 50), ($bCoord[1] + 10), 1, 0 )
  386. sleep($Frequency*2)
  387. EndIf
  388. EndIf
  389. EndIf
  390. EndFunc
  391.  
  392. Func Autoloot()
  393. If NOT $Autoloot Then
  394. TrayTip("QuickLooks", "Autoloot Enabled", 10)
  395. EndIf
  396. $Autoloot = NOT $Autoloot
  397. While $Autoloot
  398. Call("Loot")
  399.  
  400. If _IsPressed ( "4A" ) Then
  401. Call("IdInventory")
  402. EndIf
  403.  
  404. If _IsPressed ( "54" ) Then
  405. Call("TownPortal")
  406. EndIf
  407.  
  408. If WinActive ( $handle ) Then
  409. $HealthCheck2 = PixelGetColor( $xHealthHexCoordinate, $yHealthHexCoordinate, $handle )
  410. $ChatColorCheck2 = PixelGetColor( $xChatCoordinate, $yChatCoordinate, $handle )
  411.  
  412. If ( $HealthCheck <> $HealthCheck2 ) And ( $ChatColorCheck = $ChatColorCheck2 ) Then
  413. If $FlaskOneCheck = 0 Then
  414. Send($FlaskOne)
  415. sleep($Frequency)
  416. $FlaskOneCheck = 1
  417. $FlaskOneTimer = TimerInit()
  418. Else
  419. $FlaskOneTimerDiff = TimerDiff($FlaskOneTimer)
  420. If $FlaskOneTimerDiff >= $FlaskOneDuration Then
  421. $FlaskOneCheck = 0
  422. EndIf
  423. EndIf
  424. EndIf
  425.  
  426. If ( $HealthCheck <> $HealthCheck2 ) And ( $ChatColorCheck = $ChatColorCheck2 ) Then
  427. If $FlaskTwoCheck = 0 Then
  428. Send($FlaskTwo)
  429. sleep($Frequency)
  430. $FlaskTwoCheck = 1
  431. $FlaskTwoTimer = TimerInit()
  432. Else
  433. $FlaskTwoTimerDiff = TimerDiff($FlaskTwoTimer)
  434. If $FlaskTwoTimerDiff >= $FlaskTwoDuration Then
  435. $FlaskTwoCheck = 0
  436. EndIf
  437. EndIf
  438. EndIf
  439.  
  440. If ( $HealthCheck <> $HealthCheck2 ) And ( $ChatColorCheck = $ChatColorCheck2 ) Then
  441. If $FlaskThreeCheck = 0 Then
  442. Send($FlaskThree)
  443. sleep($Frequency)
  444. $FlaskThreeCheck = 1
  445. $FlaskThreeTimer = TimerInit()
  446. Else
  447. $FlaskThreeTimerDiff = TimerDiff($FlaskThreeTimer)
  448. If $FlaskThreeTimerDiff >= $FlaskThreeDuration Then
  449. $FlaskThreeCheck = 0
  450. EndIf
  451. EndIf
  452. EndIf
  453.  
  454. If ( $HealthCheck <> $HealthCheck2 ) And ( $ChatColorCheck = $ChatColorCheck2 ) Then
  455. If $FlaskFourCheck = 0 Then
  456. Send($FlaskFour)
  457. sleep($Frequency)
  458. $FlaskFourCheck = 1
  459. $FlaskFourTimer = TimerInit()
  460. Else
  461. $FlaskFourTimerDiff = TimerDiff($FlaskFourTimer)
  462. If $FlaskFourTimerDiff >= $FlaskFourDuration Then
  463. $FlaskFourCheck = 0
  464. EndIf
  465. EndIf
  466. EndIf
  467.  
  468. If _IsPressed ( "01" ) And $QuickSilverCheckA = 0 Then
  469. $QuickSilverTimerA = TimerInit()
  470. $QuickSilverCheckA = 1
  471. EndIf
  472.  
  473. $QuickSilverTimerDiffA = TimerDiff($QuickSilverTimerA)
  474.  
  475. If _IsPressed ( "01" ) And $QuickSilverTimerDiffA > 500 Then
  476. If $QuickSilverCheckB = 0 Then
  477. Send($QuickSilverFlask)
  478. sleep($Frequency)
  479. $QuickSilverTimerB = TimerInit()
  480. sleep($Frequency)
  481. $QuickSilverCheckB = 1
  482. EndIf
  483. EndIf
  484.  
  485. $QuickSilverTimerDiffB = TimerDiff($QuickSilverTimerB)
  486.  
  487. If $QuickSilverCheckB = 1 And $QuickSilverTimerDiffB >= $QuickSilverDuration Then
  488. $QuickSilverCheckB = 0
  489. $QuickSilverCheckA = 0
  490. EndIf
  491.  
  492. EndIf
  493. WEnd
  494. TrayTip("QuickLooks", "Autoloot Disabled", 10)
  495. EndFunc
  496.  
  497. ; End Loot Functions Section
  498.  
  499. ;----------------------------------------------------------------------------------------------------------
  500.  
  501. ; Scrolls Functions Section
  502.  
  503. Func FindPortalScroll()
  504. Local $xPortalScroll = MouseGetPos ( 0 )
  505. Local $yPortalScroll = MouseGetPos ( 1 )
  506. IniWrite ( "QuickLooks.ini", "ClickCoords", "PortalScrollX", $xPortalScroll )
  507. IniWrite ( "QuickLooks.ini", "ClickCoords", "PortalScrollY", $yPortalScroll )
  508. TrayTip("QuickLooks", "Portal Scroll Position Changed In QuickLooks.ini", 10)
  509. EndFunc
  510.  
  511. Func FindPortalPosition()
  512. Local $xPortalPosition = MouseGetPos ( 0 )
  513. Local $yPortalPosition = MouseGetPos ( 1 )
  514. IniWrite ( "QuickLooks.ini", "ClickCoords", "PortalPositionX", $xPortalPosition )
  515. IniWrite ( "QuickLooks.ini", "ClickCoords", "PortalPositionY", $yPortalPosition )
  516. TrayTip("QuickLooks", "Portal Position Changed In QuickLooks.ini", 10)
  517. EndFunc
  518.  
  519. Func TownPortal()
  520. Local $PortalScrollX = IniRead ( "QuickLooks.ini", "ClickCoords", "PortalScrollX", 0 )
  521. Local $PortalScrollY = IniRead ( "QuickLooks.ini", "ClickCoords", "PortalScrollY", 0 )
  522. Local $PortalPositionX = IniRead ( "QuickLooks.ini", "ClickCoords", "PortalPositionX", 0 )
  523. Local $PortalPositionY = IniRead ( "QuickLooks.ini", "ClickCoords", "PortalPositionY", 0 )
  524. If WinActive ( $handle ) Then
  525. TrayTip("QuickLooks", "Creating Town Portal.", 10)
  526. Send ("i")
  527. sleep($Frequency)
  528. MouseClick($MOUSE_CLICK_RIGHT, ($PortalScrollX), ($PortalScrollY), 1, 0 )
  529. sleep($Frequency)
  530. Send ("i")
  531. sleep($Frequency*3)
  532. MouseClick($MOUSE_CLICK_LEFT, ($PortalPositionX), ($PortalPositionY), 1, 0 )
  533. sleep($Frequency*4)
  534. EndIf
  535. EndFunc
  536.  
  537. Func FindWisdomScroll()
  538. Local $xWisdomScroll = MouseGetPos ( 0 )
  539. Local $yWisdomScroll = MouseGetPos ( 1 )
  540. IniWrite ( "QuickLooks.ini", "ClickCoords", "WisdomScrollX", $xWisdomScroll )
  541. IniWrite ( "QuickLooks.ini", "ClickCoords", "WisdomScrollY", $yWisdomScroll )
  542. TrayTip("QuickLooks", "Wisdom Scroll Position Changed In QuickLooks.ini", 10)
  543. EndFunc
  544.  
  545. Func IdInventory()
  546. If WinActive ( $handle ) Then
  547. Local $aCoord = PixelSearch(0, 0, $xresolution, $yresolution, 0x2B0404, 1, 1, $handle)
  548. If not @error Then
  549. MouseClick($MOUSE_CLICK_RIGHT, ($WisdomScrollX), ($WisdomScrollY), 1, 0 )
  550. sleep($Frequency*2)
  551. MouseClick($MOUSE_CLICK_LEFT, ($aCoord[0] + 3), ($aCoord[1] + 3), 1, 0 )
  552. sleep($Frequency*2)
  553. EndIf
  554. EndIf
  555. EndFunc
  556.  
  557. Func IdInventorySell()
  558. If WinActive ( $handle ) Then
  559. Local $aCoord = PixelSearch(0, 0, $xresolution, $yresolution, 0x2B0404, 1, 1, $handle)
  560. If not @error Then
  561. MouseClick($MOUSE_CLICK_RIGHT, ($WisdomScrollX), ($WisdomScrollY), 1, 0 )
  562. sleep($Frequency)
  563. MouseClick($MOUSE_CLICK_LEFT, ($aCoord[0] + 3), ($aCoord[1] + 3), 1, 0 )
  564. sleep($Frequency)
  565. Send("{LCTRL}down")
  566. MouseClick($MOUSE_CLICK_LEFT, ($aCoord[0] + 3), ($aCoord[1] + 3), 1, 0 )
  567. Send("{LCTRL}up")
  568. sleep($Frequency*2)
  569. EndIf
  570. EndIf
  571. EndFunc
  572.  
  573. ; End Scrolls Functions Section
  574.  
  575. ;----------------------------------------------------------------------------------------------------------
  576.  
  577. ; Orb Functions Section
  578.  
  579. Func FindTargetItem()
  580. Local $xTargetItem = MouseGetPos ( 0 )
  581. Local $yTargetItem = MouseGetPos ( 1 )
  582. IniWrite ( "QuickLooks.ini", "ClickCoords", "TargetItemX", $xTargetItem )
  583. IniWrite ( "QuickLooks.ini", "ClickCoords", "TargetItemY", $yTargetItem )
  584. TrayTip("QuickLooks", "Target Item Position Changed In QuickLooks.ini", 10)
  585. EndFunc
  586.  
  587. Func FindAlteration()
  588. Local $xAlteration = MouseGetPos ( 0 )
  589. Local $yAlteration = MouseGetPos ( 1 )
  590. IniWrite ( "QuickLooks.ini", "ClickCoords", "AlterationX", $xAlteration )
  591. IniWrite ( "QuickLooks.ini", "ClickCoords", "AlterationY", $yAlteration )
  592. TrayTip("QuickLooks", "Alteration Orb Position Changed In QuickLooks.ini", 10)
  593. EndFunc
  594.  
  595. Func Alteration()
  596. Local $AlterationX = IniRead ( "QuickLooks.ini", "ClickCoords", "AlterationX", 0 )
  597. Local $AlterationY = IniRead ( "QuickLooks.ini", "ClickCoords", "AlterationY", 0 )
  598. Local $TargetItemX = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemX", 0 )
  599. Local $TargetItemY = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemY", 0 )
  600. $Alteration= NOT $Alteration
  601. While $Alteration
  602. MouseClick($MOUSE_CLICK_RIGHT, ($AlterationX), ($AlterationY), 1)
  603. sleep(5)
  604. MouseClick($MOUSE_CLICK_LEFT, ($TargetItemX), ($TargetItemY), 1)
  605. sleep(5)
  606. WEnd
  607. EndFunc
  608.  
  609. Func FindJeweller()
  610. Local $xJeweller = MouseGetPos ( 0 )
  611. Local $yJeweller = MouseGetPos ( 1 )
  612. IniWrite ( "QuickLooks.ini", "ClickCoords", "JewellerX", $xJeweller )
  613. IniWrite ( "QuickLooks.ini", "ClickCoords", "JewellerY", $yJeweller )
  614. TrayTip("QuickLooks", "Jeweller Orb Position Changed In QuickLooks.ini", 10)
  615. EndFunc
  616.  
  617. Func Jeweller()
  618. Local $JewellerX = IniRead ( "QuickLooks.ini", "ClickCoords", "JewellerX", 0 )
  619. Local $JewellerY = IniRead ( "QuickLooks.ini", "ClickCoords", "JewellerY", 0 )
  620. Local $TargetItemX = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemX", 0 )
  621. Local $TargetItemY = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemY", 0 )
  622. $Jeweller= NOT $Jeweller
  623. While $Jeweller
  624. MouseClick($MOUSE_CLICK_RIGHT, ($JewellerX), ($JewellerY), 1)
  625. sleep(5)
  626. MouseClick($MOUSE_CLICK_LEFT, ($TargetItemX), ($TargetItemY), 1)
  627. sleep(5)
  628. WEnd
  629. EndFunc
  630.  
  631. Func FindFusing()
  632. Local $xFusing = MouseGetPos ( 0 )
  633. Local $yFusing = MouseGetPos ( 1 )
  634. IniWrite ( "QuickLooks.ini", "ClickCoords", "FusingX", $xFusing )
  635. IniWrite ( "QuickLooks.ini", "ClickCoords", "FusingY", $yFusing )
  636. TrayTip("QuickLooks", "Fusing Orb Position Changed In QuickLooks.ini", 10)
  637. EndFunc
  638.  
  639. Func Fusing()
  640. Local $FusingX = IniRead ( "QuickLooks.ini", "ClickCoords", "FusingX", 0 )
  641. Local $FusingY = IniRead ( "QuickLooks.ini", "ClickCoords", "FusingY", 0 )
  642. Local $TargetItemX = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemX", 0 )
  643. Local $TargetItemY = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemY", 0 )
  644. $Fusing= NOT $Fusing
  645. While $Fusing
  646. MouseClick($MOUSE_CLICK_RIGHT, ($FusingX), ($FusingY), 1)
  647. sleep(5)
  648. MouseClick($MOUSE_CLICK_LEFT, ($TargetItemX), ($TargetItemY), 1)
  649. sleep(5)
  650. WEnd
  651. EndFunc
  652.  
  653. Func FindChromatic()
  654. Local $xChromatic = MouseGetPos ( 0 )
  655. Local $yChromatic = MouseGetPos ( 1 )
  656. IniWrite ( "QuickLooks.ini", "ClickCoords", "ChromaticX", $xChromatic )
  657. IniWrite ( "QuickLooks.ini", "ClickCoords", "ChromaticY", $yChromatic )
  658. TrayTip("QuickLooks", "Chromatic Orb Position Changed In QuickLooks.ini", 10)
  659. EndFunc
  660.  
  661. Func Chromatic()
  662. Local $ChromaticX = IniRead ( "QuickLooks.ini", "ClickCoords", "ChromaticX", 0 )
  663. Local $ChromaticY = IniRead ( "QuickLooks.ini", "ClickCoords", "ChromaticY", 0 )
  664. Local $TargetItemX = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemX", 0 )
  665. Local $TargetItemY = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemY", 0 )
  666. $Chromatic= NOT $Chromatic
  667. While $Chromatic
  668. MouseClick($MOUSE_CLICK_RIGHT, ($ChromaticX), ($ChromaticY), 1)
  669. sleep(5)
  670. MouseClick($MOUSE_CLICK_LEFT, ($TargetItemX), ($TargetItemY), 1)
  671. sleep(5)
  672. WEnd
  673. EndFunc
  674.  
  675. Func FindWhetstone()
  676. Local $xWhetstone = MouseGetPos ( 0 )
  677. Local $yWhetstone = MouseGetPos ( 1 )
  678. IniWrite ( "QuickLooks.ini", "ClickCoords", "WhetstoneX", $xWhetstone )
  679. IniWrite ( "QuickLooks.ini", "ClickCoords", "WhetstoneY", $yWhetstone )
  680. TrayTip("QuickLooks", "Whetstone Position Changed In QuickLooks.ini", 10)
  681. EndFunc
  682.  
  683. Func Whetstone()
  684. Local $WhetstoneX = IniRead ( "QuickLooks.ini", "ClickCoords", "WhetstoneX", 0 )
  685. Local $WhetstoneY = IniRead ( "QuickLooks.ini", "ClickCoords", "WhetstoneY", 0 )
  686. Local $TargetItemX = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemX", 0 )
  687. Local $TargetItemY = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemY", 0 )
  688. $Whetstone= NOT $Whetstone
  689. While $Whetstone
  690. MouseClick($MOUSE_CLICK_RIGHT, ($WhetstoneX), ($WhetstoneY), 1)
  691. sleep(5)
  692. MouseClick($MOUSE_CLICK_LEFT, ($TargetItemX), ($TargetItemY), 1)
  693. sleep(5)
  694. WEnd
  695. EndFunc
  696.  
  697. Func FindArmorScrap()
  698. Local $xArmorScrap = MouseGetPos ( 0 )
  699. Local $yArmorScrap = MouseGetPos ( 1 )
  700. IniWrite ( "QuickLooks.ini", "ClickCoords", "ArmorScrapX", $xArmorScrap )
  701. IniWrite ( "QuickLooks.ini", "ClickCoords", "ArmorScrapY", $yArmorScrap )
  702. TrayTip("QuickLooks", "Armor Scrap Position Changed In QuickLooks.ini", 10)
  703. EndFunc
  704.  
  705. Func ArmorScrap()
  706. Local $ArmorScrapX = IniRead ( "QuickLooks.ini", "ClickCoords", "ArmorScrapX", 0 )
  707. Local $ArmorScrapY = IniRead ( "QuickLooks.ini", "ClickCoords", "ArmorScrapY", 0 )
  708. Local $TargetItemX = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemX", 0 )
  709. Local $TargetItemY = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemY", 0 )
  710. $ArmorScrap= NOT $ArmorScrap
  711. While $ArmorScrap
  712. MouseClick($MOUSE_CLICK_RIGHT, ($ArmorScrapX), ($ArmorScrapY), 1)
  713. sleep(5)
  714. MouseClick($MOUSE_CLICK_LEFT, ($TargetItemX), ($TargetItemY), 1)
  715. sleep(5)
  716. WEnd
  717. EndFunc
  718.  
  719. Func FindChisel()
  720. Local $xChisel = MouseGetPos ( 0 )
  721. Local $yChisel = MouseGetPos ( 1 )
  722. IniWrite ( "QuickLooks.ini", "ClickCoords", "ChiselX", $xChisel )
  723. IniWrite ( "QuickLooks.ini", "ClickCoords", "ChiselY", $yChisel )
  724. TrayTip("QuickLooks", "Chisel Position Changed In QuickLooks.ini", 10)
  725. EndFunc
  726.  
  727. Func Chisel()
  728. Local $ChiselX = IniRead ( "QuickLooks.ini", "ClickCoords", "ChiselX", 0 )
  729. Local $ChiselY = IniRead ( "QuickLooks.ini", "ClickCoords", "ChiselY", 0 )
  730. Local $TargetItemX = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemX", 0 )
  731. Local $TargetItemY = IniRead ( "QuickLooks.ini", "ClickCoords", "TargetItemY", 0 )
  732. $Chisel= NOT $Chisel
  733. While $Chisel
  734. MouseClick($MOUSE_CLICK_RIGHT, ($ChiselX), ($ChiselY), 1)
  735. sleep(5)
  736. MouseClick($MOUSE_CLICK_LEFT, ($TargetItemX), ($TargetItemY), 1)
  737. sleep(5)
  738. WEnd
  739. EndFunc
  740.  
  741. ; End Orb Functions Section
  742.  
  743. ;----------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement