Last active
June 23, 2018 15:45
-
-
Save sclark39/6ae9f40ec6db8dfa425eeaaf9b4dee54 to your computer and use it in GitHub Desktop.
Revisions
-
sclark39 revised this gist
Jun 23, 2018 . 1 changed file with 11 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,8 @@ Fortnite.RegisterKey( "x", "WeaponSlotKey" ) Fortnite.RegisterKey( "q", "BuildKey" ) Fortnite.RegisterKey( "f", "BuildKey" ) Fortnite.RegisterKey( "MButton", "BuildKey" ) Fortnite.RegisterKey( "5", "BuildKey" ) Fortnite.RegisterKey( "F4", "BuildKey" ) Fortnite.RegisterKey( "c", "EditKey" ) Fortnite.RegisterKey( "b", "InventoryKey" ) Fortnite.RegisterKey( "Esc", "EscKey" ) @@ -50,8 +52,8 @@ HoldToToggleCrouch() { ckey := SanitizeKey( A_ThisHotkey ) SendInput {%ckey%} KeyWait, % ckey ;if ( A_TimeSinceThisHotkey > 150 ) SendInput {%ckey%} return }} @@ -60,15 +62,18 @@ HoldToToggleCrouch() { ConfirmEdit() { ConfirmEdit: { _editKey:= Fortnite.Keys.EditKey if ( Fortnite.Editing = 1 ) { Critical Sleep, 150 SendInput {%_editKey% down} Fortnite.EditingOff() Sleep, 50 SendInput {%_editKey% up} if ( Fortnite.Building = 1 ) { Sleep, 50 SendInput % Fortnite.ActiveWeapon Fortnite.SwitchedToWeapon( Fortnite.ActiveWeapon ) } -
sclark39 revised this gist
May 30, 2018 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Fortnite.RegisterKey( "q", "BuildKey" ) Fortnite.RegisterKey( "f", "BuildKey" ) Fortnite.RegisterKey( "MButton", "BuildKey" ) Fortnite.RegisterKey( "c", "EditKey" ) Fortnite.RegisterKey( "b", "InventoryKey" ) Fortnite.RegisterKey( "Esc", "EscKey" ) Fortnite.RegisterKey( "LCtrl", "Crouch" ) Fortnite.RegisterKey( "LButton", "PrimaryFire" ) @@ -50,7 +50,7 @@ HoldToToggleCrouch() { ckey := SanitizeKey( A_ThisHotkey ) SendInput {%ckey%} KeyWait, % ckey if ( A_TimeSinceThisHotkey > 150 ) SendInput {%ckey%} return }} @@ -63,12 +63,12 @@ ConfirmEdit() { if ( Fortnite.Editing = 1 and Fortnite.InventoryOpen = 0 ) { Critical Sleep, 150 SendInput % Fortnite.Keys.EditKey Fortnite.EditingOff() if ( Fortnite.Building = 1 ) { Sleep, 150 SendInput % Fortnite.ActiveWeapon Fortnite.SwitchedToWeapon( Fortnite.ActiveWeapon ) } -
sclark39 revised this gist
May 27, 2018 . 1 changed file with 19 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ HotKey, IfWinActive, Fortnite ; Fortnite Binds Fortnite.RegisterKey( "1", "MeleeSlotKey" ) @@ -19,10 +19,8 @@ Fortnite.RegisterKey( "RButton", "SecondaryFire" ) Fortnite.RegisterKey( "XButton1", "SwapBuild" ) ; Activate Special Custom Binds HotKey, % "*" Fortnite.Keys.SwapBuild, LastInv HotKey, % "*$" Fortnite.Keys.Crouch, HoldToToggleCrouch HotKey, % "~*" Fortnite.Keys.PrimaryFire " Up", ConfirmEdit HotKey, % "~*" Fortnite.Keys.SecondaryFire " Up", ConfirmEdit @@ -49,10 +47,11 @@ LastInv() { HoldToToggleCrouch() { HoldToToggleCrouch: { ckey := SanitizeKey( A_ThisHotkey ) SendInput {%ckey%} KeyWait, % ckey if ( A_TimeSinceThisHotkey > 250 ) SendInput {%ckey%} return }} @@ -64,12 +63,12 @@ ConfirmEdit() { if ( Fortnite.Editing = 1 and Fortnite.InventoryOpen = 0 ) { Critical Sleep, 100 SendInput % Fortnite.Keys.EditKey Fortnite.EditingOff() if ( Fortnite.Building = 1 ) { Sleep, 100 SendInput % Fortnite.ActiveWeapon Fortnite.SwitchedToWeapon( Fortnite.ActiveWeapon ) } @@ -98,13 +97,17 @@ class Fortnite Hotkey, % fullName, % Label }} SwitchedToWeapon(key) { WeaponSlotKey: { if ( key = "" ) { Fortnite.SwitchedToWeapon(SanitizeKey( A_ThisHotkey )) return } if ( Fortnite.ActiveWeapon != key ) { Fortnite.PreviousWeapon := Fortnite.ActiveWeapon Fortnite.ActiveWeapon := key } @@ -144,23 +147,21 @@ class Fortnite InventoryKey: { Fortnite.InventoryOpen := !Fortnite.InventoryOpen return }} ClosedInventory() { EscKey: { Fortnite.InventoryOpen := 0 return }} } SanitizeKey(key) { key := RegExReplace(key,"[^\w]","") ;if ( StrLen(key) > 1 ) ; key := "{" key "}" return key } -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 16 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,22 @@ HotKey, IfWinActive, ahk_class Fortnite ; Fortnite Binds Fortnite.RegisterKey( "1", "MeleeSlotKey" ) Fortnite.RegisterKey( "2", "WeaponSlotKey" ) Fortnite.RegisterKey( "3", "WeaponSlotKey" ) Fortnite.RegisterKey( "4", "WeaponSlotKey" ) Fortnite.RegisterKey( "z", "WeaponSlotKey" ) Fortnite.RegisterKey( "x", "WeaponSlotKey" ) Fortnite.RegisterKey( "q", "BuildKey" ) Fortnite.RegisterKey( "f", "BuildKey" ) Fortnite.RegisterKey( "MButton", "BuildKey" ) Fortnite.RegisterKey( "c", "EditKey" ) Fortnite.RegisterKey( "i", "InventoryKey" ) Fortnite.RegisterKey( "Esc", "EscKey" ) Fortnite.RegisterKey( "LCtrl", "Crouch" ) Fortnite.RegisterKey( "LButton", "PrimaryFire" ) Fortnite.RegisterKey( "RButton", "SecondaryFire" ) Fortnite.RegisterKey( "XButton1", "SwapBuild" ) ; Activate Special Custom Binds KeySequenceDelay := 100 -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 13 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,19 @@ HotKey, IfWinActive, ahk_class Fortnite ; Fortnite Binds Fortnite.RegisterKey( "1", "MeleeSlotKey" ) Fortnite.RegisterKey( "2", "WeaponSlotKey" ) Fortnite.RegisterKey( "3", "WeaponSlotKey" ) Fortnite.RegisterKey( "4", "WeaponSlotKey" ) Fortnite.RegisterKey( "z", "WeaponSlotKey" ) Fortnite.RegisterKey( "x", "WeaponSlotKey" ) Fortnite.RegisterKey( "MButton", "BuildKey" ) Fortnite.RegisterKey( "q", "BuildKey" ) Fortnite.RegisterKey( "f", "BuildKey" ) Fortnite.RegisterKey( "i", "InventoryKey" ) Fortnite.RegisterKey( "Esc", "EscKey" ) Fortnite.RegisterKey( "c", "EditKey" ) Fortnite.RegisterKey( "LCtrl", "Crouch" ) Fortnite.RegisterKey( "LButton", "PrimaryFire" ) Fortnite.RegisterKey( "RButton", "SecondaryFire" ) Fortnite.RegisterKey( "XButton1", "SwapBuild" ) -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 18 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,22 @@ HotKey, IfWinActive, ahk_class Fortnite ; Fortnite Binds Fortnite.RegisterKey( "1", "MeleeSlotKey" ) Fortnite.RegisterKey( "2", "WeaponSlotKey" ) Fortnite.RegisterKey( "3", "WeaponSlotKey" ) Fortnite.RegisterKey( "4", "WeaponSlotKey" ) Fortnite.RegisterKey( "z", "WeaponSlotKey" ) Fortnite.RegisterKey( "x", "WeaponSlotKey" ) Fortnite.RegisterKey( "MButton", "BuildKey" ) Fortnite.RegisterKey( "q", "BuildKey" ) Fortnite.RegisterKey( "f", "BuildKey" ) Fortnite.RegisterKey( "i", "InventoryKey" ) Fortnite.RegisterKey( "Esc", "EscKey" ) Fortnite.RegisterKey( "c", "EditKey" ) Fortnite.RegisterKey( "LCtrl", "Crouch" ) Fortnite.RegisterKey( "LButton", "PrimaryFire" ) Fortnite.RegisterKey( "RButton", "SecondaryFire" ) Fortnite.RegisterKey( "XButton1", "SwapBuild" ) ; Activate Special Custom Binds KeySequenceDelay := 100 @@ -50,8 +50,8 @@ HoldToToggleCrouch() { HoldToToggleCrouch: { SendInput % SanitizeKey( A_ThisHotkey ) KeyWait % SanitizeKey( A_ThisHotkey ) if ( A_TimeSinceThisHotkey > QuickPressThreshold ) SendInput % SanitizeKey( A_ThisHotkey ) return }} -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class Fortnite }} SwitchedToBuild() { BuildKey: { Fortnite.Building := 1 Fortnite.Editing := 0 -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 131 additions and 103 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,105 +1,36 @@ HotKey, IfWinActive, ahk_class Fortnite ; Fortnite Binds Fortnite.RegisterKey( "1", "MeleeSlotKey" ) Fortnite.RegisterKey( "2", "WeaponSlotKey" ) Fortnite.RegisterKey( "3", "WeaponSlotKey" ) Fortnite.RegisterKey( "4", "WeaponSlotKey" ) Fortnite.RegisterKey( "z", "WeaponSlotKey" ) Fortnite.RegisterKey( "x", "WeaponSlotKey" ) Fortnite.RegisterKey( "MButton", "BuildKey" ) Fortnite.RegisterKey( "q", "BuildKey" ) Fortnite.RegisterKey( "f", "BuildKey" ) Fortnite.RegisterKey( "i", "InventoryKey" ) Fortnite.RegisterKey( "Esc", "EscKey" ) Fortnite.RegisterKey( "c", "EditKey" ) Fortnite.RegisterKey( "LCtrl", "Crouch" ) Fortnite.RegisterKey( "LButton", "PrimaryFire" ) Fortnite.RegisterKey( "RButton", "SecondaryFire" ) Fortnite.RegisterKey( "XButton1", "SwapBuild" ) ; Activate Special Custom Binds KeySequenceDelay := 100 QuickPressThreshold := 250 HotKey, % "*" Fortnite.Keys.SwapBuild, LastInv HotKey, % "*" Fortnite.Keys.Crouch, HoldToToggleCrouch HotKey, % "~*" Fortnite.Keys.PrimaryFire " Up", ConfirmEdit HotKey, % "~*" Fortnite.Keys.SecondaryFire " Up", ConfirmEdit ; Alternates between your two most recent weapon slots, and ; switches back to a weapon if you're on melee or build mode. LastInv() { LastInv: { if ( Fortnite.Building + Fortnite.UsingMelee > 0 ) { SendInput % Fortnite.ActiveWeapon @@ -110,23 +41,31 @@ LastInv: SendInput % Fortnite.PreviousWeapon Fortnite.SwitchedToWeapon( Fortnite.PreviousWeapon ) } return }} ; Quick press will toggle crouch, long press will toggle again ; when you let go HoldToToggleCrouch() { HoldToToggleCrouch: { SendInput % SanitizeKey( A_ThisHotkey ) KeyWait, % A_ThisHotkey if ( A_TimeSinceFortniteHotkey > QuickPressThreshold ) SendInput % SanitizeKey( A_ThisHotkey ) return }} ; Confirm editing buildings when letting go of primary or ; secondary fire ConfirmEdit() { ConfirmEdit: { if ( Fortnite.Editing = 1 and Fortnite.InventoryOpen = 0 ) { Critical Sleep, % KeySequenceDelay SendInput % Fortnite.Keys.EditKey Fortnite.EditingOff() if ( Fortnite.Building = 1 ) { @@ -135,4 +74,93 @@ ConfirmEdit: Fortnite.SwitchedToWeapon( Fortnite.ActiveWeapon ) } } return }} ; Tracks the state of the game class Fortnite { static Keys:={} static ActiveWeapon:=2 static PreviousWeapon:=3 static Building:=0 static InventoryOpen:=0 static Editing:=0 static UsingMelee:=0 RegisterKey( Name, Label ) { { fullName := "~*" Name Fortnite.Keys[Label] := Name if ( IsLabel( Label ) ) Hotkey, % fullName, % Label }} SwitchedToWeapon(key) { WeaponSlotKey: { if ( !key ) key := SanitizeKey( A_ThisHotkey ) if ( Fortnite.ActiveWeapon != key ) { Fortnite.PreviousWeapon := Fortnite.ActiveWeapon Fortnite.ActiveWeapon := key } Fortnite.Building := Fortnite.UsingMelee := Fortnite.Editing := 0 return }} SwitchedToMelee() { MeleeSlotKey: { Fortnite.UsingMelee:=1 return }} SwitchedToBuild() { BuildKey: { Fortnite.Building := 1 Fortnite.Editing := 0 return }} EditingOn() { EditKey: { Fortnite.Editing := 1 return }} EditingOff() { { Fortnite.Editing := 0 return }} ToggledInventory() { InventoryKey: { Fortnite.InventoryOpen := !Fortnite.InventoryOpen MsgBox % Fortnite.InventoryOpen return }} ClosedInventory() { EscKey: { Fortnite.InventoryOpen := 0 listvars return }} } SanitizeKey(key) { key := RegExReplace(key,"[^\w]","") if ( StrLen(key) > 1 ) key := "{" key "}" return key } -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,13 +13,13 @@ HotKey, ~*f, BuildKey HotKey, ~*i, InventoryKey HotKey, ~*Esc, EscKey EditKey = ~*c HotKey, %EditKey%, EditOn ; Activate Special Custom Binds KeySequenceDelay := 100 QuickPressThreshold := 250 HotKey, *XButton1, LastInv HotKey, *LCtrl, HoldToToggleCrouch HotKey, ~*LButton Up, ConfirmEdit HotKey, ~*RButton Up, ConfirmEdit @@ -93,7 +93,10 @@ BuildKey: EscKey: Fortnite.ClosedInventory() Return EditOn: Fortnite.EditingOn() Return ; Alternates between your two most recent weapon slots, and switches ; back to a weapon if you're on melee or build mode. LastInv: @@ -118,9 +121,6 @@ HoldToToggleCrouch: Return ; Confirm editing buildings when letting go of primary or secondary fire ConfirmEdit: if ( Fortnite.Editing = 1 and Fortnite.InventoryOpen = 0 ) { @@ -135,4 +135,4 @@ ConfirmEdit: Fortnite.SwitchedToWeapon( Fortnite.ActiveWeapon ) } } Return -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 32 additions and 32 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,15 +15,14 @@ HotKey, ~*Esc, EscKey EditKey = ~*c ; Activate Special Custom Binds KeySequenceDelay := 100 QuickPressThreshold := 250 HotKey, *XButton1, LastInv HotKey, *LCtrl, HoldToToggleCrouch HotKey, %EditKey%, EditOn HotKey, ~*LButton Up, ConfirmEdit HotKey, ~*RButton Up, ConfirmEdit ; Tracks the state of the game class Fortnite { @@ -32,40 +31,40 @@ class Fortnite static Building:=0 static InventoryOpen:=0 static Editing:=0 static UsingMelee:=0 SwitchedToWeapon(key) { if ( this.ActiveWeapon != key ) { this.PreviousWeapon := this.ActiveWeapon this.ActiveWeapon := key } this.Building := this.UsingMelee := this.Editing := 0 } SwitchedToMelee() { this.UsingMelee:=1 } SwitchedToBuild() { this.Building := 1 this.Editing := 0 } EditingOn() { this.Editing := 1 } EditingOff() { this.Editing := 0 } ToggledInventory() { this.InventoryOpen := !this.InventoryOpen } ClosedInventory() { this.InventoryOpen := 0 } @@ -78,61 +77,62 @@ SanitizeKey(key) key := "{" . key . "}" return key } Return WeaponSlotKey: Fortnite.SwitchedToWeapon( SanitizeKey( A_ThisHotkey ) ) Return MeleeSlotKey: Fortnite.SwitchedToMelee() Return InventoryKey: Fortnite.ToggledInventory() Return BuildKey: Fortnite.SwitchedToBuild() Return EscKey: Fortnite.ClosedInventory() Return ; Alternates between your two most recent weapon slots, and switches ; back to a weapon if you're on melee or build mode. LastInv: if ( Fortnite.Building + Fortnite.UsingMelee > 0 ) { SendInput % Fortnite.ActiveWeapon Fortnite.SwitchedToWeapon( Fortnite.ActiveWeapon ) } else { SendInput % Fortnite.PreviousWeapon Fortnite.SwitchedToWeapon( Fortnite.PreviousWeapon ) } Return ; Quick press will toggle crouch, long press will toggle again when you let go HoldToToggleCrouch: SendInput % SanitizeKey( A_ThisHotkey ) KeyWait, % A_ThisHotkey if ( A_TimeSinceThisHotkey > QuickPressThreshold ) SendInput % SanitizeKey( A_ThisHotkey ) Return ; Confirm editing buildings when letting go of primary or secondary fire EditOn: Fortnite.EditingOn() Return ConfirmEdit: if ( Fortnite.Editing = 1 and Fortnite.InventoryOpen = 0 ) { Critical Sleep, % KeySequenceDelay SendInput % SanitizeKey( EditKey ) Fortnite.EditingOff() if ( Fortnite.Building = 1 ) { Sleep, % KeySequenceDelay SendInput % Fortnite.ActiveWeapon Fortnite.SwitchedToWeapon( Fortnite.ActiveWeapon ) } } Return -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 18 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ HotKey, ~*i, InventoryKey HotKey, ~*Esc, EscKey EditKey = ~*c ; Activate Special Custom Binds HotKey, *XButton1, LastInv HotKey, *LCtrl, HoldToToggleCrouch HotKey, %EditKey%, EditOn @@ -71,14 +71,28 @@ class Fortnite } } SanitizeKey(key) { key := RegExReplace(key,"[^\w]","") if ( StrLen(key) > 1 ) key := "{" . key . "}" return key } WeaponSlotKey: Fortnite.SwitchToWeapon( SanitizeKey( A_ThisHotkey ) ) Return MeleeSlotKey: Fortnite.SwitchToMelee() Return InventoryKey: Fortnite.ToggleInventory() Return BuildKey: Fortnite.SwitchToBuild() Return EscKey: Fortnite.Esc() Return ; Alternates between your two most recent weapon slots, and switches ; back to a weapon if you're on melee or build mode. @@ -95,15 +109,15 @@ LastInv: } Return ; Quick press will toggle crouch, long press will toggle again when you let go HoldToToggleCrouch: SendInput % SanitizeKey( A_ThisHotkey ) KeyWait, % A_ThisHotkey if ( A_TimeSinceThisHotkey > 250 ) SendInput % SanitizeKey( A_ThisHotkey ) Return ; Confirm editing buildings when letting go of primary or secondary fire EditOn: Fortnite.EditOn() Return @@ -122,20 +136,3 @@ ConfirmEdit: } } Return -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ HotKey, IfWinActive, ahk_class Fortnite ; Track Fortnite Binds HotKey, ~*1, MeleeSlotKey HotKey, ~*2, WeaponSlotKey HotKey, ~*3, WeaponSlotKey @@ -14,7 +14,7 @@ HotKey, ~*i, InventoryKey HotKey, ~*Esc, EscKey EditKey = ~*c ; Activate Custom Binds HotKey, *XButton1, LastInv HotKey, *LCtrl, HoldToToggleCrouch HotKey, %EditKey%, EditOn -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -112,8 +112,8 @@ ConfirmEdit: { Critical Sleep, 100 SendInput % SanitizeKey( EditKey ) Fortnite.EditOff() if ( Fortnite.Building = 1 ) { Sleep, 100 -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ ; Track Fortnite Binds HotKey, IfWinActive, ahk_class Notepad HotKey, ~*1, MeleeSlotKey HotKey, ~*2, WeaponSlotKey @@ -111,8 +111,8 @@ ConfirmEdit: if ( Fortnite.BuildEdit = 1 and Fortnite.InventoryOpen = 0 ) { Critical Sleep, 100 Fortnite.EditOff() SendInput % SanitizeKey( EditKey ) if ( Fortnite.Building = 1 ) { -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ ; Track Fortnite Binds HotKey, IfWinActive, ahk_class Fortnite HotKey, ~*1, MeleeSlotKey HotKey, ~*2, WeaponSlotKey -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ ; Track Fortnite Binds HotKey, IfWinActive, ahk_class Notepad HotKey, ~*1, MeleeSlotKey HotKey, ~*2, WeaponSlotKey @@ -108,7 +108,7 @@ EditOn: Fortnite.EditOn() Return ConfirmEdit: if ( Fortnite.BuildEdit = 1 and Fortnite.InventoryOpen = 0 ) { Critical Fortnite.EditOff() -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ ; Track Fortnite Binds HotKey, IfWinActive, ahk_class Fortnite HotKey, ~*1, MeleeSlotKey HotKey, ~*2, WeaponSlotKey -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 78 additions and 81 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ ; Track Fortnite Binds HotKey, IfWinActive, ahk_class Notepad ;HotKey, IfWinActive, ahk_class Fortnite HotKey, ~*1, MeleeSlotKey HotKey, ~*2, WeaponSlotKey HotKey, ~*3, WeaponSlotKey @@ -10,14 +13,18 @@ HotKey, ~*q, BuildKey HotKey, ~*f, BuildKey HotKey, ~*i, InventoryKey HotKey, ~*Esc, EscKey EditKey = ~*c ; Custom Binds HotKey, *XButton1, LastInv HotKey, *LCtrl, HoldToToggleCrouch HotKey, %EditKey%, EditOn HotKey, ~*LButton Up, ConfirmEdit HotKey, ~*RButton Up, ConfirmEdit ; Init is Over Return ; Tracks the state of the game class Fortnite { @@ -36,28 +43,17 @@ class Fortnite this.PreviousWeapon := this.ActiveWeapon this.ActiveWeapon := key } this.Building := this.Melee := this.BuildEdit := 0 } SwitchToMelee() { this.Melee:=1 } SwitchToBuild() { this.Building := 1 this.Melee := this.BuildEdit := 0 } EditOn() { this.BuildEdit := 1 @@ -66,80 +62,81 @@ class Fortnite { this.BuildEdit := 0 } ToggleInventory() { this.InventoryOpen := !this.InventoryOpen } Esc() { this.InventoryOpen := 0 } } SanitizeKey(key) { key := RegExReplace(key,"[^\w]","") if ( StrLen(key) > 1 ) key := "{" . key . "}" return key } ; Alternates between your two most recent weapon slots, and switches ; back to a weapon if you're on melee or build mode. LastInv: if ( Fortnite.Building + Fortnite.Melee > 0 ) { SendInput % Fortnite.ActiveWeapon Fortnite.SwitchToWeapon( Fortnite.ActiveWeapon ) } else { SendInput % Fortnite.PreviousWeapon Fortnite.SwitchToWeapon( Fortnite.PreviousWeapon ) } Return ; Quick Press will Toggle, Long Press will Toggle twice HoldToToggleCrouch: SendInput % SanitizeKey( A_ThisHotkey ) KeyWait, % A_ThisHotkey if ( A_TimeSinceThisHotkey > 250 ) SendInput % SanitizeKey( A_ThisHotkey ) Return ; Confirm Build on Mouse Release EditOn: Fortnite.EditOn() Return ConfirmEdit: if ( Fortnite.BuildEdit = 1 ) { Critical Fortnite.EditOff() Sleep, 100 SendInput % SanitizeKey( EditKey ) if ( Fortnite.Building = 1 ) { Sleep, 100 SendInput % Fortnite.ActiveWeapon Fortnite.SwitchToWeapon( Fortnite.ActiveWeapon ) } } Return ; State Tracking WeaponSlotKey: Fortnite.SwitchToWeapon( SanitizeKey( A_ThisHotkey ) ) Return MeleeSlotKey: Fortnite.SwitchToMelee() Return InventoryKey: Fortnite.ToggleInventory() Return BuildKey: Fortnite.SwitchToBuild() Return EscKey: Fortnite.Esc() Return -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,9 +14,9 @@ HotKey, ~*Esc, EscKey ; Custom Binds HotKey, *XButton1, LastInv HotKey, *LCtrl, HoldToToggleCrouch HotKey, ~*c, EditOn HotKey, ~*LButton Up, ConfirmEdit HotKey, ~*RButton Up, ConfirmEdit ; Tracks the state of the game class Fortnite -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,9 +14,9 @@ HotKey, ~*Esc, EscKey ; Custom Binds HotKey, *XButton1, LastInv HotKey, *LCtrl, HoldToToggleCrouch ;HotKey, ~*c, EditOn ;HotKey, ~*LButton Up, ConfirmEdit ;HotKey, ~*RButton Up, ConfirmEdit ; Tracks the state of the game class Fortnite -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 35 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,9 +13,10 @@ HotKey, ~*Esc, EscKey ; Custom Binds HotKey, *XButton1, LastInv HotKey, *LCtrl, HoldToToggleCrouch HotKey, ~*c, EditOn HotKey, ~*LButton Up, ConfirmEdit HotKey, ~*RButton Up, ConfirmEdit ; Tracks the state of the game class Fortnite @@ -39,25 +40,33 @@ class Fortnite this.Melee := 0 this.BuildEdit := 0 } SwitchToMelee() { this.Melee:=1 } SwitchToBuild() { this.Building := 1 this.Melee:=0 this.BuildEdit := 0 } ToggleInventory() { this.InventoryOpen := !this.InventoryOpen } EditOn() { this.BuildEdit := 1 } EditOff() { this.BuildEdit := 0 } Esc() { this.InventoryOpen := 0 @@ -91,33 +100,46 @@ Return if ( A_TimeSinceThisHotkey > 250 ) SendInput {%thiskey%} Return ; Confirm Build on Mouse Release EditOn: Fortnite.EditOn() Return ConfirmEdit: if ( Fortnite.BuildEdit = 1 ) { Fortnite.EditOff() Sleep, 100 SendInput {c} if ( Fortnite.Building = 1 ) { Sleep, 100 SendInput % Fortnite.ActiveWeapon Fortnite.SwitchToWeapon( Fortnite.ActiveWeapon ) } } Return ; State Tracking WeaponSlotKey: Fortnite.SwitchToWeapon( SubStr( A_ThisHotkey, 3 ) ) Return MeleeSlotKey: Fortnite.SwitchToMelee() Return InventoryKey: Fortnite.ToggleInventory() Return BuildKey: Fortnite.SwitchToBuild() Return EscKey: Fortnite.Esc() Return } -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,6 +91,7 @@ Return if ( A_TimeSinceThisHotkey > 250 ) SendInput {%thiskey%} Return HoldToToggleBuildEdit: thiskey := SubStr( A_ThisHotkey, 2 ) SendInput {%thiskey%} @@ -119,4 +120,4 @@ Return EscKey: Fortnite.Esc() Return } -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 1 addition and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,30 +39,25 @@ class Fortnite this.Melee := 0 this.BuildEdit := 0 } SwitchToMelee() { this.Melee:=1 } SwitchToBuild() { this.Building := 1 this.Melee:=0 this.BuildEdit := 0 } ToggleInventory() { this.InventoryOpen := !this.InventoryOpen } ToggleEdit() { this.BuildEdit := 0 this.Melee:=0 } Esc() { this.InventoryOpen := 0 @@ -96,7 +91,6 @@ Return if ( A_TimeSinceThisHotkey > 250 ) SendInput {%thiskey%} Return HoldToToggleBuildEdit: thiskey := SubStr( A_ThisHotkey, 2 ) SendInput {%thiskey%} @@ -113,21 +107,16 @@ Return WeaponSlotKey: Fortnite.SwitchToWeapon( SubStr( A_ThisHotkey, 3 ) ) Return MeleeSlotKey: Fortnite.SwitchToMelee() Return InventoryKey: Fortnite.ToggleInventory() Return BuildKey: Fortnite.SwitchToBuild() Return EscKey: Fortnite.Esc() Return } -
sclark39 renamed this gist
May 26, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sclark39 revised this gist
May 26, 2018 . No changes.There are no files selected for viewing
-
sclark39 revised this gist
May 26, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,6 +17,7 @@ HotKey, *c, HoldToToggleCrouch HotKey, *LCtrl, HoldToToggleCrouch HotKey, *g, HoldToToggleBuildEdit ; Tracks the state of the game class Fortnite { static ActiveWeapon:=2 -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 12 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class Fortnite static Building:=0 static InventoryOpen:=0 static BuildEdit:=0 static Melee:=0 SwitchToWeapon(key) { @@ -34,12 +35,19 @@ class Fortnite this.ActiveWeapon := key } this.Building := 0 this.Melee := 0 this.BuildEdit := 0 } SwitchToMelee() { this.Melee:=1 } SwitchToBuild() { this.Building := 1 this.Melee:=0 this.BuildEdit := 0 } @@ -51,6 +59,7 @@ class Fortnite ToggleEdit() { this.BuildEdit := 0 this.Melee:=0 } Esc() @@ -66,7 +75,7 @@ Return ; Alternates between your two most recent weapon slots, and switches ; back to a weapon if you're on melee or build mode. LastInv: if ( Fortnite.Building + Fortnite.Melee > 0 ) { SendInput % Fortnite.ActiveWeapon Fortnite.SwitchToWeapon( Fortnite.ActiveWeapon ) @@ -83,7 +92,7 @@ Return thiskey := SubStr( A_ThisHotkey, 2 ) SendInput {%thiskey%} KeyWait, % thiskey if ( A_TimeSinceThisHotkey > 250 ) SendInput {%thiskey%} Return @@ -104,11 +113,8 @@ Return Fortnite.SwitchToWeapon( SubStr( A_ThisHotkey, 3 ) ) Return MeleeSlotKey: Fortnite.SwitchToMelee() Return InventoryKey: -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -106,6 +106,8 @@ Return ; Don't Track Melee MeleeSlotKey: ; Swap which weapon is your active vs previous so when we switch ; back we return to the right one Fortnite.SwitchToWeapon(Fortnite.PreviousWeapon) Return -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -83,7 +83,7 @@ Return thiskey := SubStr( A_ThisHotkey, 2 ) SendInput {%thiskey%} KeyWait, % thiskey if ( A_TimeSinceThisHotkey > 250 ) SendInput {%thiskey%} Return -
sclark39 revised this gist
May 26, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -63,7 +63,8 @@ Return #IfWinActive, Fortnite { ; Alternates between your two most recent weapon slots, and switches ; back to a weapon if you're on melee or build mode. LastInv: if ( Fortnite.Building = 1 ) {
NewerOlder