Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d3d77a397 | |||
f0dcde4b23 | |||
4d90fdb229 | |||
30281c7e73 | |||
720a772dd1 | |||
9925be5e0b | |||
b1dd53d6d9 |
@@ -6,28 +6,11 @@ local addonname, shared = ...
|
|||||||
shared = { timer = nil }
|
shared = { timer = nil }
|
||||||
|
|
||||||
---@class DechickenatorData
|
---@class DechickenatorData
|
||||||
---@field alerts table<string, Alert>
|
---@field blacklistedBuffs table<string, boolean>
|
||||||
|
|
||||||
---@alias auraType
|
|
||||||
---| 'BUFF'
|
|
||||||
---| 'DEBUFF'
|
|
||||||
|
|
||||||
--/dechicken a:Greater Blessing of Kings;R;e:spit;m:cuntfucker %s;c:SAY
|
|
||||||
--/dechicken a:Greater Blessing of Kings;R;e:spit;m:cuntfucker
|
|
||||||
--/dechicken a:Greater Blessing of Kings;R;e:spit;m:cuntfucker
|
|
||||||
--/dechicken a:Greater Blessing of Kings;R;m:cuntfucker
|
|
||||||
--/dechicken a:Turkey Feathers;R;e:laugh
|
|
||||||
---@class Alert
|
|
||||||
---@field message string?
|
|
||||||
---@field channel string?
|
|
||||||
---@field channelData string?
|
|
||||||
---@field emote string?
|
|
||||||
---@field spellName string
|
|
||||||
---@field remove boolean?
|
|
||||||
|
|
||||||
--/run Dechickenator_Data = {alerts={}}
|
|
||||||
if not Dechickenator_Data then Dechickenator_Data = {} end
|
if not Dechickenator_Data then Dechickenator_Data = {} end
|
||||||
if not Dechickenator_Data.alerts then Dechickenator_Data.alerts = {} end
|
if not Dechickenator_Data.blacklistedBuffs then Dechickenator_Data.blacklistedBuffs = {} end
|
||||||
|
if not Dechickenator_Data.message then Dechickenator_Data.message = "Индивидуум %s хочет поделиться своим истинным обликом" end
|
||||||
local function init()
|
local function init()
|
||||||
local function RemoveBuff(buff)
|
local function RemoveBuff(buff)
|
||||||
if UnitAffectingCombat("player") then return end
|
if UnitAffectingCombat("player") then return end
|
||||||
@@ -35,12 +18,13 @@ local function init()
|
|||||||
end
|
end
|
||||||
local function RemoveBuffs()
|
local function RemoveBuffs()
|
||||||
if UnitAffectingCombat("player") then return end
|
if UnitAffectingCombat("player") then return end
|
||||||
for buff, enabled in pairs(Dechickenator_Data.alerts) do
|
for buff, enabled in pairs(Dechickenator_Data.blacklistedBuffs) do
|
||||||
if enabled then
|
if enabled then
|
||||||
RemoveBuff(buff)
|
RemoveBuff(buff)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not shared.timer then
|
if not shared.timer then
|
||||||
shared.timer = C_Timer.NewTicker(1, function()
|
shared.timer = C_Timer.NewTicker(1, function()
|
||||||
RemoveBuffs()
|
RemoveBuffs()
|
||||||
@@ -55,25 +39,12 @@ local function init()
|
|||||||
local target = CLEUParser.GetDestName(...)
|
local target = CLEUParser.GetDestName(...)
|
||||||
if target ~= UnitName("player") then return end
|
if target ~= UnitName("player") then return end
|
||||||
local spellName = CLEUParser.GetSpellName(...)
|
local spellName = CLEUParser.GetSpellName(...)
|
||||||
if not Dechickenator_Data.alerts[spellName] then return end
|
if not Dechickenator_Data.blacklistedBuffs[spellName] then return end
|
||||||
local source = CLEUParser.GetSourceName(...)
|
local source = CLEUParser.GetSourceName(...)
|
||||||
if Dechickenator_Data.alerts[spellName].message then
|
local msg = string.format(Dechickenator_Data.message, tostring(source))
|
||||||
local msg = Dechickenator_Data.alerts[spellName].message
|
RemoveBuff(spellName)
|
||||||
if string.find(msg, "%s") then
|
SendChatMessage(msg, "EMOTE")
|
||||||
msg = string.format(msg, tostring(source))
|
DoEmote("spit", source)
|
||||||
end
|
|
||||||
local channel = "SAY"
|
|
||||||
if Dechickenator_Data.alerts[spellName].channel then
|
|
||||||
channel = Dechickenator_Data.alerts[spellName].channel
|
|
||||||
end
|
|
||||||
SendChatMessage(msg, channel)
|
|
||||||
end
|
|
||||||
if Dechickenator_Data.alerts[spellName].emote then
|
|
||||||
DoEmote(Dechickenator_Data.alerts[spellName].emote, source)
|
|
||||||
end
|
|
||||||
if Dechickenator_Data.alerts[spellName].remove then
|
|
||||||
RemoveBuff(spellName)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -88,52 +59,14 @@ loadedFrame:SetScript("OnEvent", function(self, event, addonName)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
---@param table table
|
|
||||||
---@param depth number?
|
|
||||||
function DumpTable(table, depth)
|
|
||||||
if depth == nil then
|
|
||||||
depth = 0
|
|
||||||
end
|
|
||||||
if (depth > 200) then
|
|
||||||
print("Error: Depth > 200 in dumpTable()")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
for k, v in pairs(table) do
|
|
||||||
if (type(v) == "table") then
|
|
||||||
print(string.rep(" ", depth) .. k .. ":")
|
|
||||||
DumpTable(v, depth + 1)
|
|
||||||
else
|
|
||||||
print(string.rep(" ", depth) .. k .. ": ", v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
SlashCmdList["DECHICKENATOR_TOGGLE_BLACKLISTED_BUFF"] = function(input)
|
SlashCmdList["DECHICKENATOR_TOGGLE_BLACKLISTED_BUFF"] = function(input)
|
||||||
local fields = { strsplit(";", input) }
|
print("Toggling blacklisted buff: " .. tostring(input))
|
||||||
---@type Alert
|
if Dechickenator_Data.blacklistedBuffs[input] then
|
||||||
local aura = { spellName = "" }
|
Dechickenator_Data.blacklistedBuffs[input] = nil
|
||||||
|
else
|
||||||
for _, field in ipairs(fields) do
|
Dechickenator_Data.blacklistedBuffs[input] = true
|
||||||
local data = { strsplit(":", field) }
|
|
||||||
local key = strtrim(data[1])
|
|
||||||
key = string.lower(key)
|
|
||||||
if key == "a" then
|
|
||||||
aura.spellName = strtrim(data[2])
|
|
||||||
elseif key == "e" then
|
|
||||||
aura.emote = strtrim(data[2])
|
|
||||||
elseif key == "m" then
|
|
||||||
aura.message = strtrim(data[2])
|
|
||||||
elseif key == "c" then
|
|
||||||
aura.channel = strtrim(data[2])
|
|
||||||
elseif key == "r" then
|
|
||||||
aura.remove = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
DumpTable(aura)
|
|
||||||
if aura.spellName ~= "" then
|
|
||||||
Dechickenator_Data.alerts[aura.spellName] = aura
|
|
||||||
end
|
end
|
||||||
|
print(Dechickenator_Data.blacklistedBuffs[input])
|
||||||
end
|
end
|
||||||
SLASH_DECHICKENATOR_TOGGLE_BLACKLISTED_BUFF1 = "/dechicken"
|
SLASH_DECHICKENATOR_TOGGLE_BLACKLISTED_BUFF1 = "/dechicken"
|
||||||
|
|
||||||
@@ -142,4 +75,4 @@ SlashCmdList["DECHICKENATOR_SET_MESSAGE"] = function(input)
|
|||||||
Dechickenator_Data.message = input
|
Dechickenator_Data.message = input
|
||||||
print(Dechickenator_Data.message)
|
print(Dechickenator_Data.message)
|
||||||
end
|
end
|
||||||
SLASH_DECHICKENATOR_SET_MESSAGE1 = "/dechicken_message"
|
SLASH_DECHICKENATOR_SET_MESSAGE1 = "/dechicken_message"
|
BIN
Dechickenator.zip
(Stored with Git LFS)
BIN
Dechickenator.zip
(Stored with Git LFS)
Binary file not shown.
76
README.md
76
README.md
@@ -1,7 +1,7 @@
|
|||||||
# Dechickenator
|
# Dechickenator
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
Dechickenator is a World of Warcraft addon that provides flexible buff and aura management with custom alerts and actions.
|
Dechickenator is a World of Warcraft addon that automatically manages unwanted buffs with custom messaging.
|
||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
- **v1 (Master)**: Simple buff removal with predefined actions
|
- **v1 (Master)**: Simple buff removal with predefined actions
|
||||||
@@ -9,44 +9,40 @@ Dechickenator is a World of Warcraft addon that provides flexible buff and aura
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Automatically remove unwanted buffs
|
- Automatically remove unwanted buffs
|
||||||
- Create custom alerts for specific spell auras
|
- Send custom emote messages when buffs are applied
|
||||||
- Send personalized chat messages when buffs are applied
|
- Perform "spit" emote on buff source
|
||||||
- Perform custom emotes triggered by specific buffs
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
1. Download the [addon](https://git.site.quack-lab.dev/dave/wow_dechickenator/raw/branch/2.0/Dechickenator.zip)
|
1. Download the [addon](https://git.site.quack-lab.dev/dave/wow_dechickenator/raw/branch/master/Dechickenator.zip)
|
||||||
2. Extract the addon to your World of Warcraft `Interface/AddOns` directory
|
2. Extract the addon to your World of Warcraft `Interface/AddOns` directory
|
||||||
3. Ensure the addon is enabled in the character selection screen
|
3. Ensure the addon is enabled in the character selection screen
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Use the `/dechicken` slash command to configure alerts with the following syntax:
|
|
||||||
|
|
||||||
### Command Structure
|
### Toggling Blacklisted Buffs
|
||||||
`/dechicken a:SpellName;[options]`
|
Use `/dechicken BuffName` to add or remove a buff from the blacklist.
|
||||||
|
|
||||||
### Options
|
### Customizing Message
|
||||||
- `a:` - Spell/Aura name (required)
|
Use `/dechicken_message Your custom message with %s for source name`
|
||||||
- `e:` - Emote to perform
|
|
||||||
- `m:` - Custom message to send (supports `%s` for source name)
|
|
||||||
- `c:` - Chat channel (default: SAY)
|
|
||||||
- `R` - Automatically remove the buff
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
```
|
```
|
||||||
# Remove "Greater Blessing of Kings" and send a message
|
# Toggle "Greater Blessing of Kings" blacklist
|
||||||
/dechicken a:Greater Blessing of Kings;R;m:No buffs please!
|
/dechicken Greater Blessing of Kings
|
||||||
|
|
||||||
# Perform a laugh emote when "Turkey Feathers" is applied
|
# Set a custom message
|
||||||
/dechicken a:Turkey Feathers;e:laugh
|
/dechicken_message %s thinks they're special!
|
||||||
|
|
||||||
# Send a custom message in YELL channel
|
|
||||||
/dechicken a:Some Buff;m:Hey %s, nice buff!;c:YELL
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Default Behavior
|
||||||
|
- When a blacklisted buff is applied, it will be automatically removed
|
||||||
|
- An emote message will be sent (default: "Индивидуум %s хочет поделиться своим истинным обликом")
|
||||||
|
- A "spit" emote will be performed towards the buff source
|
||||||
|
|
||||||
# Dechickenator; Ruski
|
# Dechickenator; Ruski
|
||||||
|
|
||||||
## Обзор
|
## Обзор
|
||||||
Dechickenator - это аддон для World of Warcraft, обеспечивающий гибкое управление баффами и аурами с настраиваемыми оповещениями и действиями.
|
Dechickenator - это аддон для World of Warcraft, который автоматически управляет нежелательными баффами с настраиваемыми сообщениями.
|
||||||
|
|
||||||
## Версии
|
## Версии
|
||||||
- **v1 (Master)**: Простое удаление баффов с предустановленными действиями
|
- **v1 (Master)**: Простое удаление баффов с предустановленными действиями
|
||||||
@@ -54,36 +50,32 @@ Dechickenator - это аддон для World of Warcraft, обеспечива
|
|||||||
|
|
||||||
## Возможности
|
## Возможности
|
||||||
- Автоматическое удаление нежелательных баффов
|
- Автоматическое удаление нежелательных баффов
|
||||||
- Создание пользовательских оповещений для определённых аур заклинаний
|
- Отправка пользовательских эмоций при получении баффов
|
||||||
- Отправка персонализированных сообщений в чат при получении баффов
|
- Выполнение эмоции "плевок" в сторону источника баффа
|
||||||
- Выполнение пользовательских эмоций при срабатывании определённых баффов
|
|
||||||
|
|
||||||
## Установка
|
## Установка
|
||||||
1. Скачайте [аддон](https://git.site.quack-lab.dev/dave/wow_dechickenator/raw/branch/2.0/Dechickenator.zip)
|
1. Скачайте [аддон](https://git.site.quack-lab.dev/dave/wow_dechickenator/raw/branch/master/Dechickenator.zip)
|
||||||
2. Распакуйте аддон в директорию World of Warcraft `Interface/AddOns`
|
2. Распакуйте аддон в директорию World of Warcraft `Interface/AddOns`
|
||||||
3. Убедитесь, что аддон включен на экране выбора персонажа
|
3. Убедитесь, что аддон включен на экране выбора персонажа
|
||||||
|
|
||||||
## Использование
|
## Использование
|
||||||
Используйте команду `/dechicken` для настройки оповещений со следующим синтаксисом:
|
|
||||||
|
|
||||||
### Структура команды
|
### Управление черным списком баффов
|
||||||
`/dechicken a:НазваниеЗаклинания;[опции]`
|
Используйте `/dechicken НазваниеБаффа` для добавления или удаления баффа из черного списка.
|
||||||
|
|
||||||
### Опции
|
### Настройка сообщения
|
||||||
- `a:` - Название заклинания/ауры (обязательно)
|
Используйте `/dechicken_message Ваше сообщение с %s для имени источника`
|
||||||
- `e:` - Эмоция для выполнения
|
|
||||||
- `m:` - Пользовательское сообщение (`%s` для имени источника)
|
|
||||||
- `c:` - Канал чата (по умолчанию: SAY)
|
|
||||||
- `R` - Автоматически удалять бафф
|
|
||||||
|
|
||||||
### Примеры
|
### Примеры
|
||||||
```
|
```
|
||||||
# Удалить "Великое благословение королей" и отправить сообщение
|
# Переключить "Великое благословение королей" в черном списке
|
||||||
/dechicken a:Великое благословение королей;R;m:Не нужны баффы!
|
/dechicken Великое благословение королей
|
||||||
|
|
||||||
# Выполнить эмоцию смеха при получении "Индюшачьих перьев"
|
# Установить пользовательское сообщение
|
||||||
/dechicken a:Индюшачьи перья;e:laugh
|
/dechicken_message %s считает себя особенным!
|
||||||
|
```
|
||||||
|
|
||||||
# Отправить пользовательское сообщение в канал YELL
|
## Поведение по умолчанию
|
||||||
/dechicken a:Какой-то бафф;m:Эй %s, классный бафф!;c:YELL
|
- При получении баффа из черного списка он будет автоматически удален
|
||||||
```
|
- Будет отправлено сообщение с эмоцией (по умолчанию: "Индивидуум %s хочет поделиться своим истинным обликом")
|
||||||
|
- В сторону источника баффа будет выполнена эмоция "плевок"
|
Reference in New Issue
Block a user