From 8993aa9904f77af05d1450ecbe263bb7c81fb87d Mon Sep 17 00:00:00 2001 From: HxxxxxS Date: Sun, 27 Jun 2021 22:43:01 +0200 Subject: [PATCH] Initial Commit --- PsiloShift.lua | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ PsiloShift.toc | 9 +++++++ README.md | 57 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 PsiloShift.lua create mode 100644 PsiloShift.toc create mode 100644 README.md diff --git a/PsiloShift.lua b/PsiloShift.lua new file mode 100644 index 0000000..65b8d55 --- /dev/null +++ b/PsiloShift.lua @@ -0,0 +1,68 @@ +local _, S = ... + +do + _G["PSprint"] = function(msg, notitle) + msg = "|cff00ffff" .. msg + if notitle ~= true then + msg = "|cffff0000PsiloShift: " .. msg + end + print(msg) + end + + PSprint("available commands:") + do + local name = "shiftStart" + local b = _G[name] or CreateFrame('Button', name, nil, 'SecureActionButtonTemplate,SecureHandlerBaseTemplate'); + b:SetAttribute('type', 'macro'); + b:SetAttribute('macrotext', '/run if GetSpellCooldown(768)>0 or UnitPower("player",0)0 then SetCVar("autoUnshift",0) end'); + PSprint("'/click "..name.."' |cff00ff00- enable autoUnshift if pot cooldown is ready (start of macro), inherits from |cff00ffffshiftStart") + end + do + local name = "shiftHS" + local b = _G[name] or CreateFrame('Button', name, nil, 'SecureActionButtonTemplate,SecureHandlerBaseTemplate'); + b:SetAttribute('type', 'macro'); + b:SetAttribute('macrotext', '/click formStart\n/run if GetItemCooldown(20520)>0 then SetCVar("autoUnshift",0) end'); + PSprint("'/click "..name.."' |cff00ff00- enable autoUnshift if health stone cooldown is ready (start of macro), inherits from |cff00ffffshiftStart") + end + do + local name = "shiftSap" + local b = _G[name] or CreateFrame('Button', name, nil, 'SecureActionButtonTemplate,SecureHandlerBaseTemplate'); + b:SetAttribute('type', 'macro'); + b:SetAttribute('macrotext', '/click formStart\n/run if GetItemCooldown(10646)>0 then SetCVar("autoUnshift",0) end'); + PSprint("'/click "..name.."' |cff00ff00- enable autoUnshift if sapper cooldown is ready (start of macro), inherits from |cff00ffffshiftStart") + end + do + local name = "formStart" + local b = _G[name] or CreateFrame('Button', name, nil, 'SecureActionButtonTemplate,SecureHandlerBaseTemplate'); + b:SetAttribute('type', 'macro'); + b:SetAttribute('macrotext', '/changeactionbar [noform]1;[form:1]2;[form:3]3;[form:4]4;[form:5]5;6;\n/click shiftStart'); + PSprint("'/click "..name.."' |cff00ff00- change actionbar based on current form (caster:1,bear:2,cat:3,travel:4,moonkin:5,flight:6,swift:7) (start of macro), inherits from |cff00ffffshiftStart") + end + do + local name = "barReset" + local b = _G[name] or CreateFrame('Button', name, nil, 'SecureActionButtonTemplate,SecureHandlerBaseTemplate'); + b:SetAttribute('type', 'macro'); + b:SetAttribute('macrotext', '/changeactionbar 1'); + end + do + local name = "formEnd" + local b = _G[name] or CreateFrame('Button', name, nil, 'SecureActionButtonTemplate,SecureHandlerBaseTemplate'); + b:SetAttribute('type', 'macro'); + b:SetAttribute('macrotext', '/use [bar:2]!Dire Bear Form;[bar:3]!Cat Form;[bar:4]!Travel Form\n/click barReset\n/click shiftEnd'); + PSprint("'/click "..name.."' |cff00ff00- change back to form based on current bar (end of macro), inherits from |cff00ffffshiftEnd|r, also resets bar") + end +end diff --git a/PsiloShift.toc b/PsiloShift.toc new file mode 100644 index 0000000..61c34c5 --- /dev/null +++ b/PsiloShift.toc @@ -0,0 +1,9 @@ +## Interface: 20501 +## Version: v2-classic +## Title: PsiloShift +## Notes: Helper addon for druid powershift macros +## Author: Psilocybin-Mograine +## SavedVariables: PSILOSHIFT + +PsiloShift.lua + diff --git a/README.md b/README.md new file mode 100644 index 0000000..f8e08ab --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# PsiloShift (BCC) - By Psilocybin-Mograine(H) +## Helper addon to optimize character count in your shapeshift macros + +Takes the safe shift macro made by Fyroth and Zia on the Druid Discord and minifies the required text so you can fit more consumes into your macros. + +Can mix and match with sapper cooldown, healthstone cooldown, also supports my multi form shapeshift macro (the one with the actionbars), so you can powershift from any form back to the same form. + +## Macro examples: + +### Powershift only +```lua +/stopattack +/click formStart +# Put conumables here if you want +/click formEnd +/startattack +``` +### Healthstone + Nightmare Seed +```lua +#showtooltip +/click shiftHS +/click formStart +/use [mod:ctrl]Nightmare Seed;Master Healthstone +/click formEnd +/changeactionbar 1 +``` +### Health pots +```lua +#showtooltip +/click shiftPot +/click formStart +/use [mod:shift]Major Healing Potion;Super Healing Potion +/click formEnd +``` +### Ironskin/Stoneshield pots +```lua +#showtooltip +/click shiftPot +/click formStart +/use [mod:shift]Ironshield Potion;Greater Stoneshield Potion +/click formEnd +``` +### Sapper +```lua +/click shiftSap +/click formStart +/use [mod:shift]Super Sapper Charge;Goblin Sapper Charge +/cast [noform:1]!Dire Bear Form +/click formEnd +``` + +## Actionbar form order +The formStart function will set your actionbar to a number from 1-6 using the following logic: +`/changeactionbar [noform] 1; [form:1] 2; [form:3] 3; [form:4] 4; [form:5] 5 ; 6;` + +# Questions? +Find Psilocybin-Mograine in the userlist on the Druid Discord.