Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Path of Exile AutoHotkey Script by Glyph - http://www.twitch.tv/glyph27
  2. ; Version "29-Aug-2014".
  3. ;
  4. ; This script aims to combine the best qualities of the POE hotkey scripts I could find online and
  5. ; modify them to be clearer and more performance-optimised when possible.
  6. ;
  7. ; Distribute and modify this script however you please. This code is provided without any warranty,
  8. ; express or implied.
  9. ;
  10. ; Props to GGG for a great UI design that changes states without any delay. Most of these functions
  11. ; would require sleep commands and take a noticable amount of time.
  12.  
  13. ; INSTRUCTIONS:
  14. ;
  15. ; 1. Change the hotkeys below to whatever you like.
  16. ; 2. Search this file for "MODIFY THIS" and change anything accordingly.
  17.  
  18.  
  19. ; Key Bindings
  20. ;
  21. ; For more information about AutoHotkey key bindings, see :
  22. ; * http://www.autohotkey.com/docs/Hotkeys.htm
  23. ; * http://www.autohotkey.com/docs/KeyList.htm
  24.  
  25. ; Use global "#IfWinActive" instead of local "IfWinActive" so that hotkeys are not eaten by AHK.
  26. #IfWinActive, Path of Exile
  27.  
  28. Numpad0::PathOfExile_logout()
  29. NumpadIns::PathOfExile_logout()
  30.  
  31. `::PathOfExile_oos()
  32. ~::PathOfExile_oos()
  33.  
  34. F2::PathOfExile_remaining()
  35.  
  36. F3::PathOfExile_hideout()
  37.  
  38. F4::PathOfExile_itemlevel()
  39.  
  40. F5::PathOfExile_portal()
  41.  
  42.  
  43. ; Log the user out as fast as possible.
  44. PathOfExile_logout()
  45. {
  46. SendMode Input ; Ensures that MouseClick uses the fastest input mode.
  47.  
  48. BlockInput On
  49.  
  50. SendInput {Space}{Esc}
  51.  
  52. ; It is possible to automatically calculate where your logout button is located based on your
  53. ; resolution, however, this may take a little bit longer to process and I don't want to risk it.
  54. ; The reason for the delay, if there is any, is due to WinActivate or WinGetPos. It's easy
  55. ; enough to calculate your logout button's position yourself, anyway:
  56.  
  57. ; MODIFY THIS to the position of the desired logout or exit button. Set the first number to your
  58. ; screen's horizontal resolution divided by 2. Set the second number to your screen's vertical
  59. ; resolution multiplied by 0.403.
  60. MouseClick, Left, 1275, 580
  61.  
  62. BlockInput Off
  63. }
  64.  
  65. PathOfExile_oos()
  66. {
  67. BlockInput On
  68.  
  69. SendInput {Enter}/oos{Enter}
  70.  
  71. ; Enter party chat after command (instead of local).
  72. SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
  73.  
  74. BlockInput Off
  75. }
  76.  
  77. PathOfExile_remaining()
  78. {
  79. BlockInput On
  80.  
  81. SendInput {Enter}/remaining{Enter}
  82.  
  83. ; Enter party chat after command (instead of local).
  84. SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
  85.  
  86. BlockInput Off
  87. }
  88.  
  89. PathOfExile_hideout()
  90. {
  91. BlockInput On
  92.  
  93. SendInput {Enter}/hideout{Enter}
  94.  
  95. ; Enter party chat after command (instead of local).
  96. SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
  97.  
  98. BlockInput Off
  99. }
  100.  
  101. ; Checks item level of the held item.
  102. PathOfExile_itemlevel()
  103. {
  104. BlockInput On
  105.  
  106. SendInput {Enter}/itemlevel{Enter}
  107.  
  108. ; Enter party chat after command (instead of local).
  109. SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
  110.  
  111. BlockInput Off
  112. }
  113.  
  114. ; Casts town portal.
  115. ; RIP my town portal scrolls from testing this method.
  116. PathOfExile_portal()
  117. {
  118. BlockInput On
  119.  
  120. MouseGetPos, x, y ; so that we can return the mouse to the original position after.
  121.  
  122. ; Send mouse button up commands if the mouse buttons are down, or else town portal will fail.
  123. GetKeyState, lbstate, LButton
  124. GetKeyState, rbstate, RButton
  125.  
  126. if lbstate = D
  127. SendInput {LButton Up}
  128.  
  129. if rbstate = D
  130. SendInput {RButton Up}
  131.  
  132. if lbstate = D or rbstate = D
  133. Sleep, 50
  134.  
  135. SendMode Input ; Ensures that MouseClick uses the fastest input mode.
  136.  
  137. SendInput f ; MODIFY THIS to your inventory hotkey.
  138.  
  139. Sleep, 50 ; Needed when inventory hasn't been opened on this map yet for some reason.
  140.  
  141. MouseClick, Right, 2500, 1100 ; MODIFY THIS to the position of your town portal scroll.
  142.  
  143. SendInput {Space}
  144.  
  145. ; Ensure that the mouse isn't moved back so fast that the portal doesn't get clicked.
  146. Sleep, 50
  147.  
  148. MouseMove, x, y
  149.  
  150. BlockInput Off
  151. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement