Skip to content

Commit

Permalink
add turn on/off quick-flasks #2
Browse files Browse the repository at this point in the history
  • Loading branch information
heyfey committed May 22, 2021
1 parent 5f6ec83 commit a958f43
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 34 deletions.
2 changes: 2 additions & 0 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Please click in the links to see demos and how to use.
| `Ctrl + A` | hold to keep looting
| `Ctrl + J` | use protal scroll
| `Ctrl + D` | auto-detonating mine on/off
| `Ctrl + F` | quick-flasks on/off
| `Ctrl + F` | auto-flasks on/off
| `F2 ~ F8``Ctrl + ~` | quick enter |
| `Ctrl + PageUp` | search item on cursor; if none, search by input
Expand Down Expand Up @@ -82,6 +83,7 @@ Please click in the links to see demos and how to use.
+ You can change key binding and flasks list in GUI
+ `list` is the key sequence you want to send, which is not limited to flasks, you can add as many keys (skills) as you want; use `-` as delimiter
+ For example: `2-3-4-5-q-w-e`, `2345` for utility flasks, `q` for Blood Rage, `w` for Steelskin/Molten Shell, `e` for Phase Run
+ In game, use `Ctrl + L` to turn on/off quick-flasks


### Auto-flasks
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
| `Ctrl + A` | "按住"持續自動撿裝
| `Ctrl + J` | 使用傳送卷軸
| `Ctrl + D` | 開啟/關閉自動引爆地雷
| `Ctrl + L` | 開啟/關閉一鍵喝水
| `Ctrl + F` | 開啟/關閉自動喝水
| `Ctrl + PageUp` | 在賣場查詢游標上的物品,如果沒有則用"輸入"查詢
| `F2 ~ F8``Ctrl + ~` | 快速輸入 |
Expand Down Expand Up @@ -94,6 +95,8 @@

+ 按鍵可以是藥水也可以是技能。比如`2-3-4-5-q-w-e``2345`是功能藥水,`q`是鋼筋鐵骨,`w`是鮮血狂怒,`e`是暗影迷蹤。建議在此功能中只使用**瞬發**的技能,不然可能有點蠢。

+ 在遊戲裡`Ctrl + L`開啟/關閉一鍵喝水


### 自動喝水 auto flask

Expand Down
22 changes: 18 additions & 4 deletions src/POE_Utility.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ global quickFlasksHotkey1
global quick_flask_list
global quick_flask_list_1

global quick_flask_active = True

global lootColor
global loot_dalay

Expand Down Expand Up @@ -55,12 +57,24 @@ RunGUI()
;===============================================================================

QuickFlaskLabel0:
QuickFlask(quick_flask_list)
return
if quick_flask_active{
QuickFlask(quick_flask_list)
}
else{
Send, %quickFlasksHotkey0%
}
return

QuickFlaskLabel1:
QuickFlask(quick_flask_list_1)
return
if quick_flask_active{
QuickFlask(quick_flask_list_1)
}
else{
Send, %quickFlasksHotkey1%
}
return

~^l::Activate_QuickFlask() ; Ctrl+L: 開啟/關閉一鍵喝水

~RButton::AutoDetonate()

Expand Down
Binary file modified src/POE_Utility.exe
Binary file not shown.
12 changes: 12 additions & 0 deletions src/functions.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ AutoFlask(){
return
}

Activate_QuickFlask(){
quick_flask_active := !quick_flask_active
if quick_flask_active{
MsgBox , 0, , Quick flask : On, 0.5
AutoFlask()
}
else{
MsgBox , 0, , Quick flask : Off, 0.5
}
return
}

QuickFlask(list){
Loop, parse, list, -
{
Expand Down
62 changes: 32 additions & 30 deletions src/gui.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,48 @@ Gui, Add, Edit, x252 y20 w0 h0 , 123 ; dummy edit to avoid a mysterious bug
; quick flasks
; 1
Gui, Font, bold
Gui, Add, GroupBox, x30 y50 w380 h100 , Quick Flasks
Gui, Add, GroupBox, x30 y50 w380 h130 , Quick Flasks
Gui, Add, Text, x40 y80 w80 h20 , Ctrl + L
Gui, Font, norm
Gui, Add, Hotkey, vquickFlasksHotkey0 x42 y80 w80 h20 , %quickFlasksHotkey0%
Gui, Add, Text, x120 y50 w30 h0 , Text
Gui, Add, Text, x130 y80 w120 h30 , to quick flasks (1)`, list:
Gui, Add, Edit, vquick_flask_list x250 y80 w150 h20 , %quick_flask_list%
; 2
Gui, Add, Hotkey, vquickFlasksHotkey1 x40 y110 w80 h20 , %quickFlasksHotkey1%
Gui, Add, Text, x130 y80 w70 h30 , to turn on /off
Gui, Add, Hotkey, vquickFlasksHotkey0 x40 y110 w80 h20 , %quickFlasksHotkey0%
Gui, Add, Text, x120 y80 w30 h0 , Text
Gui, Add, Text, x130 y110 w120 h30 , to quick flasks (2)`, list:
Gui, Add, Edit, vquick_flask_list_1 x250 y110 w150 h20 , %quick_flask_list_1%
Gui, Add, Text, x130 y110 w120 h30 , to quick flasks (1)`, list:
Gui, Add, Edit, vquick_flask_list x250 y110 w150 h20 , %quick_flask_list%
; 2
Gui, Add, Hotkey, vquickFlasksHotkey1 x40 y140 w80 h20 , %quickFlasksHotkey1%
Gui, Add, Text, x120 y110 w30 h0 , Text
Gui, Add, Text, x130 y140 w120 h30 , to quick flasks (2)`, list:
Gui, Add, Edit, vquick_flask_list_1 x250 y140 w150 h20 , %quick_flask_list_1%

; auto flasks
Gui, Font, bold
Gui, Add, GroupBox, x30 y160 w380 h160 , Auto Flasks
Gui, Add, Text, x40 y190 w80 h20 , Ctrl + F
Gui, Add, GroupBox, x30 y190 w380 h160 , Auto Flasks
Gui, Add, Text, x40 y220 w80 h20 , Ctrl + F
Gui, Font, norm
Gui, Add, Text, x130 y190 w70 h30 , to turn on/off`,
Gui, Add, Text, x210 y190 w30 h20 , X:
Gui, Add, Text, x210 y220 w30 h20 , Y:
Gui, Add, Text, x210 y250 w50 h20 , color:
Gui, Add, Text, x210 y280 w30 h20 , list:
Gui, Add, Edit, vlow_life_X x250 y190 w60 h20 , %low_life_X%
Gui, Add, Edit, vlow_life_Y x250 y220 w60 h20 , %low_life_Y%
Gui, Add, Edit, vlife_color x250 y250 w140 h20 , %life_color%
Gui, Add, Edit, vlow_life_flask_list x250 y280 w140 h20 , %low_life_flask_list%
Gui, Add, Text, x130 y220 w70 h30 , to turn on /off,
Gui, Add, Text, x210 y220 w30 h20 , X:
Gui, Add, Text, x210 y250 w30 h20 , Y:
Gui, Add, Text, x210 y280 w50 h20 , color:
Gui, Add, Text, x210 y310 w30 h20 , list:
Gui, Add, Edit, vlow_life_X x250 y220 w60 h20 , %low_life_X%
Gui, Add, Edit, vlow_life_Y x250 y250 w60 h20 , %low_life_Y%
Gui, Add, Edit, vlife_color x250 y280 w140 h20 , %life_color%
Gui, Add, Edit, vlow_life_flask_list x250 y310 w140 h20 , %low_life_flask_list%

; loot
Gui, Font, bold
Gui, Add, GroupBox, x30 y330 w380 h130 , Loot
Gui, Add, Text, x40 y390 w80 h20 , A
Gui, Add, Text, x40 y420 w80 h20 , Ctrl + A
Gui, Add, GroupBox, x30 y360 w380 h130 , Loot
Gui, Add, Text, x40 y420 w80 h20 , A
Gui, Add, Text, x40 y450 w80 h20 , Ctrl + A
Gui, Font, norm
Gui, Add, Text, x40 y360 w70 h20 , loot color:
Gui, Add, Edit, vlootColor x100 y360 w100 h20 , %lootColor%
Gui, Add, Text, x130 y390 w100 h20 , to quick loot
Gui, Add, Text, x130 y420 w130 h20 , hold to keep looting`; delay:
Gui, Add, Text, x340 y420 w170 h-10 , (ms)
Gui, Add, Edit, vloot_dalay x270 y420 w50 h20 , %loot_dalay%
Gui, Add, Text, x330 y420 w30 h20 , (ms)
Gui, Add, Text, x40 y390 w70 h20 , loot color:
Gui, Add, Edit, vlootColor x100 y390 w100 h20 , %lootColor%
Gui, Add, Text, x130 y420 w100 h20 , to quick loot
Gui, Add, Text, x130 y450 w130 h20 , hold to keep looting`; delay:
Gui, Add, Text, x340 y450 w170 h-10 , (ms)
Gui, Add, Edit, vloot_dalay x270 y450 w50 h20 , %loot_dalay%
Gui, Add, Text, x330 y450 w30 h20 , (ms)

; qucik enter
Gui, Font, bold
Expand Down

0 comments on commit a958f43

Please sign in to comment.