Advertisement
UNOBTANIUM

Path of Exile Autohotkey

Jul 29th, 2015
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. InstantFlask = 2
  2. PortalScrollX := 0
  3. PortalScrollY := 1
  4. WisdomScrollX := 0
  5. WisdomScrollY := 0
  6. isRunning = 1
  7. isInChat = 0
  8.  
  9. #IfWinActive, Path of Exile
  10. ~Enter::
  11. {
  12.     if (isRunning) {
  13.         isRunning = 0
  14.         isInChat = 1
  15.     } else {
  16.         isRunning = 1
  17.         isInChat = 0
  18.     }
  19.     Return
  20. }
  21.  
  22. ~ESC::
  23. {
  24.     if (isInChat) {
  25.         isInChat = 0
  26.         isRunning = 1
  27.     }
  28.     Return
  29. }
  30.  
  31.  
  32. #If isRunning
  33. #IfWinActive, Path of Exile ahk_class Direct3DWindowClass
  34. ~R::
  35. {
  36.     SendInput, {F6 down}{F7 down}
  37.     keywait r, L
  38.     SendInput, {F6 up}{F7 up}
  39.     Return
  40. }
  41.  
  42.  
  43.  
  44. #IfWinActive, Path of Exile ahk_class Direct3DWindowClass
  45. q::
  46. {
  47.     SendInput, {F9}{F6 down}q{F6 up}{F9}
  48.     Return
  49. }
  50.  
  51.  
  52. #IfWinActive, Path of Exile ahk_class Direct3DWindowClass
  53. ~F1::
  54. {
  55.    BlockInput On
  56.    SendInput, {Enter}/remaining{Enter}
  57.    BlockInput Off
  58.    Return
  59. }
  60.  
  61. #IfWinActive, Path of Exile
  62. ~F2::
  63. {
  64.    BlockInput On
  65.    SendInput, {Enter}/oos{Enter}
  66.    BlockInput Off
  67.    Return
  68. }
  69.  
  70. #IfWinActive, Path of Exile ahk_class Direct3DWindowClass
  71. ~F3::
  72. {
  73.    BlockInput On
  74.    SendInput, {LButton}{Enter}/itemlevel{Enter}
  75.    Sleep, 100
  76.    SendInput, {LButton}
  77.    BlockInput Off
  78.    Return
  79. }
  80.  
  81.  
  82.  
  83. #IfWinActive, Path of Exile ahk_class Direct3DWindowClass
  84. ~F4::
  85. {
  86.    MouseGetPos, mousePosX, mousePosY
  87.    WinGetPos,,,width,height
  88.    slotZeroX := (width*0.67)
  89.    slotZeroY := (height*0.57)
  90.    spaceX := (width*0.028125)
  91.    spaceY := (height*0.04629)
  92.  
  93.    BlockInput On
  94.    SendInput, I
  95.    Sleep, 5
  96.    MouseClick, L, (slotZeroX+PortalScrollX*spaceX), (slotZeroY+PortalScrollY*spaceY), 1, 0, U
  97.    Sleep, 5
  98.    MouseClick, R, (slotZeroX+PortalScrollX*spaceX), (slotZeroY+PortalScrollY*spaceY), 1, 0
  99.    Sleep, 5
  100.    MouseMove %mousePosX%, %mousePosY%, 1
  101.    SendInput, I
  102.    BlockInput Off
  103.    Return
  104. }
  105.  
  106.  
  107. #IfWinActive, Path of Exile ahk_class Direct3DWindowClass
  108. ~F5::
  109. {
  110.    MouseGetPos, mousePosXSave, mousePosSaveY
  111.    WinGetPos,,,width,height
  112.    slotZeroX := (width*0.67)
  113.    slotZeroY := (height*0.57)
  114.    spaceX := (width*0.028125)
  115.    spaceY := (height*0.04629)
  116.  
  117.    BlockInput, On
  118.    mousePosX := (slotZeroX+WisdomScrollX*spaceX)
  119.    mousePosY := (slotZeroY+WisdomScrollY*spaceY)
  120.    MouseMove, mousePosX, mousePosY, 1
  121.    MouseClick, R, mousePosX, mousePosY, 1, 0
  122.    Sleep, 10
  123.    SendInput, {SHIFT down}
  124.    Sleep, 5
  125.  
  126.    Loop 5 {
  127.       y := a_index-1
  128.       mousePosY := (slotZeroY+y*spaceY)
  129.        Loop 12 {
  130.            x := a_index-1
  131.          mousePosX := (slotZeroX+x*spaceX)
  132.  
  133.          PixelGetColor, pixelColor, mousePosX, mousePosY, RGB
  134.          vred := ((pixelColor & 0xFF0000) >> 16)
  135.          if (vred > 8) {
  136.            MouseClick, L, mousePosX, mousePosY, 1, 0
  137.          }
  138.        }
  139.    }
  140.    SendInput, {SHIFT up}
  141.    MouseMove %mousePosXSave%, %mousePosYSave%, 1
  142.    BlockInput, Off
  143.    Return
  144. }
  145.  
  146.  
  147.  
  148.  
  149.  
  150. #IfWinActive, Path of Exile ahk_class Direct3DWindowClass
  151. ~F7::
  152. {
  153.    BlockInput On
  154.    SendInput, %InstantFlask%{Esc}
  155.    WinGetPos,,,width,height
  156.    MouseClick, L, (width/2), (height*0.44), 2, 0,
  157.    BlockInput Off
  158.    Return
  159. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement