diff --git a/README.md b/README.md index 62bac48..d98e2d8 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ All commands can take the following options separated by commas: - `expiringsound` : "Play a sound when a curse is about to expire.", - `allowooc` : "Allow out of combat targets to be multicursed. Would only consider using this solo to avoid potentially griefing raids/dungeons by pulling unintended mobs.", - `minhp=` : "Minimum HP for a target to be considered.", -- `refreshtime=` : "Time threshold below which to allow refreshing a curse. Default is 0 seconds.", +- `refreshtime=` : "Time threshold at which to allow refreshing a curse. Default is 0 seconds.", EXAMPLE: `/cursive multicurse Corruption|HIGHEST_HP|warnings,resistsound,expiringsound,minhp=10000,refreshtime=2` diff --git a/commands.lua b/commands.lua index c41b6ca..118cc9c 100644 --- a/commands.lua +++ b/commands.lua @@ -1,4 +1,5 @@ local curseCommands = "|cffffcc00Cursive:|cffffaaaa Commands:" +local priorityChoices = "Priority choices:" local curseOptions = "Options (separate with ,):" local commandOptions = { @@ -7,12 +8,18 @@ local commandOptions = { expiringsound = "Play a sound when a curse is about to expire.", allowooc = "Allow out of combat targets to be multicursed. Would only consider using this solo to avoid potentially griefing raids/dungeons by pulling unintended mobs.", minhp = "Minimum HP for a target to be considered. Example usage minhp=10000. ", - refreshtime = "Time threshold below which to allow refreshing a curse. Default is 0 seconds." + refreshtime = "Time threshold at which to allow refreshing a curse. Default is 0 seconds." } local commands = { ["curse"] = "/cursive curse ||>: Casts spell if not already on target/guid", - ["multicurse"] = "/cursive multicurse ||>: Picks target based on priority and casts spell if not already on target. Priority options: HIGHEST_HP, RAID_MARK, HIGHEST_HP_RAID_MARK.", + ["multicurse"] = "/cursive multicurse ||>: Picks target based on priority and casts spell if not already on target", +} + +local priorities = { + ["HIGHEST_HP"] = "Target with the highest HP.", + ["RAID_MARK"] = "Target with the highest raid mark.", + ["HIGHEST_HP_RAID_MARK"] = "Target with the highest HP and raid mark.", } local curseNoTarget = "|cffffcc00Cursive:|cffffaaaa Couldn't find a target to curse." @@ -48,6 +55,11 @@ local function handleSlashCommands(msg, editbox) for command, description in pairs(commands) do DEFAULT_CHAT_FRAME:AddMessage(description) end + DEFAULT_CHAT_FRAME:AddMessage(priorityChoices) + for priority, description in pairs(priorities) do + DEFAULT_CHAT_FRAME:AddMessage(priority .. ": " .. description) + end + DEFAULT_CHAT_FRAME:AddMessage(curseOptions) for option, description in pairs(commandOptions) do DEFAULT_CHAT_FRAME:AddMessage(option .. ": " .. description) @@ -253,8 +265,11 @@ function Cursive:Multicurse(spellName, priority, options) return end - if priority and (priority ~= "HIGHEST_HP" and priority ~= "RAID_MARK") then - DEFAULT_CHAT_FRAME:AddMessage(commands["multicurse"]) + if priority and not priorities[priority] then + DEFAULT_CHAT_FRAME:AddMessage(priorityChoices) + for choice, description in pairs(priorities) do + DEFAULT_CHAT_FRAME:AddMessage(choice .. ": " .. description) + end return end