Looking for help with creating a toggable function.
I want to have the function FireNovaHigh "true" when I click mousebutton 5 and toggled to "false" when I click mousebutton 5 again. I also want to put the status out in chat when it changes.
I tried to copy code and modify it but I havent had any luck. Wondering if someone can post an edited version. I want to add hotkeys to different rotations.I hope this shows somewhat what I want done:
Code:
--binds
FireNovaHigh = IsMouseButtonDown(5)
FireNovaHigh = false
--FireNovaHigh
if not FireNovaHighdown then FireNovaHighdown = 0 end
if not GetCurrentKeyBoardFocus() and FireNovaHigh and GetTime() - FireNovaHighdown > 1 then
FireNovaHighdown = GetTime()
if FireNovaHigh then
FireNovaHigh = false
PQR_WriteToChat("FireNovaHigh: |cFFFF0000Disabled")
PQR_Event("PQR_Text","FireNovaHigh: Disabled",nil,"FF0000")
else
FireNovaHigh = true
PQR_WriteToChat("FireNovaHigh: |cFF00FF00Enabled")
PQR_Event("PQR_Text","FireNovaHigh: Enabled",nil,"00FF00")
end
end