-- DEFAULT_CHAT_FRAME:AddMessage("|cFFFF8800".."You need to target the critter you wish to add!|r"); |
-- end |
elseif tbl[1] == "report" then |
local output |
output = "" |
for index,value in pairs(lastwords_options["critters"]) do |
if value ~= 0 then |
if value ==1 then |
output = output..value.." "..index..", "; |
else |
local CName |
if strsub(index, -1) == "y" then |
CName = strsub(index,1, -1).."ies" |
elseif strsub(index, -2) == "ch" then |
CName = index.."es" |
if tbl[2] == "r" or tbl[2] == "raid" then |
if GetNumRaidMembers > 0 then |
LW_Report("RAID") |
else |
DEFAULT_CHAT_FRAME:AddMessage("|cFFFF8800".."You are not in a raid!|r") |
end |
elseif tbl[2] == "g" or tbl[2] == "guild" then |
LW_Report("GUILD") |
elseif tbl[2] == "p" or tbl[2] == "party" then |
if GetNumPartyMembers() > 0 then |
LW_Report("PARTY") |
else |
DEFAULT_CHAT_FRAME:AddMessage("|cFFFF8800".."You are not in a party!|r") |
end |
elseif tbl[2] == "t" or tbl[2] == "test" then |
LW_Report("WHISPER") |
else |
local output |
output = "" |
for index,value in pairs(lastwords_options["critters"]) do |
if value ~= 0 then |
if value ==1 then |
output = output..value.." "..index..", "; |
else |
CName = strsub(index,1, -1).."s" |
output = output..value.." "..CName..", "; |
local CName |
if strsub(index, -1) == "y" then |
CName = strsub(index,1, -1).."ies" |
elseif strsub(index, -2) == "ch" then |
CName = index.."es" |
else |
CName = strsub(index,1, -1).."s" |
output = output..value.." "..CName..", "; |
end |
end |
end |
end |
end |
|
if strlen(output)==0 then |
output = "|cFFFF8800So far you have mercilessly slaughtered:|r Nothing! Hoorah!"; |
else |
output = strsub(output, 1, -3) |
|
output = "|cFFFF8800So far you have slaughtered:|r "..output..". You Rotter!"; |
if strlen(output)==0 then |
output = "|cFFFF8800So far you have mercilessly slaughtered:|r Nothing! Hoorah!"; |
else |
output = strsub(output, 1, -3) |
|
output = "|cFFFF8800So far you have slaughtered:|r "..output..". You Rotter!"; |
end |
DEFAULT_CHAT_FRAME:AddMessage(output); |
end |
DEFAULT_CHAT_FRAME:AddMessage(output); |
else |
DEFAULT_CHAT_FRAME:AddMessage("|cFFFF8800Last Words accepts the following commands:|r") |
DEFAULT_CHAT_FRAME:AddMessage("|cFFFF8800reset:|r Resets all options to their default values.") |