diff --git a/Makefile b/Makefile index 06e6490..5055cf2 100644 --- a/Makefile +++ b/Makefile @@ -10,3 +10,13 @@ install/spellbook: watch/spellbook: @echo "Watching for changes in Spellbook..." @fswatch -o "./Spellbook/Spellbook.xml" | xargs -n1 -I{} make install/spellbook + +.PHONY: install/spellrotation +install/spellrotation: + cp "./SpellRotation/SpellRotation.xml" "$(PLUGDIR)" + @echo "SpellRotation installed." + +.PHONY: watch/spellrotation +watch/spellrotation: + @echo "Watching for changes in SpellRotation..." + @fswatch -o "./SpellRotation/SpellRotation.xml" | xargs -n1 -I{} make install/spellrotation diff --git a/README.md b/README.md index bae1fbe..978934d 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,5 @@ See each plugin's README.md for details and usage. ## Plugins - [Spellbook](./Spellbook) - Lists all spells in a sticky window for reference - +- [SpellRotation](./SpellRotation) - Allows you to easily switch between spells for battle + efficiancy diff --git a/SpellRotation/README.md b/SpellRotation/README.md new file mode 100644 index 0000000..fefbed0 --- /dev/null +++ b/SpellRotation/README.md @@ -0,0 +1,48 @@ +# SpellRotation Aardwolf Plugin + +This plugin lets you switch between various spells to use with SnD or your other aliases. + +A typical rotation set might look like: + +- `main` - The main spell +- `aoe` - An AOE spell +- `phys` - A physical spell for enemies resistent to elemental damage + +## Installation + +1. Download [SpellRotation.xml](SpellRotation.xml), place it somewhere it wouldn't move (e.g. the + plugins directory in your MUSHClient installation) +1. Open Plugin Manager (Ctrl+Shift+P) +1. Add `SpellRotation.xml` via the plugin manager + +## Usage + +1. To **set a rotation**, use `ks set ` +1. Attacking is done by using `kp` without a taregt, or `kp `. +1. You can switch to a rotation by using `ks switch `. To switch mid-battle, you can +use `kp `, which will switch rotation and also attack the active target at the same +time. e.g. `kp aoe` + + +### Aliases/Commands + +Use `ks help` to see this list at any time in the game. + +``` +SpellRotation +-------------------------------------------------------------- +kp [target] Execute current rotation +kp [name] Switch to rotation [name] and execute +ks get Get rotation +ks Set rotation +ks switch Switch to rotation +ks list List all rotations and their commands +``` diff --git a/SpellRotation/SpellRotation.xml b/SpellRotation/SpellRotation.xml new file mode 100644 index 0000000..a2f7315 --- /dev/null +++ b/SpellRotation/SpellRotation.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + Rot:actDefault("%1") + + + Rot:parse("%1") + + + + + + kp - + + + + + + + { main = { "attack" } } + + + diff --git a/Spellbook/Spellbook.xml b/Spellbook/Spellbook.xml index ce65604..2424572 100644 --- a/Spellbook/Spellbook.xml +++ b/Spellbook/Spellbook.xml @@ -2,8 +2,8 @@ - + @@ -49,16 +49,14 @@ utils.serialize = function (t) return s .. "}" end -Log = {} - +logger = {} local function withColor(color) return function (text) ColourNote(color, "", text) end end - -Log.Cyan = withColor("cyan") -Log.Yellow = withColor("yellow") +logger.Cyan = withColor("cyan") +logger.Yellow = withColor("yellow") -- funcs @@ -129,7 +127,7 @@ function Spw.GenerateSpellWindow() end end - Log.Yellow("Output captured to window.") + logger.Yellow("Output captured to window.") EnableTriggerGroup("spellbook", false) end @@ -153,45 +151,45 @@ end function Spw.SpwCommand(main, args) local function showHelp() - Log.Cyan("Spellbook window commands") - Log.Cyan("----------------------------------------------------------------") - Log.Cyan("spw enable - Enable spellbook") - Log.Cyan("spw disable - Disable spellbook") - Log.Cyan("spw hide - Hide spell from spellbook") - Log.Cyan("spw unhide - Unhide spell from spellbook") - Log.Cyan("spw hidden - List hidden spells") - Log.Cyan("spw prac - Display practice % mode") - Log.Cyan("spw prac one - Practice spell % once per click") - Log.Cyan("spw prac full - Practice spell % to full on click") + logger.Cyan("Spellbook window commands") + logger.Cyan("----------------------------------------------------------------") + logger.Cyan("spw enable - Enable spellbook") + logger.Cyan("spw disable - Disable spellbook") + logger.Cyan("spw hide - Hide spell from spellbook") + logger.Cyan("spw unhide - Unhide spell from spellbook") + logger.Cyan("spw hidden - List hidden spells") + logger.Cyan("spw prac - Display practice % mode") + logger.Cyan("spw prac one - Practice spell % once per click") + logger.Cyan("spw prac full - Practice spell % to full on click") end if main == 'disable' or main == 'off' then SpWin:hide() EnableAliasGroup("spellbook", false) EnableTriggerGroup("spellbook", false) - Log.Yellow("Spellbook disabled.") + logger.Yellow("Spellbook disabled.") elseif main == 'enable' or main == 'on' then EnableAliasGroup("spellbook", true) EnableTriggerGroup("spellbook", true) - Log.Yellow("Spellbook enabled.") + logger.Yellow("Spellbook enabled.") elseif main == 'hide' then local sp = args[2] if not sp then - Log.Yellow("Usage: spw hide ") + logger.Yellow("Usage: spw hide ") return end SpWinIgnore[sp] = true SetVariable("SpWinIgnore", utils.serialize(SpWinIgnore)) - Log.Yellow("Spell " .. sp .. " hidden.") + logger.Yellow("Spell " .. sp .. " hidden.") elseif main == 'unhide' then local sp = args[2] if not sp then - Log.Yellow("Usage: spw unhide ") + logger.Yellow("Usage: spw unhide ") return end SpWinIgnore[sp] = nil SetVariable("SpWinIgnore", utils.serialize(SpWinIgnore)) - Log.Yellow("Spell " .. sp .. " unhidden.") + logger.Yellow("Spell " .. sp .. " unhidden.") elseif main == 'hidden' then local hidden = "" for sp, _ in pairs(SpWinIgnore) do @@ -202,17 +200,17 @@ function Spw.SpwCommand(main, args) else hidden = hidden:sub(1, -3) end - Log.Yellow("Hidden spells: " .. hidden) + logger.Yellow("Hidden spells: " .. hidden) elseif main == 'prac' then local mode = args[2] if mode == 'one' then SetVariable("SpWinPrac", "one") - Log.Yellow("Spellbook practice mode set to 'one'.") + logger.Yellow("Spellbook practice mode set to 'one'.") elseif mode == 'full' then SetVariable("SpWinPrac", "full") - Log.Yellow("Spellbook practice mode set to 'full'.") + logger.Yellow("Spellbook practice mode set to 'full'.") else - Log.Yellow("Spellbook practice mode is currently set to " .. GetVariable("SpWinPrac") .. ".") + logger.Yellow("Spellbook practice mode is currently set to " .. GetVariable("SpWinPrac") .. ".") end else showHelp()