Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Path of Exile AutoHotkey Script by Glyph - http://www.twitch.tv/glyph27
- ; Version "29-March-2015".
- ;
- ; This script aims to combine the best features and qualities of the POE AutoHotkey scripts I've
- ; seen online and to be faster, more reliable, and clearer than any.
- ;
- ; Modify and distribute this script however you please. This code is provided without any warranty,
- ; express or implied.
- ;
- ; Props to GGG for a great UI design that changes states without any delay. Most of these functions
- ; would require sleep commands and take a noticable amount of time, otherwise.
- ; Instructions - YOU _MUST_ FOLLOW THESE FOR TOWN PORTAL AND LOGOUT MACROS TO WORK!
- ;
- ; 1. Change the hotkeys below to whatever you like.
- ; 2. Search this file for "MODIFY THIS" and change anything accordingly.
- ; 3. Reload your AutoHotkey script.
- ;
- ; Windows7 and Windows8 users must run AHK as administrator or the script may be interrupted by
- ; user input.
- ; Key Bindings
- ;
- ; For more information about AutoHotkey key bindings, see :
- ; * http://www.autohotkey.com/docs/Hotkeys.htm
- ; * http://www.autohotkey.com/docs/KeyList.htm
- ;
- ;
- ; Default Hotkeys:
- ;
- ; Keypad 0 -> Logout to main menu as fast as possible.
- ; Mouse Forward -> Logout to main menu as fast as possible.
- ; ~ (Tilde key) -> Out of Sync hack. (/oos).
- ; F2 -> Remaining monsters. (/remaining).
- ; F3 -> Teleport to your hideout from town. (/hideout).
- ; F4 -> Report item level of held item. (/itemlevel).
- ; Ctrl-T -> Open a portal to town.
- ; Ctrl-Shift-T -> Open a portal to town and say "Portal Up".
- ; F9 -> Turn off/on other hoykeys, for example if you need to type the ~ character in
- ; chat etc. Note that all hotkeys only work in POE so you do not need to turn
- ; off hotkeys when alt-tabbing.
- SetTitleMatchMode 3 ; Exact matching only.
- #SingleInstance force
- ; Use global "#IfWinActive" instead of local "IfWinActive" so that hotkeys are not eaten by AHK.
- #IfWinActive, Path of Exile
- *Numpad0::PathOfExile_logout()
- *NumpadIns::PathOfExile_logout()
- *Xbutton2::PathOfExile_logout()
- `::PathOfExile_oos()
- ~::PathOfExile_oos()
- F2::PathOfExile_remaining()
- F3::PathOfExile_hideout()
- F4::PathOfExile_itemlevel()
- ^T::PathOfExile_portal()
- ^+T::PathOfExile_portalmessage()
- F9::Suspend ; Enable / disable these hotkeys.
- ; Log the user out as fast as possible.
- PathOfExile_logout()
- {
- SendMode Input ; Ensures that MouseClick uses the fastest input mode.
- BlockInput On
- SendInput {Space}{Esc} ; MODIFY THIS so that {Space} is your "Close all Menus" hotkey.
- ; Closes the escape menu if it is open, and then opens it.
- ; It is possible to automatically calculate where your logout button is located based on your
- ; resolution, however, this may take a little bit longer to process and I don't want to risk it.
- ; The reason for the delay, if there is any, is due to WinActivate or WinGetPos calls.
- screenResolutionWidth := 2550. ; MODIFY THIS to your screen's horizontal resolution.
- screenResolutionHeight := 1440. ; MODIFY THIS to your screen's vertical resolution.
- x := screenResolutionWidth * 0.5
- y := screenResolutionHeight * 0.403
- MouseClick, Left, x, y
- Sleep, 40 ; sometimes initial click does not trigger, do it again after delay
- MouseClick, Left, x, y
- BlockInput Off
- }
- PathOfExile_oos()
- {
- BlockInput On
- SendInput {Enter}/oos{Enter}
- ; Enter party chat after command (instead of local).
- SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
- BlockInput Off
- }
- PathOfExile_remaining()
- {
- BlockInput On
- SendInput {Enter}/remaining{Enter}
- ; Enter party chat after command (instead of local).
- SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
- BlockInput Off
- }
- PathOfExile_hideout()
- {
- BlockInput On
- SendInput {Enter}/hideout{Enter}
- ; Enter party chat after command (instead of local).
- SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
- BlockInput Off
- }
- ; Checks item level of the held item.
- ;
- ; This script does not support checking the item level of the hovered item because I can't find
- ; a way to do so reliably. When hovering over the edge of the item, the script would attempt to put
- ; the item back into an adjacent spot.
- PathOfExile_itemlevel()
- {
- BlockInput On
- SendInput {Enter}/itemlevel{Enter}
- ; Enter party chat after command (instead of local).
- SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
- BlockInput Off
- }
- ; Casts town portal.
- ; RIP my town portal scrolls from testing this method.
- PathOfExile_portal()
- {
- BlockInput On
- MouseGetPos, x, y ; so that we can return the mouse to the original position after.
- SendMode Input ; Ensures that MouseClick uses the fastest input mode.
- ; Send mouse button up commands if the mouse buttons are down, or else town portal will fail.
- GetKeyState, lbstate, LButton
- GetKeyState, rbstate, RButton
- if lbstate = D
- SendInput {LButton Up}
- if rbstate = D
- SendInput {RButton Up}
- ; Wait for Mouse Button Up to register with game client.
- if lbstate = D or rbstate = D
- Sleep, 70
- SendInput {v}{f} ; MODIFY THIS to your PASSIVE SKILL TREE MENU hotkey and INVENTORY hotkey. Passive
- ; skill tree is used so that TP works even when the inventory was already open.
- Sleep, 100 ; Needed when inventory hasn't been opened on this map yet for whatever reason.
- MouseMove, 2500, 1100 ; MODIFY THIS to the position of your town portal scroll.
- Sleep, 70 ; Fixes this script to work as of 3/29/2015.
- MouseClick, Right, 2500, 1100 ; MODIFY THIS to the position of your town portal scroll.
- Sleep, 70 ; Fixes this script to work as of 3/29/2015.
- SendInput {Space}
- ; Ensure that the mouse isn't moved back so fast that the portal doesn't get clicked.
- Sleep, 70
- MouseMove, x, y
- BlockInput Off
- }
- ; Send a message to party chat after opening a town portal.
- PathOfExile_portalmessage()
- {
- PathOfExile_portal()
- BlockInput On
- SendInput {Enter}{`%}Portal Up{Enter}
- ; Change chat channel.
- ;SendInput {Enter}{`%}{Enter} ; Change the {'%} to {#} for global, etc.
- BlockInput Off
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement