Add new code snippets
This commit is contained in:
208
.vscode/settings.json
vendored
Normal file
208
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"Lua.diagnostics.globals": [
|
||||
"StaticPopup1Button1",
|
||||
"SelectGossipOption",
|
||||
"PLAYER",
|
||||
"ChatConfigChatSettingsLeftCheckBox1Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox2Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox3Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox4Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox5Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox6Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox7Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox8Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox9Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox10Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox11Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox12Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox13Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox14Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox15Check",
|
||||
"ChatConfigChatSettingsLeftCheckBox16Check",
|
||||
"StaticPopupDialogs",
|
||||
"StaticPopup_Show",
|
||||
"CommunitiesFrame",
|
||||
"COMMUNITIES_FRAME_DISPLAY_MODES",
|
||||
"CommunitiesFrameInset",
|
||||
"ActionButton_HideOverlayGlow",
|
||||
"ActionButton_ShowOverlayGlow",
|
||||
"message",
|
||||
"InspectUnit",
|
||||
"FriendsFrameCloseButton",
|
||||
"DISPLAY",
|
||||
"HP",
|
||||
"NAME",
|
||||
"ANIMATION",
|
||||
"SHOW",
|
||||
"SlashCmdList",
|
||||
"ChatFrame_AddMessageEventFilter",
|
||||
"ChatFrame_GetMessageEventFilters",
|
||||
"ChatFrame_RemoveMessageEventFilter",
|
||||
"CR_VERSATILITY_DAMAGE_DONE",
|
||||
"CHAT_MSG_WHISPER",
|
||||
"CHAT_MSG_TEXT_EMOTE",
|
||||
"HIDE",
|
||||
"CR_VERSATILITY_DAMAGE_TAKEN",
|
||||
"COLOR",
|
||||
"CHAT_MSG_LOOT",
|
||||
"CHAT_MSG_SYSTEM",
|
||||
"CHAT_MSG_SKILL",
|
||||
"AuctionHouseFrame",
|
||||
"CompactRaidFrameContainer",
|
||||
"ChatFrame1",
|
||||
"UIDropDownMenu_Initialize",
|
||||
"UIDropDownMenu_AddButton",
|
||||
"ToggleDropDownMenu",
|
||||
"WorldMapFrame",
|
||||
"RegisterUnitWatch",
|
||||
"UnitFrame_OnEnter",
|
||||
"BOOKTYPE_SPELL",
|
||||
"DEFAULT_CHAT_FRAME",
|
||||
"GameTooltipTextLeft1",
|
||||
"CHAT_MSG_PARTY",
|
||||
"CHAT_MSG_PARTY_LEADER",
|
||||
"LFG_LIST_CONVERT_TO_RAID_WARNING",
|
||||
"INVITE",
|
||||
"CANCEL",
|
||||
"UIDropDownMenu_SetText",
|
||||
"HybridScrollFrame_CreateButtons",
|
||||
"HybridScrollFrame_Update",
|
||||
"SearchBoxTemplate_OnTextChanged",
|
||||
"NORMAL_FONT_COLOR",
|
||||
"GRAY_FONT_COLOR",
|
||||
"StaticPopupSpecial_Show",
|
||||
"StaticPopupSpecial_Hide",
|
||||
"UIDropDownMenu_JustifyText",
|
||||
"UIDropDownMenu_SetAnchor",
|
||||
"NUM_LE_LFG_CATEGORYS",
|
||||
"LFG_LIST_ENTER_NAME",
|
||||
"nop",
|
||||
"FILTER",
|
||||
"LFGListApplicationDialog",
|
||||
"LFG_LIST_APP_UNEMPOWERED",
|
||||
"HIGHLIGHT_FONT_COLOR",
|
||||
"WHISPER",
|
||||
"LFG_LIST_MUST_SIGN_UP_TO_WHISPER",
|
||||
"PVEFrame_ShowFrame",
|
||||
"LFG_LIST_SELECT_A_CATEGORY",
|
||||
"LFG_LIST_NOT_LEADER",
|
||||
"LFG_LIST_MORE",
|
||||
"LFG_LIST_MUST_HAVE_NAME",
|
||||
"UIDropDownMenu_DisableDropDown",
|
||||
"UIDropDownMenu_EnableDropDown",
|
||||
"HybridScrollFrame_GetOffset",
|
||||
"ERR_RESTRICTED_ACCOUNT_LFG_LIST_TRIAL",
|
||||
"MAX_RAID_MEMBERS",
|
||||
"LFG_LIST_PROVING_GROUND_TITLE",
|
||||
"LFG_LIST_APP_CURRENTLY_APPLYING",
|
||||
"LFG_LIST_MAX_MEMBERS",
|
||||
"LFG_LIST_MUST_CHOOSE_SPEC",
|
||||
"LFG_LIST_OFFLINE_MEMBER",
|
||||
"LFG_LIST_SELECT_A_SEARCH_RESULT",
|
||||
"BATTLENET_FONT_COLOR",
|
||||
"EasyMenu",
|
||||
"LFG_LIST_MUST_SELECT_ROLE",
|
||||
"LFG_LIST_INVITED_TO_GROUP",
|
||||
"GMError",
|
||||
"LFG_LIST_ILVL_ABOVE_YOURS",
|
||||
"LFG_LIST_HONOR_LEVEL_ABOVE_YOURS",
|
||||
"LFG_LIST_LEGACY",
|
||||
"LFG_LIST_CATEGORY_FORMAT",
|
||||
"WHISPER_LEADER",
|
||||
"LFG_LIST_REPORT_GROUP_FOR",
|
||||
"LFG_LIST_REPORT_FOR",
|
||||
"IGNORE_PLAYER",
|
||||
"UIDropDownMenu_CreateInfo",
|
||||
"PVEFrame_ToggleFrame",
|
||||
"CANNOT_DO_THIS_WITH_LFGLIST_APP",
|
||||
"CANNOT_DO_THIS_WHILE_LFGLIST_LISTED",
|
||||
"NO_LFG_LIST_AVAILABLE",
|
||||
"LFG_LIST_LOADING",
|
||||
"LFG_LIST_RECOMMENDED_ILVL",
|
||||
"LFG_LIST_ITEM_LEVEL_INSTR_SHORT",
|
||||
"DONE_EDITING",
|
||||
"LIST_GROUP",
|
||||
"LFG_LIST_ITEM_LEVEL_CURRENT",
|
||||
"GameFontHighlightSmall",
|
||||
"GameFontDisableSmall",
|
||||
"LE_PARTY_CATEGORY_HOME",
|
||||
"LFG_LIST_INVITE_GROUP",
|
||||
"LFG_LIST_APP_INVITED",
|
||||
"LFG_LIST_APP_CANCELLED",
|
||||
"LFG_LIST_APP_DECLINED",
|
||||
"LFG_LIST_APP_TIMED_OUT",
|
||||
"LFG_LIST_APP_INVITE_ACCEPTED",
|
||||
"LFG_LIST_APP_INVITE_DECLINED",
|
||||
"LFG_LIST_PROVING_TANK_GOLD",
|
||||
"LFG_LIST_PROVING_TANK_SILVER",
|
||||
"LFG_LIST_PROVING_TANK_BRONZE",
|
||||
"LFG_LIST_PROVING_HEALER_GOLD",
|
||||
"LFG_LIST_PROVING_HEALER_SILVER",
|
||||
"LFG_LIST_PROVING_HEALER_BRONZE",
|
||||
"LFG_LIST_PROVING_DAMAGER_GOLD",
|
||||
"LFG_LIST_PROVING_DAMAGER_SILVER",
|
||||
"LFG_LIST_PROVING_DAMAGER_BRONZE",
|
||||
"SearchBoxTemplateClearButton_OnClick",
|
||||
"LFG_LIST_ROLE_CHECK",
|
||||
"LFG_LIST_PENDING",
|
||||
"LFGListFrameDropDown",
|
||||
"LE_LFG_LIST_DISPLAY_TYPE_CLASS_ENUMERATE",
|
||||
"LFG_LIST_TOOLTIP_FRIENDS_IN_GROUP",
|
||||
"LFG_LIST_BOSSES_DEFEATED",
|
||||
"LFG_LIST_ENTRY_DELISTED",
|
||||
"FRIENDS_BNET_NAME_COLOR_CODE",
|
||||
"FRIENDS_WOW_NAME_COLOR_CODE",
|
||||
"LFG_LIST_JOINED_GROUP_NOTICE",
|
||||
"LFG_LIST_OFFLINE_MEMBER_NOTICE",
|
||||
"GameFontRed",
|
||||
"LFG_LIST_OFFLINE_MEMBER_NOTICE_GONE",
|
||||
"GameFontGreen",
|
||||
"LE_LFG_LIST_DISPLAY_TYPE_ROLE_COUNT",
|
||||
"LE_LFG_LIST_DISPLAY_TYPE_ROLE_ENUMERATE",
|
||||
"LE_LFG_LIST_DISPLAY_TYPE_PLAYER_COUNT",
|
||||
"LE_LFG_LIST_DISPLAY_TYPE_HIDE_ALL",
|
||||
"UIDropDownMenu_SetWidth",
|
||||
"GetLFGMode",
|
||||
"CANNOT_DO_THIS_WHILE_PVE_QUEUING",
|
||||
"CANNOT_DO_THIS_IN_BATTLEGROUND",
|
||||
"GREEN_FONT_COLOR",
|
||||
"LFG_LIST_NO_RESULTS_FOUND",
|
||||
"MAX_PARTY_MEMBERS",
|
||||
"LFG_LIST_AND_MORE",
|
||||
"RED_FONT_COLOR",
|
||||
"PLAYER_LIST_DELIMITER",
|
||||
"FONT_COLOR_CODE_CLOSE",
|
||||
"RGBTableToColorCode",
|
||||
"ChatFrame_SendTell",
|
||||
"CANNOT_DO_THIS_WHILE_PVP_QUEUING",
|
||||
"ChatTypeInfo",
|
||||
"LFG_LIST_TOO_MANY_FOR_ACTIVITY",
|
||||
"LFG_LIST_GROUP_TOO_FULL",
|
||||
"LFG_LIST_INVITED_APP_FILLS_GROUP",
|
||||
"UNIT_TYPE_LEVEL_TEMPLATE",
|
||||
"LFG_LIST_HONOR_LEVEL_CURRENT_PVP",
|
||||
"LFG_LIST_COMMENT_FORMAT",
|
||||
"LFG_LIST_SEARCH_FAILED",
|
||||
"LFG_LIST_HIT_MAX_APPLICATIONS",
|
||||
"LFG_LIST_TOOLTIP_ILVL",
|
||||
"LFG_LIST_TOOLTIP_HONOR_LEVEL",
|
||||
"LFG_LIST_TOOLTIP_VOICE_CHAT",
|
||||
"LFG_LIST_TOOLTIP_LEADER",
|
||||
"LFG_LIST_TOOLTIP_AGE",
|
||||
"LFG_LIST_TOOLTIP_MEMBERS_SIMPLE",
|
||||
"LFG_LIST_TOOLTIP_MEMBERS",
|
||||
"CANNOT_DO_THIS_IN_LFG_PARTY",
|
||||
"CANNOT_DO_THIS_IN_PVE_QUEUE",
|
||||
"LFG_LIST_TOOLTIP_CLASS_ROLE",
|
||||
"LFG_LIST_BAD_NAME",
|
||||
"LFG_LIST_BAD_DESCRIPTION",
|
||||
"LFG_LIST_BAD_VOICE_CHAT_COMMENT",
|
||||
"LFG_LIST_BAD_LEADER_NAME",
|
||||
"LFG_LIST_APP_DECLINED_MESSAGE",
|
||||
"LFG_LIST_APP_TIMED_OUT_MESSAGE",
|
||||
"LE_FRAME_TUTORIAL_LFG_LIST",
|
||||
"LFGListFrame",
|
||||
"aura_env"
|
||||
],
|
||||
"Lua.diagnostics.disable": ["duplicate-set-field"]
|
||||
}
|
55
AttackSpeedTest.lua
Normal file
55
AttackSpeedTest.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
--Guess attack speed by taking entire data set and comparing 2 - 4 intervals then storing the n into seperate array and incrementing it
|
||||
--Attack speed with most counts in latter array is the best guess by m%
|
||||
--Correct this by repeating step on exit combat maybe?
|
||||
--Look at tolerances as well
|
||||
|
||||
local dataSet2s = {
|
||||
[1]=540390408.9506,
|
||||
[2]=540392394.9163,
|
||||
[3]=540394398.5326,
|
||||
[4]=540396409.5288,
|
||||
[5]=540398396.6414,
|
||||
[6]=540400397.0754,
|
||||
[7]=540402384.8113,
|
||||
[8]=540404385.3304,
|
||||
[9]=540406398.99,
|
||||
[10]=540408386.472,
|
||||
[11]=540410386.9851,
|
||||
[12]=540412374.8497,
|
||||
[13]=540414375.1427,
|
||||
[14]=540416373.0995,
|
||||
[15]=540418376.9931,
|
||||
[16]=540420390.6971
|
||||
}
|
||||
local dataSet1p5s = {
|
||||
[1]=541651364.1916,
|
||||
[2]=541652857.9058,
|
||||
[3]=541654365.8491,
|
||||
[4]=541655858.3292,
|
||||
[5]=541657352.4962,
|
||||
[6]=541658846.2963,
|
||||
[7]=541660354.015,
|
||||
[8]=541661847.0112,
|
||||
[9]=541663340.6759,
|
||||
[10]=541664861.3772,
|
||||
[11]=541666354.9449,
|
||||
[12]=541667848.8308,
|
||||
[13]=541669343.2332,
|
||||
[14]=541670849.9777,
|
||||
[15]=541672344.0613,
|
||||
[16]=541673851.2346
|
||||
}
|
||||
local tolerance = 50
|
||||
local tempAverages = {}
|
||||
-- rounds .5 to 0 or 1; want to round to .5 or .2 or alike
|
||||
for k,v in ipairs(dataSet1p5s) do
|
||||
if k > 1 then
|
||||
local tempAvg = (dataSet1p5s[k] - dataSet1p5s[k - 1])
|
||||
print(((math.floor(tempAvg / 1000) - (tempAvg / 1000)) * 1000), (math.ceil(tempAvg / 1000) - (tempAvg / 1000)) * 1000)
|
||||
if not tempAverages[tempAvg] then tempAverages[tempAvg] = 0 end
|
||||
tempAverages[tempAvg] = tempAverages[tempAvg] + 1
|
||||
end
|
||||
end
|
||||
for k,v in pairs(tempAverages) do
|
||||
print(k,v)
|
||||
end
|
16
Complete Projects/BFA Freakz/Grand Crusader Proc.lua
Normal file
16
Complete Projects/BFA Freakz/Grand Crusader Proc.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UNIT_AURA
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, CombatLogGetCurrentEventInfo())
|
||||
local sid = select(12, CombatLogGetCurrentEventInfo())
|
||||
local caster = select(5, CombatLogGetCurrentEventInfo())
|
||||
if caster == UnitName("player") and se == "SPELL_CAST_SUCCESS" and sid == 53595 then
|
||||
WeakAurasSaved.CustomTrash.ProcShit.casts = WeakAurasSaved.CustomTrash.ProcShit.casts + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.CustomTrash.ProcShit.procs .. " / " .. WeakAurasSaved.CustomTrash.ProcShit.casts .. "\n" .. WeakAurasSaved.CustomTrash.ProcShit.procs / WeakAurasSaved.CustomTrash.ProcShit.casts
|
||||
end
|
34
Complete Projects/BFA Freakz/RareAlert.lua
Normal file
34
Complete Projects/BFA Freakz/RareAlert.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
--Custom text
|
||||
function()
|
||||
output = ""
|
||||
for k, v in pairs(aura_env.elites) do
|
||||
output = output .. aura_env.eliteColor .. k .. " " .. v .. "\124r\n"
|
||||
end
|
||||
for k, v in pairs(aura_env.rares) do
|
||||
output = output .. aura_env.rareColor .. k .. " " .. v .. "\124r\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--NAME_PLATE_UNIT_ADDED
|
||||
function(e, u)
|
||||
class = UnitClassification(u)
|
||||
-- use date() for time
|
||||
if class == "elite" then
|
||||
aura_env.elites[UnitName(u)] = aura_env.GetTime()
|
||||
return true
|
||||
elseif class == "rare" or class == "rareelite" then
|
||||
aura_env.rares[UnitName(u)] = aura_env.GetTime()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.elites = {}
|
||||
aura_env.rares = {}
|
||||
aura_env.eliteColor = "\124c" .. "ff3e3e3e"
|
||||
aura_env.rareColor = "\124c" .. "ffffe72e"
|
||||
|
||||
aura_env.GetTime = function()
|
||||
return string.match(date(), "%d%d:%d%d:%d%d")
|
||||
endee
|
10
Complete Projects/BFA/Adding text to texture.lua
Normal file
10
Complete Projects/BFA/Adding text to texture.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE, MONOCHROME")
|
||||
aura_env.region.text:SetTextColor(0, 1, 0, 0.8)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 1, 0)
|
||||
aura_env.region.text:SetText("SW")
|
||||
aura_env.region.text:Show()
|
27
Complete Projects/BFA/Anna Arrow.lua
Normal file
27
Complete Projects/BFA/Anna Arrow.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if aura_env.altlist[UnitName(unit)] then
|
||||
local plate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
if plate then
|
||||
aura_env.region:SetAnchor("CENTER", plate, "CENTER")
|
||||
aura_env.region:SetOffset(0, 50)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if aura_env.altlist[UnitName(unit)] then
|
||||
aura_env.region:ClearAllPoints()
|
||||
aura_env.region:Color(1, 1, 1, 0)
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.altlist =
|
||||
{
|
||||
["Elna"] = 1,
|
||||
["Melna"] = 1,
|
||||
}
|
22
Complete Projects/BFA/Anna Trade.lua
Normal file
22
Complete Projects/BFA/Anna Trade.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
--TRADE_SHOW
|
||||
function()
|
||||
if UnitName("target") == "Melna" then
|
||||
local items = 0
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local type = select(7, GetItemInfo(link))
|
||||
if (type == "Cooking" or type == "Cloth") and items < 6 then
|
||||
UseContainerItem(i, j)
|
||||
items = items + 1
|
||||
elseif items >= 6 then
|
||||
AcceptTrade()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
AcceptTrade()
|
||||
end
|
||||
end
|
531
Complete Projects/BFA/Autoloot.lua
Normal file
531
Complete Projects/BFA/Autoloot.lua
Normal file
@@ -0,0 +1,531 @@
|
||||
--LOOT_READY MERCHANT_SHOW QUEST_POI_UPDATE QUEST_DETAIL QUEST_COMPLETE QUEST_GREETING QUEST_PROGRESS GOSSIP_SHOW SCRAPPING_MACHINE_SHOW MERCHANT_CLOSED EQUIP_BIND_CONFIRM
|
||||
function(e)
|
||||
local aura_env = aura_env
|
||||
if e == "LOOT_READY" then --Auto Loot
|
||||
local slot = 1
|
||||
local lootinfo = GetLootInfo()
|
||||
for k, v in pairs(lootinfo) do
|
||||
if v.locked == false then
|
||||
local link = GetLootSlotLink(slot)
|
||||
local looted = false
|
||||
if not link then link = GetLootSlotLink(slot) end
|
||||
if v.item:match("%d* Gold") or v.item:match("%d* Silver") or v.item:match("%d* Copper") then LootSlot(slot); print("|cff78cb00loot 1 |r", v.item, type, subtype)
|
||||
elseif link:match("Azerite") then LootSlot(slot); print("|cff78cb00loot 2 |r", v.item, type, subtype)
|
||||
elseif v.item:match("War Resources") then LootSlot(slot); print("|cff78cb00loot 3 |r", v.item, type, subtype)
|
||||
elseif v.item:match("Residuum") then LootSlot(slot); print("|cff78cb00loot 4 |r", v.item, type, subtype)
|
||||
elseif v.item:match("Manapearl") then LootSlot(slot); print("|cff78cb00loot 5 |r", v.item, type, subtype)
|
||||
end
|
||||
if link then
|
||||
local icon = v.texture
|
||||
local id = link:match("item:(%d+):")
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[v.item] and v.item and icon then WeakAurasSaved.CustomTrash.IconDatabase[v.item] = icon; print("Adding|cff78cb00 ", v.item, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[v.item] and v.item and id then WeakAurasSaved.CustomTrash.IDDatabase[v.item] = id; print("Adding|cff3366ff ", v.item, " |rto the id database") end
|
||||
local type = select(6, GetItemInfo(link)) or ""
|
||||
local subtype = select(7, GetItemInfo(link)) or ""
|
||||
local ilvl = select(4, GetItemInfo(link)) or 0
|
||||
local equip = select(9, GetItemInfo(link))
|
||||
if (select(7, GetItemInfo(link)) or 0) == "Mount" then LootSlot(slot); print("|cff78cb00loot 6 |r", v.item, type, subtype)
|
||||
elseif ilvl > 390 then LootSlot(slot); print("|cff78cb00loot 7 |r", v.item, type, subtype)
|
||||
elseif (select(7, GetItemInfo(link)) or 0) == "Herb" then LootSlot(slot); print("|cff78cb00loot 8 |r", v.item, type, subtype)
|
||||
elseif (select(7, GetItemInfo(link)) or 0) == "Cooking" then LootSlot(slot); print("|cff78cb00loot 9 |r", v.item, type, subtype)
|
||||
elseif (select(7, GetItemInfo(link)) or 0) == "Cloth" and type == "Tradeskill" then LootSlot(slot); print("|cff78cb00loot 10 |r", v.item, type, subtype)
|
||||
elseif (select(7, GetItemInfo(link)) or 0) == "Metal & Stone" then LootSlot(slot); print("|cff78cb00loot 11 |r", v.item, type, subtype)
|
||||
elseif (select(11, GetItemInfo(link)) or 0) > 150000 and v.quality == 0 then LootSlot(slot); print("|cff78cb00loot 12 |r", v.item, type, subtype)
|
||||
elseif v.quality > 1 and v.quality < 4 and type ~= "Weapon" and type ~= "Armor" then LootSlot(slot); print("|cff78cb00loot 13 |r", v.item, type, subtype)
|
||||
elseif v.isQuestItem == true then LootSlot(slot); print("|cff78cb00loot 14 |r", v.item, type, subtype)
|
||||
elseif v.quality == 0 then LootSlot(slot); print("|cff78cb00loot 15 |r", v.item, type, subtype)
|
||||
elseif aura_env.whitelist[v.item] then LootSlot(slot); print("|cff78cb00loot 16 |r", v.item, type, subtype)
|
||||
--elseif type == "Quest" and subtype == "Quest" then LootSlot(slot); print("|cff78cb00loot 17 |r", v.item, type, subtype)
|
||||
else
|
||||
print(type, subtype)
|
||||
if type == "Weapon" or type == "Armor" then
|
||||
if aura_env.skills[select(3, UnitClass("player"))][subtype] == 1 then
|
||||
LootSlot(slot); print("|cff78cb00loot 18 |r", v.item, type, subtype)
|
||||
elseif equip == "INVTYPE_FINGER" or equip == "INVTYPE_TRINKET" or equip == "INVTYPE_CLOAK" or equip == "INVTYPE_NECK" then
|
||||
LootSlot(slot); print("|cff78cb00loot 19 |r", v.item, type, subtype)
|
||||
end
|
||||
elseif type == "Miscellaneous" then
|
||||
if subtype == "Mount" then
|
||||
LootSlot(slot); print("|cff78cb00loot 20 |r", v.item, type, subtype)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if link then WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity, looted) end
|
||||
slot = slot + 1
|
||||
end
|
||||
end
|
||||
CloseLoot()
|
||||
elseif e == "EQUIP_BIND_CONFIRM" then
|
||||
StaticPopup1Button1:Click()
|
||||
elseif e == "SCRAPPING_MACHINE_SHOW" then
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local name = GetItemInfo(link)
|
||||
local rarity = select(3, GetItemInfo(link))
|
||||
local ilvl = select(4, GetItemInfo(link)) or 0
|
||||
local type = select(6, GetItemInfo(link))
|
||||
local equip = select(9, GetItemInfo(link)) or ""
|
||||
local price = select(11, GetItemInfo(link))
|
||||
if aura_env.sellWhitelist[name] ~= 1 then
|
||||
if name and rarity and ilvl and type and equip and price then
|
||||
if (type == "Armor" or type == "Weapon") and rarity <= 3 and aura_env.getequipID(equip) then
|
||||
UseContainerItem(i, j)
|
||||
elseif rarity > 3 and aura_env.getequipID(equip) then
|
||||
if equip ~= "INVTYPE_FINGER" then
|
||||
local eqID = aura_env.getequipID(equip)
|
||||
local elink = GetInventoryItemLink("player", eqID)
|
||||
local eilvl = select(4, GetItemInfo(elink)) or 0
|
||||
if eilvl > ilvl + 5 then
|
||||
print("Scrapping " .. link .. "over |cFF780000" .. eilvl - ilvl .. "|r ilvl difference from " .. elink)
|
||||
UseContainerItem(i, j)
|
||||
end
|
||||
elseif equip == "INVTYPE_FINGER" then
|
||||
local eqID1, eqID2 = 11, 12
|
||||
local elink1, elink2 = GetInventoryItemLink("player", eqID1), GetInventoryItemLink("player", eqID2)
|
||||
local eilvl1, eilvl2 = select(4, GetItemInfo(elink1)) or 0, select(4, GetItemInfo(elink2)) or 0
|
||||
if eilvl1 > ilvl + 5 then
|
||||
print("Scrapping " .. link .. " over |cFF780000" .. eilvl1 - ilvl .. "|r ilvl difference from " .. elink1)
|
||||
UseContainerItem(i, j)
|
||||
elseif eilvl2 > ilvl + 5 then
|
||||
print("Scrapping " .. link .. " over |cFF780000" .. eilvl2 - ilvl .. "|r ilvl difference from " .. elink2)
|
||||
UseContainerItem(i, j)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "MERCHANT_SHOW" then --Sell grey and white wepaon
|
||||
if CanMerchantRepair() == true then RepairAllItems() end
|
||||
local i, j = 0, 1
|
||||
for c = 0, 4 do
|
||||
for s = 1, GetContainerNumSlots(c) do
|
||||
local link = select(7, GetContainerItemInfo(c, s))
|
||||
if link then
|
||||
local name = GetItemInfo(link)
|
||||
local rarity = select(3, GetItemInfo(link))
|
||||
local ilvl = select(4, GetItemInfo(link)) or 0
|
||||
local type = select(6, GetItemInfo(link))
|
||||
local price = select(11, GetItemInfo(link))
|
||||
if price and price > 0 then
|
||||
if aura_env.sellWhitelist[name] ~= 1 then
|
||||
if rarity == 0 then
|
||||
aura_env.toSell[#aura_env.toSell + 1] = {["c"] = c, ["s"] = s}
|
||||
elseif (type == "Armor" or type == "Weapon") and ilvl < 350 then
|
||||
aura_env.toSell[#aura_env.toSell + 1] = {["c"] = c, ["s"] = s}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.ticker = C_Timer.NewTicker(0.15, function()
|
||||
if aura_env.toSell[1] then
|
||||
UseContainerItem(aura_env.toSell[1].c, aura_env.toSell[1].s)
|
||||
table.remove(aura_env.toSell, 1)
|
||||
else
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
if j >= GetContainerNumSlots(i) then i = i + 1; j = 1 end
|
||||
if i >= 4 then aura_env.ticker:Cancel() end
|
||||
end)
|
||||
elseif e == "MERCHANT_CLOSED" then
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
aura_env.toSell = {}
|
||||
elseif e == "QUEST_POI_UPDATE" then
|
||||
CloseGossip()
|
||||
elseif e == "QUEST_DETAIL" then
|
||||
AcceptQuest()
|
||||
elseif e == "QUEST_COMPLETE" then
|
||||
if GetNumQuestChoices() <= 1 then
|
||||
GetQuestReward(1)
|
||||
end
|
||||
elseif e == "GOSSIP_SHOW" then
|
||||
local quests = GetNumGossipAvailableQuests()
|
||||
local complquests = GetNumGossipActiveQuests()
|
||||
local opt = GetNumGossipOptions()
|
||||
if complquests > 0 and opt == 0 then
|
||||
for i = 1, complquests do
|
||||
SelectGossipActiveQuest(i)
|
||||
end
|
||||
end
|
||||
if quests > 0 and opt == 0 then
|
||||
SelectGossipAvailableQuest(1)
|
||||
end
|
||||
if opt == 1 and quests + complquests == 0 then
|
||||
SelectGossipOption(1)
|
||||
end
|
||||
elseif e == "QUEST_GREETING" then
|
||||
local quests = GetNumGossipAvailableQuests()
|
||||
local complquests = GetNumGossipActiveQuests()
|
||||
if complquests > 0 then
|
||||
for i = 1, complquests do
|
||||
SelectActiveQuest(1)
|
||||
end
|
||||
end
|
||||
if quests > 0 then
|
||||
SelectAvailableQuest(1)
|
||||
end
|
||||
elseif e == "QUEST_PROGRESS" then
|
||||
if IsQuestCompletable(i) then
|
||||
CompleteQuest()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.whitelist =
|
||||
{
|
||||
["Pygmy Suckerfish"] = 1,
|
||||
["Drakkari Offerings"] = 1,
|
||||
["Deepcoral Pod"] = 1,
|
||||
["Hardened Spring"] = 1,
|
||||
["Machined Gear Assembly"] = 1,
|
||||
["Tempered Plating"] = 1,
|
||||
["Hefty Glimmershell"] = 1,
|
||||
["Fresh Meat"] = 1,
|
||||
["Wood"] = 1,
|
||||
}
|
||||
aura_env.sellWhitelist =
|
||||
{
|
||||
["Blacksmith Hammer"] = 1,
|
||||
["Endless Tincture of Renewed Combat"] = 1,
|
||||
["Mr. Munchykins"] = 1,
|
||||
}
|
||||
aura_env.toSell = {}
|
||||
aura_env.getequipID = function(equip)
|
||||
if equip == "INVTYPE_HEAD" then return 1
|
||||
elseif equip == "INVTYPE_NECK" then return 2
|
||||
elseif equip == "INVTYPE_SHOULDER" then return 3
|
||||
elseif equip == "INVTYPE_BODY" then return 4
|
||||
elseif equip == "INVTYPE_CHEST" or equip == "INVTYPE_ROBE" then return 5
|
||||
elseif equip == "INVTYPE_WAIST" then return 6
|
||||
elseif equip == "INVTYPE_LEGS" then return 7
|
||||
elseif equip == "INVTYPE_FEET" then return 8
|
||||
elseif equip == "INVTYPE_WRIST" then return 9
|
||||
elseif equip == "INVTYPE_HAND" then return 10
|
||||
elseif equip == "INVTYPE_CLOAK" then return 15
|
||||
elseif equip == "INVTYPE_WEAPON" or equip == "INVTYPE_WEAPONMAINHAND" or equip == "INVTYPE_2HWEAPON" then return 16
|
||||
elseif equip == "INVTYPE_SHIELD" then return 17
|
||||
else return nil end
|
||||
end
|
||||
aura_env.skills =
|
||||
{
|
||||
--Warrior
|
||||
[1] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Paladin
|
||||
[2] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Hunter
|
||||
[3] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Rogue
|
||||
[4] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Priest
|
||||
[5] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Death Knight
|
||||
[6] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Shaman
|
||||
[7] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Mage
|
||||
[8] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Warlock
|
||||
[9] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Monk
|
||||
[10] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Druid
|
||||
[11] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Demon Hunter
|
||||
[12] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
}
|
27
Complete Projects/BFA/Azerite Power Energize.lua
Normal file
27
Complete Projects/BFA/Azerite Power Energize.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_ENERGIZE" then
|
||||
local caster = select(9, ...)
|
||||
if caster == UnitName("player") then
|
||||
local spell = select(13, ...)
|
||||
if spell == "Lucid Dreams" then
|
||||
local amount = select(15, ...)
|
||||
aura_env.amount = aura_env.amount + amount
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
aura_env.amount = 0
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.amount
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.amount = 0
|
64
Complete Projects/BFA/Block Ratio.lua
Normal file
64
Complete Projects/BFA/Block Ratio.lua
Normal file
@@ -0,0 +1,64 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
aura_env.nummelee = aura_env.nummelee + 1
|
||||
local bloq = select(17, ...)
|
||||
if bloq then
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
local amount = select(13, ...)
|
||||
local total = amount + bloq
|
||||
local pbloq = bloq / total * 100
|
||||
aura_env.bloqs[#aura_env.bloqs + 1] = pbloq
|
||||
local count = 1
|
||||
for k,v in ipairs(aura_env.bloqs) do
|
||||
aura_env.pbloq = aura_env.pbloq + v
|
||||
count = count + 1
|
||||
end
|
||||
aura_env.pbloq = aura_env.pbloq / count
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
aura_env.nummelee = aura_env.nummelee + 1
|
||||
local bloq = select(20, ...)
|
||||
if bloq then
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
local amount = select(16, ...)
|
||||
local total = amount + bloq
|
||||
local pbloq = bloq / total * 100
|
||||
aura_env.bloqs[#aura_env.bloqs + 1] = pbloq
|
||||
local count = 1
|
||||
for k,v in ipairs(aura_env.bloqs) do
|
||||
aura_env.pbloq = aura_env.pbloq + v
|
||||
count = count + 1
|
||||
end
|
||||
aura_env.pbloq = aura_env.pbloq / count
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.round(aura_env.pbloq, 2) .. "\n" .. aura_env.round((aura_env.numbloq / aura_env.nummelee) * 100, 2)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.bloqs = {}
|
||||
aura_env.numbloq = 0
|
||||
aura_env.nummelee = 0
|
||||
aura_env.pbloq = 0
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
162
Complete Projects/BFA/Block and Absorb Melee.lua
Normal file
162
Complete Projects/BFA/Block and Absorb Melee.lua
Normal file
@@ -0,0 +1,162 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local amount = select(13, ...)
|
||||
local block = select(17, ...) or 0
|
||||
local absorb = select(18, ...) or 0
|
||||
if amount then
|
||||
local output = amount
|
||||
local total = amount
|
||||
total = total + block + absorb
|
||||
local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0
|
||||
output = output .. " " .. block .. " " .. absorb .. " " .. rel
|
||||
if #aura_env.melee == aura_env.lines then
|
||||
table.remove(aura_env.melee, 1)
|
||||
table.insert(aura_env.melee, output)
|
||||
else
|
||||
table.insert(aura_env.melee, output)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local amount = select(16, ...)
|
||||
local block = select(20, ...) or 0
|
||||
local absorb = select(21, ...) or 0
|
||||
if amount then
|
||||
local output = amount
|
||||
local total = amount
|
||||
total = total + block + absorb
|
||||
local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0
|
||||
output = output .. " " .. block .. " " .. absorb .. " " .. rel
|
||||
if #aura_env.melee == aura_env.lines then
|
||||
table.remove(aura_env.melee, 1)
|
||||
table.insert(aura_env.melee, output)
|
||||
else
|
||||
table.insert(aura_env.melee, output)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local meleeT, blockT, absorbT, perT = "", "", "", ""
|
||||
local melee, block, absorb, per = 0, 0, 0, 0
|
||||
for i = #aura_env.melee, 1, -1 do
|
||||
melee = aura_env.melee[i]:match("(%d+)")
|
||||
if melee then
|
||||
melee = tonumber(melee)
|
||||
block = aura_env.melee[i]:match("%d+ (%d+)") or 0
|
||||
block = tonumber(block)
|
||||
absorb = aura_env.melee[i]:match("%d+ %d+ (%d+)") or 0
|
||||
absorb = tonumber(absorb)
|
||||
if block or absorb then
|
||||
per = aura_env.melee[i]:match("%d+ %d+ %d+ (%d+%.?%d*)") or 0
|
||||
per = tonumber(per)
|
||||
end
|
||||
meleeT = meleeT .. aura_env.shorten(melee) .. "\n"
|
||||
blockT = blockT .. aura_env.shorten(block) .. "\n"
|
||||
absorbT = absorbT .. aura_env.shorten(absorb) .. "\n"
|
||||
perT = perT .. aura_env.shorten(per) .. "\n"
|
||||
end
|
||||
end
|
||||
aura_env.region.melee:SetText(meleeT)
|
||||
aura_env.region.block:SetText(blockT)
|
||||
aura_env.region.absorb:SetText(absorbT)
|
||||
aura_env.region.percentage:SetText(perT)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.lines = 10
|
||||
|
||||
----------------------------------------
|
||||
-- PLEASE DO NOT EDIT BELOW THIS LINE --
|
||||
----------------------------------------
|
||||
local fontsize = select(2, aura_env.region.text:GetFont())
|
||||
aura_env.region:SetWidth(fontsize * 20)
|
||||
aura_env.region:SetHeight(fontsize * aura_env.lines)
|
||||
aura_env.melee = {""}
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
if not aura_env.region.melee then
|
||||
local melee = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.melee = melee
|
||||
end
|
||||
aura_env.region.melee:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.melee:SetTextColor(1, 1, 1)
|
||||
aura_env.region.melee:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 7.5, 0)
|
||||
aura_env.region.melee:SetWidth(fontsize * 5)
|
||||
aura_env.region.melee:SetJustifyH("LEFT")
|
||||
aura_env.region.melee:SetText("")
|
||||
aura_env.region.melee:Show()
|
||||
|
||||
if not aura_env.region.block then
|
||||
local block = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.block = block
|
||||
end
|
||||
aura_env.region.block:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.block:SetTextColor(0.75, 0.23, 0.23)
|
||||
aura_env.region.block:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 2.5, 0)
|
||||
aura_env.region.block:SetWidth(fontsize * 5)
|
||||
aura_env.region.block:SetJustifyH("LEFT")
|
||||
aura_env.region.block:SetText("")
|
||||
aura_env.region.block:Show()
|
||||
|
||||
if not aura_env.region.absorb then
|
||||
local absorb = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.absorb = absorb
|
||||
end
|
||||
aura_env.region.absorb:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.absorb:SetTextColor(0.1227, 0.4089, 0.65)
|
||||
aura_env.region.absorb:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 2.5, 0)
|
||||
aura_env.region.absorb:SetWidth(fontsize * 5)
|
||||
aura_env.region.absorb:SetJustifyH("LEFT")
|
||||
aura_env.region.absorb:SetText("")
|
||||
aura_env.region.absorb:Show()
|
||||
|
||||
if not aura_env.region.percentage then
|
||||
local percentage = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.percentage = percentage
|
||||
end
|
||||
aura_env.region.percentage:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.percentage:SetTextColor(0.32, 0.32, 0.34)
|
||||
aura_env.region.percentage:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 7.5, 0)
|
||||
aura_env.region.percentage:SetWidth(fontsize * 5)
|
||||
aura_env.region.percentage:SetJustifyH("LEFT")
|
||||
aura_env.region.percentage:SetText("")
|
||||
aura_env.region.percentage:Show()
|
||||
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val <= 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
89
Complete Projects/BFA/CD.lua
Normal file
89
Complete Projects/BFA/CD.lua
Normal file
@@ -0,0 +1,89 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local dest = select(6, ...)
|
||||
if dest == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Shield Block" or name == "Ignore Pain" then
|
||||
local c1, c2, c3, c4 = "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF"
|
||||
local Avatar = GetSpellCooldown("Avatar")
|
||||
local AvatarD = select(2, GetSpellCooldown("Avatar"))
|
||||
local LastStand = GetSpellCooldown("Last Stand")
|
||||
local ShieldWall = GetSpellCooldown("Shield Wall")
|
||||
local DemoralizingShout = GetSpellCooldown("Demoralizing Shout")
|
||||
local DemoralizingShoutD = select(2, GetSpellCooldown("Demoralizing Shout"))
|
||||
if Avatar > 0 and AvatarD > 2 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.AvatarCD = aura_env.AvatarCD + 3
|
||||
else
|
||||
aura_env.AvatarCD = aura_env.AvatarCD + 4
|
||||
end
|
||||
end
|
||||
if LastStand > 0 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.LastStandCD = aura_env.LastStandCD + 3
|
||||
else
|
||||
aura_env.LastStandCD = aura_env.LastStandCD + 4
|
||||
end
|
||||
end
|
||||
if ShieldWall > 0 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.ShieldWallCD = aura_env.ShieldWallCD + 3
|
||||
else
|
||||
aura_env.ShieldWallCD = aura_env.ShieldWallCD + 4
|
||||
end
|
||||
end
|
||||
if DemoralizingShout > 0 and DemoralizingShoutD > 2 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 3
|
||||
else
|
||||
aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 4
|
||||
end
|
||||
end
|
||||
if AvatarD < 2 then c1 = "|cFF0080FF" end
|
||||
if LastStand == 0 then c2 = "|cFF0080FF" end
|
||||
if ShieldWall == 0 then c3 = "|cFF0080FF" end
|
||||
if DemoralizingShoutD < 2 then c4 = "|cFF0080FF" end
|
||||
aura_env.region.text2:SetText(c1 .. aura_env.AvatarCD .. "|r\n" .. c2 .. aura_env.LastStandCD .. "|r\n" .. c3 .. aura_env.ShieldWallCD .. "|r\n" .. c4 .. aura_env.DemoralizingShoutCD .. "|r")
|
||||
elseif name == "Avatar" then
|
||||
aura_env.AvatarCD = 0
|
||||
elseif name == "Last Stand" then
|
||||
aura_env.LastStandCD = 0
|
||||
elseif name == "Shield Wall" then
|
||||
aura_env.ShieldWallCD = 0
|
||||
elseif name == "Demoralizing Shout" then
|
||||
aura_env.DemoralizingShoutCD = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.AvatarCD, aura_env.LastStandCD, aura_env.ShieldWallCD, aura_env.DemoralizingShoutCD = 0, 0, 0, 0
|
||||
local fontsize = 16
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.text:SetFont(font, size, flags)
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.text:SetJustifyH("LEFT")
|
||||
aura_env.region.text:SetText("Avatar\nLast Stand\nShield Wall\nDemoralizing Shout")
|
||||
aura_env.region.text:Show()
|
||||
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("0" .. "\n" .. "0" .. "\n" .. "0" .. "\n" .. "0")
|
||||
aura_env.region.text2:Show()
|
50
Complete Projects/BFA/CD2.lua
Normal file
50
Complete Projects/BFA/CD2.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local caster = select(6, ...)
|
||||
if caster == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Rampage" then
|
||||
local c1 = "|cFFFFFFFF"
|
||||
local Recklessness = GetSpellCooldown("Recklessness")
|
||||
local RecklessnessD = select(2, GetSpellCooldown("Recklessness"))
|
||||
if Recklessness > 0 and RecklessnessD > 2 then
|
||||
aura_env.RecklessnessCD = aura_env.RecklessnessCD + 3.75
|
||||
end
|
||||
if RecklessnessD < 2 then c1 = "|cFF0080FF" end
|
||||
aura_env.region.text2:SetText(c1 .. aura_env.RecklessnessCD .. "|r")
|
||||
elseif name == "Recklessness" then
|
||||
aura_env.RecklessnessCD = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.RecklessnessCD = 0
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.text:SetFont(font, size, flags)
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.text:SetJustifyH("LEFT")
|
||||
aura_env.region.text:SetText("Recklessness")
|
||||
aura_env.region.text:Show()
|
||||
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("0")
|
||||
aura_env.region.text2:Show()
|
15
Complete Projects/BFA/Chat Macro
Normal file
15
Complete Projects/BFA/Chat Macro
Normal file
@@ -0,0 +1,15 @@
|
||||
/click ChatFrame1Tab RightButton
|
||||
DropDownList1Button4
|
||||
|
||||
|
||||
/click ChatFrame3Tab RightButton
|
||||
/click DropDownList1Button10
|
||||
/click ChatConfigChatSettingsLeftCheckBox2Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox4Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox12Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox13Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox14Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox15Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox16Check
|
||||
|
||||
/run local c="ChatConfigChatSettingsLeftCheckBox2Check";c:Click();c=c:gsub("%d","4");c:Click();for i=12,14 do c=c:gsub("%d", i); c:Click() end --no work
|
20
Complete Projects/BFA/Combat.lua
Normal file
20
Complete Projects/BFA/Combat.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
|
||||
function(e)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
if not aura_env.seconds then aura_env.seconds = 0 end
|
||||
if not aura_env.minutes then aura_env.minutes = 0 end
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() aura_env.seconds = aura_env.seconds + 1; if aura_env.seconds > 59 then aura_env.seconds = 0; aura_env.minutes = aura_env.minutes + 1 end; WeakAuras.ScanEvents("UPDATE") end)
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_ENABLED" then
|
||||
aura_env.minutes = 0; aura_env.seconds = 0
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
elseif e == "UPDATE" then return true end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.seconds and aura_env.minutes then
|
||||
return aura_env.minutes .. ":" .. aura_env.seconds
|
||||
end
|
||||
end
|
27
Complete Projects/BFA/Cooldown Gradient.lua
Normal file
27
Complete Projects/BFA/Cooldown Gradient.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--ANIMATION
|
||||
function()
|
||||
if GetSpellCooldown("Memory of Lucid Dreams") then
|
||||
local start, dur = GetSpellCooldown("Memory of Lucid Dreams")
|
||||
local remcd = start + dur - GetTime()
|
||||
if remcd > 0 then
|
||||
remcd = 1 - aura_env.range(remcd, 0, 120, 1)
|
||||
return aura_env.grad(remcd)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.grad = function(c)
|
||||
--c expected as [0, 1]
|
||||
if c > 0.5 then
|
||||
c = 1 - (2 * (c - 0.5))
|
||||
return c, 1, 0, 1
|
||||
else
|
||||
c = c * 2
|
||||
return 1, c, 0, 1
|
||||
end
|
||||
end
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
17
Complete Projects/BFA/Deepcoral Bud Glow.lua
Normal file
17
Complete Projects/BFA/Deepcoral Bud Glow.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if name == "Deepcoral Bud" then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if name == "Deepcoral Bud" then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
19
Complete Projects/BFA/Dodge Bog.lua
Normal file
19
Complete Projects/BFA/Dodge Bog.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(e, ...)
|
||||
local se = select(2, ...)
|
||||
if se == "SWING_MISSED" or se == "SPELL_MISSED" then
|
||||
local target = select(9, ...)
|
||||
local misstype = select(12, ...)
|
||||
if misstype == "DODGE" and target == UnitName("player") then
|
||||
if not aura_env.dodg then aura_env.dodg = 0 end
|
||||
aura_env.dodg = aura_env.dodg + 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if not aura_env.dodg then aura_env.dodg = 0 end
|
||||
return aura_env.dodg
|
||||
end
|
40
Complete Projects/BFA/Drop Track/BAQS/BAQ farm.lua
Normal file
40
Complete Projects/BFA/Drop Track/BAQS/BAQ farm.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count = Garbage.baqcrap.count + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count then Garbage.baqcrap.count = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Tidemistress Ethendriss"] = 3,
|
||||
["Shirakess Starseeker"] = 1.2,
|
||||
["Azsh'ari Siegemistress"] = 0.9,
|
||||
["Shirakess Voidtwister"] = 0.7,
|
||||
["Shadowbinder Athissa"] = 0.6,
|
||||
["Azsh'ari Invoker"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.5,
|
||||
["Shirakess Overseer"] = 0.5,
|
||||
["Incantatrix Vazina"] = 0.5,
|
||||
["Lady Naz'jess"] = 0.5,
|
||||
["Herald of the Queen"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.4,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Theurgist Nitara"] = 0.2,
|
||||
["Azsh'ari Oracle"] = 0.13,
|
||||
["Tidebinder Sarjezi"] = 0.09,
|
||||
}
|
40
Complete Projects/BFA/Drop Track/BAQS/BAQ nameplate.lua
Normal file
40
Complete Projects/BFA/Drop Track/BAQS/BAQ nameplate.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Tidemistress Ethendriss"] = 3,
|
||||
["Shirakess Starseeker"] = 1.2,
|
||||
["Azsh'ari Siegemistress"] = 0.9,
|
||||
["Shirakess Voidtwister"] = 0.7,
|
||||
["Shadowbinder Athissa"] = 0.6,
|
||||
["Azsh'ari Invoker"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.5,
|
||||
["Shirakess Overseer"] = 0.5,
|
||||
["Incantatrix Vazina"] = 0.5,
|
||||
["Lady Naz'jess"] = 0.5,
|
||||
["Herald of the Queen"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.4,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Theurgist Nitara"] = 0.2,
|
||||
["Azsh'ari Oracle"] = 0.13,
|
||||
["Tidebinder Sarjezi"] = 0.09,
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {0,1,0,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Barnacled Reefwalker"] = 1.6,
|
||||
["Gloomchasm Reefwalker"] = 1.4,
|
||||
["Whitewave Reefwalker"] = 1.2,
|
||||
["Staghorn Reefwalker"] = 1.2,
|
||||
["Deep Reefwalker"] = 1.2,
|
||||
["Sunbleached Reefwalker"] = 1,
|
||||
["Kelpwillow"] = 1,
|
||||
["Anemonar"] = 0.9,
|
||||
["Seashelf Reefwalker"] = 0.8,
|
||||
["Murkbloom Reefwalker"] = 0.7,
|
||||
["Oronu"] = 0.6,
|
||||
["Urduu"] = 0.6,
|
||||
["Emorneth"] = 0.5,
|
||||
["Sandclaw Stoneshell"] = 6,
|
||||
["Chitterspine Ambusher"] = 0.8,
|
||||
["Chitterspine Crab"] = 0.5,
|
||||
["Chitterspine Lurker"] = 0.5,
|
||||
["Iridescent Glimmershell"] = 0.5,
|
||||
["Needlespine"] = 0.5,
|
||||
["Chitterspine Encroacher"] = 0.4,
|
||||
["Glimmershell Crab"] = 0.4,
|
||||
["Sandclaw Crab"] = 0.4,
|
||||
["Chitterspine Ambusher"] = 0.4,
|
||||
["Crackleclaw Crab"] = 0.3,
|
||||
["Glimmershell Hulk"] = 0.3,
|
||||
["Chitterspine Crab"] = 0.3,
|
||||
["Braxicus"] = 0.3,
|
||||
["Chitterspine Guillotine"] = 0.16,
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count3 = Garbage.baqcrap.count3 + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count3 .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count3 then Garbage.baqcrap.count3 = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Barnacled Reefwalker"] = 1.6,
|
||||
["Gloomchasm Reefwalker"] = 1.4,
|
||||
["Whitewave Reefwalker"] = 1.2,
|
||||
["Staghorn Reefwalker"] = 1.2,
|
||||
["Deep Reefwalker"] = 1.2,
|
||||
["Sunbleached Reefwalker"] = 1,
|
||||
["Kelpwillow"] = 1,
|
||||
["Anemonar"] = 0.9,
|
||||
["Seashelf Reefwalker"] = 0.8,
|
||||
["Murkbloom Reefwalker"] = 0.7,
|
||||
["Oronu"] = 0.6,
|
||||
["Urduu"] = 0.6,
|
||||
["Emorneth"] = 0.5,
|
||||
["Sandclaw Stoneshell"] = 6,
|
||||
["Chitterspine Ambusher"] = 0.8,
|
||||
["Chitterspine Crab"] = 0.5,
|
||||
["Chitterspine Lurker"] = 0.5,
|
||||
["Iridescent Glimmershell"] = 0.5,
|
||||
["Needlespine"] = 0.5,
|
||||
["Chitterspine Encroacher"] = 0.4,
|
||||
["Glimmershell Crab"] = 0.4,
|
||||
["Sandclaw Crab"] = 0.4,
|
||||
["Chitterspine Ambusher"] = 0.4,
|
||||
["Crackleclaw Crab"] = 0.3,
|
||||
["Glimmershell Hulk"] = 0.3,
|
||||
["Chitterspine Crab"] = 0.3,
|
||||
["Braxicus"] = 0.3,
|
||||
["Chitterspine Guillotine"] = 0.16,
|
||||
}
|
80
Complete Projects/BFA/Drop Track/STONES/Stone nameplates.lua
Normal file
80
Complete Projects/BFA/Drop Track/STONES/Stone nameplates.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {0,0,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Herald of Salgos"] = 33,
|
||||
["Spawn of Salgos"] = 33,
|
||||
["Osgen"] = 30,
|
||||
["Ungormath"] = 30,
|
||||
["Burning Amalgamation"] = 29,
|
||||
["Moghiea"] = 29,
|
||||
["Salgos the Eternal"] = 28,
|
||||
["Zomera"] = 27,
|
||||
["Arcane Amalgamation"] = 25,
|
||||
["Xue"] = 25,
|
||||
["Aldrantiss"] = 22,
|
||||
["Watery Amalgamation"] = 22,
|
||||
["Dusty Amalgamation"] = 22,
|
||||
["Alzana"] = 21,
|
||||
["Vyz'olgo the Mind-Taker"] = 20,
|
||||
["Qalina"] = 19,
|
||||
["Omus"] = 19,
|
||||
["Voice in the Deeps"] = 13,
|
||||
["King Gakula"] = 11,
|
||||
["Chasm-Haunter"] = 11,
|
||||
["Scale Matriarch Vynara"] = 11,
|
||||
["Anemonar"] = 10,
|
||||
["Sandcastle"] = 9,
|
||||
["Shiz'narasz the Consumer"] = 9,
|
||||
["Toxigore the Alpha"] = 9,
|
||||
["Needlespine"] = 9,
|
||||
["Siltstalker the Packmother"] = 9,
|
||||
["Urduu"] = 9,
|
||||
["Tidemistress Leth'sindra"] = 9,
|
||||
["Banescale the Packfather"] = 9,
|
||||
["Sandclaw Stoneshell"] = 8,
|
||||
["Garnetscale"] = 8,
|
||||
["Allseer Oma'kil"] = 8,
|
||||
["Vor'koth"] = 8,
|
||||
["Elder Unu"] = 8,
|
||||
["Caverndark Terror"] = 8,
|
||||
["Blindlight"] = 8,
|
||||
["Shassera"] = 8,
|
||||
["Soundless"] = 8,
|
||||
["Scale Matriarch Gratinax"] = 8,
|
||||
["Tidelord Aquatus"] = 8,
|
||||
["Tidelord Dispersius"] = 8,
|
||||
["Carnivorous Lasher"] = 7,
|
||||
["Mirecrawler"] = 7,
|
||||
["Daggertooth Terror"] = 7,
|
||||
["Amethyst Spireshell"] = 7,
|
||||
["Prince Typhonus"] = 7,
|
||||
["Alga the Eyeless"] = 7,
|
||||
["Prince Vortran"] = 7,
|
||||
["Kelpwillow"] = 7,
|
||||
["Deepglider"] = 7,
|
||||
["Scale Matriarch Zodia"] = 7,
|
||||
["Rockweed Shambler"] = 7,
|
||||
["Avarius"] = 6,
|
||||
["Iridescent Glimmershell"] = 6,
|
||||
["Oronu"] = 6,
|
||||
["Elderspawn Nalaada"] = 5,
|
||||
}
|
80
Complete Projects/BFA/Drop Track/STONES/Stone.lua
Normal file
80
Complete Projects/BFA/Drop Track/STONES/Stone.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count2 = Garbage.baqcrap.count2 + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count2 .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count2 then Garbage.baqcrap.count2 = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Herald of Salgos"] = 33,
|
||||
["Spawn of Salgos"] = 33,
|
||||
["Osgen"] = 30,
|
||||
["Ungormath"] = 30,
|
||||
["Burning Amalgamation"] = 29,
|
||||
["Moghiea"] = 29,
|
||||
["Salgos the Eternal"] = 28,
|
||||
["Zomera"] = 27,
|
||||
["Arcane Amalgamation"] = 25,
|
||||
["Xue"] = 25,
|
||||
["Aldrantiss"] = 22,
|
||||
["Watery Amalgamation"] = 22,
|
||||
["Dusty Amalgamation"] = 22,
|
||||
["Alzana"] = 21,
|
||||
["Vyz'olgo the Mind-Taker"] = 20,
|
||||
["Qalina"] = 19,
|
||||
["Omus"] = 19,
|
||||
["Voice in the Deeps"] = 13,
|
||||
["King Gakula"] = 11,
|
||||
["Chasm-Haunter"] = 11,
|
||||
["Scale Matriarch Vynara"] = 11,
|
||||
["Anemonar"] = 10,
|
||||
["Sandcastle"] = 9,
|
||||
["Shiz'narasz the Consumer"] = 9,
|
||||
["Toxigore the Alpha"] = 9,
|
||||
["Needlespine"] = 9,
|
||||
["Siltstalker the Packmother"] = 9,
|
||||
["Urduu"] = 9,
|
||||
["Tidemistress Leth'sindra"] = 9,
|
||||
["Banescale the Packfather"] = 9,
|
||||
["Sandclaw Stoneshell"] = 8,
|
||||
["Garnetscale"] = 8,
|
||||
["Allseer Oma'kil"] = 8,
|
||||
["Vor'koth"] = 8,
|
||||
["Elder Unu"] = 8,
|
||||
["Caverndark Terror"] = 8,
|
||||
["Blindlight"] = 8,
|
||||
["Shassera"] = 8,
|
||||
["Soundless"] = 8,
|
||||
["Scale Matriarch Gratinax"] = 8,
|
||||
["Tidelord Aquatus"] = 8,
|
||||
["Tidelord Dispersius"] = 8,
|
||||
["Carnivorous Lasher"] = 7,
|
||||
["Mirecrawler"] = 7,
|
||||
["Daggertooth Terror"] = 7,
|
||||
["Amethyst Spireshell"] = 7,
|
||||
["Prince Typhonus"] = 7,
|
||||
["Alga the Eyeless"] = 7,
|
||||
["Prince Vortran"] = 7,
|
||||
["Kelpwillow"] = 7,
|
||||
["Deepglider"] = 7,
|
||||
["Scale Matriarch Zodia"] = 7,
|
||||
["Rockweed Shambler"] = 7,
|
||||
["Avarius"] = 6,
|
||||
["Iridescent Glimmershell"] = 6,
|
||||
["Oronu"] = 6,
|
||||
["Elderspawn Nalaada"] = 5,
|
||||
}
|
33
Complete Projects/BFA/Global Debug.lua
Normal file
33
Complete Projects/BFA/Global Debug.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
--DEBUG_UPDATE DEBUG_ADD
|
||||
function(e, m, t, c)
|
||||
if e == "DEBUG_UPDATE" then
|
||||
return true
|
||||
elseif e == "DEBUG_ADD" and m and t then
|
||||
if c then aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t, c} else aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t} end
|
||||
WeakAuras.ScanEvents("DEBUG_UPDATE")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.DebugTextArray then
|
||||
aura_env.output = ""
|
||||
if #aura_env.DebugTextArray > 0 then
|
||||
for k,v in ipairs(aura_env.DebugTextArray) do
|
||||
if v[3] then aura_env.output = aura_env.output .. "|c" .. v[3] end
|
||||
aura_env.output = aura_env.output .. v[1]
|
||||
if v[3] then aura_env.output = aura_env.output .. "|r" end
|
||||
aura_env.output = aura_env.output .. "\n"
|
||||
if v[2] > 0 then
|
||||
local aura_env = aura_env
|
||||
C_Timer.After(v[2], function() table.remove(aura_env.DebugTextArray, k); WeakAuras.ScanEvents("DEBUG_UPDATE") end)
|
||||
end
|
||||
end
|
||||
end
|
||||
return aura_env.output
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
--DevTools_Dump nice
|
||||
if not aura_env.DebugTextArray then aura_env.DebugTextArray = {} end
|
25
Complete Projects/BFA/Guild Spam.lua
Normal file
25
Complete Projects/BFA/Guild Spam.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
--[05:42 PM] [G] [Whispa]: <Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons
|
||||
--/run WeakAuras.ScanEvents("BULLSHIT_BEGIN")
|
||||
--BULLSHIT_BEGIN BULLSHIT_STOP PLAYER_ENTERING_WORLD
|
||||
function(e)
|
||||
if e == "BULLSHIT_BEGIN" then
|
||||
if IsInInstance() == false then
|
||||
aura_env.ticker = C_Timer.NewTicker(600, function() SendChatMessage("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons", "CHANNEL", _, "1") end)
|
||||
--aura_env.ticker = C_Timer.NewTicker(0.60, function() print("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons") end)
|
||||
else
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
end
|
||||
elseif e == "BULLSHIT_STOP" then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
elseif e == "PLAYER_ENTERING_WORLD" then
|
||||
if IsInInstance() == true then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
38
Complete Projects/BFA/Icon Database Update.lua
Normal file
38
Complete Projects/BFA/Icon Database Update.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--MERCHANT_SHOW PLAYER_ALIVE CHAT_MSG_LOOT
|
||||
function(e, msg)
|
||||
if e == "PLAYER_ALIVE" then
|
||||
for c = 0, 5 do
|
||||
for s = 1, GetContainerNumSlots(c) do
|
||||
if GetContainerItemLink(c, s) then
|
||||
local name = GetItemInfo(GetContainerItemLink(c, s))
|
||||
local icon = select(10, GetItemInfo(GetContainerItemLink(c, s)))
|
||||
local link = GetContainerItemLink(c, s)
|
||||
local id = link:match("item:(%d+):")
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "MERCHANT_SHOW" then
|
||||
local i = 1
|
||||
C_Timer.After(0.2, function()
|
||||
while GetMerchantItemInfo(i) do
|
||||
local name, icon = GetMerchantItemInfo(i)
|
||||
local link = GetMerchantItemLink(i)
|
||||
local id = link:match("item:(%d+):")
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
i = i + 1
|
||||
end
|
||||
end)
|
||||
elseif e == "CHAT_MSG_LOOT" then
|
||||
local itemID, icon, name
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
itemID = itemLink:match("item:(%d+):")
|
||||
icon = select(10, GetItemInfo(itemLink))
|
||||
name = GetItemInfo(itemLink)
|
||||
end
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
end
|
||||
end
|
28
Complete Projects/BFA/Ignite.lua
Normal file
28
Complete Projects/BFA/Ignite.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
--CLEU PLAYER_TARGET_CHANGED
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
if (select(2, ...) == "SPELL_AURA_APPLIED" or select(2, ...) == "SPELL_AURA_REFRESH" or select(2, ...) == "SPELL_PERIODIC_DAMAGE") and select(5, ...) == UnitName("player") and select(13, ...) == "Ignite" then
|
||||
return true
|
||||
end
|
||||
elseif e == "PLAYER_TARGET_CHANGED" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local function UnitDebuffC(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i, PLAYER)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i, PLAYER)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
local thing = select(16, UnitDebuffC("target", "Ignite"))
|
||||
if thing then return thing else return 0 end
|
||||
end
|
79
Complete Projects/BFA/Ignor Pain ALERT.lua
Normal file
79
Complete Projects/BFA/Ignor Pain ALERT.lua
Normal file
@@ -0,0 +1,79 @@
|
||||
--UNIT_AURA:player UNIT_POWER_UPDATE:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.UnitBuffC("Ignore Pain") then
|
||||
local expTime = math.floor((select(6, aura_env.UnitBuffC("Ignore Pain")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1200 == expTime then aura_env.absorb = select(16, aura_env.UnitBuffC("Ignore Pain")) end
|
||||
end
|
||||
elseif e == "UNIT_POWER_UPDATE" then
|
||||
local rage = UnitPower("player")
|
||||
local time = GetTime()
|
||||
if rage < 40 then
|
||||
aura_env.region:Hide()
|
||||
return false
|
||||
elseif rage >= 40 and rage < 90 and not aura_env.UnitBuffC("player", "Ignore Pain") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(true)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif rage >= 40 and rage < 90 and aura_env.UnitBuffC("player", "Ignore Pain") then
|
||||
local absorb = select(16, aura_env.UnitBuffC("player", "Ignore Pain")) or 0
|
||||
local expTime = select(6, aura_env.UnitBuffC("player", "Ignore Pain")) or 0
|
||||
if absorb > 0 and expTime > 0 then
|
||||
if expTime - time <= 3 then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif absorb <= 0.2 * aura_env.absorb then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
else
|
||||
aura_env.region:Hide()
|
||||
return false
|
||||
end
|
||||
end
|
||||
elseif rage >= 90 and not aura_env.UnitBuffC("player", "Shield Block") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Shield Block"))
|
||||
aura_env.region:SetOffset(-128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 0.33)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif rage >= 90 and aura_env.UnitBuffC("player", "Shield Block") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 0.5)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
else
|
||||
aura_env.region:Hide()()
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.absorb = 0
|
||||
aura_env.UnitBuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
65
Complete Projects/BFA/Ignore Pain.lua
Normal file
65
Complete Projects/BFA/Ignore Pain.lua
Normal file
@@ -0,0 +1,65 @@
|
||||
--UNIT_COMBAT:player UNIT_AURA:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.CUnitBuff("Ignore Pain") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain"))
|
||||
local expTime = math.floor((select(6, aura_env.CUnitBuff("Ignore Pain")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1200 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Ignore Pain")) end
|
||||
aura_env.region.text:SetText(aura_env.shorten(aura_env.amount))
|
||||
aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount))
|
||||
else
|
||||
aura_env.region.text:SetText("")
|
||||
aura_env.region.timer:SetText("")
|
||||
aura_env.maxamount = 0
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_COMBAT" then
|
||||
if aura_env.CUnitBuff("Ignore Pain") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain"))
|
||||
aura_env.region.text:SetText(aura_env.shorten(aura_env.amount))
|
||||
aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount))
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
return aura_env.amount, aura_env.maxamount, 1
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.absorb = 0
|
||||
aura_env.CUnitBuff = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff("player", i)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
24
Complete Projects/BFA/Kindling.lua
Normal file
24
Complete Projects/BFA/Kindling.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
--CLEU SPELL_UPDATE_COOLDOWN
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
if select(2, ...) == "SPELL_DAMAGE" and select(5, ...) == UnitName("player") and (select(13, ...) == "Fireball" or select(13, ...) == "Fire Blast" or select(13, ...) == "Pyroblast") and select(21, ...) == true and GetSpellCooldown("Combustion") > 0 then
|
||||
if not aura_env.cd then aura_env.cd = 0 end
|
||||
aura_env.cd = aura_env.cd + 1
|
||||
return true
|
||||
end
|
||||
if select(2, ...) == "SPELL_CAST_SUCCESS" and select(5, ...) == UnitName("player") and select(13, ...) == "Combustion" then
|
||||
aura_env.cd = 0
|
||||
end
|
||||
elseif e == "SPELL_UPDATE_COOLDOWN" then return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if not aura_env.cd then aura_env.cd = 0 end
|
||||
if GetSpellCooldown("Combustion") > 0 then
|
||||
return "|cfffd477b" .. aura_env.cd
|
||||
else
|
||||
return "|cff78cb00" .. aura_env.cd
|
||||
end
|
||||
end
|
34
Complete Projects/BFA/Loot List.lua
Normal file
34
Complete Projects/BFA/Loot List.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
--CHAT_MSG_LOOT
|
||||
function(_,msg,who)
|
||||
local who = who:match(UnitName("player"))
|
||||
local what = msg:match("%[([a-zA-Z ' -]+)%]")
|
||||
if who == UnitName("player") then
|
||||
local link = ""
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
if GetContainerItemLink(i,j) then
|
||||
if GetItemInfo(GetContainerItemLink(i, j)) == what then
|
||||
link = GetContainerItemLink(i, j)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
table.insert(aura_env.loot, {["Who"] = who, ["What"] = what, ["When"] = GetTime() + 2.5, ["Link"] = link})
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(aura_env.loot) do
|
||||
if v.When < GetTime() then
|
||||
table.remove(aura_env.loot, k)
|
||||
else
|
||||
output = output .. v.Link .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.loot = {}
|
121
Complete Projects/BFA/Map.lua
Normal file
121
Complete Projects/BFA/Map.lua
Normal file
@@ -0,0 +1,121 @@
|
||||
--EVERY FRAME (Throttled)
|
||||
function()
|
||||
if aura_env.lastscan < GetTime() then
|
||||
if UnitExists("focus") then
|
||||
if UnitInParty("focus") then
|
||||
--Get MapID for both
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local focusMapID = C_Map.GetBestMapForUnit("focus")
|
||||
|
||||
--Get Coordinates for both within same map
|
||||
local pX, pY, fX, fY = 0, 0, 0, 0
|
||||
if myMapID == focusMapID then
|
||||
pX, pY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").y, 4) * 10000
|
||||
fX, fY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").y, 4) * 10000
|
||||
end
|
||||
|
||||
if pX > 0 and pY > 0 and fX > 0 and fY > 0 then
|
||||
--Get player direction facing and convert to angle
|
||||
local playerFace = GetPlayerFacing() or 0
|
||||
local playerA = math.floor(playerFace * 100)
|
||||
playerA = aura_env.range(playerA, 0, 630, 360) - 1
|
||||
playerA = - playerA
|
||||
playerA = math.floor(playerA)
|
||||
playerA = playerA - 90
|
||||
if playerA < 0 then playerA = playerA + 360 end
|
||||
|
||||
--Get relative Coordinates
|
||||
local X = fX - pX
|
||||
local Y = fY - pY
|
||||
local hyp = math.sqrt((X ^ 2) + (Y ^ 2))
|
||||
local a = math.atan2(Y, X)
|
||||
a = a - math.rad(playerA)
|
||||
local Y2, X2 = hyp * math.cos(a), hyp * math.sin(a)
|
||||
local zoomout, zoomin = 100, 50
|
||||
if (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom > 0.3 then
|
||||
aura_env.zoom = aura_env.zoom - 0.2
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.3 and aura_env.zoom > 0.1 then
|
||||
aura_env.zoom = aura_env.zoom - 0.05
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.1 and aura_env.zoom > 0.0005 then
|
||||
aura_env.zoom = aura_env.zoom - 0.0005
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom < 0.001 then
|
||||
aura_env.zoom = 1
|
||||
end
|
||||
if (math.abs((X2 * aura_env.zoom)) < zoomin and math.abs((Y2 * aura_env.zoom)) < zoomin) and aura_env.zoom < 50 then
|
||||
aura_env.zoom = aura_env.zoom + 0.2
|
||||
end
|
||||
aura_env.region.text:SetText("Zoom: " .. aura_env.zoom .. "\nDistance: " .. aura_env.round(hyp, 0))
|
||||
aura_env.region.playerTexture:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.focusTexture:SetPoint("CENTER", aura_env.region, "CENTER", X2 * aura_env.zoom, Y2 * aura_env.zoom)
|
||||
|
||||
--Get class to color
|
||||
local pclass, fclass = select(3, UnitClass("player")), select(3, UnitClass("focus"))
|
||||
aura_env.region.playerTexture:SetVertexColor(aura_env.classColor(pclass))
|
||||
aura_env.region.focusTexture:SetVertexColor(aura_env.classColor(fclass))
|
||||
return true
|
||||
else
|
||||
print("Focus not in map!")
|
||||
end
|
||||
aura_env.lastscan = GetTime() + aura_env.throttle / 1000
|
||||
else print("Focus not in party!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
|
||||
else print("No focus found!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.throttle = 250
|
||||
aura_env.lastscan = 0
|
||||
aura_env.zoom = 1
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43, 0.75 elseif
|
||||
class == 2 then return 0.96, 0.55, 0.73, 0.75 elseif
|
||||
class == 3 then return 0.67, 0.83, 0.45, 0.75 elseif
|
||||
class == 4 then return 1, 0.96, 0.41, 0.75 elseif
|
||||
class == 5 then return 1, 1, 1, 0.75 elseif
|
||||
class == 6 then return 0.77, 0.12, 0.23, 0.75 elseif
|
||||
class == 7 then return 0, 0.44, 0.87, 0.75 elseif
|
||||
class == 8 then return 0.25, 0.78, 0.92, 0.75 elseif
|
||||
class == 9 then return 0.53, 0.53, 0.93, 0.75 elseif
|
||||
class == 10 then return 0, 1, 0.59, 0.75 elseif
|
||||
class == 11 then return 1, 0.49, 0.04, 0.75 elseif
|
||||
class == 12 then return 0.64, 0.19, 0.79, 0.75 else
|
||||
return 1, 1, 1, 1 end
|
||||
end
|
||||
|
||||
if not aura_env.region.playerTexture then
|
||||
local playerTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.playerTexture = playerTexture
|
||||
end
|
||||
aura_env.region.playerTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
|
||||
aura_env.region.playerTexture:SetHeight(16)
|
||||
aura_env.region.playerTexture:SetWidth(16)
|
||||
aura_env.region.playerTexture:Show()
|
||||
if not aura_env.region.focusTexture then
|
||||
local focusTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.focusTexture = focusTexture
|
||||
end
|
||||
aura_env.region.focusTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
|
||||
aura_env.region.focusTexture:SetHeight(16)
|
||||
aura_env.region.focusTexture:SetWidth(16)
|
||||
aura_env.region.focusTexture:Show()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
end
|
||||
aura_env.region.text:ClearAllPoints()
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 0, 500)
|
||||
aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Medium.ttf", 16, "OUTLINE")
|
||||
aura_env.region.text:SetJustifyH("CENTER")
|
||||
aura_env.region.text:Show()
|
108
Complete Projects/BFA/Mob Highlight.lua
Normal file
108
Complete Projects/BFA/Mob Highlight.lua
Normal file
@@ -0,0 +1,108 @@
|
||||
--QUEST_LOG_UPDATE
|
||||
function(e, unit)
|
||||
if e == "QUEST_LOG_UPDATE" then
|
||||
local entries = GetNumQuestLogEntries()
|
||||
for i = 1, entries do
|
||||
if GetQuestLogLeaderBoard(1, i) then
|
||||
for j = 1, 40 do
|
||||
local text, type, finished = GetQuestLogLeaderBoard(1, i)
|
||||
if not text then
|
||||
break
|
||||
elseif text and not finished then
|
||||
if type == "monster" and text:match("slain") then
|
||||
local count, mcount = text:match("(%d*)%/(%d*)")
|
||||
local rem = mcount - count
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
aura_env.mobs[mob] = rem
|
||||
end
|
||||
elseif finished and aura_env.mobs[mob] then
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
table.remove(aura_env.mobs, mob)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
--TSU
|
||||
function(allstates, e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if UnitExists(unit) then
|
||||
if aura_env.mobs[UnitName(unit)] then
|
||||
local name = UnitName(unit)
|
||||
allstates[unit] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
unit = unit,
|
||||
name = name,
|
||||
count = aura_env.mobs[name],
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if allstates[unit] then
|
||||
allstates[unit] =
|
||||
{
|
||||
show = false,
|
||||
changed = true,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text = text
|
||||
end
|
||||
aura_env.region:SetHeight(128)
|
||||
aura_env.region:SetWidth(512)
|
||||
aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Regular.ttf", 18, "OUTLINE")
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetText(aura_env.state.count)
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region.texture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura51")
|
||||
aura_env.region.texture:SetHeight(32)
|
||||
aura_env.region.texture:SetWidth(32)
|
||||
local plate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit)
|
||||
if plate then
|
||||
print("found plate pls work")
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("TOP", plate, "TOP", 0, 32)
|
||||
aura_env.region.texture:Show()
|
||||
aura_env.region.text:ClearAllPoints()
|
||||
aura_env.region.text:SetPoint("CENTER", plate, "CENTER", 32, 48)
|
||||
aura_env.region.text:Show()
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs = {}
|
||||
local entries = GetNumQuestLogEntries()
|
||||
for i = 1, entries do
|
||||
if GetQuestLogLeaderBoard(1, i) then
|
||||
for j = 1, 40 do
|
||||
local text, type, finished = GetQuestLogLeaderBoard(1, i)
|
||||
if not text then
|
||||
break
|
||||
elseif text and not finished then
|
||||
if type == "monster" and text:match("slain") then
|
||||
local count, mcount = text:match("(%d*)%/(%d*)")
|
||||
local rem = mcount - count
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
aura_env.mobs[mob] = rem
|
||||
end
|
||||
elseif finished and aura_env.mobs[mob] then
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
table.remove(aura_env.mobs, mob)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
67
Complete Projects/BFA/Null Barrier.lua
Normal file
67
Complete Projects/BFA/Null Barrier.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
--UNIT_COMBAT:player UNIT_AURA:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier"))
|
||||
local expTime = math.floor((select(6, aura_env.CUnitBuff("Null Barrier")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1000 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Null Barrier")) end
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_COMBAT" then
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier"))
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.region:SetInverse(false)
|
||||
aura_env.region:Color(0.5, 0, 0.5, 1)
|
||||
return aura_env.amount, aura_env.maxamount, 1
|
||||
else
|
||||
aura_env.region:SetInverse(true)
|
||||
aura_env.region:Color(0.5, 0.5, 0.5, 1)
|
||||
return 15, aura_env.lastTime + 15
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.maxamount = 0
|
||||
aura_env.amount = 0
|
||||
aura_env.lastTime = GetTime()
|
||||
aura_env.CUnitBuff = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff("player", i)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
20
Complete Projects/BFA/Quest Fuckery.lua
Normal file
20
Complete Projects/BFA/Quest Fuckery.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
--QUEST_POI_UPDATE UPDATE_Q_ITEM
|
||||
function()
|
||||
if InCombatLockdown() ~= 1 then
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local type = select(6, GetItemInfo(link))
|
||||
if type == "Quest" then
|
||||
PickupContainerItem(i, j)
|
||||
if CursorHasItem() then
|
||||
PickupAction(22)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
100
Complete Projects/BFA/Rare Tracc.lua
Normal file
100
Complete Projects/BFA/Rare Tracc.lua
Normal file
@@ -0,0 +1,100 @@
|
||||
--CHAT_MSG_CHANNEL
|
||||
function(e, msg, _, _, channel)
|
||||
if channel:match("General") and (channel:match("Nazjatar") or channel:match("Mechagon")) then
|
||||
if msg:match("(KX%-T57 (%d+%.?%d*))") then msg = msg:gsub("(KX%-T57 (%d+%.?%d*))", "") end
|
||||
local x, y = msg:match("(%d+%.?%d*)[ ,/]+(%d+%.?%d*)")
|
||||
if x and y then
|
||||
local command = x .. " " .. y
|
||||
aura_env.waypoints[#aura_env.waypoints + 1] = {["x"] = x, ["y"] = y,}
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME
|
||||
function()
|
||||
if not aura_env.noidee then
|
||||
local function range (val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
if not aura_env.idee then WeakAuras.ScanEvents("NEW_ID")
|
||||
else
|
||||
local hX, hY = aura_env.waypoints[aura_env.idee]["x"], aura_env.waypoints[aura_env.idee]["y"]
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
|
||||
local X = pX - hX
|
||||
local Y = pY - hY
|
||||
local playerFace = GetPlayerFacing() or 0
|
||||
local playerA = math.floor(playerFace * 100)
|
||||
playerA = range(playerA, 0, 630, 360) - 1
|
||||
playerA = - playerA
|
||||
playerA = playerA - 90
|
||||
if playerA < 0 then playerA = playerA + 360 end
|
||||
aura_env.hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2))) * 100
|
||||
aura_env.region.distance:SetText(math.floor(aura_env.hyp))
|
||||
aura_env.angle = math.deg(math.atan2(Y, X))
|
||||
aura_env.angle = aura_env.angle - playerA
|
||||
aura_env.angle = aura_env.angle - 180
|
||||
if aura_env.hyp < aura_env.wipeDistance then
|
||||
table.remove(aura_env.waypoints, aura_env.idee)
|
||||
aura_env.idee = nil
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--NEW_ID REMOVE_ID
|
||||
function(e)
|
||||
if e == "NEW_ID" then
|
||||
if not IsInInstance() then
|
||||
local maxhyp = 100000
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
|
||||
for k,v in ipairs(aura_env.waypoints) do
|
||||
local hX, hY = aura_env.waypoints[k].x, aura_env.waypoints[k].y
|
||||
local X, Y = pX - hX, pY - hY
|
||||
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2)))
|
||||
if hyp < maxhyp then
|
||||
maxhyp = hyp
|
||||
aura_env.idee = k
|
||||
end
|
||||
end
|
||||
if not aura_env.idee then aura_env.noidee = true end
|
||||
if aura_env.idee then aura_env.noidee = nil end
|
||||
end
|
||||
elseif e == "REMOVE_ID" then
|
||||
if aura_env.idee then
|
||||
table.remove(aura_env.waypoints, aura_env.idee)
|
||||
aura_env.idee = nil
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
else
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ANIMATION
|
||||
function()
|
||||
if aura_env.angle then
|
||||
return - aura_env.angle
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.waypoints = {}
|
||||
if not aura_env.region.distance then
|
||||
local distance = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.distance = distance
|
||||
end
|
||||
aura_env.region.distance:ClearAllPoints()
|
||||
aura_env.region.distance:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE")
|
||||
aura_env.region.distance:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.distance:SetJustifyH("CENTER")
|
||||
aura_env.region.distance:SetJustifyV("CENTER")
|
||||
aura_env.region.distance:Show()
|
||||
aura_env.wipeDistance = 50
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
4
Complete Projects/BFA/Reset Custom Variable.lua
Normal file
4
Complete Projects/BFA/Reset Custom Variable.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
--PLAYER_ALIVE
|
||||
function()
|
||||
WeakAurasSaved["CustomTrash"] = ""
|
||||
end
|
42
Complete Projects/BFA/SCT ABANDONED.lua
Normal file
42
Complete Projects/BFA/SCT ABANDONED.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
--CLEU UPDATE_TEXT
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local aura_env = aura_env
|
||||
if se == "SPELL_DAMAGE" or se == "SPELL_PERIODIC_DAMAGE" then
|
||||
local _, _, _, _, caster, _, _, _, target, _, _, sID, sName, sSchool, amount, overkill, school, resisted, blocked, absorbed, critical = ...
|
||||
if caster == UnitName("player") and critical == false then
|
||||
if not aura_env.hits then aura_env.hits = {} end
|
||||
local ID = #aura_env.hits + 1
|
||||
aura_env.hits[ID] =
|
||||
{
|
||||
["sID"] = sID,
|
||||
["sName"] = sName,
|
||||
["sSchool"] = sSchool,
|
||||
["amount"] = amount,
|
||||
["resisted"] = resisted,
|
||||
["blocked"] = blocked,
|
||||
["absorbed"] = absorbed,
|
||||
["target"] = target,
|
||||
["time"] = GetTime(),
|
||||
}
|
||||
WeakAuras.ScanEvents("UPDATE_TEXT")
|
||||
C_Timer.After(2, function() table.remove(aura_env.hits, ID); WeakAuras.ScanEvents("UPDATE_TEXT") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_TEXT" then
|
||||
aura_env.output = ""
|
||||
print(#aura_env.hits)
|
||||
for k,v in ipairs(aura_env.hits) do
|
||||
print(k, v.amount)
|
||||
aura_env.output = aura_env.output .. v.amount .. "\n"
|
||||
end
|
||||
print("")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.output
|
||||
end
|
1
Complete Projects/BFA/Saved/TSU - Combat HP Bars
Normal file
1
Complete Projects/BFA/Saved/TSU - Combat HP Bars
Normal file
@@ -0,0 +1 @@
|
||||
!nR1cZjoYr4)lu1wfo3AcpmE9E3TPkSbwWblCqI15UZrWG0amhcjIE4xPw(TNU7rsiK5LmEtLI1EfZm9x)y6E6w9y9s6A6QE6QLluQsHs6QZ1vnX)bJYCn6WTN4pvxPY5f1vFQ74XECFDLtRue(6ZrF9SlGVnXvyQ98cUUAV66QUopQUGzW1vaihXmMnX1jWgawXXgwcZWx4y7rS2N56dp4RRowyl8MkFgEuok8SVRyYeUlUCfsCdhaF0Kpky8yjJB1OZTn73bMN(klWLvgyWcULvBtpjUEbJ4pWT9vbQepPRo4QAQAdu1Q1dalazQ6cl2Za4Q2S58qQisagWzwG1igKBD5eiQ32OthCDb2RenFPWB4yfm3ELXWLzkc80vkJMqpU14BDei2ADVfezlXeBD1RAOO1OhzBiWuGLA5WOnLap(adlMNN(is3mWbNhy5lImxYztpQN4fE6bHHz2I5mFobMbZkCdZX1eTaYnlx(eyZsAInFgSkcdC3CbqHdS1PAlxLJpd3ujHvIk(Te7WQMWgco4a5(Jh3WXg2xc3Uiya4MZe2h(QJ9zoS1tBi2Gez73eCcDaLSxT6T7RIEC(CxBM13apnspkDEKLiYrhhXsmhCsuQcS2fCqaFrMpJSAcW9wtT)YHk1UPXTDQP1y5Ww3UC4x71T)TeFhlMi9NWGL7eMyKvv0Azm1XTjcN0kREvVgnuqpyFyIUlIcwqpmKl95D)7DpZ2S1LtqSCEuxTE37uq)bYn7Simd9TI8NqlIijyE8oK6mkzqABBszlsgR4yoaA3zHYCzAt1yMNk6uPuQ8gfv5sAAXM4f5kfFKrXTiHs79vowoUsodReyh(7k0Vpdh0p0DJRXFcEwPRsdW8dAhQi4)pWibcLiekriuAfcjI9I5o71SU5fxuPy1l(u1INDoCqxLI6JpT6zPfhtUhZhDaLrsOTsQQ)2AbVhF8QVy(62NTODWwBnZ)mWZNBYnVrqwMKbY4HJG6gTlHt7dgZax09B2ZwcC7chPPdAHAkCzx5yYp9shlZ4Tw5uUIxwo8FeWmXiHLd1ICw0VmuC3iemRftLXnjdmqoEaAxcd8)KmW0a9cpc6gGl6Q16R1vcyOxAX3CMedWo6mFBN7dN6hMFa1wZ0PrIoxsxTuCIKRMY8xo8gUNhBcFTmnswfDgg6JhSWeDRsLhlsKwE94aBkBAEMLfrG3hxoKd)eCYYRxou(rmggB5WV8LLdZbhn9Bn6nas591gAdUQvnLV2OEULd9NYTxrr0hxo4uydZ6gWxnl3YJNeZ(kT1g0QrToATaKCCtnJwREnQPnOtBixB)BRdhnUv(HOgSTjJ(y5a5QWf5YrdjWhiAMB4NVkO39bZFDUptyXn1OvOk8dO9G85K7k5iZZj7Nbm7ze8hmMBhsuXqyA8KWZ3lpS0HmBtGMFgsvAmnFo0laGYNNlAkj73TPiLepDrS8kRwj)UKPuepN90RO)g2tzbIfHaGNVmGB)qbkLs(84W)1qoaQ3Fz5WsflcwSsho0O9jw4uGVKf5cQbzcx6QmMboV7NWO9R2E4VZhacBojk4(dTPKevk(yih222lYXbQ)rW)cPDVe8F2)sI(4n15Xy55JhoDgtz2t4MVfsJ3xWhYaD4XKeDbzGOhywbsUnDrgiZhsnyrKrEGzGsHTj)jIYfzIoV0bcWoJRp3gIeojlcE0jq4dzIUvEM0JzGwxowy)BXvyHRZeGApmlkrFo0rxyK7aW477FjBoxu6pBmgCTbtN9clyFavX(akDvVg309B7iNis76bXYJdsowH0ru)sQ5JJuPZJ(LuAx2e4A1RVhX12XFJY8otxfKXKp)4Yh)dmV8(YpNLKWVljJFhtk))GKZVljPp6K1)4tA)MtE)gsIFSjZFhsQFSj3pQK8hzY(JpP)XM8)DUiGJTyG3JIco(IdEpksidflKTIg2zXdzOYc8lCSr30B67PRM4nJLDgCdfA86jOe6WrzB(LNxoCJVdVUQXuUXS4UmSZEDh2OHPcSxjHnUqo23yUc2ilUh2DHeNAf79LBKJJvYDRe(vVAUvHq5SdMpIYhF933uZYPBf4bUMCqQjokNwQO82a2qVz))5MmJDt101zrB7MUy3VcBVg2smpWvF2Z1J6k0i6kcCCt0E3)CXV7v6Uh7DLwChrtId2sTv9wt2E1U9160g7c6Q24U7MOwSq14gPDPf4XkBA2LDAOuFL4FanIDkxmzk2B8QPB6i7Pi1(vczOorTcUCXD0b8WBI4YONAyI9lt2mzs21IAAzB0fzmZGFFntZU2E3FhNnRgyL9U)gUPGDF4k9Ux9FhWC5dAgyzD3ub2Anj2HTj88ex0vXW2j7rrj9A)1wABRp)rOCzOPdSLwIxEH5cPF1GycFXIqrUvclMmIdfT(HT5lQDFMcpS(vCQE06v)aKn5dlhE6YHFGcQ(quFypGgMs(kHk4zPAx6QgO2syAYTb7BJVHTdFd3sNQPZGWwpEzYMq(gRlFvErSKQcyXcq1IyrCHifxby0Byfx5k1l7FMu98flCoawXWFGQwPxyARRgxxHQjxnEGnOzZdBi7OTCBKBt7xVEAzDRrDL9bMlWf7u9InV9jB7DkaccRzXFAHXwoGeNNgJklF53rk)jsdoHQApF4GR9YIheSWq)ebZ1BmxwuItKYRPzsxgtAn1kbuHEerZcWrVRXRnhhOz5DZ8SBZuMmx7SUG1mFBCLrVYeXOYR7G8aoZVcQeVY(6mFKH1kLHnQPbeu)TqOOxPDf4NFWGtgtacjtgwOaKqFwUDXTZFf3(Cw525j52n7KBzg7pNe7VMBd1WrzYtFlVpkVcu6VacwGVdLshp88aofwy)auadDfHjoEVdFmE6oCURJRakxl82IA1Tx7FVRIwToPU4w5nxjl1lXvyHc3dHLUbJsLKHJaVcvi7LVo4kiKZrFBB3Yzug)TnFKMb10VG76)CI7qvEHLachIWAplwulUhrn04(Qcr2Uiu5aebkJkSdajP)1VeXp1szryAEw1YLkFEXlkwUYN(8N(Cz0gvzJcyIB5oYeLe0IRCFYaOR0APgF8IzQAjX)uFwbSsvmey1QLbg(rxu9loqUrSYI1)tOO8zYPFalePmYq9)7
|
1
Complete Projects/BFA/Saved/Warrior CDs
Normal file
1
Complete Projects/BFA/Saved/Warrior CDs
Normal file
@@ -0,0 +1 @@
|
||||
!TZ12YjUUs0VMtvZ8WzkWHC7rcHmd1MauyYK9CEWjcJWOjglgBryipKV9tljB8nzWMBbsrvPsiGSKCFz1l1DBmkB0Zq3Zqx7BL1(2zg6Jn0hW)bExKRztSJfBKrRZUOKH(FBpCOhMz06)Qvc(35l(3YNFfmAhZru3ouIdZqVw9w9Q3fM4jitSrly09rMVy5sN6aZElQdgUatgH64jwFgYLbVaUYHehI3i5RHxkFx41mxILf2Lp8wI9S)BWF5aC)Pdh2B(eyw)r9MDU7HMWNl(x0uxKgFFGTTBmWtoVEt7JFf7W0HRI8xd9NQvvV3t69Q2fMSP8fvFInAom56oOXy)RsCjWcGr2GizXK0XflMe9o1B2KpUPoHBnMCZBsTNo2rxkmkBO7IgqM6z0sih9W2d9fBnRFhxUBtSCIidziXSXLI2uKq1m1d)KPnYZJlhMIf3GM8py8uBgjqMjhbx(sCSSHr9y1UDB0UBIH5rEdN8AzCfkzmIHn6dJWezl359PUd4YfPk0fBbQqPGFWCqwrm564jWvqbfQUJyuMuNHelPquoPWffvTRpa0s838jPsZddxYaVaDOywGRDmI4K)rVWqkFJxOLCGDKd7oWYKc3JDREBJh05MHmSRdY(NG5hFN3Q85bcIaxaq1y5sgiLeDVfwDxWWb0nigsi3iGz)Jixxc199NRDRhF80zWyB89F0tEXpsgWD1opWv6o(uiNr9ADRxVf3AMbFq7jbooCRn(mpPYvtqoFXE6zG7RlLjLWcdgYyWCMpPWYfAaYLaKOZIhUPyK9J6P2WX)MJlCcD8W)LP5BW2RDh5Bu(ok4pXnKAv(cHbp1vEf8F0e)(mXVRW)nlc8rPmWomPu7b0zo6ZiGm4g4nM6XOJ7bR2dtgWTm1N6)3GHwFGLyKe4(J)x42YYMoRMy3WTJzeZxMFRV9a)De3m89UHEBVziBqy(cgpPk3FI1LpmX1f6IgS7eY9MDMznHq7019x(IHAWubMPJfqfnAP3426G6XLA5I98aOctI0eQI)4tmRl2o3zJSaJK2p0RzJwWumctSgbcRkLwouihya1h8(6FpDGqwyHDWUet9r0zTbufp4VvTNHM7LeQBjOOGBbdWRwbWjS0Iz8gvWM18vrV)ChFPX7p)fDoS8xZclfGxq2IH0cMoWxbzBphqYahi35Y1ZBXNEtkq(fFuRRVSYfA8Bx)9c4grdHfm0llNmWB18fFZMNIl2UjjW(seRCSeWIpUEHlAJo22ovHWFVIflwWnaFDLAHAcK7(Y4xbctUJBCzalMKgawnhH9uVmjIEfx1dl83542pzcU9cqaH8auzmYeHdGY4NjuxXI4Ash3N4GVxUNK7MM0zyVvf)vLzOIOQ6diE)EQJ)DhYzUKqXR4EYHjm)LinPdAEZojG5Bu6ybCMWZUUdQVnEaFTuaBlC0JbwaU6s0coIL82V)ugJ60(vSlONIGZgIvjMMiR0mzmKkLwScRehoAmCbUjW)yYizuRfRys4Of4uHq((WFRC9eJZq))mjcHYsHq4C49BjElUJeReaFCNVB7nClepaoY1NBchhobYGYa2jJiNzqwU8NpXrPTqCaLGNy9oKzWumk1XibiJKa(QaeyeOlUK6vKlHRpm0PobW4831EAGhM5iKJfoCAKF2nIiFtWUS5XuASiqKPxqTOlih1OWlLqb6ViNTE3vLYEPAv6BNhD1KElSqQ((t1nYnYQ9iweTih8Q2LKMuB8SWGjQzeln1kL(C5JDLApQi22zz)hXJkFJo0JkxJNLnSuAMK7zsEj5NSmEEzeVEBq4loxZcs7lgdSeK9A4WGdKawQcyD4UAkBLu(sqWlcdWZ1QCHcspXP85tEDdz6LHWE508uqatSxbNblCbP2frjetdxT79cn8sP2LKVPk1aBBr1ltsXhh89c5jfLiJ4GH)Pwp2pP32KuD2gW1lVSPuHLKj9M1NxysYMbeLuqgmFr(YIySp9qZ8D7dwG6)kc77aAIkOlZvnkbwItPmjvXeSQJsTpdsIbjGqrIdoX6AhZ6kZ8WeSXoIsG1sZ6D0ON7KO)jINgjWs0C9KNi9XJ8MiuF1xbhn3IKqNYLU88lRKd6jPyjLkOFmcmByO)4cO1iCFGaQiH7Zq9U0eoL)4)(6g2HB2DsIiV2z0nmCEAY95mE2AZ2p5PP2xuycIF2nRZVen(2UKhtwNZkzOxvcY0mvsgap7uZRG7suYCrP44ZkjRSWLJBYuuuuW)Htrjaqm7Zuhn5Izr0tqeT3V(XF60yc9pdDpLfRt8Pwh(uX4gZXRYlhQOosNsC1EoXvXlgXN7YsUQc7viMQQynMGWAtKhdo6idXBMLvXADzSHIsPv76lpFzzpkK2AinZnKVQYY(vGIrgvoW2eoSzLYQa19hx1i)0KIQ0CAf8dOwoFXs7XrFD(2ROK5UsBfGrx8e0KxcxzvMYvxB2fPGAPvLu)UePBkh7jrFJefaPaNTiJs9UIkwQ4Sob5x4e5PDm5jZ8u(VZp0yuLv)tTnlk1rwZhPpIGTh8(ZpISTlsQQU6YYPiOKMnuS47r5V8XLrQmelRFtgTLYivmfXbEEPwV8qLoI0(pHuf7m479oSAFLwQq(tFajIAdY0uekmzFkpobMYzZXjGyJz(40ehGubFT8KZQaMmcUPDnR241)3VUVr9MXlUMQtSFG3y5NyzTZl5xO9fSDU44RJQ(yR1xXlLwbPzLM0tcgw3IhtDr2K32kD8t5Y8hzPJVo(zVN(KK8RuPgo074N19564qobUQJBhpU6UMfyYKLSV45Lkh9bNhLtl4ReZXETrAVv3A3s(7VPcn8r1ovkosqIM0pS2KCwDAXOkVC6DzYMLlRvIjNdcHRQdQI7zMvtuPIN3PoQ6WQJQU8yj3vfbRmIxz(oZE2NRBN3O4hYh8zFfVq9jclABeSxYOGc4VTYdTvsexZ1Q6iX63LSEWV8d2SYimbrJQSYgErCkG3FUlEOn2uEoNuPmyr8UL3Wlxm8nTownAn93FpwWKTw1Pp4BNsfcZ8NUATZUwR0QYv6(8bN9typvMwbDCLg7t8T2ZDC1vhcjZkZAcMGWKYyXhzN9ozWN98PU)iRYAUkvzrIvTShYpyhB(Ymuac6wOnQQCX1xC1UTnQoaBZNLCgFLFFXCgQI2pB7D)GgEBTU(jS5M3cT7tiBV1JhBgjeSyvoRiu61uuNo(DEi1x1h7tw5SfEbzFoYLKrLI3(pfRWehuX7xmDjJ2FKfJps6qGFD9HAwu2gfL6yRtFyu3XV)8naB(c)mPvsza0D6tHwbchL4loLCsutb(HASSpGUu5uUVs3qRhPP9Ad6OMnOvGZQamXlOsTAfOGk5TFzIcZS0c8S8eE9DQ5dTTF4l)lQCSW(QoN2H8b5)SeyFzflPCPprp)57PSMM)urUgnKYQEsF(b2LsmF)5My0KnOzuU48kv2nnJYg8GsFKLtMSEqnuEAPDnXdLCN27DbBwFTK2OZ)49tYxip8p0T730Gg63xzN0leX7Mbnvpo)HyJXPXUKYPkJHVYAALNoKql9xKmXXgst(Dv9arUEQ4v)vq4g9aVEkQ)U(48WN9kmrv04sjJ))d
|
1
Complete Projects/BFA/Saved/Warrior Rage
Normal file
1
Complete Projects/BFA/Saved/Warrior Rage
Normal file
@@ -0,0 +1 @@
|
||||
!TZv8Vjoow4)xQ0j1kTTccTDNkD7jbu4kZXaDiW25wTciKyGSnKWMeANo)a)TFVNtCIDIdyOq3z2RIQwiX25z73777ZpB6WYd7pupyOU2fL1UOYq9fd1TWFGRoXW8rlFVL19C88Hl0Pm9hn6VRq)9Ld7u6IRggcf2Z3I4xlUkd1R5y)TVz4BTECFppNqB4sFT70PbKqOkSIpCc7DnSMrgQ3XZf(TpzMTNB)xwcVFMV3QLScPB)nc8yVEOUXQW5E(DxgcfmamTedqjB1WKvp9Gqd)WOgW21o(DtH3gmN(E4tH(2ZMr8dIA1(jxaFRfzYQPtJm17A0((MdAd3N(rJv(gAWdyjXXPLvSrgSAc5jIBOoul7VouFu9Q69hP3VApOXCnwqYuU79j0YPFFJ2qltVg8KigoHZhQVcTy9LogVawti(5utlmY4n9CNApJ1bdj(Ugo)k0zG(p0BUcEsMgo4Gk8oIZ079SXhqTU9739tTB0eSkBWD4bdFFBp)1JRTYXjyo(unCnHzG4YxVrN(n6bdC(qxagFmcnOnzuHAIxnAmsVEVgn6WMSy(dxXUqlx6NldvDf(Cx627ZFzI799QBHnM9cdCIJFElEW2L64ybd5ybgfDXac07HrEWaxyy7QEPtM)vR8rdZw2CoJoEg0qiy23e)7IvqiaZHY0Xiii3vdqN7mxeU8lSbPZ1kvIw7u)qYxd1YmdGxRCtpWdJgRODjxy35v04BVFUubZIMqaRL3ZU6pBdD0Af44yUki0BrF45nyPLrimISk(VS6tJPXQdJo4F3uG0QaYOzexIVTP(CVN7sRG4f0dG)w15zJxckmazdXJGht4QamijokcWq8IEWgtc88N8jplQ5YfggxY6XDO1JV33BMpjiy94t1Xa7ZYeecyxgo070bAfWSMBtCamqDhJfrpRGKBwBNahsRxhTk3OPL6pouVCutdXDMpInl(bQzvllQWggsdziJpr6hvE6asNZltD7G2KbKdG2psilRIo3H9qBaVeh8HGZydxJjoel0U(Eoc2Iea(h(Odm0zM5498MPsktPgWoOKoTggb20Xyg4V1Dq)2T60yO(CI9S5qG31xMIpGZuMElMyeg7o8krlKWlsbsFGuTzRZ65QvAfhgbyCbpB4yfB01HlbJYlO(8T6O362grJerXttwfg6529jIp4Rh3kkmgviha9zY8oMKydBTb5LhqHw2r(CShL88eHkdcTnF8LBzbwtYZOr71d1)hlJRF0B)MN3cQSgg0hclERDqQNpI1uJ7zouVPV93wp(ZRmSWghKjfZ1kczKmxL1BYWz58it6zBlqma1TYC7JEIccGjZaQdp4iM6Zpjz2vIdHavxeoU5Cca8WbOJM1tg(2y)FOUNldafVQZkcZuMB4oJK2mr3dgLwckij(HVievg5Hd9P96bwsXhi15imv9uCZevgk0pW4yAhrdEzIbPivScZp7d)SeO3dl7SavZgyL5iE2dQ4c40fjyvHsMJbpdFC)5RCbDMRhx3Xy52jKt5CVUYLv2cdTujm54Lf0ACWyNLQqtcjTCg4c4f55o5yGvR0PmWkv(W8Qfkgc6TLRor)mkF(yrCRkBkp8TeY(9LhxunahJsknZ(tpxmhMuEBo26uo8qP81BHonpDoh9Dru1jC5C87m6BM0bKNodusw1mkVuyQ(Sop07dZ8BoR5Q2BKwwuf(7uXIuXvyuXzD0aVlZhdItFKM0iNOIexXO8q9cx(QKseNpLtLOXeLOXeL4Ij8agpc6PbTD3ID9lsYkghnsbXdsecmXG3aBE5vAL1UU0hkPv5NVbEnC65xvrUrlIYkDmha(m8FmAy6)shNeWhPaGBfEmW2Dg6Q8q1E9A1TNI4L2l2wY(Igrw45foNPriMeUQ1FaYJiweRpztHf4XSW82bdAmpcgQXkFmM9XxCSrxdQtMaMjDKOpRGTq(4PgMKFVUbGc5oRMH)VpO15PF6CDScX1J(qWEKyBMc(sbjkDZx9(Tq)QbDITjf6)kKw2ILkIpJyW2sBwGygDDOSQ5iSvqif1suNxUexiM)L4YEV3ZOEpEjLfiqCjwsQfqtJPGeooPGI6i3QuU0wTaXSss46UQq775eIWY(Fl3M(OxzSphDEihVAm6zHmXI579YyVDQkpQBFg86eoyA0rnhIRfDWuV6T3kFFjka4vmTYXcsMiBRiyDZAcGAFHFZkQjBZkI1kvPujXDPGz89qOFyuk2(h0VBmCEGnEHET(33fVvl4wD4AT5ovPOLLaT7D2wweieQtJFfH5JUwSQ1kLsLSqVXdrgz5sSzkfqoSSdWyfexOhTzJs6boDLIjGWs9mWrdHolT7RSciMy7kxLfD24Ru1wP6HOpffmEpFBi2ogL5UU9A9BD70VA78jQNRx2Mmf7KUcISPER9lAyCVvuCEL3mnfsKtRB5nkc1h9qIFN(6pIuFJiUpDreG86X)Y6XL4Vm8Mw3sV80vU0N2Pu42Zw)X1JJEnf3MiBAzk)tRhFzP1JT8sVn7LJNPHZ6Xi8mTSdalRgaXE6jra0Na11(S81ZEkRsHZjU5VF(Y9lqRtnYTvf2lFcWH7IDIclkGhL)MeNasXvzIpX4rjvswlHgVDKLJJFB2SzMRRTZwAE6hGFDK1uQ9MOPe)akRWpcw4V)cmf5e3QIrvrkpg6irSKeacUG44G(yiKmWkNEsRzUE(qe79GYMt4QggoG1rECqCJYbzbESeZWtlF9pjhxP1TNjbzHfhf3q5IAw)XnWORUs586DZPwMtXRO0wLKLglWJHQxqowLk7nQoJMtvMGExw8SdjZOxCXf5Nudi8J9vGHzXIHtIbXWXNqfUpQ6GEvhv9(7B3QXTNSEmsCiRe9A0Sxd97ozloajujSP)lZzdzQHjSymmboP156cRcA(jLpMVcZmCIF1zGNd4KWr6i6pVny89m2i7lzu47x8WsFaZ)0mT3zj3xrQMmRMtCXzr(wjRJqNDLOC1dT2hJRpiGQE3pvRA)rT7(VhbkE70F0GonB1gOJAaJyd60Q)O7AuTD)7YS8Yyx6OyIyBrP9ziDHJswNx8M(u06F3yqMG5L5a9uKLjfZGHriA3IX7YS9ksTDwCUWagRdPMzMD68hEsGFkx8eCLYY8Yf9BFZ62jMBMOEjKxySeBowM9XAQq)vewNIMA3KSbPa1r8Mkao2sZocSyR)G(OFcLb5(I08LuzhZwY3hBE1oLTeA28(pD9A9TgdEWDGHSLHAUTCKSTuUin1jYwE9oL7b2A1PZhXPyyNZhtsgs2uIv2YzhKlFnSK6KpTkfNAtCgGpMtsguYNrJmj)41Kkf3c2OIIsTdF6OYMyL8PGknHx7BAP5Y5cFUYuoVk5s4NyovU6iKtLRpKzuj(SVY7zDCxRCr3PsH3599PzV2NgvGnvB)y(tc5bNV8N1o17pvED05cMpqlP0CUHpUFQB(uZkkvmZ(MuS2tPNQfHfIYF6uV66RO7VlApJWnZ1iegv0)x)ISTjsuwRQhp(mlQvLZeeBacvDxWH0TgOr7XTEOGeoJtz3jRSRJp5O)OWgiDGp9p)iQwAIm1s8h5fPPRpsN0K3M9ssC3DuoZzPmYYKGXuvPD1Hst0gu(KtLuEHo8NdvAubSShjkKYOhQ4tEXEVDtkK2rzsMyktlqPek2y3o7rPFhkkJOBm1r12r1ZcYNalTFR6vBpQvh4T671rRnbvdhCqe2OZrJUwXNXMJMoK0tUt2Xewct4mazF5SY2i(SAhRLyF1YkQffxFjOv84CsHoxRivO5dYExU57YnvuUjpf4(k08qCmF4vAozN25IcYTQIBPrE1K)ZCQjf0IP8xLkQy1)QLtMp3U7YxfobDMYvX)xHsZVVpftsvAMLOyVzC41Zjp5DkkEu5K4LOYDN0JKOCoJ(MD70PQWXJQCHNZk1oFucNMPTD0Nuv04(CQOYi5vUQvjYN12H8qTJFlQtxArMvOKrLQIlZ5ntJA5)oQrv6cuPzlQ(vglQU4MB(TpJIZ78ZhjfO)WR)89JG(7AnLFqz2ZeBkvp1bqcQ8eAQ65ENteA5B(qLsx(Q1DsLNyswg(6(hnqMSjlCsdExP57knpCkn)W7knpeknRtdwPzO9)7LyMK(tMyZdVet(oYFHYjVkCsJpE6IP38mDd1)WX4lPWRkzM7e8W7ko)HuXPCASJHetvrAFD7K(w3p3Ipx2z2i78Q7oCz6CJ6GZ9p3Qnj997pfNt24bri9)KgB4)8DVVp6Y1CsPnM(fpVblDFP8NClGDzRkkZOGtzHJ72oUUdYjsohIYoCHzLUC8oSHkl(Ix0MMevLf8nV81S76zp5Ispfszu7w8I43W2QNOZpzzcCse3RV9Mhd9HL)7I(qLs5ZUVSsAB)eyfxQH9JH)V)
|
22
Complete Projects/BFA/Second Wind.lua
Normal file
22
Complete Projects/BFA/Second Wind.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
--UNIT_COMBAT
|
||||
function(_, target, event, _, amount)
|
||||
if target == "player" and event ~= "HEAL" and amount then
|
||||
aura_env.lasthit = GetTime()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function()
|
||||
if aura_env.lasthit + 5 < GetTime() then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
return 5, aura_env.lasthit + 5
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.lasthit = 0
|
132
Complete Projects/BFA/SetupChat.lua
Normal file
132
Complete Projects/BFA/SetupChat.lua
Normal file
@@ -0,0 +1,132 @@
|
||||
--CHAT_MSG_WHISPER
|
||||
--/run SendChatMessage("hi", "WHISPER",_, UnitName("player"))
|
||||
function(e,msg,sender)
|
||||
sender = sender:gsub("-.+", "")
|
||||
msg = msg:lower()
|
||||
print(sender,msg)
|
||||
if msg == "setup party" and sender == UnitName("player") then
|
||||
aura_env.party()
|
||||
end
|
||||
if msg == "setup general" and sender == UnitName("player") then
|
||||
aura_env.general()
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.party = function()
|
||||
print("Setting party up")
|
||||
print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == false then --Say
|
||||
ChatConfigChatSettingsLeftCheckBox1Check:Click()
|
||||
end
|
||||
print("Check4 " .. ChatCOnfigChatSettingsLeftCheckBox4Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == false then --Emote
|
||||
ChatConfigChatSettingsLeftCheckBox2Check:Click()
|
||||
end
|
||||
print("Check5 " .. ChatCOnfigChatSettingsLeftCheckBox5Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == false then --Yell
|
||||
ChatConfigChatSettingsLeftCheckBox3Check:Click()
|
||||
end
|
||||
print("Check6 " .. ChatCOnfigChatSettingsLeftCheckBox6Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat
|
||||
ChatConfigChatSettingsLeftCheckBox4Check:Click()
|
||||
end
|
||||
print("Check7 " .. ChatCOnfigChatSettingsLeftCheckBox7Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat
|
||||
ChatConfigChatSettingsLeftCheckBox5Check:Click()
|
||||
end
|
||||
print("Check8 " .. ChatCOnfigChatSettingsLeftCheckBox8Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce
|
||||
ChatConfigChatSettingsLeftCheckBox6Check:Click()
|
||||
end
|
||||
print("Check9 " .. ChatCOnfigChatSettingsLeftCheckBox9Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce
|
||||
ChatConfigChatSettingsLeftCheckBox7Check:Click()
|
||||
end
|
||||
print("Check 10 " .. ChatCOnfigChatSettingsLeftCheckBox10Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == false then --Whisper
|
||||
ChatConfigChatSettingsLeftCheckBox8Check:Click()
|
||||
end
|
||||
print("Check 11 " .. ChatCOnfigChatSettingsLeftCheckBox11Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == false then --Blizzard whisper
|
||||
ChatConfigChatSettingsLeftCheckBox9Check:Click()
|
||||
end
|
||||
print("Check 12 " .. ChatCOnfigChatSettingsLeftCheckBox12Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == false then --Party
|
||||
ChatConfigChatSettingsLeftCheckBox10Check:Click()
|
||||
end
|
||||
print("Check 13 " .. ChatCOnfigChatSettingsLeftCheckBox13Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == false then --Party leader
|
||||
ChatConfigChatSettingsLeftCheckBox11Check:Click()
|
||||
end
|
||||
print("Check 14 " .. ChatCOnfigChatSettingsLeftCheckBox14Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == false then --Raid
|
||||
ChatConfigChatSettingsLeftCheckBox12Check:Click()
|
||||
end
|
||||
print("Check 15 " .. ChatCOnfigChatSettingsLeftCheckBox15Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == false then --Raid leader
|
||||
ChatConfigChatSettingsLeftCheckBox13Check:Click()
|
||||
end
|
||||
print("Check 16 " .. ChatCOnfigChatSettingsLeftCheckBox16Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == false then --Raid Warning
|
||||
ChatConfigChatSettingsLeftCheckBox14Check:Click()
|
||||
end
|
||||
print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == false then --Instance
|
||||
ChatConfigChatSettingsLeftCheckBox15Check:Click()
|
||||
end
|
||||
print("Check2 " .. ChatCOnfigChatSettingsLeftCheckBox2Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == false then --Instance leader
|
||||
ChatConfigChatSettingsLeftCheckBox16Check:Click()
|
||||
end
|
||||
end
|
||||
aura_env.general = function()
|
||||
if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == true then --Say
|
||||
ChatConfigChatSettingsLeftCheckBox1Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == true then --Emote
|
||||
ChatConfigChatSettingsLeftCheckBox2Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == true then --Yell
|
||||
ChatConfigChatSettingsLeftCheckBox3Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat
|
||||
ChatConfigChatSettingsLeftCheckBox4Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat
|
||||
ChatConfigChatSettingsLeftCheckBox5Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce
|
||||
ChatConfigChatSettingsLeftCheckBox6Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce
|
||||
ChatConfigChatSettingsLeftCheckBox7Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == true then --Whisper
|
||||
ChatConfigChatSettingsLeftCheckBox8Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == true then --Blizzard whisper
|
||||
ChatConfigChatSettingsLeftCheckBox9Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == true then --Party
|
||||
ChatConfigChatSettingsLeftCheckBox10Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == true then --Party leader
|
||||
ChatConfigChatSettingsLeftCheckBox11Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == true then --Raid
|
||||
ChatConfigChatSettingsLeftCheckBox12Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == true then --Raid leader
|
||||
ChatConfigChatSettingsLeftCheckBox13Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == true then --Raid Warning
|
||||
ChatConfigChatSettingsLeftCheckBox14Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == true then --Instance
|
||||
ChatConfigChatSettingsLeftCheckBox15Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == true then --Instance leader
|
||||
ChatConfigChatSettingsLeftCheckBox16Check:Click()
|
||||
end
|
||||
end
|
110
Complete Projects/BFA/Shield Block.lua
Normal file
110
Complete Projects/BFA/Shield Block.lua
Normal file
@@ -0,0 +1,110 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local bloq = select(17, ...)
|
||||
if bloq then
|
||||
aura_env.dmgbloq = aura_env.dmgbloq + bloq
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local bloq = select(20, ...)
|
||||
if bloq then
|
||||
aura_env.dmgbloq = aura_env.dmgbloq + bloq
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_AURA_APPLIED" then
|
||||
local dest = select(6, ...)
|
||||
if dest == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Shield Block" or name == "Last Stand" then
|
||||
aura_env.numbloq = 0
|
||||
aura_env.dmgbloq = 0
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.numbloq = 0
|
||||
aura_env.dmgbloq = 0
|
||||
aura_env.color = function(damag)
|
||||
local damagcolor = "|cFFFFFFFF"
|
||||
if damag <= 0.25 * UnitHealth("player") then damagcolor = "|cFFFF0000"
|
||||
elseif damag > 0.25 * UnitHealth("player") and damag <= 0.5 * UnitHealth("player") then damagcolor = "|cFFFF8000"
|
||||
elseif damag > 0.5 * UnitHealth("player") and damag <= 0.75 * UnitHealth("player") then damagcolor = "|cFF00FF00"
|
||||
elseif damag > 0.75 * UnitHealth("player") and damag <= UnitHealth("player") then damagcolor = "|cFF00FFFF"
|
||||
elseif damag > UnitHealth("player") and damag <= 1.33 * UnitHealth("player") then damagcolor = "|cFFFF00FF"
|
||||
elseif damag > 1.33 * UnitHealth("player") and damag <= 1.66 * UnitHealth("player") then damagcolor = "|cFFFFFF00"
|
||||
elseif damag > 1.66 * UnitHealth("player") then damagcolor = "|c" end
|
||||
return damagcolor
|
||||
end
|
||||
local fontsize = 32
|
||||
if not aura_env.region.blocks then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.blocks = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.blocks:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", fontsize, "OUTLINE")
|
||||
aura_env.region.blocks:SetTextColor(1,1,1,1)
|
||||
aura_env.region.blocks:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.blocks:SetJustifyH("LEFT")
|
||||
aura_env.region.blocks:SetText("0")
|
||||
aura_env.region.blocks:Show()
|
||||
|
||||
if not aura_env.region.damag then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.damag = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.damag:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE")
|
||||
aura_env.region.damag:SetTextColor(1,1,1,1)
|
||||
aura_env.region.damag:SetPoint("CENTER", aura_env.region, "CENTER", 0, -32)
|
||||
aura_env.region.damag:SetJustifyH("LEFT")
|
||||
aura_env.region.damag:SetText("0")
|
||||
aura_env.region.damag:Show()
|
||||
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val <= 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
||||
aura_env.auraID = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return i
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
54
Complete Projects/BFA/Slabhide Farm.lua
Normal file
54
Complete Projects/BFA/Slabhide Farm.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UPDATE REMOVE PLAYER_ALIVE
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "UNIT_DIED" then
|
||||
local name = select(9, ...)
|
||||
if name:match(aura_env.farmanimal) then
|
||||
local date = date()
|
||||
local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][#WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] + 1] = {["h"] = h, ["m"] = m, ["s"] = s}
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count + 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE" then
|
||||
return true
|
||||
elseif e == "REMOVE" then
|
||||
for i = 1, #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] do
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][i] = nil
|
||||
end
|
||||
return true
|
||||
elseif e == "PLAYER_ALIVE" and IsInInstance() == false then
|
||||
ResetInstances()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local output = #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count * aura_env.prob .. "%\n"
|
||||
local date = date()
|
||||
local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0
|
||||
for k,v in ipairs(WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal]) do
|
||||
output = output .. v.h .. ":" .. v.m .. ":" .. v.s .. " -" .. aura_env.round((s - v.s + (m - v.m) * 60 + (h - v.h) * 3600) / 60, 0) .. "m" .. "\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.farmanimal = "Altairus"
|
||||
aura_env.prob = 0.8
|
||||
if not WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] then WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] = {}; WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = 0 end
|
||||
aura_env.ticker = C_Timer.NewTicker(10, function() WeakAuras.ScanEvents("UPDATE") end)
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
77
Complete Projects/BFA/Stat Recap.lua
Normal file
77
Complete Projects/BFA/Stat Recap.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
--EVERY FRAME
|
||||
function()
|
||||
local crit, haste, mastery = aura_env.round(GetCritChance(), 2), aura_env.round(GetHaste(), 2), aura_env.round(GetMastery(), 2)
|
||||
aura_env.region.crit:SetText(crit); aura_env.region.haste:SetText(haste); aura_env.region.mastery:SetText(mastery)
|
||||
if crit >= 15 and crit < 20 then aura_env.region.crit:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif crit >= 20 and crit < 25 then aura_env.region.crit:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif crit >= 25 and crit < 30 then aura_env.region.crit:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif crit >= 30 and crit < 35 then aura_env.region.crit:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif crit >= 35 and crit < 40 then aura_env.region.crit:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif crit >= 40 then aura_env.region.crit:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
if haste >= 10 and haste < 20 then aura_env.region.haste:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif haste >= 20 and haste < 30 then aura_env.region.haste:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif haste >= 30 and haste < 40 then aura_env.region.haste:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif haste >= 40 and haste < 50 then aura_env.region.haste:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif haste >= 50 and haste < 60 then aura_env.region.haste:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif haste >= 60 then aura_env.region.haste:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
if mastery >= 15 and mastery < 20 then aura_env.region.mastery:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif mastery >= 20 and mastery < 25 then aura_env.region.mastery:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif mastery >= 25 and mastery < 35 then aura_env.region.mastery:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif mastery >= 35 and mastery < 40 then aura_env.region.mastery:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif mastery >= 40 and mastery < 45 then aura_env.region.mastery:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif mastery >= 45 then aura_env.region.mastery:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
return "Crit\nHaste\nMastery"
|
||||
end
|
||||
|
||||
--INIT
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.crit then
|
||||
local crit = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.crit = crit
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.crit:SetFont(font, size, flags)
|
||||
aura_env.region.crit:SetTextColor(1,1,1,1)
|
||||
aura_env.region.crit:SetPoint("RIGHT", aura_env.region, "CENTER", 96, size)
|
||||
aura_env.region.crit:SetJustifyH("RIGHT")
|
||||
aura_env.region.crit:SetText("11111111")
|
||||
aura_env.region.crit:Show()
|
||||
if not aura_env.region.haste then
|
||||
local haste = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.haste = haste
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.haste:SetFont(font, size, flags)
|
||||
aura_env.region.haste:SetTextColor(1,1,1,1)
|
||||
aura_env.region.haste:SetPoint("RIGHT", aura_env.region, "CENTER", 96, 0)
|
||||
aura_env.region.haste:SetJustifyH("RIGHT")
|
||||
aura_env.region.haste:SetText("22222222")
|
||||
aura_env.region.haste:Show()
|
||||
if not aura_env.region.mastery then
|
||||
local mastery = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.mastery = mastery
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.mastery:SetFont(font, size, flags)
|
||||
aura_env.region.mastery:SetTextColor(1,1,1,1)
|
||||
aura_env.region.mastery:SetPoint("RIGHT", aura_env.region, "CENTER", 96, - size)
|
||||
aura_env.region.mastery:SetJustifyH("RIGHT")
|
||||
aura_env.region.mastery:SetText("33333333")
|
||||
aura_env.region.mastery:Show()
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.c11, aura_env.c12, aura_env.c13 = 1, 0, 0
|
||||
aura_env.c21, aura_env.c22, aura_env.c23 = 1, 0.5, 0
|
||||
aura_env.c31, aura_env.c32, aura_env.c33 = 0, 1, 0
|
||||
aura_env.c41, aura_env.c42, aura_env.c43 = 0, 1, 1
|
||||
aura_env.c51, aura_env.c52, aura_env.c53 = 1, 0, 1
|
||||
aura_env.c61, aura_env.c62, aura_env.c63 = 1, 1, 0
|
160
Complete Projects/BFA/Stun Counter.lua
Normal file
160
Complete Projects/BFA/Stun Counter.lua
Normal file
@@ -0,0 +1,160 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED RESET GROUP_ROSTER_UPDATE
|
||||
function(...)
|
||||
local e = select(1, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local caster = select(6, ...)
|
||||
if UnitName(caster) then
|
||||
if UnitInParty(caster) or UnitName(caster) == UnitName("player") then
|
||||
local spell = select(14, ...)
|
||||
if aura_env.spells[spell] then
|
||||
caster = caster:gsub("%-.+", "")
|
||||
caster = caster:gsub(" ", "")
|
||||
if not aura_env.stuns[caster] then aura_env.stuns[caster] = 1 else aura_env.stuns[caster] = aura_env.stuns[caster] + 1 end
|
||||
local output1, output2 = "", ""
|
||||
for k,v in pairs(aura_env.stuns) do
|
||||
local class = UnitClass(k) or ""
|
||||
output1 = output1 .. aura_env.classColor(class) .. k .. "|r\n"
|
||||
output2 = output2 .. aura_env.classColor(class) .. v .. "|r\n"
|
||||
end
|
||||
aura_env.region.text2:SetText(output1)
|
||||
aura_env.region.text3:SetText(output2)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "GROUP_ROSTER_UPDATE" then
|
||||
aura_env.stuns = nil
|
||||
aura_env.stuns = {}
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text3:SetText("")
|
||||
elseif e == "RESET" then
|
||||
aura_env.stuns = nil
|
||||
aura_env.stuns = {}
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text3:SetText("")
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
aura_env.region.text2:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
aura_env.region.text3:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text3:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", 100, 0)
|
||||
aura_env.region.text3:SetJustifyH("LEFT")
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.stuns = {}
|
||||
aura_env.spells =
|
||||
{
|
||||
--DK
|
||||
["Asphyxiate"] = 1,
|
||||
["Gnaw"] = 1,
|
||||
["Monstrous Blow"] = 1,
|
||||
["Blinding Sleet"] = 1,
|
||||
["Death Grip"] = 1,
|
||||
["Gorefiend's Grasp"] = 1,
|
||||
["Mind Freeze"] = 1,
|
||||
["Shambling Rush"] = 1,
|
||||
|
||||
--DH
|
||||
["Chaos Nova"] = 1,
|
||||
["Fel Eruption"] = 1,
|
||||
["Sigil of Misery"] = 1,
|
||||
["Sigil of Chains"] = 1,
|
||||
["Disrupt"] = 1,
|
||||
|
||||
--Druid
|
||||
["Maim"] = 1,
|
||||
["Mighty Bash"] = 1,
|
||||
["Rake"] = 1,
|
||||
["Typhoon"] = 1,
|
||||
["Ursol's Vortex"] = 1,
|
||||
["Skull Bash"] = 1,
|
||||
|
||||
--Hunter
|
||||
["Intimidation"] = 1,
|
||||
["Bursting Shot"] = 1,
|
||||
["Muzzle"] = 1,
|
||||
["Counter Shot"] = 1,
|
||||
|
||||
--Monk
|
||||
["Leg Sweep"] = 1,
|
||||
["Song of Chi-ji"] = 1,
|
||||
["Ring of Peace"] = 1,
|
||||
["Spear Hand Strike"] = 1,
|
||||
|
||||
--Mage
|
||||
["Dragon's Breath"] = 1,
|
||||
["Blast Wave"] = 1,
|
||||
["Supernova"] = 1,
|
||||
|
||||
--Paladin
|
||||
["Hammer of Justice"] = 1,
|
||||
["Blinding Light"] = 1,
|
||||
["Avenger's Shield"] = 1,
|
||||
["Rebuke"] = 1,
|
||||
|
||||
--Priest
|
||||
["Holy Word: Chastise"] = 1,
|
||||
["Psychic Horror"] = 1,
|
||||
["Mind Bomb"] = 1,
|
||||
["Psychic Scream"] = 1,
|
||||
["Silence"] = 1,
|
||||
|
||||
--Rogue
|
||||
["Between the Eyes"] = 1,
|
||||
["Cheap Shot"] = 1,
|
||||
["Kidney Shot"] = 1,
|
||||
["Blind"] = 1,
|
||||
["Kick"] = 1,
|
||||
|
||||
--Shaman
|
||||
["Capacitor Totem"] = 1,
|
||||
["Pulverize"] = 1,
|
||||
["Thunderstorm"] = 1,
|
||||
["Wind Shear"] = 1,
|
||||
|
||||
--Warlock
|
||||
["Axe Toss"] = 1,
|
||||
["Shadowfury"] = 1,
|
||||
["Summon Infernal"] = 1,
|
||||
["Seduction"] = 1,
|
||||
["Spell Lock"] = 1,
|
||||
|
||||
--Warrior
|
||||
["Shockwave"] = 1,
|
||||
["Storm Bolt"] = 1,
|
||||
["Intimidating Shout"] = 1,
|
||||
["Pummel"] = 1,
|
||||
}
|
||||
aura_env.classColor = function(class)
|
||||
if class == "Death Knight" then return "|cFFC41F3B" elseif
|
||||
class == "Demon Hunter" then return "|cFFA330C9" elseif
|
||||
class == "Druid" then return "|cFFFF7D0A" elseif
|
||||
class == "Hunter" then return "|cFFABD473" elseif
|
||||
class == "Mage" then return "|cFF40C7EB" elseif
|
||||
class == "Monk" then return "|cFF00FF96" elseif
|
||||
class == "Paladin" then return "|cFFF58CBA" elseif
|
||||
class == "Priest" then return "|cFFFFFFFF" elseif
|
||||
class == "Rogue" then return "|cFFFFF569" elseif
|
||||
class == "Shaman" then return "|cFF0070DE" elseif
|
||||
class == "Warlock" then return "|cFF8787ED" elseif
|
||||
class == "Warrior" then return "|cFFC79C6E" else
|
||||
return "|cFFFFFFFF" end
|
||||
end
|
137
Complete Projects/BFA/Stun Recap.lua
Normal file
137
Complete Projects/BFA/Stun Recap.lua
Normal file
@@ -0,0 +1,137 @@
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local spell = select(14, ...)
|
||||
if aura_env.spells[spell] then
|
||||
local caster = select(6, ...)
|
||||
caster = caster:gsub("%-.+", "")
|
||||
caster = caster:gsub(" ", "")
|
||||
if #aura_env.stuns == 5 then
|
||||
table.remove(aura_env.stuns, 1)
|
||||
table.insert(aura_env.stuns, caster .. " - " .. spell)
|
||||
else
|
||||
table.insert(aura_env.stuns, caster .. " - " .. spell)
|
||||
end
|
||||
local output = ""
|
||||
for k,v in ipairs(aura_env.stuns) do
|
||||
local name = v:match("(.-) ")
|
||||
local class = UnitClass(name) or ""
|
||||
output = output .. aura_env.classColor(class) .. v .. "|r\n"
|
||||
end
|
||||
aura_env.region.text2:SetText(output)
|
||||
aura_env.region.text2:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
aura_env.region.text2:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.text2:SetJustifyH("CENTER")
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
aura_env.stuns = {}
|
||||
aura_env.spells =
|
||||
{
|
||||
--DK
|
||||
["Asphyxiate"] = 1,
|
||||
["Gnaw"] = 1,
|
||||
["Monstrous Blow"] = 1,
|
||||
["Blinding Sleet"] = 1,
|
||||
["Death Grip"] = 1,
|
||||
["Gorefiend's Grasp"] = 1,
|
||||
["Mind Freeze"] = 1,
|
||||
["Shambling Rush"] = 1,
|
||||
|
||||
--DH
|
||||
["Chaos Nova"] = 1,
|
||||
["Fel Eruption"] = 1,
|
||||
["Sigil of Misery"] = 1,
|
||||
["Sigil of Chains"] = 1,
|
||||
["Disrupt"] = 1,
|
||||
|
||||
--Druid
|
||||
["Maim"] = 1,
|
||||
["Mighty Bash"] = 1,
|
||||
["Rake"] = 1,
|
||||
["Typhoon"] = 1,
|
||||
["Ursol's Vortex"] = 1,
|
||||
["Skull Bash"] = 1,
|
||||
|
||||
--Hunter
|
||||
["Intimidation"] = 1,
|
||||
["Bursting Shot"] = 1,
|
||||
["Muzzle"] = 1,
|
||||
["Counter Shot"] = 1,
|
||||
|
||||
--Monk
|
||||
["Leg Sweep"] = 1,
|
||||
["Song of Chi-ji"] = 1,
|
||||
["Ring of Peace"] = 1,
|
||||
["Spear Hand Strike"] = 1,
|
||||
|
||||
--Mage
|
||||
["Dragon's Breath"] = 1,
|
||||
["Blast Wave"] = 1,
|
||||
["Supernova"] = 1,
|
||||
|
||||
--Paladin
|
||||
["Hammer of Justice"] = 1,
|
||||
["Blinding Light"] = 1,
|
||||
["Avenger's Shield"] = 1,
|
||||
["Rebuke"] = 1,
|
||||
|
||||
--Priest
|
||||
["Holy Word: Chastise"] = 1,
|
||||
["Psychic Horror"] = 1,
|
||||
["Mind Bomb"] = 1,
|
||||
["Psychic Scream"] = 1,
|
||||
["Silence"] = 1,
|
||||
|
||||
--Rogue
|
||||
["Between the Eyes"] = 1,
|
||||
["Cheap Shot"] = 1,
|
||||
["Kidney Shot"] = 1,
|
||||
["Blind"] = 1,
|
||||
["Kick"] = 1,
|
||||
|
||||
--Shaman
|
||||
["Capacitor Totem"] = 1,
|
||||
["Pulverize"] = 1,
|
||||
["Thunderstorm"] = 1,
|
||||
["Wind Shear"] = 1,
|
||||
|
||||
--Warlock
|
||||
["Axe Toss"] = 1,
|
||||
["Shadowfury"] = 1,
|
||||
["Summon Infernal"] = 1,
|
||||
["Seduction"] = 1,
|
||||
["Spell Lock"] = 1,
|
||||
|
||||
--Warrior
|
||||
["Shockwave"] = 1,
|
||||
["Storm Bolt"] = 1,
|
||||
["Intimidating Shout"] = 1,
|
||||
["Pummel"] = 1,
|
||||
}
|
||||
aura_env.classColor = function(class)
|
||||
if class == "Death Knight" then return "|cFFC41F3B" elseif
|
||||
class == "Demon Hunter" then return "|cFFA330C9" elseif
|
||||
class == "Druid" then return "|cFFFF7D0A" elseif
|
||||
class == "Hunter" then return "|cFFABD473" elseif
|
||||
class == "Mage" then return "|cFF40C7EB" elseif
|
||||
class == "Monk" then return "|cFF00FF96" elseif
|
||||
class == "Paladin" then return "|cFFF58CBA" elseif
|
||||
class == "Priest" then return "|cFFFFFFFF" elseif
|
||||
class == "Rogue" then return "|cFFFFF569" elseif
|
||||
class == "Shaman" then return "|cFF0070DE" elseif
|
||||
class == "Warlock" then return "|cFF8787ED" elseif
|
||||
class == "Warrior" then return "|cFFC79C6E" else
|
||||
return "|cFFFFFFFF" end
|
||||
end
|
106
Complete Projects/BFA/TSU - Combat HP Bars.lua
Normal file
106
Complete Projects/BFA/TSU - Combat HP Bars.lua
Normal file
@@ -0,0 +1,106 @@
|
||||
--UNIT_HEALTH NAME_PLATE_UNIT_REMOVED NAME_PLATE_UNIT_ADDED UNIT_THREAT_LIST_UPDATE PLAYER_TARGET_CHANGED
|
||||
function(allstates, e, u)
|
||||
if e == "PLAYER_TARGET_CHANGED" then
|
||||
return true
|
||||
elseif e == "UNIT_HEALTH" or e == "UNIT_THREAT_LIST_UPDATE" then
|
||||
if u then
|
||||
print(UnitDetailedThreatSituation("player", u))
|
||||
if UnitExists(u) and u:match("nameplate") and UnitDetailedThreatSituation("player", u) then
|
||||
local threat = select(5, UnitDetailedThreatSituation("player", u))
|
||||
local tank = UnitDetailedThreatSituation("player", u)
|
||||
local hp = UnitHealth(u)
|
||||
local maxhp = UnitHealthMax(u)
|
||||
local php = aura_env.round((hp / maxhp) * 100, 1)
|
||||
local name = UnitName(u)
|
||||
local target = false
|
||||
if UnitIsUnit(u, "target") then target = true end
|
||||
allstates[u] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
name = name,
|
||||
unit = u,
|
||||
value = hp,
|
||||
total = maxhp,
|
||||
index = php,
|
||||
shp = aura_env.shorten(hp),
|
||||
tank = tank,
|
||||
target = target,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if allstates[u] then allstates[u].changed = true; allstates[u].show = false; return true end
|
||||
elseif e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if not allstates[u] then
|
||||
if u then
|
||||
if UnitExists(u) and UnitDetailedThreatSituation("player", u) then
|
||||
local threat = select(5, UnitDetailedThreatSituation("player", u))
|
||||
local tank = UnitDetailedThreatSituation("player", u)
|
||||
local hp = UnitHealth(u)
|
||||
local maxhp = UnitHealthMax(u)
|
||||
local php = aura_env.round((hp / maxhp) * 100, 1)
|
||||
local name = UnitName(u)
|
||||
local target = false
|
||||
if UnitIsUnit(u, "target") then target = true end
|
||||
allstates[u] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
name = name,
|
||||
unit = u,
|
||||
value = hp,
|
||||
total = maxhp,
|
||||
index = php,
|
||||
shp = aura_env.shorten(hp),
|
||||
tank = tank,
|
||||
target = target,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ADDITIONAL INFO
|
||||
{
|
||||
tank = "bool",
|
||||
target = "bool",
|
||||
index = "number",
|
||||
}
|
||||
|
||||
--INIT
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
121
Complete Projects/BFA/TSU - Enemy Health.lua
Normal file
121
Complete Projects/BFA/TSU - Enemy Health.lua
Normal file
@@ -0,0 +1,121 @@
|
||||
--TSU
|
||||
--UNIT_HEALTH NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(allstates)
|
||||
for _,v in pairs(allstates) do
|
||||
v.show = false
|
||||
v.changed = true
|
||||
end
|
||||
|
||||
for i = 1, 40 do
|
||||
local unit = "nameplate" .. i
|
||||
if UnitExists(unit) then
|
||||
if UnitIsPlayer(unit) then
|
||||
print("3", unit)
|
||||
if UnitIsEnemy("player", unit) then
|
||||
print("4", unit)
|
||||
local hp = UnitHealth(unit)
|
||||
local maxHp = UnitHealthMax(unit)
|
||||
local hppp = aura_env.round(hp / maxHp * 100, 2)
|
||||
local shortHP = aura_env.shorten(hp)
|
||||
local shortmaxHP = aura_env.shorten(maxHp)
|
||||
local name = UnitName(unit)
|
||||
local class = UnitClass(unit)
|
||||
print(hp, maxHp, hppp, shortHP, shortmaxHP, name, class)
|
||||
allstates[unit] =
|
||||
{
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
value = hp,
|
||||
total = maxHp,
|
||||
index = hppp,
|
||||
name = name,
|
||||
hppp = hppp,
|
||||
shortHP = shortHP,
|
||||
shortmaxHP = shortmaxHP,
|
||||
class = class,
|
||||
}
|
||||
end
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
||||
aura_env.classColor = function(class)
|
||||
if class == "Death Knight" then return 0.77, 0.12, 0.23, 1 elseif
|
||||
class == "Demon Hunter" then return 0.64, 0.19, 0.79, 1 elseif
|
||||
class == "Druid" then return 1, 0.49, 0.04, 1 elseif
|
||||
class == "Hunter" then return 0.67, 0.83, 0.45, 1 elseif
|
||||
class == "Mage" then return 0.25, 0.78, 0.92, 1 elseif
|
||||
class == "Monk" then return 0, 1, 0.59, 1 elseif
|
||||
class == "Paladin" then return 0.96, 0.55, 0.73, 1 elseif
|
||||
class == "Priest" then return 1, 1, 1, 1 elseif
|
||||
class == "Rogue" then return 1, 0.96, 0.41, 1 elseif
|
||||
class == "Shaman" then return 0, 0.44, 0.87, 1 elseif
|
||||
class == "Warlock" then return 0.53, 0.53, 0.93, 1 elseif
|
||||
class == "Warrior" then return 0.78, 0.61, 0.43, 1 else
|
||||
return 1, 1, 1, 1 end
|
||||
end
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.grad = function(c)
|
||||
--c expected as [0, 1]
|
||||
if c > 0.5 then
|
||||
c = 1 - (2 * (c - 0.5))
|
||||
return c, 1, 0, 1
|
||||
else
|
||||
c = c * 2
|
||||
return 1, c, 0, 1
|
||||
end
|
||||
end
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
|
||||
--ANIMATION
|
||||
function()
|
||||
if aura_env.state then
|
||||
-- print(aura_env.state.class)
|
||||
return aura_env.classColor(aura_env.state.class)
|
||||
end
|
||||
end
|
58
Complete Projects/BFA/TSU - Enemy Nameplates Maybe.lua
Normal file
58
Complete Projects/BFA/TSU - Enemy Nameplates Maybe.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED REMOVE_UNIT
|
||||
function(allstates, e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" and unit then
|
||||
if UnitIsPlayer(unit) then
|
||||
if UnitIsEnemy("player", unit) then
|
||||
local _, _, class = UnitClass(unit)
|
||||
allstates[unit] =
|
||||
{
|
||||
changed = true,
|
||||
show = true,
|
||||
unit = unit,
|
||||
class = class,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" and unit then
|
||||
if allstates[unit] then
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
allstates[unit].show = false
|
||||
allstates[unit].changed = true
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_UNIT" then
|
||||
if allstates[unit] then
|
||||
allstates[unit].show = false
|
||||
allstates[unit].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit)
|
||||
local aura_env = aura_env
|
||||
local unit = aura_env.state.unit
|
||||
LCG.PixelGlow_Start(nameplate, {aura_env.classColor(aura_env.state.class)}, nil, 0, 8, 4, 0, -4)
|
||||
C_Timer.After(4, function() WeakAuras.ScanEvents("REMOVE_UNIT", unit); LCG.PixelGlow_Stop(nameplate) end)
|
||||
|
||||
--INIT
|
||||
aura_env.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43, 1 elseif
|
||||
class == 2 then return 0.96, 0.55, 0.73, 1 elseif
|
||||
class == 3 then return 0.67, 0.83, 0.45, 1 elseif
|
||||
class == 4 then return 1, 0.96, 0.41, 1 elseif
|
||||
class == 5 then return 1, 1, 1, 1 elseif
|
||||
class == 6 then return 0.77, 0.12, 0.23, 1 elseif
|
||||
class == 7 then return 0, 0.44, 0.87, 1 elseif
|
||||
class == 8 then return 0.25, 0.78, 0.92, 1 elseif
|
||||
class == 9 then return 0.53, 0.53, 0.93, 1 elseif
|
||||
class == 10 then return 0, 1, 0.59, 1 elseif
|
||||
class == 11 then return 1, 0.49, 0.04, 1 elseif
|
||||
class == 12 then return 0.64, 0.19, 0.79, 1 else
|
||||
return 1, 1, 1, 1 end
|
||||
end
|
64
Complete Projects/BFA/TSU - Herb Icons.lua
Normal file
64
Complete Projects/BFA/TSU - Herb Icons.lua
Normal file
@@ -0,0 +1,64 @@
|
||||
--BAG_UPDATE UPDATE
|
||||
function(allstates, e, id)
|
||||
if e == "BAG_UPDATE" then
|
||||
if id then
|
||||
for i = 1, GetContainerNumSlots(id) do
|
||||
local iid = GetContainerItemID(id, i)
|
||||
if aura_env.herbIDs[iid] then
|
||||
local texture = select(1, GetContainerItemInfo(id, i))
|
||||
local amount = GetItemCount(iid, false)
|
||||
local bank = GetItemCount(iid, true) - amount
|
||||
allstates[iid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
amount = amount,
|
||||
bank = bank,
|
||||
index = amount,
|
||||
icon = texture,
|
||||
itemId = iid,
|
||||
resort = true,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE" then
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local iid = GetContainerItemID(i, j)
|
||||
if aura_env.herbIDs[iid] then
|
||||
local texture = select(1, GetContainerItemInfo(i, j))
|
||||
local amount = GetItemCount(iid, false)
|
||||
local bank = GetItemCount(iid, true) - amount
|
||||
allstates[iid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
amount = amount,
|
||||
bank = bank,
|
||||
index = amount,
|
||||
icon = texture,
|
||||
itemId = iid,
|
||||
resort = true,
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.herbIDs =
|
||||
{
|
||||
[168487] = "Zin'anthid",
|
||||
[152511] = "Sea Stalk",
|
||||
[152505] = "Riverbud",
|
||||
[152506] = "Star Moss",
|
||||
[152507] = "Akunda's Bite",
|
||||
[152508] = "Winter's Kiss",
|
||||
[152509] = "Siren's Pollen",
|
||||
[152510] = "Anchor Weed",
|
||||
}
|
||||
WeakAuras.ScanEvents("UPDATE")
|
371
Complete Projects/BFA/TSU - Loot Window.lua
Normal file
371
Complete Projects/BFA/TSU - Loot Window.lua
Normal file
@@ -0,0 +1,371 @@
|
||||
--REMOVE_ITEM_SHOW ADD_ITEM_SHOW
|
||||
function(allstates, e, what, howmuch, looted)
|
||||
if e == "ADD_ITEM_SHOW" then
|
||||
if what then
|
||||
--Get info about item
|
||||
local icon = 0
|
||||
local name = GetItemInfo(what)
|
||||
--Save icon to databases
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end
|
||||
if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
--Get ID for tooltip
|
||||
local indexid = #allstates + 1
|
||||
local ID
|
||||
if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end
|
||||
allstates[indexid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
index = GetTime(),
|
||||
resort = true,
|
||||
icon = icon,
|
||||
name = what,
|
||||
amount = howmuch,
|
||||
looted = looted,
|
||||
}
|
||||
if ID then
|
||||
allstates[indexid].itemId = ID
|
||||
end
|
||||
C_Timer.After(5, function() WeakAuras.ScanEvents("REMOVE_ITEM_SHOW", indexid) end)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_ITEM_SHOW" then
|
||||
if allstates[what] then
|
||||
allstates[what].show = false
|
||||
allstates[what].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
if aura_env.state.looted == true then
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, aura_env.region)
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region.texture:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\ok-icon.tga")
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.texture:Show()
|
||||
end
|
||||
|
||||
--ON HIDE
|
||||
if aura_env.region.texture then aura_env.region.texture:Hide() end
|
||||
|
||||
--INIT
|
||||
aura_env.skills =
|
||||
{
|
||||
--Warrior
|
||||
[1] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Paladin
|
||||
[2] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Hunter
|
||||
[3] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Rogue
|
||||
[4] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Priest
|
||||
[5] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Death Knight
|
||||
[6] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Shaman
|
||||
[7] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Mage
|
||||
[8] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Warlock
|
||||
[9] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Monk
|
||||
[10] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Druid
|
||||
[11] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Demon Hunter
|
||||
[12] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
}
|
58
Complete Projects/BFA/TSU - Loot.lua
Normal file
58
Complete Projects/BFA/TSU - Loot.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
--CHAT_MSG_LOOT REMOVE_ITEM ADD_ITEM
|
||||
function(allstates, e, msg, howmuch)
|
||||
if e == "CHAT_MSG_LOOT" then
|
||||
if msg then
|
||||
local who = msg:match("%w+")
|
||||
if who == "You" then
|
||||
local howmuch = msg:match("(x%d+).$")
|
||||
local what
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
what = itemLink
|
||||
end
|
||||
--WeakAuras.ScanEvents("ADD_ITEM", what, howmuch)
|
||||
C_Timer.After(0.05, function() WeakAuras.ScanEvents("ADD_ITEM", what, howmuch) end)
|
||||
end
|
||||
end
|
||||
elseif e == "ADD_ITEM" then
|
||||
local what = msg
|
||||
if what then
|
||||
local rarity = select(3, GetItemInfo(what))
|
||||
local icon = 0
|
||||
local name = GetItemInfo(what)
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end
|
||||
if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
local color = "ffffffff"
|
||||
if rarity then
|
||||
color = select(4, GetItemQualityColor(rarity))
|
||||
end
|
||||
color = "|c" .. color
|
||||
local indexid = #allstates + 1
|
||||
local ID
|
||||
if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end
|
||||
allstates[indexid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
expirationTime = GetTime() + 1,
|
||||
index = GetTime(),
|
||||
autoHide = true,
|
||||
resort = true,
|
||||
icon = icon,
|
||||
name = what,
|
||||
color = color,
|
||||
amount = howmuch,
|
||||
}
|
||||
if ID then
|
||||
allstates[indexid].itemId = ID
|
||||
end
|
||||
C_Timer.After(1, function() WeakAuras.ScanEvents("REMOVE_ITEM", indexid) end)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_ITEM" then
|
||||
if allstates[msg] then
|
||||
allstates[msg].show = false
|
||||
allstates[msg].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
731
Complete Projects/BFA/TSU - Spell Alert.lua
Normal file
731
Complete Projects/BFA/TSU - Spell Alert.lua
Normal file
@@ -0,0 +1,731 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED REMOVE_GUID NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(allstates, e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, CombatLogGetCurrentEventInfo())
|
||||
if se == "SPELL_CAST_START" or se == "SPELL_CAST_SUCCESS" then
|
||||
local spell = select(13, CombatLogGetCurrentEventInfo())
|
||||
if aura_env.spells[spell] then
|
||||
local ID = select(7, GetSpellInfo(aura_env.spells[spell].ID))
|
||||
if ID == aura_env.spells[spell].ID then
|
||||
local castTime = select(4, GetSpellInfo(aura_env.spells[spell].ID))
|
||||
local GUID = select(4, CombatLogGetCurrentEventInfo())
|
||||
if GUID then allstates[GUID] = {} end
|
||||
if allstates[GUID].timer then allstates[GUID].timer:Cancel() end
|
||||
local unit = ""
|
||||
local target = select(9, CombatLogGetCurrentEventInfo())
|
||||
if target and UnitIsPlayer(target) == true then
|
||||
local targetClass = UnitClass(target) or ""
|
||||
target = aura_env.classColor(targetClass) .. target
|
||||
allstates[GUID].target = target
|
||||
end
|
||||
for i = 1, 30 do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if UnitGUID("nameplate" .. i) == GUID then
|
||||
unit = "nameplate" .. i
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
-- unit = "player"
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if castTime > 1000 and se == "SPELL_CAST_START" then
|
||||
if unit == "player" or unit == "" then unit = "nameplate1" end
|
||||
if allstates[GUID].timer then allstates[GUID].timer:Cancel() end
|
||||
allstates[GUID].changed = true
|
||||
allstates[GUID].show = true
|
||||
allstates[GUID].showTime = GetTime()
|
||||
allstates[GUID].ID = aura_env.spells[spell].ID
|
||||
allstates[GUID].ins = aura_env.spells[spell].ins
|
||||
allstates[GUID].unit = unit
|
||||
allstates[GUID].GUID = GUID
|
||||
allstates[GUID].progressType = "timed"
|
||||
allstates[GUID].expirationTime = GetTime() + castTime / 1000
|
||||
allstates[GUID].duration = castTime / 1000
|
||||
allstates[GUID].timer = C_Timer.NewTimer(castTime / 1000, function() WeakAuras.ScanEvents("REMOVE_GUID", GUID); LCG.PixelGlow_Stop(nameplate); end)
|
||||
return true
|
||||
elseif castTime == 0 and se == "SPELL_CAST_SUCCESS" then
|
||||
if unit == "player" or unit == "" then unit = "nameplate1" end
|
||||
if allstates[GUID].timer then allstates[GUID].timer:Cancel() end
|
||||
allstates[GUID].changed = true
|
||||
allstates[GUID].show = true
|
||||
allstates[GUID].showTime = GetTime()
|
||||
allstates[GUID].ID = aura_env.spells[spell].ID
|
||||
allstates[GUID].ins = aura_env.spells[spell].ins
|
||||
allstates[GUID].unit = unit
|
||||
allstates[GUID].GUID = GUID
|
||||
allstates[GUID].expirationTime = GetTime() + 2
|
||||
allstates[GUID].timer = C_Timer.NewTimer(2, function() WeakAuras.ScanEvents("REMOVE_GUID", GUID); LCG.PixelGlow_Stop(nameplate); end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_CAST_FAILED" then
|
||||
local spell = select(13, CombatLogGetCurrentEventInfo())
|
||||
if aura_env.spells[spell] then
|
||||
local ID = select(7, GetSpellInfo(aura_env.spells[spell].ID))
|
||||
if ID == aura_env.spells[spell].ID then
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local GUID = select(4, CombatLogGetCurrentEventInfo())
|
||||
if allstates[GUID].timer then allstates[GUID].timer:Cancel() end
|
||||
local unit = ""
|
||||
for i = 1, 30 do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if UnitGUID("nameplate" .. i) == GUID then
|
||||
unit = "nameplate" .. i
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
--WeakAuras.ScanEvents("REMOVE_GUID", GUID)
|
||||
local rem = allstates[GUID].expirationTime - GetTime()
|
||||
local maxrem = allstates[GUID].expirationTime - allstates[GUID].showTime
|
||||
allstates[GUID].changed = true
|
||||
allstates[GUID].show = true
|
||||
allstates[GUID].progressType = "static"
|
||||
allstates[GUID].value = string.format("%.1f", rem)
|
||||
allstates[GUID].total = maxrem
|
||||
allstates[GUID].interrupted = true
|
||||
allstates[GUID].timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("REMOVE_GUID", GUID) end)
|
||||
if unit ~= "" then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif se == "UNIT_DIED" then
|
||||
local GUID = select(8, CombatLogGetCurrentEventInfo())
|
||||
if allstates[GUID] and allstates[GUID].expirationTime and not allstates[GUID].interrupted then
|
||||
local rem = allstates[GUID].expirationTime - GetTime()
|
||||
local maxrem = allstates[GUID].expirationTime - allstates[GUID].showTime
|
||||
allstates[GUID].changed = true
|
||||
allstates[GUID].show = true
|
||||
allstates[GUID].progressType = "static"
|
||||
allstates[GUID].value = rem
|
||||
allstates[GUID].total = maxrem
|
||||
allstates[GUID].interrupted = true
|
||||
allstates[GUID].timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("REMOVE_GUID", GUID) end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "REMOVE_GUID" then
|
||||
local GUID = select(1, ...)
|
||||
if allstates[GUID] then
|
||||
allstates[GUID].show = false
|
||||
allstates[GUID].changed = true
|
||||
return true
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local u = select(1, ...)
|
||||
if u then
|
||||
local GUID = UnitGUID(u)
|
||||
if allstates[GUID] then
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
||||
LCG.PixelGlow_Start(nameplate, {1, 1, 0, 1}, 100, 0, 200, 4, 0, -4)
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local u = select(1, ...)
|
||||
if u then
|
||||
local GUID = UnitGUID(u)
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg", "Master")
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text = text
|
||||
end
|
||||
aura_env.region.text:SetFont(font, size, flags)
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:ClearAllPoints()
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.text:SetJustifyH("CENTER")
|
||||
aura_env.region.text:SetJustifyV("CENTER")
|
||||
local output = aura_env.state.ins
|
||||
if aura_env.state.target then output = output .. " > " .. aura_env.state.target end
|
||||
aura_env.region.text:SetText(output)
|
||||
aura_env.region.text:Show()
|
||||
local aura_env = aura_env
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit, true)
|
||||
LCG.PixelGlow_Start(nameplate, {1, 1, 0, 1}, 100, 0, 200, 4, 0, -4)
|
||||
local GUID = aura_env.state.GUID
|
||||
|
||||
--ON HIDE
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit, true)
|
||||
if nameplate then
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
|
||||
--ANIMATION
|
||||
function()
|
||||
if aura_env.state and aura_env.state.interrupted then return 0, 1, 0, 1 end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.spells = {
|
||||
-- ["Vivify"] =
|
||||
-- {
|
||||
-- ["ID"] = 116670,
|
||||
-- ["ins"] = "Test",
|
||||
-- },
|
||||
["Brutal Backhand"] =
|
||||
{
|
||||
["ID"] = 257426,
|
||||
["ins"] = "Brutal Backhand - Sidestep",
|
||||
},
|
||||
["Shattering Toss"] =
|
||||
{
|
||||
["ID"] = 274860,
|
||||
["ins"] = "Shattering Toss - Brace"
|
||||
},
|
||||
["Suppression Slam"] =
|
||||
{
|
||||
["ID"] = 270003,
|
||||
["ins"] = "Suppression Slam - Sidestep"
|
||||
},
|
||||
["Axe Barrage"] =
|
||||
{
|
||||
["ID"] = 270084,
|
||||
["ins"] = "Axe Barrage - Stun"
|
||||
},
|
||||
["Poison Barrage"] =
|
||||
{
|
||||
["ID"] = 270507,
|
||||
["ins"] = "Poison Barrage - Move with"
|
||||
},
|
||||
["Slobber Knocker"] =
|
||||
{
|
||||
["ID"] = 256627,
|
||||
["ins"] = "Slobber Knocker - Sidestep"
|
||||
},
|
||||
["Heavy Slash"] =
|
||||
{
|
||||
["ID"] = 257292,
|
||||
["ins"] = "Heavy Slash - Sidestep"
|
||||
},
|
||||
["Singing Steel"] =
|
||||
{
|
||||
["ID"] = 256709,
|
||||
["ins"] = "Singing Steel - Sidestep"
|
||||
},
|
||||
["Crimson Swipe"] =
|
||||
{
|
||||
["ID"] = 268230,
|
||||
["ins"] = "Crimson Swipe - Sidestep"
|
||||
},
|
||||
["Tail Thrash"] =
|
||||
{
|
||||
["ID"] = 265910,
|
||||
["ins"] = "Tail Thrash - Mitigation"
|
||||
},
|
||||
["Debilitating Backhand"] =
|
||||
{
|
||||
["ID"] = 266237,
|
||||
["ins"] = "Debilitating Backhand - Sidestep"
|
||||
},
|
||||
["Poison Nova"] =
|
||||
{
|
||||
["ID"] = 267273,
|
||||
["ins"] = "Poison Nova - Interrupt"
|
||||
},
|
||||
["Blade Combo"] =
|
||||
{
|
||||
["ID"] = 268586,
|
||||
["ins"] = "Blade Combo - Mitigation"
|
||||
},
|
||||
["Clear the Deck"] =
|
||||
{
|
||||
["ID"] = 269029,
|
||||
["ins"] = "Clear the Deck - Sidestep"
|
||||
},
|
||||
["Viscous Slobber"] =
|
||||
{
|
||||
["ID"] = 272827,
|
||||
["ins"] = "Viscous Slobber - Place out of group"
|
||||
},
|
||||
["Crashing Tide"] =
|
||||
{
|
||||
["ID"] = 261563,
|
||||
["ins"] = "Crashing Tide - Face to wall"
|
||||
},
|
||||
["Noxious Breath"] =
|
||||
{
|
||||
["ID"] = 272657,
|
||||
["ins"] = "Noxious Breath - Sidestep"
|
||||
},
|
||||
["Dust Cloud"] =
|
||||
{
|
||||
["ID"] = 268705,
|
||||
["ins"] = "Dust Cloud - Move enemies"
|
||||
},
|
||||
["Shocking Claw"] =
|
||||
{
|
||||
["ID"] = 257337,
|
||||
["ins"] = "Shocking Claw - Sidestep"
|
||||
},
|
||||
["Power Through"] =
|
||||
{
|
||||
["ID"] = 268415,
|
||||
["ins"] = "Power Through - Face away"
|
||||
},
|
||||
["Cover"] =
|
||||
{
|
||||
["ID"] = 263275,
|
||||
["ins"] = "Cover - Move enemies"
|
||||
},
|
||||
["Desperate Measures"] =
|
||||
{
|
||||
["ID"] = 263601,
|
||||
["ins"] = "Desperate Measures - Mitigation"
|
||||
},
|
||||
["Blowtorch"] =
|
||||
{
|
||||
["ID"] = 263103,
|
||||
["ins"] = "Blowtorch - Face away"
|
||||
},
|
||||
["Echo Blade"] =
|
||||
{
|
||||
["ID"] = 268846,
|
||||
["ins"] = "Echo Blade - Face away"
|
||||
},
|
||||
["Charged Shot"] =
|
||||
{
|
||||
["ID"] = 269429,
|
||||
["ins"] = "Charged Shot - Mitigation"
|
||||
},
|
||||
["Shockwave"] =
|
||||
{
|
||||
["ID"] = 272457,
|
||||
["ins"] = "Shockwave - Mitigation"
|
||||
},
|
||||
["Maddening Gaze"] =
|
||||
{
|
||||
["ID"] = 272609,
|
||||
["ins"] = "Maddening Gaze - Sidestep"
|
||||
},
|
||||
["Suppression Fire"] =
|
||||
{
|
||||
["ID"] = 258864,
|
||||
["ins"] = "Suppression Fire - Face away"
|
||||
},
|
||||
["Shadow Cleave"] =
|
||||
{
|
||||
["ID"] = 265372,
|
||||
["ins"] = "Shadow Cleave - Face away"
|
||||
},
|
||||
["Thorned Barrage"] =
|
||||
{
|
||||
["ID"] = 265760,
|
||||
["ins"] = "Thorned Barrage - Mitigation"
|
||||
},
|
||||
["Crush"] =
|
||||
{
|
||||
["ID"] = 260508,
|
||||
["ins"] = "Crush - Mitigation"
|
||||
},
|
||||
["Marking Cleave"] =
|
||||
{
|
||||
["ID"] = 263905,
|
||||
["ins"] = "Marking Cleave - Sidestep"
|
||||
},
|
||||
["Warding Candles"] =
|
||||
{
|
||||
["ID"] = 263961,
|
||||
["ins"] = "Warding Candles - Move enemies"
|
||||
},
|
||||
["Tectonic Smash"] =
|
||||
{
|
||||
["ID"] = 275907,
|
||||
["ins"] = "Tectonic Smash - Sidestep"
|
||||
},
|
||||
["Heaving Blow"] =
|
||||
{
|
||||
["ID"] = 276268,
|
||||
["ins"] = "Heaving Blow - Sidestep"
|
||||
},
|
||||
["Hindering Cleave"] =
|
||||
{
|
||||
["ID"] = 267899,
|
||||
["ins"] = "Hindering Cleave - Sidestep"
|
||||
},
|
||||
["Mental Assault"] =
|
||||
{
|
||||
["ID"] = 268391,
|
||||
["ins"] = "Mental Assault - Sidestep"
|
||||
},
|
||||
["Rotten Bile"] =
|
||||
{
|
||||
["ID"] = 265540,
|
||||
["ins"] = "Rotten Bile - MOVE CUNT"
|
||||
},
|
||||
["Blade Barrage"] =
|
||||
{
|
||||
["ID"] = 257870,
|
||||
["ins"] = "Blade Barrage - Mitigation"
|
||||
},
|
||||
["Skewer"] =
|
||||
{
|
||||
["ID"] = 249919,
|
||||
["ins"] = "Skewer - Mitigation"
|
||||
},
|
||||
["Heavy Slash"] =
|
||||
{
|
||||
["ID"] = 257292,
|
||||
["ins"] = "Heavy Slash - Sidestep"
|
||||
},
|
||||
["Broadside"] =
|
||||
{
|
||||
["ID"] = 268260,
|
||||
["ins"] = "Broadside - Sidestep"
|
||||
},
|
||||
["Crushing Slam"] =
|
||||
{
|
||||
["ID"] = 272711,
|
||||
["ins"] = "Crushing Slam - Sidestep"
|
||||
},
|
||||
["Slam"] =
|
||||
{
|
||||
["ID"] = 269266,
|
||||
["ins"] = "Slam - Sidestep"
|
||||
},
|
||||
["Energy Lash"] =
|
||||
{
|
||||
["ID"] = 262794,
|
||||
["ins"] = "Energy Lash - Reflect"
|
||||
},
|
||||
["Grasping Hex"] =
|
||||
{
|
||||
["ID"] = 300436,
|
||||
["ins"] = "Grasping Hex - Interrupt",
|
||||
},
|
||||
["Stoneskin"] =
|
||||
{
|
||||
["ID"] = 300514,
|
||||
["ins"] = "Stoneskin - Interrupt",
|
||||
},
|
||||
["Shockwave"] =
|
||||
{
|
||||
["ID"] = 300424,
|
||||
["ins"] = "Shockwave - Sidestep",
|
||||
},
|
||||
["Charged Smash"] =
|
||||
{
|
||||
["ID"] = 297254,
|
||||
["ins"] = "Charged Smash - Stack on tank",
|
||||
},
|
||||
["Rapid Fire"] =
|
||||
{
|
||||
["ID"] = 301667,
|
||||
["ins"] = "Rapid Fire - Sidestep",
|
||||
},
|
||||
["Enlarge"] =
|
||||
{
|
||||
["ID"] = 301629,
|
||||
["ins"] = "Enlarge - Interrupt",
|
||||
},
|
||||
["Shrink"] =
|
||||
{
|
||||
["ID"] = 284219,
|
||||
["ins"] = "Shrink - Interrupt",
|
||||
},
|
||||
["Wreck"] =
|
||||
{
|
||||
["ID"] = 302279,
|
||||
["ins"] = "Wreck - Mitigation",
|
||||
},
|
||||
["Pedal to the Metal"] =
|
||||
{
|
||||
["ID"] = 299164,
|
||||
["ins"] = "Pedal to the Metal - Sidestep",
|
||||
},
|
||||
["Burnout"] =
|
||||
{
|
||||
["ID"] = 298571,
|
||||
["ins"] = "Burnout - move from smoke",
|
||||
},
|
||||
["Bolt Buster"] =
|
||||
{
|
||||
["ID"] = 298940,
|
||||
["ins"] = "Bolt Buster - Sidestep",
|
||||
},
|
||||
["Mega Taze"] =
|
||||
{
|
||||
["ID"] = 298718,
|
||||
["ins"] = "Mega Taze - Run into smoke",
|
||||
},
|
||||
["Slimewave"] =
|
||||
{
|
||||
["ID"] = 300777,
|
||||
["ins"] = "Slimewave - Sidestep",
|
||||
},
|
||||
["Toxic Wave"] =
|
||||
{
|
||||
["ID"] = 297834,
|
||||
["ins"] = "Toxic Wave - Run to robot",
|
||||
},
|
||||
["Disassembling Protocol"] =
|
||||
{
|
||||
["ID"] = 301990,
|
||||
["ins"] = "Disassembling Protocol - Mitigation",
|
||||
},
|
||||
["Gyro-Scrap"] =
|
||||
{
|
||||
["ID"] = 300159,
|
||||
["ins"] = "Gyro-Scrap - Run away",
|
||||
},
|
||||
["Exhaust"] =
|
||||
{
|
||||
["ID"] = 300177,
|
||||
["ins"] = "Exhaust - Move from smoke",
|
||||
},
|
||||
["Repair Protocol"] =
|
||||
{
|
||||
["ID"] = 300171,
|
||||
["ins"] = "Repair Protocol - Interrupt",
|
||||
},
|
||||
["Shield Bash"] =
|
||||
{
|
||||
["ID"] = 273185,
|
||||
["ins"] = "Shield Bash - Mitigation",
|
||||
},
|
||||
["Overclock"] =
|
||||
{
|
||||
["ID"] = 299588,
|
||||
["ins"] = "Overclock - Interrupt",
|
||||
},
|
||||
["Repair"] =
|
||||
{
|
||||
["ID"] = 300087,
|
||||
["ins"] = "Repair - Interrupt",
|
||||
},
|
||||
["Scrap Cannon"] =
|
||||
{
|
||||
["ID"] = 300188,
|
||||
["ins"] = "Scrap Cannon - Sidestep",
|
||||
},
|
||||
["Detonate"] =
|
||||
{
|
||||
["ID"] = 301088,
|
||||
["ins"] = "Detonate - Interrupt",
|
||||
},
|
||||
["Whirling Edge"] =
|
||||
{
|
||||
["ID"] = 285020,
|
||||
["ins"] = "Whirling Edge - Run away",
|
||||
},
|
||||
["Maximum Thrust"] =
|
||||
{
|
||||
["ID"] = 283421,
|
||||
["ins"] = "Maximum Thrust - Sidestep",
|
||||
},
|
||||
["Process Waste"] =
|
||||
{
|
||||
["ID"] = 294290,
|
||||
["ins"] = "Process Waste - Sidestep",
|
||||
},
|
||||
["Venting Flames"] =
|
||||
{
|
||||
["ID"] = 291946,
|
||||
["ins"] = "Venting Flames - Go behind cool cube",
|
||||
},
|
||||
["Capacitor Discharge"] =
|
||||
{
|
||||
["ID"] = 295169,
|
||||
["ins"] = "Capacitor Discharge - Run to free floor",
|
||||
},
|
||||
["Tune-Up"] =
|
||||
{
|
||||
["ID"] = 293729,
|
||||
["ins"] = "Tune-Up - Interrupt",
|
||||
},
|
||||
["Sonic Pulse"] =
|
||||
{
|
||||
["ID"] = 293986,
|
||||
["ins"] = "Sonic Pulse - Sidestep",
|
||||
},
|
||||
["Skullcracker"] =
|
||||
{
|
||||
["ID"] = 300296,
|
||||
["ins"] = "Skullcracker - Mitigation",
|
||||
},
|
||||
["Coalesce"] =
|
||||
{
|
||||
["ID"] = 297835,
|
||||
["ins"] = "Coalesce - Run to robot",
|
||||
},
|
||||
["Maximum Thrust"] =
|
||||
{
|
||||
["ID"] = 283421,
|
||||
["ins"] = "Maximum Thrust - Sidestep",
|
||||
},
|
||||
["Vent Jets"] =
|
||||
{
|
||||
["ID"] = 285388,
|
||||
["ins"] = "Vent Jets - Run Away",
|
||||
},
|
||||
["Giga-Zap"] =
|
||||
{
|
||||
["ID"] = 291939,
|
||||
["ins"] = "Giga-Zap - Face Away",
|
||||
},
|
||||
["Rock Lance"] =
|
||||
{
|
||||
["ID"] = 263202,
|
||||
["ins"] = "Rock Lance - Send Help",
|
||||
},
|
||||
["Azerite Heartseeker"] =
|
||||
{
|
||||
["ID"] = 262513,
|
||||
["ins"] = "Azerite Heartseeker - Help",
|
||||
},
|
||||
["Savage Cleave"] =
|
||||
{
|
||||
["ID"] = 265019,
|
||||
["ins"] = "Savage Cleave - Sidestep",
|
||||
},
|
||||
["Decaying Mind"] =
|
||||
{
|
||||
["ID"] = 278961,
|
||||
["ins"] = "Decaying Mind - Interrupt",
|
||||
},
|
||||
["Short Out"] =
|
||||
{
|
||||
["ID"] = 297128,
|
||||
["ins"] = "Short Out - Run to bubble",
|
||||
},
|
||||
["Cyclone Strike"] =
|
||||
{
|
||||
["ID"] = 263573,
|
||||
["ins"] = "Cyclone Strike - Sidestep",
|
||||
},
|
||||
["Power Shot"] =
|
||||
{
|
||||
["ID"] = 264574,
|
||||
["ins"] = "Power Shot - Sidestep",
|
||||
},
|
||||
["Overflow"] =
|
||||
{
|
||||
["ID"] = 295346,
|
||||
["ins"] = "Overflow - Run cunt",
|
||||
},
|
||||
["Crushing Reverberation"] =
|
||||
{
|
||||
["ID"] = 295332,
|
||||
["ins"] = "Crushing Reverberation - Stack on tank cunt",
|
||||
},
|
||||
["Overwhelming Barrage"] =
|
||||
{
|
||||
["ID"] = 295138,
|
||||
["ins"] = "Overwhelming Barrage - Dodge cunt",
|
||||
},
|
||||
["Frostshock Bolts"] =
|
||||
{
|
||||
["ID"] = 295601,
|
||||
["ins"] = "Frostshock Bolts - Dodge cunt",
|
||||
},
|
||||
["Inversion"] =
|
||||
{
|
||||
["ID"] = 295791,
|
||||
["ins"] = "Inversion - Spread cunt",
|
||||
},
|
||||
["Bioluminescent Cloud"] =
|
||||
{
|
||||
["ID"] = 292205,
|
||||
["ins"] = "Bioluminescent Cloud - Get glowing cunt",
|
||||
},
|
||||
["Shock Pulse"] =
|
||||
{
|
||||
["ID"] = 292279,
|
||||
["ins"] = "Shock Pulse - Run cunt",
|
||||
},
|
||||
["Arcane Bomb"] =
|
||||
{
|
||||
["ID"] = 296746,
|
||||
["ins"] = "Arcane Bomb - Run cunt",
|
||||
},
|
||||
["Gale Buffet"] =
|
||||
{
|
||||
["ID"] = 296701,
|
||||
["ins"] = "Gale Buffet - Run to stormy cunt",
|
||||
},
|
||||
["Arcanado Burst"] =
|
||||
{
|
||||
["ID"] = 296701,
|
||||
["ins"] = "Arcanado Burst - Tornados cunt",
|
||||
},
|
||||
["Coral Growth"] =
|
||||
{
|
||||
["ID"] = 296555,
|
||||
["ins"] = "Coral Growth - Run cunt",
|
||||
},
|
||||
["Briny Bubble"] =
|
||||
{
|
||||
["ID"] = 297333,
|
||||
["ins"] = "Briny Bubble - Help cunt-s",
|
||||
},
|
||||
["Rippling Wave"] =
|
||||
{
|
||||
["ID"] = 296688,
|
||||
["ins"] = "Rippling Wave - Soak - s l o w l y - cunt",
|
||||
},
|
||||
["Arcing Azerite"] =
|
||||
{
|
||||
["ID"] = 296944,
|
||||
["ins"] = "Arcing Azerite - Destroy Corals cunt",
|
||||
},
|
||||
["Conductive Pulse"] =
|
||||
{
|
||||
["ID"] = 295822,
|
||||
["ins"] = "Conductive Pulse - Interrupt cunt",
|
||||
},
|
||||
["Frenetic Charge"] =
|
||||
{
|
||||
["ID"] = 299914,
|
||||
["ins"] = "Frenetic Charge - Soak cunt",
|
||||
},
|
||||
["Zealous Eruption"] =
|
||||
{
|
||||
["ID"] = 301807,
|
||||
["ins"] = "Zealous Eruption - Run to safe boss cunt",
|
||||
},
|
||||
["Fanatical Verdict"] =
|
||||
{
|
||||
["ID"] = 296850,
|
||||
["ins"] = "Fanatical Verdict - Spread cunt",
|
||||
},
|
||||
["Potent Spark"] =
|
||||
{
|
||||
["ID"] = 301947,
|
||||
["ins"] = "Potent Spark - Botanist orbs cunt",
|
||||
},
|
||||
["Violent Outburst"] =
|
||||
{
|
||||
["ID"] = 297325,
|
||||
["ins"] = "Violent Outburst - Run cunt",
|
||||
},
|
||||
}
|
||||
aura_env.classColor = function(class)
|
||||
if class == "Death Knight" then return "|cFFC41F3B" elseif
|
||||
class == "Demon Hunter" then return "|cFFA330C9" elseif
|
||||
class == "Druid" then return "|cFFFF7D0A" elseif
|
||||
class == "Hunter" then return "|cFFABD473" elseif
|
||||
class == "Mage" then return "|cFF40C7EB" elseif
|
||||
class == "Monk" then return "|cFF00FF96" elseif
|
||||
class == "Paladin" then return "|cFFF58CBA" elseif
|
||||
class == "Priest" then return "|cFFFFFFFF" elseif
|
||||
class == "Rogue" then return "|cFFFFF569" elseif
|
||||
class == "Shaman" then return "|cFF0070DE" elseif
|
||||
class == "Warlock" then return "|cFF8787ED" elseif
|
||||
class == "Warrior" then return "|cFFC79C6E" else
|
||||
return "|cFFFFFFFF" end
|
||||
end
|
69
Complete Projects/BFA/Tank Taunt UNTESTED.lua
Normal file
69
Complete Projects/BFA/Tank Taunt UNTESTED.lua
Normal file
@@ -0,0 +1,69 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED GROUP_ROSTER_UPDATE UNTRIGGER
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then --CLEU
|
||||
if not aura_env.tank then aura_env.tank = "" end
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED" then
|
||||
local type = select(15, ...)
|
||||
if type == "DEBUFF" then
|
||||
local caster = select(5, ...)
|
||||
local target = select(9, ...)
|
||||
local name = select(13, ...)
|
||||
--If selected debuff is cast on other tank, get other tank from other trigger
|
||||
if (target == aura_env.tank or target == UnitName("player")) and aura_env.auras[name] then
|
||||
--Get stacks duration and expiry time for duration control and trigger
|
||||
local stacks, dur = select(3, aura_env.unitDebuffC(target, name)), select(5, aura_env.unitDebuffC(target, name))
|
||||
if stacks > aura_env.auras[name] then
|
||||
--If I have too many stacks and I am tanking then -- other taunts
|
||||
if target == UnitName("player") and select(1, UnitDetailedThreatSituation("player", "target")) then
|
||||
aura_env.returnName = "DEBIL TAUNT"
|
||||
aura_env.region:Color(0.3715, 0.6285, 0, 1)
|
||||
--If other tank has too many stacks and other tank is tanking then -- I taunt
|
||||
elseif target == aura_env.tank and select(1, UnitDetailedThreatSituation(target, "target")) then
|
||||
aura_env.returnName = "TAUNT DEBIL"
|
||||
aura_env.region:Color(0.5660, 0.1588, 0.2752, 1)
|
||||
end
|
||||
if aura_env.timer then aura_env.timer:Cancel() end
|
||||
aura_env.timer = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("UNTRIGGER") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "GROUP_ROSTER_UPDATE" then --Find other tank
|
||||
if IsInRaid() then
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if UnitGroupRolesAssigned("raid" .. i) == "TANK" and UnitName("raid" .. i) ~= UnitName("player") then
|
||||
aura_env.tank = UnitName("raid" .. i)
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "UNTRIGGER" then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--NAME INFO
|
||||
function()
|
||||
return aura_env.returnName
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.UnitDebuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.auras =
|
||||
{
|
||||
["Rimefrost"] = 5,
|
||||
["Septic Taint"] = 5,
|
||||
|
||||
}
|
33
Complete Projects/BFA/Taunt Cunt UNFINISHED.lua
Normal file
33
Complete Projects/BFA/Taunt Cunt UNFINISHED.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
--UNIT_AURA
|
||||
function(_,unit)
|
||||
if UnitGroupRolesAssigned(unit) == "TANK" and UnitName(unit) ~= UnitName("player") then
|
||||
local tank = UnitDetailedThreatSituation(unit, "boss1")
|
||||
if not tank then
|
||||
for k,v in pairs(aura_env.debuffs) do
|
||||
if aura_env.UnitDebuffC(k, unit) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.debuffs =
|
||||
{
|
||||
["Sacred Blade"] = 1
|
||||
}
|
||||
aura_env.UnitDebuffC = function(spell, unit)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
62
Complete Projects/BFA/Taunterino.lua
Normal file
62
Complete Projects/BFA/Taunterino.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UPDATE_TAUNT_GOD
|
||||
function(...)
|
||||
local e = select(1, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local spellName = select(14, ...)
|
||||
if (spellName == "Taunt"
|
||||
or spellName == "Provoke"
|
||||
or spellName == "Dark Command"
|
||||
or spellName == "Torment"
|
||||
or spellName == "Hand of Reckoning"
|
||||
or spellName == "Growl")
|
||||
and subEvent == "SPELL_CAST_SUCCESS" then
|
||||
local target = select(10, ...)
|
||||
local source = select(6, ...)
|
||||
local subEvent = select(3, ...)
|
||||
aura_env.spellName = spellName
|
||||
aura_env.caster = source
|
||||
aura_env.target = target
|
||||
aura_env.cast_time = GetTime()
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE_TAUNT_GOD") end)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_TAUNT_GOD" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.caster then
|
||||
local source_class = UnitClass(aura_env.caster)
|
||||
local source_class_color = "|cFFFFFFFF"
|
||||
local time_color = "|cFFFFFFFF"
|
||||
local target_color = "|cFFFFFFFF"
|
||||
if aura_env.spellName == "Taunt"
|
||||
or aura_env.spellName == "Provoke"
|
||||
or aura_env.spellName == "Hand of Reckoning"
|
||||
or aura_env.spellName == "Dark Command"
|
||||
or aura_env.spellName == "Torment"
|
||||
or aura_env.spellName == "Growl"
|
||||
then cooldown_time = aura_env.cast_time + 8 else cooldown_time = 0 end
|
||||
if (cooldown_time / GetTime()) < 1 then time_color = "|cFF00FF00" else time_color = "|cFFFF0000" end
|
||||
if source_class == "Death Knight" then source_class_color = "|cFFC41F3B"
|
||||
elseif source_class == "Demon Hunter" then source_class_color = "|cFFA330C9"
|
||||
elseif source_class == "Druid" then source_class_color = "|cFFFF7D0A"
|
||||
elseif source_class == "Hunter" then source_class_color = "|cFFABD473"
|
||||
elseif source_class == "Mage" then source_class_color = "|cFF40C7EB"
|
||||
elseif source_class == "Monk" then source_class_color = "|cFF00FF96"
|
||||
elseif source_class == "Paladin" then source_class_color = "|cFFF58CBA"
|
||||
elseif source_class == "Priest" then source_class_color = "|cFFFFFFFF"
|
||||
elseif source_class == "Rogue" then source_class_color = "|cFFFFF569"
|
||||
elseif source_class == "Shaman" then source_class_color = "|cFF0070DE"
|
||||
elseif source_class == "Warlock" then source_class_color = "|cFF8787ED"
|
||||
elseif source_class == "Warrior" then source_class_color = "|cFFC79C6E" end
|
||||
if aura_env.target == UnitName("target") then target_color = "|cFF00FF00" else target_color = "|cFFFF0000" end
|
||||
return source_class_color .. aura_env.caster .. "\n" .. target_color .. aura_env.target .. "\n" .. source_class_color .. aura_env.spellName .. "\n" .. time_color .. math.floor(GetTime() - aura_env.cast_time)
|
||||
end
|
||||
end
|
58
Complete Projects/BFA/UnitDebuff.lua
Normal file
58
Complete Projects/BFA/UnitDebuff.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
--UNIT_AURA COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED
|
||||
function(e, unit, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if UnitExists(unit) then
|
||||
if aura_env.UnitDebuffC(aura_env.debuff, unit) and not aura_env.auras[UnitGUID(unit)] and select(7, aura_env.UnitDebuffC(aura_env.debuff, unit)) == "player" then
|
||||
aura_env.auras[UnitGUID(unit)] = 1
|
||||
aura_env.count = aura_env.count + 1
|
||||
return true
|
||||
elseif not aura_env.UnitDebuffC(aura_env.debuff, unit) and aura_env.auras[UnitGUID(unit)] then
|
||||
aura_env.auras[UnitGUID(unit)] = nil
|
||||
aura_env.count = aura_env.count - 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(1, ...)
|
||||
if se == "UNIT_DIED" then
|
||||
local GUID = select(7, ...)
|
||||
if aura_env.auras[GUID] then
|
||||
aura_env.auras[GUID] = nil
|
||||
aura_env.count = aura_env.count - 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
for k,v in pairs(aura_env.auras) do
|
||||
k = nil
|
||||
v = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function()
|
||||
if aura_env.count == 0 then return true end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.count > 0 then return aura_env.count else return "" end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.debuff = "Dagger in the Back"
|
||||
aura_env.count = 0
|
||||
aura_env.auras = {}
|
||||
aura_env.UnitDebuffC = function(spell, unit)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
33
Complete Projects/BFA/Vaultbot Beep.lua
Normal file
33
Complete Projects/BFA/Vaultbot Beep.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED PLAYER_REGEN_DISABLED PLAYER_TARGET_CHANGED
|
||||
function(e, u)
|
||||
--local mname = "Armored Vaultbot"
|
||||
local mname = "Sickly Saurid"
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(u)
|
||||
if name == mname then
|
||||
PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master")
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master"); end)
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(u)
|
||||
if name == mname then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
||||
LCG.PixelGlow_Stop()
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" and aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
elseif e == "PLAYER_TARGET_CHANGED" and aura_env.ticker then
|
||||
if UnitName("target") == mname then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,72 @@
|
||||
local baseUrl = "https://www.wowhead.com/"
|
||||
local keybind = "CTRL-C"
|
||||
local popupText = "Wowhead %s Link\n" .. keybind .. " to copy"
|
||||
|
||||
local typeAttributeMap = {
|
||||
quest = {"id", "questId", "questID"},
|
||||
item = {info = {"id"}}
|
||||
}
|
||||
|
||||
|
||||
local function ShowUrlPopup(id, type)
|
||||
if not (id or type) then return end
|
||||
local url = baseUrl .. type .. "=" .. id
|
||||
StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url)
|
||||
end
|
||||
|
||||
|
||||
local function getIdAndType(focus)
|
||||
local function loop(focus, keys)
|
||||
if not focus then return end
|
||||
for key, value in pairs(keys) do
|
||||
if type(value) == "table" then
|
||||
return loop(focus[key], value)
|
||||
end
|
||||
local id = focus[value]
|
||||
if id then
|
||||
return id
|
||||
end
|
||||
end
|
||||
end
|
||||
if not focus then return end
|
||||
for type, keys in pairs(typeAttributeMap) do
|
||||
local id = loop(focus, keys)
|
||||
if id then
|
||||
return id, type
|
||||
end
|
||||
end
|
||||
return getIdAndType(focus:GetParent())
|
||||
end
|
||||
|
||||
|
||||
local function run()
|
||||
local focus = GetMouseFocus()
|
||||
local id, type = getIdAndType(focus)
|
||||
ShowUrlPopup(id, type)
|
||||
end
|
||||
|
||||
|
||||
StaticPopupDialogs["WowheadQuestLinkUrl"] = {
|
||||
text = popupText,
|
||||
button1 = "Close",
|
||||
OnShow = function(self, data)
|
||||
local function HidePopup(self) self:GetParent():Hide() end
|
||||
self.editBox:SetScript("OnEscapePressed", HidePopup)
|
||||
self.editBox:SetScript("OnEnterPressed", HidePopup)
|
||||
self.editBox:SetMaxLetters(0)
|
||||
self.editBox:SetText(data)
|
||||
self.editBox:HighlightText(0, self.editBox:GetNumLetters())
|
||||
end,
|
||||
hasEditBox = true,
|
||||
editBoxWidth = 233,
|
||||
timeout = 0,
|
||||
whileDead = true,
|
||||
hideOnEscape = true,
|
||||
preferredIndex = 3,
|
||||
}
|
||||
|
||||
|
||||
local btn = CreateFrame("BUTTON", "KeybindBtn")
|
||||
SetBindingClick(keybind, btn:GetName())
|
||||
btn:SetScript("OnClick", run)
|
||||
|
1
Complete Projects/BFA/Whoa/Events.lua
Normal file
1
Complete Projects/BFA/Whoa/Events.lua
Normal file
@@ -0,0 +1 @@
|
||||
UNIT_POWER_FREQUENT:player UNIT_SPELLCAST_START:player UNIT_SPELLCAST_STOP:player UNIT_DISPLAYPOWER:player UNIT_MAXPOWER:player LOAD
|
45
Complete Projects/BFA/Whoa/Nnoga's Hide Guild Chat.lua
Normal file
45
Complete Projects/BFA/Whoa/Nnoga's Hide Guild Chat.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
function(event,addonName)
|
||||
if event == "ADDON_LOADED" and addonName == "Blizzard_Communities" then
|
||||
--create overlay
|
||||
local f = CreateFrame("Button",nil,UIParent)
|
||||
f:SetFrameStrata("HIGH")
|
||||
f.tex = f:CreateTexture(nil, "BACKGROUND")
|
||||
f.tex:SetAllPoints()
|
||||
f.tex:SetColorTexture(0.1,0.1,0.1,1)
|
||||
f.text = f:CreateFontString()
|
||||
f.text:SetFontObject("GameFontNormalMed3")
|
||||
f.text:SetText("Chat Hidden. Click to show")
|
||||
f.text:SetTextColor(1, 1, 1, 1)
|
||||
f.text:SetJustifyH("CENTER")
|
||||
f.text:SetJustifyV("CENTER")
|
||||
f.text:SetHeight(20)
|
||||
f.text:SetPoint("CENTER",f,"CENTER",0,0)
|
||||
f:EnableMouse(true)
|
||||
f:RegisterForClicks("AnyUp")
|
||||
f:SetScript("OnClick",function(...)
|
||||
f:Hide()
|
||||
end)
|
||||
--toggle
|
||||
local function toggleOverlay()
|
||||
if CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.CHAT then
|
||||
f:SetAllPoints(CommunitiesFrame.Chat.InsetFrame)
|
||||
f:Show()
|
||||
elseif CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.MINIMIZED then
|
||||
f:SetAllPoints(CommunitiesFrameInset)
|
||||
f:Show()
|
||||
else
|
||||
f:Hide()
|
||||
end
|
||||
end
|
||||
local function hideOverlay()
|
||||
f:Hide()
|
||||
end
|
||||
toggleOverlay() --run once
|
||||
|
||||
--hook
|
||||
hooksecurefunc(CommunitiesFrame,"SetDisplayMode", toggleOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"Show",toggleOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"Hide",hideOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"OnClubSelected", toggleOverlay)
|
||||
end
|
||||
end
|
45
Complete Projects/BFA/Withdraw Guild Bank.lua
Normal file
45
Complete Projects/BFA/Withdraw Guild Bank.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
--START DEPOSIT GUILDBANKFRAME_CLOSED
|
||||
function(e)
|
||||
local interval = 0.5
|
||||
local item = "U'taka"
|
||||
if e == "START" then
|
||||
for t = 1, GetNumGuildBankTabs() do
|
||||
for s = 1, 98 do
|
||||
local l = GetGuildBankItemLink(t, s)
|
||||
if l then
|
||||
local name = GetItemInfo(l)
|
||||
if name:match(item) then
|
||||
SetCurrentGuildBankTab(t)
|
||||
aura_env.tab = t
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if not aura_env.tab then print("NO FISH FOUND CUNT") else
|
||||
local s = 1
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(interval, function()
|
||||
print(aura_env.tab, s)
|
||||
AutoStoreGuildBankItem(aura_env.tab, s)
|
||||
s = s + 1
|
||||
end)
|
||||
end
|
||||
elseif e == "DEPOSIT" then
|
||||
local b = 0
|
||||
local s = 1
|
||||
local bs = 1
|
||||
local stage = 1
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(interval, function()
|
||||
if stage == 1 then SplitContainerItem(b, s, 1); print(stage); stage = stage + 1
|
||||
elseif stage == 2 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
|
||||
elseif stage == 3 then PickupContainerItem(b, s); print(stage); stage = stage + 1
|
||||
elseif stage == 4 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
|
||||
elseif stage == 5 then s = s + 1; bs = bs + 1; stage = 1 end
|
||||
if s >= GetContainerNumSlots(b) then s = 1; b = b + 1 end
|
||||
end)
|
||||
elseif e == "GUILDBANKFRAME_CLOSED" then
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
end
|
||||
end
|
1
Complete Projects/BFA/__GOOD SHIT
Normal file
1
Complete Projects/BFA/__GOOD SHIT
Normal file
@@ -0,0 +1 @@
|
||||
/script ChatFrame1:AddMessage("frame name: " .. GetMouseFocus():GetName())
|
7
Complete Projects/Classic/Warrior Heroic Strike.lua
Normal file
7
Complete Projects/Classic/Warrior Heroic Strike.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
--UPDATE_RAGE
|
||||
function(e, ...)
|
||||
if e == "UPDATE_RAGE" then
|
||||
local hs = IsCurrentSpell("Cleave")
|
||||
if hs == true then return true else return false end
|
||||
end
|
||||
end
|
36
Complete Projects/Classic/Warrior Rage.lua
Normal file
36
Complete Projects/Classic/Warrior Rage.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
--UPDATE_RAGE
|
||||
function(e, ...)
|
||||
if e == "UPDATE_RAGE" then
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local rage, maxrage = UnitPower("player"), UnitPowerMax("player")
|
||||
WeakAurasSaved.CustomTrash.CustomRage = rage
|
||||
return rage, maxrage, 1
|
||||
end
|
||||
|
||||
--DURATION2
|
||||
--Other aura
|
||||
function()
|
||||
local hs = IsCurrentSpell("Heroic Strike")
|
||||
local cleave = IsCurrentSpell("Cleave")
|
||||
if hs then return WeakAurasSaved.CustomTrash.CustomRage - 15, UnitPowerMax("player"), 1 elseif cleave then return WeakAurasSaved.CustomTrash.CustomRage - 20, UnitPowerMax("player"), 1 else return WeakAurasSaved.CustomTrash.CustomRage, UnitPowerMax("player"), 1 end
|
||||
end
|
||||
|
||||
--TEXT
|
||||
function()
|
||||
return WeakAurasSaved.CustomTrash.CustomRage
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if WeakAuras.IsOptionsOpen() and aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
else
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end
|
||||
end
|
199
Complete Projects/Fivver Stuff/Aura Uptime.lua
Normal file
199
Complete Projects/Fivver Stuff/Aura Uptime.lua
Normal file
@@ -0,0 +1,199 @@
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
|
||||
-- look for auras every frame
|
||||
-- or maybe look for combatlog ?
|
||||
-- get time when each aura is applied/expires
|
||||
-- calculate uptime based on the log ?
|
||||
-- alternatively sample each frame and add up # of frames aura was active and # of frames combat was ongoing
|
||||
-- bad solution though
|
||||
function(e)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE") end)
|
||||
aura_env.startCombat = debugprofilestop()
|
||||
aura_env.buffs = {}
|
||||
aura_env.debuffs = {}
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_ENABLED" then
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
elseif e == "UPDATE" then return true end
|
||||
end
|
||||
|
||||
--CLEU
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(e)
|
||||
if not aura_env.buffs then aura_env.buffs = {} end
|
||||
if not aura_env.debuffs then aura_env.debuffs = {} end
|
||||
|
||||
local timestamp, subEvent, _, _, caster, _, _, _, target = CombatLogGetCurrentEventInfo()
|
||||
-- print(CombatLogGetCurrentEventInfo())
|
||||
|
||||
-- if "buff" is selected in the menu and
|
||||
-- there has been an aura applied or removed and
|
||||
-- the aura has been cast by the player on the player then
|
||||
-- do fancy data stuff pls
|
||||
if InCombatLockdown() ~= false then
|
||||
local targetUnit = "boss1"
|
||||
if UnitExists(targetUnit) == false then targetUnit = "target" end
|
||||
if (aura_env.config.menu == 1 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == target and caster == UnitName("player")) then
|
||||
local spell = select(12, CombatLogGetCurrentEventInfo())
|
||||
print("SPell", spell)
|
||||
if not aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell] = {
|
||||
["timeActive"] = 0,
|
||||
["timeInactive"] = 0,
|
||||
["active"] = false,
|
||||
["lastSwitch"] = debugprofilestop(),
|
||||
}
|
||||
-- print("OPA; NEW SPELL")
|
||||
end
|
||||
if subEvent == "SPELL_AURA_APPLIED" and aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell].active = true
|
||||
aura_env.buffs[spell].timeInactive = aura_env.buffs[spell].timeInactive + debugprofilestop() - aura_env.buffs[spell].lastSwitch
|
||||
aura_env.buffs[spell].lastSwitch = debugprofilestop()
|
||||
elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell].active = false
|
||||
aura_env.buffs[spell].timeActive = aura_env.buffs[spell].timeActive + debugprofilestop() - aura_env.buffs[spell].lastSwitch
|
||||
aura_env.buffs[spell].lastSwitch = debugprofilestop()
|
||||
end
|
||||
elseif (aura_env.config.menu == 2 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == UnitName("player") and target == UnitName(targetUnit)) then
|
||||
local spell = select(12, CombatLogGetCurrentEventInfo())
|
||||
if not aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell] = {
|
||||
["timeActive"] = 0,
|
||||
["timeInactive"] = 0,
|
||||
["active"] = false,
|
||||
["lastSwitch"] = debugprofilestop(),
|
||||
}
|
||||
-- print("OPA; NEW SPELL")
|
||||
end
|
||||
if subEvent == "SPELL_AURA_APPLIED" and aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell].active = true
|
||||
aura_env.debuffs[spell].timeInactive = aura_env.debuffs[spell].timeInactive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch
|
||||
aura_env.debuffs[spell].lastSwitch = debugprofilestop()
|
||||
elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell].active = false
|
||||
aura_env.debuffs[spell].timeActive = aura_env.debuffs[spell].timeActive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch
|
||||
aura_env.debuffs[spell].lastSwitch = debugprofilestop()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- debug print pls
|
||||
for k,v in pairs(aura_env.buffs) do
|
||||
-- print(k,v)
|
||||
if type(v) == "table" then
|
||||
for k2,v2 in pairs(v) do
|
||||
-- print(k2,v2)
|
||||
if type(v2) == "table" then
|
||||
for k3,v3 in pairs(v2) do
|
||||
-- print(k3,v3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
aura_env.combatTime = (debugprofilestop() - aura_env.startCombat) / 1000
|
||||
local output = aura_env.formatTime(aura_env.combatTime) .. "\n"
|
||||
aura_env.getColor(1)
|
||||
for k,v in pairs(aura_env.buffs) do
|
||||
|
||||
-- DEBUG
|
||||
-- print(k)
|
||||
-- for k2,v2 in pairs(v) do
|
||||
-- print(k2, v2)
|
||||
-- end
|
||||
-- print("DEBUG TIME", debugprofilestop())
|
||||
-- print("END" .. "\n")
|
||||
|
||||
local totalActiveTime = 0
|
||||
if v.active == true then
|
||||
totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive
|
||||
else
|
||||
totalActiveTime = totalActiveTime + v.timeActive
|
||||
end
|
||||
|
||||
output = string.format("%s %s%20s %10s %10s\n", output, aura_env.getColor(1), GetSpellInfo(k), aura_env.formatTime(totalActiveTime / 1000), string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100))
|
||||
-- output = output .. aura_env.getColor(1) .. GetSpellInfo(k) .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n"
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.debuffs) do
|
||||
|
||||
-- DEBUG
|
||||
-- print(k)
|
||||
for k2,v2 in pairs(v) do
|
||||
-- print(k2, v2)
|
||||
end
|
||||
-- print("DEBUG TIME", debugprofilestop())
|
||||
-- print("END" .. "\n")
|
||||
|
||||
local totalActiveTime = 0
|
||||
if v.active == true then
|
||||
totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive
|
||||
else
|
||||
totalActiveTime = totalActiveTime + v.timeActive
|
||||
end
|
||||
output = output .. aura_env.getColor(2)
|
||||
if k == 233490 or (k >= 233496 and k <= 233499) then
|
||||
if k == 233490 then
|
||||
output = output .. GetSpellInfo(k) .. " 1"
|
||||
elseif k >= 233496 and k <= 233499 then
|
||||
output = output .. GetSpellInfo(k) .. " " .. (k % 233496) + 2
|
||||
end
|
||||
else
|
||||
output = output .. GetSpellInfo(k)
|
||||
end
|
||||
output = output .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.buffs = {}
|
||||
aura_env.debuffs = {}
|
||||
aura_env.combatTime = 0
|
||||
aura_env.startCombat = 0
|
||||
|
||||
aura_env.formatTime = function(time)
|
||||
local res, m, s = tonumber(string.format("%d", time)), 0, 0
|
||||
while res >= 60 do
|
||||
m = m + 1
|
||||
res = res - 60
|
||||
end
|
||||
s = res
|
||||
if s < 10 then
|
||||
s = string.format("0%d", s)
|
||||
end
|
||||
if type(s) ~= "string" then tostring(s) end
|
||||
return string.format("%d:%s", m, s)
|
||||
end
|
||||
|
||||
aura_env.getColor = function(mode)
|
||||
-- ff78cb00
|
||||
local output = "\124c"
|
||||
local colors = {}
|
||||
if mode == 1 then
|
||||
colors = {aura_env.config.bcolor[4], aura_env.config.bcolor[1], aura_env.config.bcolor[2], aura_env.config.bcolor[3]}
|
||||
elseif mode == 2 then
|
||||
colors = {aura_env.config.dcolor[4], aura_env.config.dcolor[1], aura_env.config.dcolor[2], aura_env.config.dcolor[3]}
|
||||
end
|
||||
local a, r, g, b = "00", "00", "00", "00"
|
||||
|
||||
a = string.format("%x", colors[1] * 255)
|
||||
r = string.format("%x", colors[2] * 255)
|
||||
g = string.format("%x", colors[3] * 255)
|
||||
b = string.format("%x", colors[4] * 255)
|
||||
|
||||
|
||||
if string.len(a) == 1 then a = "0" .. a end
|
||||
if string.len(r) == 1 then r = "0" .. r end
|
||||
if string.len(g) == 1 then g = "0" .. g end
|
||||
if string.len(b) == 1 then b = "0" .. b end
|
||||
|
||||
output = output .. a .. r .. g .. b
|
||||
return output
|
||||
end
|
127
Complete Projects/Fivver Stuff/Buff Me Daddy.lua
Normal file
127
Complete Projects/Fivver Stuff/Buff Me Daddy.lua
Normal file
@@ -0,0 +1,127 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED ADD_BUFF REMOVE_BUFF
|
||||
--https://pastebin.com/4xyHRftN
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_REMOVED" then
|
||||
aura_env.scanBuffs()
|
||||
end
|
||||
elseif e == "ADD_BUFF" then
|
||||
local msg = select(1, ...)
|
||||
local arg = select(2, ...)
|
||||
if msg then
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = {["active"] = false}
|
||||
if arg then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg].group = arg
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] then WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] = {["active"] = 0, ["shown"] = true} end
|
||||
end
|
||||
print(msg, "added")
|
||||
else
|
||||
print(msg, "already exists")
|
||||
end
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
elseif e == "REMOVE_BUFF" then
|
||||
local msg = select(1, ...)
|
||||
if msg and WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = nil
|
||||
print(msg, "removed")
|
||||
else
|
||||
print(msg, WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg])
|
||||
print("Cannot remove", msg)
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons then WeakAurasSaved.CustomTrash.BuffButtons = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs then WeakAurasSaved.CustomTrash.BuffButtons.Buffs = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons then WeakAurasSaved.CustomTrash.BuffButtons.Buttons = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Groups then WeakAurasSaved.CustomTrash.BuffButtons.Groups = {} end
|
||||
aura_env.buttons = 0
|
||||
|
||||
aura_env.scanBuffs = function()
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
v.active = false
|
||||
end
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
print(name)
|
||||
if WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name].active = true
|
||||
end
|
||||
if not name then break end
|
||||
end
|
||||
aura_env.refreshButtons()
|
||||
end
|
||||
|
||||
aura_env.resortButtons = function()
|
||||
aura_env.buttons = 0
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do
|
||||
if v:IsShown() == true then
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[k] then
|
||||
v:Hide()
|
||||
else
|
||||
v:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0)
|
||||
aura_env.buttons = aura_env.buttons + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
aura_env.refreshButtons = function()
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] or not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k][0] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("type", "macro")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:RegisterForClicks("LeftButtonDown")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show()
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0)
|
||||
end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("macrotext", format("/use %s", k))
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
end
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
if v.active == false then
|
||||
local texture = GetItemIcon(k) or GetSpellTexture(k)
|
||||
if not GetSpellTexture(k) then
|
||||
local count = GetItemCount(k)
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text then WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text = WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:CreateFontString("ItemCount", "ARTWORK") end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetFont("Fonts\\FRIZQT__.TTF", aura_env.config.size / 2, "OUTLINE, MONOCHROME")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetPoint("CENTER", WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k], "CENTER")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetText(count)
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:Show()
|
||||
end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetNormalTexture(texture)
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show()
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k])
|
||||
else
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Hide()
|
||||
end
|
||||
end
|
||||
aura_env.resortButtons()
|
||||
end
|
||||
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do
|
||||
if k[0] then
|
||||
print(k,v)
|
||||
v:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
ActionButton_HideOverlayGlow(k)
|
||||
end
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
|
||||
|
||||
--INIT
|
||||
local xsize, ysize = aura_env.region:GetSize()
|
||||
if not aura_env.button then aura_env.button = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate") end
|
||||
if aura_env.button then
|
||||
aura_env.button:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.button:SetSize(xsize, ysize)
|
||||
aura_env.button:SetAttribute("type", "macro")
|
||||
aura_env.button:RegisterForClicks("LeftButtonDown")
|
||||
aura_env.button:SetAttribute("macrotext", format("/use %s", aura_env.id))
|
||||
end
|
357
Complete Projects/Fivver Stuff/FO1B8D1F40B6 - Conductive Ink.lua
Normal file
357
Complete Projects/Fivver Stuff/FO1B8D1F40B6 - Conductive Ink.lua
Normal file
@@ -0,0 +1,357 @@
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(e, ...)
|
||||
if aura_env.config.tsuenable == false then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.damagepercentage = 0
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
local bossmax = UnitHealthMax(unit)
|
||||
if aura_env.config.pdmg == true then
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage
|
||||
if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
else
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i))
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "")
|
||||
aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage)
|
||||
end
|
||||
break
|
||||
elseif not name then break end
|
||||
end
|
||||
end
|
||||
aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--TSU
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(allstates, e, ...)
|
||||
if aura_env.config.tsuenable == true then
|
||||
if InCombatLockdown() == true then
|
||||
--Base setup
|
||||
local unit = "target"
|
||||
if not aura_env.data then aura_env.data = {} end
|
||||
local crit = false
|
||||
local function update_allstates(data, unit)
|
||||
local maxdmg, maxstack = 0, 0
|
||||
local totaldmg, totalstack = 0, 0
|
||||
--Get max and total damage
|
||||
for k,v in pairs(data) do
|
||||
if v.d > maxdmg then
|
||||
maxdmg = v.d
|
||||
end
|
||||
if v.s > maxstack then
|
||||
maxstack = v.s
|
||||
end
|
||||
totaldmg = totaldmg + v.d
|
||||
totalstack = totalstack + v.s
|
||||
end
|
||||
--Get damage in boss %
|
||||
local perc = 0
|
||||
local pp = 0
|
||||
local islow = false
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
pp = hp/maxhp
|
||||
if pp < 0.3 then islow = true end
|
||||
perc = aura_env.round(((totaldmg / maxhp) * 100), 2)
|
||||
end
|
||||
--Store all members in allstates
|
||||
for k,v in pairs(data) do
|
||||
allstates[k] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
caster = k,
|
||||
class = v.c,
|
||||
value = v.d,
|
||||
total = maxdmg,
|
||||
index = v.d,
|
||||
stacks = v.s,
|
||||
crit = v.cr,
|
||||
}
|
||||
end
|
||||
--Total bar control
|
||||
if UnitExists(unit) then
|
||||
allstates[1] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
caster = "Total",
|
||||
class = 5, --priest; White
|
||||
value = totaldmg,
|
||||
total = totaldmg,
|
||||
index = totaldmg + 1,
|
||||
stacks = totalstack,
|
||||
percent = perc,
|
||||
}
|
||||
if islow == true then
|
||||
allstates[1].class = 15
|
||||
end
|
||||
end
|
||||
end
|
||||
--Debug and options
|
||||
local command = UnitDebuff; if aura_env.config.debug == true then command = aura_env.UnitDebuffC end
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
--Trying to store info of debuff into data table from <unit>, looking for damage, stacks and caster, also included debug
|
||||
if UnitExists(unit) then
|
||||
if e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then
|
||||
for k,v in pairs(allstates) do
|
||||
v.show = false
|
||||
v.changed = true
|
||||
end
|
||||
aura_env.data = {}
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
for i = 1, 100 do
|
||||
local name = command(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, command(unit, i))
|
||||
caster = UnitName(caster)
|
||||
local stacks = select(3, command(unit, i))
|
||||
if aura_env.config.debug == false then
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(3, UnitClass(caster)),
|
||||
}
|
||||
end
|
||||
else
|
||||
local damage = i * 523427
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(4, command(unit, i)),
|
||||
}
|
||||
end
|
||||
elseif not name then
|
||||
break
|
||||
end
|
||||
end
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
--Looking for debuff info upon applying new stack, to update data table
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" then
|
||||
for i = 1, 100 do
|
||||
local name = command(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, command(unit, i))
|
||||
caster = UnitName(caster)
|
||||
local stacks = select(3, command(unit, i))
|
||||
if aura_env.config.debug == false then
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(3, UnitClass(caster)),
|
||||
}
|
||||
end
|
||||
else
|
||||
local damage = i * 12312
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(4, command(unit, i)),
|
||||
}
|
||||
end
|
||||
elseif not name then
|
||||
break
|
||||
end
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
--Looking for damage done by debuff at 30% and storing into data as new damage
|
||||
elseif se == "SPELL_DAMAGE" and select(13, ...) == "Conductive Ink" then
|
||||
local caster = select(5, ...)
|
||||
local hit = select(15, ...)
|
||||
local crit = select(21, ...)
|
||||
if aura_env.data[caster] then
|
||||
aura_env.data[caster].d = hit
|
||||
aura_env.data[caster].cr = crit
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--CUSTOM TRIGGER
|
||||
function(t)
|
||||
if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end
|
||||
end
|
||||
|
||||
--COLOR ANIMATION
|
||||
function()
|
||||
if aura_env.state then
|
||||
return aura_env.classColor(aura_env.state.class)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.tsuenable == false then
|
||||
if aura_env.config.pdmg == true then
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
else
|
||||
if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
end
|
||||
else
|
||||
if aura_env.state.caster == "Total" then
|
||||
return aura_env.shorten(aura_env.state.value) .. " - " .. aura_env.state.stacks .. " - " .. aura_env.state.percent .. "%"
|
||||
else
|
||||
if aura_env.state.crit == true then
|
||||
return aura_env.state.stacks .. " - " .. aura_env.shorten(aura_env.state.value) .. "(C)"
|
||||
else
|
||||
return aura_env.state.stacks .. " - " .. aura_env.shorten(aura_env.state.value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
|
||||
aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
|
||||
if aura_env.config.tsuenable == false then
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text3:SetFont(font, size, flags)
|
||||
aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0)
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.region.bar:Hide()
|
||||
end
|
||||
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() end
|
||||
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43
|
||||
elseif class == 2 then return 0.96, 0.55, 0.73
|
||||
elseif class == 3 then return 0.67, 0.83, 0.45
|
||||
elseif class == 4 then return 1, 0.96, 0.41, 1
|
||||
elseif class == 5 then return 1, 1, 1
|
||||
elseif class == 6 then return 0.77, 0.12, 0.23
|
||||
elseif class == 7 then return 0, 0.44, 0.87
|
||||
elseif class == 8 then return 0.25, 0.78, 0.92
|
||||
elseif class == 9 then return 0.53, 0.53, 0.93
|
||||
elseif class == 10 then return 0, 1, 0.59
|
||||
elseif class == 11 then return 1, 0.49, 0.04
|
||||
elseif class == 12 then return 0.64, 0.19, 0.79
|
||||
elseif class == 15 then return 0, 1, 0
|
||||
else return 1, 1, 1 end
|
||||
end
|
||||
--TESTING
|
||||
--Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1
|
||||
aura_env.UnitDebuffC = function(unit, i)
|
||||
if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko"
|
||||
elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy"
|
||||
elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary"
|
||||
elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna"
|
||||
elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John"
|
||||
elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank"
|
||||
elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma"
|
||||
elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia"
|
||||
elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry"
|
||||
elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan"
|
||||
elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael"
|
||||
end
|
||||
end
|
@@ -0,0 +1,87 @@
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS
|
||||
function(e, msg, sender, ...)
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
}
|
||||
end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
local test = ""
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
test = test .. k .. "\n"
|
||||
end
|
||||
message(test)
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.button = CreateFrame("Button", "buton", UIParent, "SecureActionButtonTemplate")
|
||||
aura_env.button:SetAttribute("type", "macro")
|
||||
aura_env.button:SetPoint("CENTER", UIParent, "CENTER")
|
||||
aura_env.button:SetWidth(128)
|
||||
aura_env.button:SetHeight(128)
|
||||
aura_env.button:SetNormalTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp")
|
||||
aura_env.button:SetPushedTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp")
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
"port",
|
||||
"portal",
|
||||
"org",
|
||||
"og",
|
||||
"UC",
|
||||
"under",
|
||||
"thunder",
|
||||
"tb",
|
||||
"wtb",
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UNIT_STATS PLAYER_TARGET_CHANGED
|
||||
function(e, ...)
|
||||
local function updateStats()
|
||||
aura_env.output = "BUFFS "
|
||||
local noBuffs = 0
|
||||
local hitPercent = 0
|
||||
local critPercent = 0
|
||||
local attackPower = 0
|
||||
local effArmor = 0
|
||||
local armorPercent = 0
|
||||
|
||||
for i = 1, 40 do
|
||||
if UnitBuff("player", i) then
|
||||
noBuffs = noBuffs + 1
|
||||
end
|
||||
end
|
||||
hitPercent = GetCombatRatingBonus(6) + GetHitModifier()
|
||||
critPercent = GetCritChance()
|
||||
local base, pos, neg = UnitAttackPower("player")
|
||||
attackPower = base + pos - neg
|
||||
effArmor = select(2, UnitArmor("player"))
|
||||
if UnitExists("target") then
|
||||
local tlevel = UnitLevel("target")
|
||||
if tlevel < 60 then
|
||||
armorPercent = (effArmor / ((85 * tlevel) + effArmor + 400)) * 100
|
||||
elseif tlevel >= 60 then
|
||||
armorPercent = (effArmor / ((467.5 * tlevel) + effArmor - 22167.5)) * 100
|
||||
end
|
||||
end
|
||||
|
||||
-- BUFFS %d%d (5 + 2 + 1 = 8 + 4)
|
||||
aura_env.output = aura_env.output .. noBuffs
|
||||
while string.len(aura_env.output) < 12 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d (12 + 3 + 1 + 4 = 20 + 4)
|
||||
aura_env.output = aura_env.output .. "HIT " .. math.ceil((hitPercent * 10)) / 10 .. "%"
|
||||
while string.len(aura_env.output) < 24 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d (24 + 4 + 1 + 4 = 33 + 4)
|
||||
aura_env.output = aura_env.output .. "CRIT " .. math.ceil((critPercent * 10)) / 10 .. "%"
|
||||
while string.len(aura_env.output) < 37 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d<4>AP %d+
|
||||
-- APPEND AP
|
||||
-- 37 + 3 + 8 = 48
|
||||
aura_env.output = aura_env.output .. "AP " .. attackPower
|
||||
while string.len(aura_env.output) < 48 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
aura_env.output = aura_env.output .. "A " .. effArmor .. " " .. math.ceil((armorPercent * 10)) / 10 .. "%"
|
||||
end
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local subevents = {
|
||||
["SPELL_AURA_APPLIED"] = true,
|
||||
["SPELL_AURA_APPLIED_DOSE"] = true,
|
||||
["SPELL_AURA_REMOVED"] = true,
|
||||
["SPELL_AURA_REMOVED_DOSE"] = true,
|
||||
["SPELL_AURA_REFRESH"] = true,
|
||||
}
|
||||
if subevents[se] then
|
||||
local target = select(9, ...)
|
||||
if target == UnitName("player") then
|
||||
updateStats()
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UNIT_STATS" or e == "PLAYER_TARGET_CHANGED" then
|
||||
updateStats()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.output or ""
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.output = ""
|
||||
WeakAuras.ScanEvents("UNIT_STATS")
|
81
Complete Projects/Fivver Stuff/FO2C01B46B55 - Monk Tutor.lua
Normal file
81
Complete Projects/Fivver Stuff/FO2C01B46B55 - Monk Tutor.lua
Normal file
@@ -0,0 +1,81 @@
|
||||
--UNIT_HEALTH UNIT_AURA PLAYER_REGEN_DISABLED
|
||||
function(e, u)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
aura_env.lowppl = 0
|
||||
aura_env.renw = 0
|
||||
elseif e == "UNIT_AURA" then
|
||||
if u == "player" then
|
||||
local i = 1
|
||||
while UnitBuff(u, i) do
|
||||
local name = UnitBuff(u, i)
|
||||
if name == "Mana Tea" then
|
||||
aura_env.manaTea = true
|
||||
break
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
elseif u:match("raid") then
|
||||
if not aura_env.people[u] then aura_env.people[u] = {} end
|
||||
aura_env.people[u].buff = false
|
||||
local i = 1
|
||||
while UnitBuff(u, i) do
|
||||
local caster = select(8, UnitBuff(u, i))
|
||||
local name = UnitBuff(u, i)
|
||||
if name == "Renewing Mist" and caster == "player" then
|
||||
aura_env.people[u].buff = true
|
||||
break
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
aura_env.renw = 0
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.buff == true then
|
||||
aura_env.renw = aura_env.renw + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_HEALTH" then
|
||||
if u:match("raid") then
|
||||
if not aura_env.people[u] then aura_env.people[u] = {} end
|
||||
aura_env.people[u].hp = UnitHealth(u)
|
||||
aura_env.people[u].mhp = UnitHealthMax(u)
|
||||
aura_env.people[u].php = UnitHealth(u) / UnitHealthMax(u)
|
||||
if aura_env.people[u].php < aura_env.config.low then
|
||||
aura_env.people[u].low = true
|
||||
else
|
||||
aura_env.people[u].low = false
|
||||
end
|
||||
end
|
||||
aura_env.lowppl = 0
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.low == true then
|
||||
aura_env.lowppl = aura_env.lowppl + 1
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--ICON
|
||||
function()
|
||||
if aura_env.manaTea == true then
|
||||
return 1360980
|
||||
elseif aura_env.lowppl < 6 or aura_env.renw >= 5 then
|
||||
return 1360980
|
||||
elseif aura_env.lowppl >= 6 and aura_env.renw < 5 then
|
||||
return 1360978
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return format("Renewing mists active: %d\nPeople on low health: %d", aura_env.renw, aura_env.lowppl)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.manaTea = false
|
||||
aura_env.lowppl = 0
|
||||
aura_env.renw = 0
|
||||
aura_env.people = {}
|
@@ -0,0 +1,54 @@
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_CHANNEL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS
|
||||
function(e, msg, sender, ...)
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" or e == "CHAT_MSG_CHANNEL" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
end
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.toggle = 0
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end
|
12
Complete Projects/Fivver Stuff/FO3BE740D804 - BG Q.lua
Normal file
12
Complete Projects/Fivver Stuff/FO3BE740D804 - BG Q.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
--GOSSIP_SHOW UPDATE_BATTLEFIELD_STATUS
|
||||
function(e, ...)
|
||||
if e == "GOSSIP_SHOW" then
|
||||
local target = UnitName("target")
|
||||
if target:match("Grizzle Halfmane") or target:match("Kartra Bloodsnarl") or target:match("Glordrum Steelbeard") or target:match("Thelman Slatefist") or target:match(" Taim Ragetotem") or target:match("Brogun Stoneshield") or target:match("Innkeeper Gryshka") then
|
||||
GossipTitleButton1:Click()
|
||||
BattlefieldFrameJoinButton:Click()
|
||||
end
|
||||
elseif e == "UPDATE_BATTLEFIELD_STATUS" then
|
||||
StaticPopup1Button1:Click()
|
||||
end
|
||||
end
|
277
Complete Projects/Fivver Stuff/FO3BE740D804 - Magus Portals.lua
Normal file
277
Complete Projects/Fivver Stuff/FO3BE740D804 - Magus Portals.lua
Normal file
@@ -0,0 +1,277 @@
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS CHAT_MSG_SYSTEM COMBAT_LOG_EVENT_UNFILTERED TRADE_SHOW TRADE_MONEY_CHANGED PLAYER_TRADE_MONEY TRADE_ACCEPT_UPDATE TRADE_CLOSED
|
||||
function(e, msg, sender, ...)
|
||||
local function updateText()
|
||||
local texts = {[1] = {}, [2] = {}, [3] = {}, [4] = {}}
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.state == 5 then
|
||||
if v.kw == "uc" or v.kw == "under" or v.kw == "undercity" then
|
||||
texts[1][#texts[1] + 1] = k
|
||||
elseif v.kw == "org" or v.kw == "og" or v.kw == "orgrimmar" then
|
||||
texts[2][#texts[2] + 1] = k
|
||||
elseif v.kw == "tb" or v.kw == "thunder" or v.kw == "thunderbluff" then
|
||||
texts[3][#texts[3] + 1] = k
|
||||
elseif v.kw == "test" then
|
||||
texts[4][#texts[4] + 1] = k
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(texts) do
|
||||
local text = ""
|
||||
for k2,v2 in pairs(v) do
|
||||
text = text .. v2 .. "\n"
|
||||
end
|
||||
WeakAurasSaved.MagusKeywords.buttons[k].text:SetText(text)
|
||||
end
|
||||
end
|
||||
|
||||
local aura_env = aura_env
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
["test"] = 1,
|
||||
} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-?%w*") or sender
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
if not aura_env.people[noRealmSender] then aura_env.people[noRealmSender] = {["state"] = 0, ["kw"] = k} end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "CHAT_MSG_SYSTEM" then
|
||||
if msg:match("You have invited") then
|
||||
local sender = msg:match("You have invited (.+) to join your group")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] then
|
||||
aura_env.people[noRealmSender].state = 0
|
||||
end
|
||||
elseif msg:match("joins the party") then
|
||||
local sender = msg:match("(.+) joins the party")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] and aura_env.people[noRealmSender].state == 0 then
|
||||
aura_env.people[noRealmSender].state = 1
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if UnitName("party" .. i) == sender then
|
||||
aura_env.people[noRealmSender].unitID = "party" .. i
|
||||
break
|
||||
end
|
||||
end
|
||||
--If not tradeable create ticker and do other stuff
|
||||
if CheckInteractDistance(aura_env.people[noRealmSender].unitID, 2) then
|
||||
InitiateTrade(aura_env.people[noRealmSender].unitID)
|
||||
aura_env.people[noRealmSender].state = 2
|
||||
end
|
||||
end
|
||||
elseif msg:match("leaves the party") then
|
||||
local sender = msg:match("(.+) leaves the party")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] and aura_env[noRealmSender].state == 6 then
|
||||
aura_env.people[noRealmSender] = nil
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_SHOW" then
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.state == 2 then
|
||||
aura_env.isTrade = true
|
||||
aura_env.tradee = k
|
||||
aura_env.people[k].state = 3
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_ACCEPT_UPDATE" then
|
||||
if msg == 1 and sender == 1 then
|
||||
if aura_env.isTrade == true then
|
||||
aura_env.people[aura_env.tradee].state = 4
|
||||
if aura_env.people[aura_env.tradee].kw == "uc" or aura_env.people[aura_env.tradee].kw == "under" or aura_env.people[aura_env.tradee].kw == "undercity" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3])
|
||||
aura_env.castQueue["Portal: Undercity"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Undercity"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "org" or aura_env.people[aura_env.tradee].kw == "og" or aura_env.people[aura_env.tradee].kw == "orgrimmar" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2])
|
||||
aura_env.castQueue["Portal: Orgrimmar"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Orgrimmar"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "tb" or aura_env.people[aura_env.tradee].kw == "thunder" or aura_env.people[aura_env.tradee].kw == "thunderbluff" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1])
|
||||
aura_env.castQueue["Portal: Thunder Bluff"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Thunder Bluff"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "test" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4])
|
||||
aura_env.castQueue["Consecration"] = true
|
||||
aura_env.people[aura_env.tradee]["Consecration"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
end
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
updateText()
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_CLOSED" then
|
||||
if aura_env.isTrade == true then
|
||||
aura_env.people[aura_env.tradee].state = 2
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = sender
|
||||
local caster = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" and caster == UnitName("player") then
|
||||
local spell = select(11, ...)
|
||||
if aura_env.castQueue[spell] == true then aura_env.castQueue[spell] = false end
|
||||
if spell == "Portal: Undercity" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3])
|
||||
elseif spell == "Portal: Orgrimmar" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2])
|
||||
elseif spell == "Portal: Thunder Bluff" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1])
|
||||
elseif spell == "Consecration" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4])
|
||||
end
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v[spell] and v.state == 5 then
|
||||
v[spell] = false
|
||||
aura_env.people[k] = nil
|
||||
updateText()
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
for i = 1, 3 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Show()
|
||||
end
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
for i = 1, 3 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Hide()
|
||||
end
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
local test = ""
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
test = test .. k .. "\n"
|
||||
end
|
||||
message(test)
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
} end
|
||||
|
||||
--[[
|
||||
Player state table
|
||||
0 - invited
|
||||
1 - joined
|
||||
2 - trade queue
|
||||
3 - trading
|
||||
4 - trade complete
|
||||
5 - light up portal
|
||||
6 - portal cast
|
||||
7 - left? clean table
|
||||
|
||||
Cancel everything if person leave
|
||||
]]
|
||||
aura_env.people = {}
|
||||
aura_env.castQueue = {}
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
|
||||
--[[local function hideButon(self)
|
||||
ActionButton_HideOverlayGlow(self)
|
||||
end--]]
|
||||
|
||||
if not WeakAurasSaved.MagusKeywords.buttons or not WeakAurasSaved.MagusKeywords.buttons[1][0] then WeakAurasSaved.MagusKeywords.buttons = {
|
||||
[1] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[2] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[3] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[4] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
} end
|
||||
|
||||
for i = 1, 4 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetAttribute("type", "macro")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetPoint("CENTER", aura_env.region, "CENTER", (i - 1) * aura_env.config.size, 0)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:RegisterForClicks("LeftButtonDown")
|
||||
--WeakAurasSaved.MagusKeywords.buttons[i]:SetScript("PreClick", hideButon)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text = WeakAurasSaved.MagusKeywords.buttons[i]:CreateFontString("text", "ARTWORK")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:SetFont("Fonts\\FRIZQT__.TTF", 14, "OUTLINE, MONOCHROME")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:SetPoint("CENTER", WeakAurasSaved.MagusKeywords.buttons[i], "CENTER", 0, -aura_env.config.size / 2 - 14)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:Show()
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Show()
|
||||
end
|
||||
|
||||
WeakAurasSaved.MagusKeywords.buttons[1]:SetNormalTexture(135750)
|
||||
WeakAurasSaved.MagusKeywords.buttons[1]:SetAttribute("macrotext", format("/cast Portal: Thunder Bluff"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[2]:SetNormalTexture(135744)
|
||||
WeakAurasSaved.MagusKeywords.buttons[2]:SetAttribute("macrotext", format("/cast Portal: Orgrimmar"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[3]:SetNormalTexture(135751)
|
||||
WeakAurasSaved.MagusKeywords.buttons[3]:SetAttribute("macrotext", format("/cast Portal: Undercity"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[4]:SetNormalTexture(135926)
|
||||
WeakAurasSaved.MagusKeywords.buttons[4]:SetAttribute("macrotext", format("/cast Consecration"))
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,234 @@
|
||||
--GROUP_ROSTER_UPDATE INSPECT_READY
|
||||
function(e)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
for i = 1, 40 do
|
||||
local u = "raid" .. i
|
||||
if UnitExists(u) and not UnitIsUnit(u, "player") then
|
||||
if not aura_env.data[u] then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
if aura_env.data[u] then
|
||||
if aura_env.data[u].name ~= UnitName(u) then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
end
|
||||
elseif not UnitExists(u) and aura_env.data[u] then
|
||||
if aura_env.data[u] then
|
||||
aura_env.data[u] = nil
|
||||
end
|
||||
for k,v in pairs(aura_env.inspectQueue) do
|
||||
if v == u then
|
||||
table.remove(aura_env.inspectQueue, k)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "INSPECT_READY" then
|
||||
if aura_env.notifyInspect ~= false and aura_env.inspecting == false then
|
||||
InspectUnit(aura_env.notifyInspect)
|
||||
aura_env.inspecting = true
|
||||
elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then
|
||||
for i = 1, 17 do
|
||||
local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0
|
||||
if link ~= 0 then
|
||||
local stats = {}
|
||||
GetItemStats(link, stats)
|
||||
local rarity = select(3, GetItemInfo(link))
|
||||
local ilvl = select(4, GetItemInfo(link))
|
||||
if aura_env.config.debug == true then
|
||||
for k,v in pairs(stats) do
|
||||
end
|
||||
end
|
||||
if i == 2 then
|
||||
aura_env.data[aura_env.notifyInspect].neckilvl = ilvl
|
||||
elseif i == 15 and rarity == 5 then
|
||||
aura_env.data[aura_env.notifyInspect].backilvl = ilvl
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION"] then
|
||||
--print("Item", link, "adds", stats["ITEM_MOD_CORRUPTION"], "corruption")
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"]
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then
|
||||
--print("Item", link, "reduces corruption by", stats["ITEM_MOD_CORRUPTION_RESISTANCE"])
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"]
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.data[aura_env.notifyInspect].inspectQueue = false
|
||||
aura_env.data[aura_env.notifyInspect].inspected = true
|
||||
aura_env.notifyInspect = false
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing) end
|
||||
ClearInspectPlayer()
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.inspected == false and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
|
||||
local text = {"", "", "", ""}
|
||||
for k,v in pairs(aura_env.data) do
|
||||
text[1] = text[1] .. aura_env.classColor(v.class) .. v.name .. "\n"
|
||||
text[2] = text[2] .. "|cff" .. aura_env.config.ncolor .. v.neckilvl .. "\n"
|
||||
text[3] = text[3] .. "|cff" .. aura_env.config.ccolor .. v.backilvl .. "\n"
|
||||
text[4] = text[4] .. "|cff" .. aura_env.config.cocolor .. v.corruption .. "\n"
|
||||
end
|
||||
|
||||
aura_env.text = text[1]
|
||||
aura_env.randomFrame.text2:SetText(text[2])
|
||||
aura_env.randomFrame.text3:SetText(text[3])
|
||||
aura_env.randomFrame.text4:SetText(text[4])
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.text
|
||||
end
|
||||
|
||||
--INIT
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
local aura_env = aura_env
|
||||
aura_env.data = {}
|
||||
aura_env.text = ""
|
||||
aura_env.inspectQueue = {}
|
||||
aura_env.insIndex = 1
|
||||
aura_env.notifyInspect = false
|
||||
aura_env.inspecting = false
|
||||
aura_env.output = ""
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function uninspect()
|
||||
aura_env.inspecting = false
|
||||
end
|
||||
hooksecurefunc("ClearInspectPlayer", uninspect)
|
||||
|
||||
aura_env.classColor = function(class)
|
||||
if class == 6 then return "|cFFC41F3B" elseif
|
||||
class == 12 then return "|cFFA330C9" elseif
|
||||
class == 11 then return "|cFFFF7D0A" elseif
|
||||
class == 3 then return "|cFFABD473" elseif
|
||||
class == 8 then return "|cFF40C7EB" elseif
|
||||
class == 10 then return "|cFF00FF96" elseif
|
||||
class == 2 then return "|cFFF58CBA" elseif
|
||||
class == 5 then return "|cFFFFFFFF" elseif
|
||||
class == 4 then return "|cFFFFF569" elseif
|
||||
class == 7 then return "|cFF0070DE" elseif
|
||||
class == 9 then return "|cFF8787ED" elseif
|
||||
class == 1 then return "|cFFC79C6E" else
|
||||
return "|cFF000000" end
|
||||
end
|
||||
|
||||
aura_env.inspectPing = function()
|
||||
if aura_env.inspecting == false and aura_env.notifyInspect == false then
|
||||
if #aura_env.inspectQueue > 0 then
|
||||
if aura_env.insIndex >= #aura_env.inspectQueue then
|
||||
aura_env.insIndex = 1
|
||||
end
|
||||
for i = aura_env.insIndex, #aura_env.inspectQueue do
|
||||
if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then
|
||||
ClearInspectPlayer()
|
||||
NotifyInspect(aura_env.inspectQueue[i])
|
||||
aura_env.notifyInspect = aura_env.inspectQueue[i]
|
||||
if aura_env.ticker then aura_env.ticker:Cancel(); aura_env.ticker = nil end
|
||||
table.remove(aura_env.inspectQueue, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not aura_env.ticker then
|
||||
aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing)
|
||||
end
|
||||
|
||||
local font, fontSize, fontFlags = aura_env.region.text:GetFont()
|
||||
local charWidth = fontSize * 0.6
|
||||
fontSize = fontSize * 0.65
|
||||
|
||||
aura_env.randomFrame = CreateFrame("frame")
|
||||
aura_env.randomFrame:ClearAllPoints()
|
||||
aura_env.randomFrame:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
|
||||
if not aura_env.randomFrame.text2 then
|
||||
aura_env.randomFrame.text2 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text2:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text2:SetPoint("CENTER", aura_env.region, "CENTER", charWidth * 8, 0)
|
||||
aura_env.randomFrame.text2:SetText("")
|
||||
aura_env.randomFrame.text2:SetJustifyV("center")
|
||||
aura_env.randomFrame.text2:SetJustifyH("center")
|
||||
aura_env.randomFrame.text2:Show()
|
||||
|
||||
if not aura_env.randomFrame.text3 then
|
||||
aura_env.randomFrame.text3 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text3:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text3:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3), 0)
|
||||
aura_env.randomFrame.text3:SetText("")
|
||||
aura_env.randomFrame.text3:SetJustifyV("center")
|
||||
aura_env.randomFrame.text3:SetJustifyH("center")
|
||||
aura_env.randomFrame.text3:Show()
|
||||
|
||||
if not aura_env.randomFrame.text4 then
|
||||
aura_env.randomFrame.text4 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text4:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text4:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3) + (charWidth * 3), 0)
|
||||
aura_env.randomFrame.text4:SetText("")
|
||||
aura_env.randomFrame.text4:SetJustifyV("center")
|
||||
aura_env.randomFrame.text4:SetJustifyH("center")
|
||||
aura_env.randomFrame.text4:Show()
|
223
Complete Projects/Fivver Stuff/FO4DBEE93B84 - Raid Scan.lua
Normal file
223
Complete Projects/Fivver Stuff/FO4DBEE93B84 - Raid Scan.lua
Normal file
@@ -0,0 +1,223 @@
|
||||
--GROUP_ROSTER_UPDATE INSPECT_READY
|
||||
function(allstates, e)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
for i = 1, 40 do
|
||||
local u = "raid" .. i
|
||||
if UnitExists(u) and not UnitIsUnit(u, "player") then
|
||||
if not aura_env.data[u] then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
if aura_env.data[u] then
|
||||
if aura_env.data[u].name ~= UnitName(u) then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
end
|
||||
elseif not UnitExists(u) and (aura_env.data[u] or allstates[u]) then
|
||||
if aura_env.data[u] then
|
||||
aura_env.data[u] = nil
|
||||
end
|
||||
for k,v in pairs(aura_env.inspectQueue) do
|
||||
if v == u then
|
||||
table.remove(aura_env.inspectQueue, k)
|
||||
end
|
||||
end
|
||||
if allstates[u] then
|
||||
allstates[u].show = false
|
||||
allstates[u].changed = true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "INSPECT_READY" then
|
||||
if aura_env.notifyInspect ~= false and aura_env.inspecting == false then
|
||||
InspectUnit(aura_env.notifyInspect)
|
||||
aura_env.inspecting = true
|
||||
elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then
|
||||
for i = 1, 17 do
|
||||
local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0
|
||||
if link ~= 0 then
|
||||
local stats = {}
|
||||
GetItemStats(link, stats)
|
||||
local rarity = select(3, GetItemInfo(link))
|
||||
local ilvl = select(4, GetItemInfo(link))
|
||||
if aura_env.config.debug == true then
|
||||
for k,v in pairs(stats) do
|
||||
end
|
||||
end
|
||||
if i == 2 then
|
||||
aura_env.data[aura_env.notifyInspect].neckilvl = ilvl
|
||||
elseif i == 15 and rarity == 5 then
|
||||
aura_env.data[aura_env.notifyInspect].backilvl = ilvl
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION"] then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"]
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"]
|
||||
end
|
||||
end
|
||||
end
|
||||
if aura_env.data[aura_env.notifyInspect].backilvl > 0 then
|
||||
local bil = aura_env.data[aura_env.notifyInspect].backilvl
|
||||
if bil >= 470 and bil < 472 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 5
|
||||
elseif bil >= 472 and bil <= 474 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 12
|
||||
elseif bil >= 476 and bil <= 480 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 20
|
||||
elseif bil >= 482 and bil <= 484 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 27
|
||||
elseif bil >= 486 and bil <= 488 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 35
|
||||
elseif bil >= 490 and bil <= 494 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 42
|
||||
elseif bil >= 494 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 50
|
||||
end
|
||||
end
|
||||
aura_env.data[aura_env.notifyInspect].inspectQueue = false
|
||||
aura_env.data[aura_env.notifyInspect].inspected = true
|
||||
aura_env.notifyInspect = false
|
||||
ClearInspectPlayer()
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.inspected == false and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
allstates[k] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
name = v.name,
|
||||
class = v.class,
|
||||
classColor = aura_env.classColor(v.class),
|
||||
backilvl = v.backilvl,
|
||||
backColor = "|cff" .. aura_env.config.ccolor,
|
||||
neckilvl = v.neckilvl,
|
||||
neckColor = "|cff" .. aura_env.config.ncolor,
|
||||
corruption = v.corruption,
|
||||
corruptionColor = "|cff" .. aura_env.config.cocolor,
|
||||
resort = true,
|
||||
index = v.name,
|
||||
}
|
||||
if aura_env.config.sort == 1 then
|
||||
allstates[k].index = v.name
|
||||
elseif aura_env.config.sort == 2 then
|
||||
allstates[k].index = v.backilvl
|
||||
elseif aura_env.config.sort == 3 then
|
||||
allstates[k].index = v.neckilvl
|
||||
elseif aura_env.config.sort == 4 then
|
||||
allstates[k].index = v.corruption
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
%classColor%n %neckColor%neckilvl %backColor%backilvl %corruptionColor%corruption
|
||||
|
||||
--INIT
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
local aura_env = aura_env
|
||||
aura_env.data = {}
|
||||
aura_env.inspectQueue = {}
|
||||
aura_env.insIndex = 1
|
||||
aura_env.notifyInspect = false
|
||||
aura_env.inspecting = false
|
||||
aura_env.output = ""
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function uninspect()
|
||||
aura_env.inspecting = false
|
||||
end
|
||||
hooksecurefunc("ClearInspectPlayer", uninspect)
|
||||
|
||||
aura_env.classColor = function(class)
|
||||
if class == 6 then return "|cFFC41F3B" elseif
|
||||
class == 12 then return "|cFFA330C9" elseif
|
||||
class == 11 then return "|cFFFF7D0A" elseif
|
||||
class == 3 then return "|cFFABD473" elseif
|
||||
class == 8 then return "|cFF40C7EB" elseif
|
||||
class == 10 then return "|cFF00FF96" elseif
|
||||
class == 2 then return "|cFFF58CBA" elseif
|
||||
class == 5 then return "|cFFFFFFFF" elseif
|
||||
class == 4 then return "|cFFFFF569" elseif
|
||||
class == 7 then return "|cFF0070DE" elseif
|
||||
class == 9 then return "|cFF8787ED" elseif
|
||||
class == 1 then return "|cFFC79C6E" else
|
||||
return "|cFF000000" end
|
||||
end
|
||||
|
||||
aura_env.inspectPing = function()
|
||||
if aura_env.inspecting == false and aura_env.notifyInspect == false then
|
||||
if #aura_env.inspectQueue > 0 then
|
||||
--print("There are units to inspect D:")
|
||||
if aura_env.insIndex >= #aura_env.inspectQueue then
|
||||
aura_env.insIndex = 1
|
||||
end
|
||||
for i = aura_env.insIndex, #aura_env.inspectQueue do
|
||||
if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then
|
||||
--print("QUEUEING INSPECT FOR", aura_env.inspectQueue[i])
|
||||
ClearInspectPlayer()
|
||||
NotifyInspect(aura_env.inspectQueue[i])
|
||||
aura_env.notifyInspect = aura_env.inspectQueue[i]
|
||||
table.remove(aura_env.inspectQueue, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing)
|
@@ -0,0 +1,71 @@
|
||||
--UNIT_AURA DRUID_HOTS_REMOVE_HOT UPDATE_HOTS
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.DruidHots then WeakAurasSaved.DruidHots = {} end
|
||||
if not WeakAurasSaved.DruidHotsTotal then WeakAurasSaved.DruidHotsTotal = {
|
||||
["Rejuvenation"] = 0,
|
||||
["Regrowth"] = 0,
|
||||
["Lifebloom"] = 0,
|
||||
["Wild Growth"] = 0,
|
||||
["Spring Blossoms"] = 0,
|
||||
["Grove Tending"] = 0,
|
||||
["Rejuvenation (Germination)"] = 0,
|
||||
} end
|
||||
if e == "UNIT_AURA" then
|
||||
local u = ...
|
||||
local index = 1
|
||||
local GUID = UnitGUID(u)
|
||||
local buff, update = 0, 0
|
||||
WeakAurasSaved.DruidHots[GUID] = {}
|
||||
while UnitBuff(u, index, "PLAYER") do
|
||||
local name = UnitBuff(u, index, "PLAYER")
|
||||
local dur = select(6, UnitBuff(u, index, "PLAYER"))
|
||||
if aura_env.hots[name] then
|
||||
buff = 1
|
||||
WeakAurasSaved.DruidHots[GUID][name] = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", GUID, name) end)
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
if buff == 0 then WeakAurasSaved.DruidHots[GUID] = nil end
|
||||
if buff == 1 then WeakAuras.ScanEvents("UPDATE_HOTS") end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "DRUID_HOTS_REMOVE_HOT" then
|
||||
local GUID, bname = ...
|
||||
WeakAurasSaved.DruidHots[GUID][bname] = nil
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "UPDATE_HOTS" then
|
||||
WeakAurasSaved.DruidHotsTotal = {
|
||||
["Rejuvenation"] = 0,
|
||||
["Regrowth"] = 0,
|
||||
["Lifebloom"] = 0,
|
||||
["Wild Growth"] = 0,
|
||||
["Spring Blossoms"] = 0,
|
||||
["Grove Tending"] = 0,
|
||||
["Rejuvenation (Germination)"] = 0,
|
||||
}
|
||||
for k,v in pairs(WeakAurasSaved.DruidHots) do
|
||||
for k2, v2 in pairs(v) do
|
||||
--print(k2)
|
||||
WeakAurasSaved.DruidHotsTotal[k2] = WeakAurasSaved.DruidHotsTotal[k2] + 1
|
||||
end
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHotsTotal)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.DruidHotsTotal["Grove Tending"]
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.hots = {
|
||||
["Rejuvenation"] = 1,
|
||||
["Regrowth"] = 1,
|
||||
["Lifebloom"] = 1,
|
||||
["Wild Growth"] = 1,
|
||||
["Spring Blossoms"] = 1,
|
||||
["Grove Tending"] = 1,
|
||||
["Rejuvenation (Germination)"] = 1,
|
||||
}
|
105
Complete Projects/Fivver Stuff/FO815D7649125 - Swing Timer.lua
Normal file
105
Complete Projects/Fivver Stuff/FO815D7649125 - Swing Timer.lua
Normal file
@@ -0,0 +1,105 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED
|
||||
--I fucked it up.
|
||||
function(e, msg, sender)
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {["tb"] = "Thunder Bluff", ["org"] = "Orgrimmar", ["uc"] = "Undercity", ["portal"] = "Portal", ["port"] = "Portal", ["water"] = "Water", ["waters"] = "Waters", ["food"] = "Food"} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
--print(sender, noRealmSender, UnitClass(sender), UnitClass(noRealmSender))
|
||||
if select(3, UnitClass(noRealmSender)) == 8 and not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then
|
||||
print("Adding", noRealmSender, "to the ignore")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] = 1
|
||||
end
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and select(3, UnitClass(noRealmSender)) ~= 8 then
|
||||
if not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then
|
||||
InviteUnit(sender)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
SendWho('z-"azsuna" c-"Mage"')
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "WHO_LIST_UPDATE" then
|
||||
for i = 1, GetNumWhoResults() do
|
||||
local name = select(1, GetWhoInfo(i))
|
||||
local class = select(5, GetWhoInfo(i))
|
||||
if class:match("Mage") then
|
||||
if not WeakAurasSaved.MagusKeywords.AntiMagusTable[name] then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
FriendsFrameCloseButton:Click()
|
||||
elseif e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name, class = UnitName(msg), select(3, UnitClass(msg))
|
||||
local ispl = UnitIsPlayer(msg)
|
||||
if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
elseif e =="NAME_PLATE_UNIT_REMOVED" then
|
||||
local name, class = UnitName(msg), select(3, UnitClass(msg))
|
||||
local ispl = UnitIsPlayer(msg)
|
||||
if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
end
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME 1
|
||||
function()
|
||||
if (WeakAurasSaved.CustomTrash.swingone - GetTime()) > 0 then
|
||||
return string.format("%.1f", WeakAurasSaved.CustomTrash.swingone - GetTime())
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME 2
|
||||
function()
|
||||
if (WeakAurasSaved.CustomTrash.swingtwo - GetTime()) > 0 then
|
||||
return string.format("%.1f", WeakAurasSaved.CustomTrash.swingtwo - GetTime())
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if WeakAurasSaved.CustomTrash.swingRotation == 1 then
|
||||
return "MH"
|
||||
elseif WeakAurasSaved.CustomTrash.swingRotation == 2 then
|
||||
return "OH"
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
WeakAurasSaved.CustomTrash.swingRotation = 1
|
||||
WeakAurasSaved.CustomTrash.swingone = 0
|
||||
WeakAurasSaved.CustomTrash.swingtwo = 0
|
103
Complete Projects/Fivver Stuff/FO815F92E76D5 - Combat Timer.lua
Normal file
103
Complete Projects/Fivver Stuff/FO815F92E76D5 - Combat Timer.lua
Normal file
@@ -0,0 +1,103 @@
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED COMBAT_TICKER_TICK COMBAT_TICKER_FALSE
|
||||
function(e)
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {}; aura_env.updateTimers() end
|
||||
if e == "PLAYER_REGEN_ENABLED" then
|
||||
if WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker:Cancel(); WeakAurasSaved.CustomTrash.CombatTimers.ticker = nil end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = 0
|
||||
WeakAuras.ScanEvents("COMBAT_TICKER_TICK")
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time)
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("COMBAT_TICKER_TICK") end) end
|
||||
elseif e == "COMBAT_TICKER_TICK" then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = WeakAurasSaved.CustomTrash.CombatTimers.time + 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time - 1
|
||||
if WeakAurasSaved.CustomTrash.CombatTimers.timers[WeakAurasSaved.CustomTrash.CombatTimers.time] then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time)
|
||||
C_Timer.After(aura_env.config.dur, function() WeakAuras.ScanEvents("COMBAT_TICKER_FALSE") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function(e)
|
||||
if e == "COMBAT_TICKER_FALSE" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--Aura #2
|
||||
--COMBAT_TICKER_TICK
|
||||
function(e)
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local temps = {
|
||||
[1] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.time},
|
||||
[2] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time},
|
||||
[3] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id},
|
||||
}
|
||||
|
||||
for k,v in ipairs(temps) do
|
||||
while v.res >= 60 do
|
||||
v.m = v.m + 1
|
||||
v.res = v.res - 60
|
||||
end
|
||||
v.s = v.res
|
||||
if v.s < 10 then
|
||||
v.s = string.format("0%d", v.s)
|
||||
end
|
||||
if type(v.s) ~= "string" then tostring(v.s) end
|
||||
end
|
||||
|
||||
return string.format("%d:%s\n%d:%s (%d:%s)", temps[1].m, temps[1].s, temps[2].m, temps[2].s, temps[3].m, temps[3].s)
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {} end
|
||||
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = 0
|
||||
|
||||
aura_env.updateTimers = function()
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers = {}
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m1 or 0) * 60) + (aura_env.config.s1 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m2 or 0) * 60) + (aura_env.config.s2 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m3 or 0) * 60) + (aura_env.config.s3 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m4 or 0) * 60) + (aura_env.config.s4 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m5 or 0) * 60) + (aura_env.config.s5 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m6 or 0) * 60) + (aura_env.config.s6 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m7 or 0) * 60) + (aura_env.config.s7 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m8 or 0) * 60) + (aura_env.config.s8 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m9 or 0) * 60) + (aura_env.config.s9 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m10 or 0) * 60) + (aura_env.config.s10 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m11 or 0) * 60) + (aura_env.config.s11 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m12 or 0) * 60) + (aura_env.config.s12 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m13 or 0) * 60) + (aura_env.config.s13 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m14 or 0) * 60) + (aura_env.config.s14 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m15 or 0) * 60) + (aura_env.config.s15 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m16 or 0) * 60) + (aura_env.config.s16 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m17 or 0) * 60) + (aura_env.config.s17 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m18 or 0) * 60) + (aura_env.config.s18 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m19 or 0) * 60) + (aura_env.config.s19 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m20 or 0) * 60) + (aura_env.config.s20 or 0)] = 1
|
||||
end
|
||||
|
||||
aura_env.updateTimers()
|
||||
|
||||
aura_env.nextTimer = function(time)
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.CombatTimers.timers) do
|
||||
local dtime = k - time
|
||||
if dtime < WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time and dtime > 0 then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = dtime
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id = k
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
65
Complete Projects/Fivver Stuff/Fiverr - Conductive Ink.lua
Normal file
65
Complete Projects/Fivver Stuff/Fiverr - Conductive Ink.lua
Normal file
@@ -0,0 +1,65 @@
|
||||
--CLEU
|
||||
function(e, ...)
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff("target", i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff("target", i))
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.stacks * aura_env.config.mediandamage
|
||||
end
|
||||
end
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff("target", i, PLAYER)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.owndebuff.stacks = select(3, UnitDebuff("target", i, PLAYER))
|
||||
aura_env.owndebuff.damage = aura_env.owndebuff.stacks * aura_env.config.mediandamage
|
||||
break
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage)
|
||||
return "Player stacks\nPlayer damage\nTotal stacks\nTotal damage"
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
290
Complete Projects/Fivver Stuff/Fiverr - Conductive Ink2.lua
Normal file
290
Complete Projects/Fivver Stuff/Fiverr - Conductive Ink2.lua
Normal file
@@ -0,0 +1,290 @@
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(e, ...)
|
||||
if aura_env.config.tsuenable == false then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.damagepercentage = 0
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
local bossmax = UnitHealthMax(unit)
|
||||
if aura_env.config.pdmg == true then
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage
|
||||
if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
else
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i))
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "")
|
||||
aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage)
|
||||
end
|
||||
break
|
||||
elseif not name then break end
|
||||
end
|
||||
end
|
||||
aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--TSU
|
||||
--CLEU PLAYER_TARGET_CHANGED
|
||||
function(allstates, e, ...)
|
||||
if aura_env.config.tsuenable == true then
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
local pp = hp / maxhp
|
||||
if pp > 0.3 then
|
||||
local totaldamage, totalstacks = 0, 0
|
||||
local maxdamage, maxstacks = {["d"] = 0, ["c"] = ""}, {["s"] = 0, ["c"] = ""}
|
||||
local datatable = {}
|
||||
aura_env.damagepercentage = 0
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then
|
||||
for i = 1, #allstates do
|
||||
allstates[i].sub30 = false
|
||||
if i > 1 then
|
||||
allstates[i] = {["show"] = false, ["changed"] = true}
|
||||
end
|
||||
end
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
--local damage = i * 23412
|
||||
datatable[caster] = {["damage"] = damage, ["stacks"] = stacks, ["name"] = UnitName(caster), ["class"] = select(3, UnitClass(caster))} --UnitName(caster) UnitClass(caster)
|
||||
if damage > maxdamage.d then maxdamage.d = damage; maxdamage.c = caster; maxstacks.s = stacks; maxstacks.c = caster end
|
||||
totaldamage = totaldamage + damage; totalstacks = totalstacks + stacks
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
local allstatesindex = 2
|
||||
for k,v in pairs(datatable) do
|
||||
allstates[allstatesindex] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
progressType = "static",
|
||||
caster = v.name,
|
||||
class = v.class,
|
||||
stacks = v.stacks,
|
||||
damage = v.damage,
|
||||
}
|
||||
if aura_env.config.sort == 1 then
|
||||
allstates[allstatesindex].resort = true
|
||||
allstates[allstatesindex].index = v.damage --/ totaldamage
|
||||
allstates[allstatesindex].value = v.damage --/ totaldamage
|
||||
allstates[allstatesindex].total = maxdamage.d
|
||||
elseif aura_env.config.sort == 2 then
|
||||
allstates[allstatesindex].resort = true
|
||||
allstates[allstatesindex].index = v.stacks
|
||||
allstates[allstatesindex].value = v.stacks
|
||||
allstates[allstatesindex].total = totalstacks
|
||||
end
|
||||
allstatesindex = allstatesindex + 1
|
||||
end
|
||||
dmgper = aura_env.round(((totaldamage / maxhp) * 100), 2)
|
||||
allstates[1] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
progressType = "static",
|
||||
caster = "Total",
|
||||
stacks = totalstacks,
|
||||
damage = totaldamage,
|
||||
resort = true,
|
||||
percent = dmgper,
|
||||
index = maxdamage.d + 1,
|
||||
value = maxdamage.d + 1,
|
||||
total = maxdamage.d + 1,
|
||||
}
|
||||
if totalstacks == 0 then totalstacks = 1 end
|
||||
if aura_env.config.sort == 2 then allstates[1].index = totalstacks + 1 end
|
||||
end
|
||||
return true
|
||||
else
|
||||
for i = 1, #allstates do
|
||||
if allstates[i] then
|
||||
allstates[i].show = true
|
||||
allstates[i].changed = true
|
||||
allstates[i].sub30 = true
|
||||
end
|
||||
end
|
||||
allstates[1].percent = "<30"
|
||||
allstates[1].class = 15
|
||||
return true
|
||||
end
|
||||
else
|
||||
for i = 1, #allstates do
|
||||
if allstates[i].sub30 == false or not allstates[i].sub30 then
|
||||
allstates[i] = {["show"] = false, ["changed"] = true}
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--CUSTOM TRIGGER
|
||||
function(t)
|
||||
if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end
|
||||
end
|
||||
|
||||
--COLOR ANIMATION
|
||||
function()
|
||||
if aura_env.state then
|
||||
return aura_env.classColor(aura_env.state.class)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.tsuenable == false then
|
||||
if aura_env.config.pdmg == true then
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
else
|
||||
if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
end
|
||||
else
|
||||
if aura_env.state.caster == "Total" then
|
||||
return aura_env.shorten(aura_env.state.damage) .. " - " .. aura_env.state.stacks .. " - " .. aura_env.state.percent .. "%"
|
||||
else
|
||||
return aura_env.shorten(aura_env.state.damage) .. " - " .. aura_env.state.stacks
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
|
||||
aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
|
||||
if aura_env.config.tsuenable == false then
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text3:SetFont(font, size, flags)
|
||||
aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0)
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.region.bar:Hide()
|
||||
end
|
||||
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() end
|
||||
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43
|
||||
elseif class == 2 then return 0.96, 0.55, 0.73
|
||||
elseif class == 3 then return 0.67, 0.83, 0.45
|
||||
elseif class == 4 then return 1, 0.96, 0.41, 1
|
||||
elseif class == 5 then return 1, 1, 1
|
||||
elseif class == 6 then return 0.77, 0.12, 0.23
|
||||
elseif class == 7 then return 0, 0.44, 0.87
|
||||
elseif class == 8 then return 0.25, 0.78, 0.92
|
||||
elseif class == 9 then return 0.53, 0.53, 0.93
|
||||
elseif class == 10 then return 0, 1, 0.59
|
||||
elseif class == 11 then return 1, 0.49, 0.04
|
||||
elseif class == 12 then return 0.64, 0.19, 0.79
|
||||
elseif class == 15 then return 0, 1, 0
|
||||
else return 1, 1, 1 end
|
||||
end
|
||||
--TESTING
|
||||
--Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1
|
||||
aura_env.UnitDebuffC = function(unit, i)
|
||||
if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko"
|
||||
elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy"
|
||||
elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary"
|
||||
elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna"
|
||||
elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John"
|
||||
elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank"
|
||||
elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma"
|
||||
elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia"
|
||||
elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry"
|
||||
elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan"
|
||||
elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael"
|
||||
end
|
||||
end
|
@@ -0,0 +1,76 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT UPDATE_WOUNDS
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end
|
||||
if not WeakAurasSaved.FesteringWounds.ticker then WeakAurasSaved.FesteringWounds.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_WOUNDS") end) end
|
||||
if e == "UPDATE_WOUNDS" then return true
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local caster = select(5, ...)
|
||||
local spellname = select(13, ...)
|
||||
local stacks = select(16, ...)
|
||||
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_APPLIED_DOSE" or se == "SPELL_AURA_REMOVED" or se == "SPELL_AURA_REMOVED_DOSE" then
|
||||
if caster and caster == UnitName("player") and spellname == "Festering Wound" then
|
||||
local countsum = 0
|
||||
local counted = 0
|
||||
for i = 1, 40 do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
local index = 1
|
||||
while UnitDebuff("nameplate" .. i, index) do
|
||||
local name, _, _, count = UnitDebuff("nameplate" .. i, index)
|
||||
local caster = select(8, UnitDebuff("nameplate" .. i, index))
|
||||
if name == "Festering Wound" then
|
||||
countsum = countsum + count
|
||||
if counted == 0 then counted = 1 end
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if counted == 0 and se == "SPELL_AURA_REMOVED" then
|
||||
WeakAurasSaved.FesteringWounds.count = 0
|
||||
end
|
||||
if counted == 1 then
|
||||
WeakAurasSaved.FesteringWounds.count = countsum
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.FesteringWounds)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.FesteringWounds.count = 0
|
||||
local countsum = 0
|
||||
local counted = 0
|
||||
for i = 1, 40 do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
local index = 1
|
||||
while UnitDebuff("nameplate" .. i, index) do
|
||||
local name, _, _, count = UnitDebuff("nameplate" .. i, index)
|
||||
local caster = select(8, UnitDebuff("nameplate" .. i, index))
|
||||
if name == "Festering Wound" then
|
||||
countsum = countsum + count
|
||||
if counted == 0 then counted = 1 end
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if counted == 1 then
|
||||
WeakAurasSaved.FesteringWounds.count = countsum
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.FesteringWounds)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--STACK INFO
|
||||
function()
|
||||
return WeakAurasSaved.FesteringWounds.count
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.FesteringWounds["Spring Blossoms"].count
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end
|
119
Complete Projects/Fivver Stuff/Fivver Druid Stuff.lua
Normal file
119
Complete Projects/Fivver Stuff/Fivver Druid Stuff.lua
Normal file
@@ -0,0 +1,119 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.DruidHots then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
}
|
||||
end
|
||||
if not WeakAurasSaved.DruidHots.ticker then WeakAurasSaved.DruidHots.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_HOTS") end) end
|
||||
if e == "DRUID_HOTS_REMOVE_HOT" then
|
||||
local name, id = ...
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
if WeakAurasSaved.DruidHots[name].timers[id] then
|
||||
if WeakAurasSaved.DruidHots[name].timers[id] then WeakAurasSaved.DruidHots[name].timers[id]:Cancel() end
|
||||
WeakAurasSaved.DruidHots[name].timers[id] = nil
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count - 1
|
||||
end
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local caster = select(5, ...)
|
||||
local spellname = select(13, ...)
|
||||
local target = select(10, ...)
|
||||
if se == "SPELL_AURA_APPLIED" then
|
||||
if caster and caster == UnitName("player") then
|
||||
if WeakAurasSaved.DruidHots[spellname] then
|
||||
WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count + 1
|
||||
WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count] = C_Timer.NewTimer(WeakAurasSaved.DruidHots[spellname].duration * 4, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", spellname, WeakAurasSaved.DruidHots[spellname].count) end)
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_AURA_REMOVED" then
|
||||
if caster and caster == UnitName("player") then
|
||||
if WeakAurasSaved.DruidHots[spellname] then
|
||||
if WeakAurasSaved.DruidHots[spellname].count > 0 then
|
||||
WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count - 1
|
||||
if WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] then WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1]:Cancel(); WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] = nil end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
}
|
||||
local instance = "party"
|
||||
if IsInRaid() then instance = "raid" end
|
||||
local index = 1
|
||||
--DevTools_Dump(UnitBuff("player", index, "PLAYER"))
|
||||
while UnitBuff("player", index, "PLAYER") do
|
||||
local name = UnitBuff("player", index, "PLAYER")
|
||||
if WeakAurasSaved.DruidHots[name] then
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
local index = 1
|
||||
--DevTools_Dump(UnitBuff(instance .. i, index, "PLAYER"))
|
||||
while UnitBuff(instance .. i, index, "PLAYER") do
|
||||
--DevTools_Dump(UnitBuff(instance .. i , index, "PLAYER"))
|
||||
local name = UnitBuff(instance .. i, index, "PLAYER")
|
||||
if WeakAurasSaved.DruidHots[name] then
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.DruidHots["Spring Blossoms"].count
|
||||
end
|
||||
|
||||
--Mana bar
|
||||
--DISPLAY
|
||||
function()
|
||||
local mana = UnitPower("player", 0)
|
||||
if mana >= 1e3 and mana < 1e6 then
|
||||
mana = string.format("%.1fk", mana / 1e3)
|
||||
elseif mana >= 1e6 and mana < 1e9 then
|
||||
mana = string.format("%.1fM", mana / 1e6)
|
||||
end
|
||||
return mana
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.DruidHots then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timer"] = nil},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timer"] = nil},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timer"] = nil},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timer"] = nil},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timer"] = nil},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil},
|
||||
}
|
||||
end
|
203
Complete Projects/Fivver Stuff/Fivver Loot Logging.lua
Normal file
203
Complete Projects/Fivver Stuff/Fivver Loot Logging.lua
Normal file
@@ -0,0 +1,203 @@
|
||||
--Idea:
|
||||
--Get loot from everyone
|
||||
--Put loot in table sorted with everyone
|
||||
--If AH visit get prices of boe items? and DE mats
|
||||
--In item table add value in vendor, AH and DE
|
||||
--Add option to export all to excel
|
||||
--Add timer (toggleable?) with a button and macro
|
||||
--Add option to mark significant items, idk how maybe use macro maybe some sort of button
|
||||
--Use only for guildies
|
||||
--Maybe reminder to turn timer on
|
||||
--Maybe individual member timer
|
||||
--Sort table by member > item > iteminfo
|
||||
--Where member holds time and key is name
|
||||
--Maybe use time as start and endtime
|
||||
--Maybe establish comms with other weakauras to make sure times are synced
|
||||
--Add gold / hour !!
|
||||
--Maybe add split gold f(totalgold, membertimespent)?
|
||||
--Google sheets uses tab for column seperation and newline for row seperation !!
|
||||
--Make into addon not weakaura
|
||||
|
||||
--CHAT_MSG_LOOT AUCTION_HOUSE_SHOW AUCTION_ITEM_LIST_UPDATE AH_READY
|
||||
function(e, msg)
|
||||
if e == "CHAT_MSG_LOOT" then
|
||||
if msg then
|
||||
local who = msg:match("%w+")
|
||||
if who == "You" then who = UnitName("player") end
|
||||
if who:match("(-)") then who:match("(.+)-%w*") end
|
||||
local howmuch = msg:match("(x%d+).$")
|
||||
local link
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
link = itemLink
|
||||
end
|
||||
local itemName, _, itemQuality, _, _, itemType = GetItemInfo(link)
|
||||
local itemLevel = GetDetailedItemLevelInfo(link)
|
||||
if itemQuality > 1 then
|
||||
if not aura_env.lootTable[who] then aura_env.lootTable[who] = {["items"] = {}} end
|
||||
if not aura_env.lootTable[who].items[itemName] then
|
||||
aura_env.lootTable[who].items[itemName] = {
|
||||
["name"] = itemName,
|
||||
["vendor"] = select(11, GetItemInfo(link)),
|
||||
["quantity"] = howmuch or 1,
|
||||
}
|
||||
--Handles DE price prediction
|
||||
--if itemType == "Armor" or itemType == "Weapon" then
|
||||
-- print("itemLevel", itemLevel)
|
||||
-- if itemLevel >= 45 and itemLevel <= 55 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[1]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- elseif itemLevel >= 56 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[2]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- elseif itemLevel > 58 and itemLevel < 77 and itemQuality == 4 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[3]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- end
|
||||
--end
|
||||
if WeakAurasSaved.LootLog.Notables[itemName] then
|
||||
aura_env.lootTable[who].items[itemName].AH = WeakAurasSaved.LootLog.Notables[itemName]
|
||||
end
|
||||
else
|
||||
aura_env.lootTable[who].items[itemName].quantity = aura_env.lootTable[who].items[itemName].quantity + 1
|
||||
end
|
||||
end
|
||||
DevTools_Dump(aura_env.lootTable)
|
||||
--DevTools_Dump(WeakAurasSaved.LootLog)
|
||||
end
|
||||
elseif e == "AUCTION_HOUSE_SHOW" then
|
||||
DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
if aura_env.i == 1 then
|
||||
QueryAuctionItems("Illusion Dust")
|
||||
print("Querry", "Illusion Dust")
|
||||
end
|
||||
--Querry update that fires item list update then get item info from like a page or two and get median value if the spread isn't too much
|
||||
elseif e == "AUCTION_ITEM_LIST_UPDATE" then
|
||||
--Get auction info
|
||||
if not aura_env.timer then
|
||||
SortAuctionSetSort("list", "buyout")
|
||||
SortAuctionApplySort("list")
|
||||
end
|
||||
if aura_env.timer then aura_env.timer:Cancel(); aura_env.timer = nil end
|
||||
if not aura_env.timer then aura_env.timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("AH_READY") end) end
|
||||
elseif e == "AH_READY" then
|
||||
if aura_env.timer then aura_env.timer = nil end
|
||||
local masterName, masterID
|
||||
if aura_env.i == 1 then
|
||||
masterName = "Illusion Dust"
|
||||
masterID = "ID"
|
||||
elseif aura_env.i == 2 then
|
||||
masterName = "Dream Dust"
|
||||
masterID = "DD"
|
||||
elseif aura_env.i == 3 then
|
||||
masterName = "Small Brillaint Shard"
|
||||
masterID = "SBS"
|
||||
elseif aura_env.i == 4 then
|
||||
masterName = "Large Brilliant Shard"
|
||||
masterID = "LBS"
|
||||
elseif aura_env.i == 5 then
|
||||
masterName = "Lesser Eternal Essence"
|
||||
masterID = "LEE"
|
||||
elseif aura_env.i == 6 then
|
||||
masterName = "Greater Eternal Essence"
|
||||
masterID = "GEE"
|
||||
end
|
||||
for i = 1, GetNumAuctionItems("list") do
|
||||
local name, _, count = GetAuctionItemInfo("list", i)
|
||||
local buyoutPrice = select(10, GetAuctionItemInfo("list", i))
|
||||
if name == masterName then
|
||||
local pricePerEach = buyoutPrice / count
|
||||
if WeakAurasSaved.LootLog.AHPrices[masterID] == 0 then
|
||||
WeakAurasSaved.LootLog.AHPrices[masterID] = pricePerEach
|
||||
else
|
||||
WeakAurasSaved.LootLog.AHPrices[masterID] = (WeakAurasSaved.LootLog.AHPrices[masterID] + pricePerEach) / 2
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.i = aura_env.i + 1
|
||||
if WeakAurasSaved.LootLog.AHPrices[masterID] then WeakAurasSaved.LootLog.AHPrices[masterID] = math.floor(WeakAurasSaved.LootLog.AHPrices[masterID]) end
|
||||
--DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
if aura_env.i == 1 then
|
||||
masterName = "Illusion Dust"
|
||||
masterID = "ID"
|
||||
elseif aura_env.i == 2 then
|
||||
masterName = "Dream Dust"
|
||||
masterID = "DD"
|
||||
elseif aura_env.i == 3 then
|
||||
masterName = "Small Brillaint Shard"
|
||||
masterID = "SBS"
|
||||
elseif aura_env.i == 4 then
|
||||
masterName = "Large Brilliant Shard"
|
||||
masterID = "LBS"
|
||||
elseif aura_env.i == 5 then
|
||||
masterName = "Lesser Eternal Essence"
|
||||
masterID = "LEE"
|
||||
elseif aura_env.i == 6 then
|
||||
masterName = "Greater Eternal Essence"
|
||||
masterID = "GEE"
|
||||
elseif aura_env.i > 6 then
|
||||
print("AH Scan complete")
|
||||
DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
masterName = nil
|
||||
masterID = nil
|
||||
aura_env.i = 1
|
||||
end
|
||||
if masterName then
|
||||
QueryAuctionItems(masterName)
|
||||
print("Querry", masterName)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.i = 1
|
||||
aura_env.lootTable = {}
|
||||
if not WeakAurasSaved.LootLog then WeakAurasSaved.LootLog = {} end
|
||||
if not WeakAurasSaved.LootLog.AHPrices then
|
||||
WeakAurasSaved.LootLog.AHPrices = {
|
||||
["ID"] = 0,
|
||||
["DD"] = 0,
|
||||
["SBS"] = 0,
|
||||
["LBS"] = 0,
|
||||
["LEE"] = 0,
|
||||
["GEE"] = 0,
|
||||
}
|
||||
end
|
||||
if not WeakAurasSaved.LootLog.DEStats then
|
||||
WeakAurasSaved.LootLog.DEStats = {
|
||||
--<45,55>
|
||||
[1] = {
|
||||
["DD"] = 0,
|
||||
["SBS"] = 0,
|
||||
["LBS"] = 0,
|
||||
["LEE"] = 0,
|
||||
["GEE"] = 0,
|
||||
["GME"] = 0,
|
||||
},
|
||||
--<56,65>
|
||||
[2] = {
|
||||
["ID"] = 2.8699,
|
||||
["LBS"] = 0.018,
|
||||
["GEE"] = 0.4,
|
||||
},
|
||||
--Purple items between 59 and 78
|
||||
[3] = {
|
||||
["LBS"] = 0,
|
||||
},
|
||||
}
|
||||
end
|
||||
if not WeakAurasSaved.LootLog.Notables then WeakAurasSaved.LootLog.Notables = {} end
|
49
Complete Projects/Fivver Stuff/RaidTranqShot.lua
Normal file
49
Complete Projects/Fivver Stuff/RaidTranqShot.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
--GROUP_ROSTER_UPDATE COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(allstates, e, ...)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
aura_env.playerList = {}
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
local u = "raid" .. i
|
||||
if select(3, UnitClass(u)) == 2 then
|
||||
if not aura_env.playerList[UnitName(u)] then aura_env.playerList[UnitName(u)] = u end
|
||||
if not allstates[UnitName(u)] then allstates[UnitName(u)] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
name = UnitName(u),
|
||||
unit = u,
|
||||
class = UnitClass(u),
|
||||
resort = true,
|
||||
cd = 0,
|
||||
cdtotal = 20,
|
||||
index = 0,
|
||||
progressType = "static",
|
||||
value = 0,
|
||||
total = 1,
|
||||
} end
|
||||
end
|
||||
end
|
||||
return true
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local caster = select(5, ...)
|
||||
if aura_env.playerList[caster] then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local spellname = select(13, ...)
|
||||
if spellname == "Consecration" then
|
||||
if allstates[caster] then
|
||||
allstates[caster].progressType = "timed"
|
||||
allstates[caster].duration = 7.57
|
||||
allstates[caster].expirationTime = GetTime() + 7.57
|
||||
allstates[caster].index = GetTime() + 7.57
|
||||
allstates[caster].resort = true
|
||||
allstates[caster].changed = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.playerList = {}
|
File diff suppressed because one or more lines are too long
@@ -0,0 +1,40 @@
|
||||
There are more things these weakauras can do but it might be a pain to understand/read/care; this is what I got sidetracked doing
|
||||
It is possible to tell the 4th-row aura to look for all cooldowns (in your spellbook) or to exclude/whitelist some; for example
|
||||
You can tell it to find all spells with cooldowns in your spellbook except for Life Cocoon; likewise, you can tell it to only find Life Cocoon
|
||||
There also are two modes this aura can appear in, one sorts the spells by their cooldown (so a 30s spell would be first, a 1 min spell second and so on) and the other sorts them by their active cooldown (so ready spells are always first and last are spells on cooldown sorted by their remaining cooldown)
|
||||
|
||||
I got carried away designing this and I think there would be no point withholding it from you so, feature-full it is
|
||||
|
||||
To begin, it has two modes of display (as mentioned previously) and this is how you toggle between them (ran in the chat of course)
|
||||
|
||||
/run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_MODES")
|
||||
|
||||
I also mentioned it being able to switch between whitelisted and blacklisted spells and this is how that's done (currently there is no way to tell what mode it's in other than looking at the actual aura and seeing for yourself (There is no output other than 0 and 1))
|
||||
|
||||
/run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_SCAN_MODES")
|
||||
|
||||
What the above command essentially does is tells the aura to either look for the spells we want or those we don't want; once it is in either mode we also need to tell it what to look for
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_ADD", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_REMOVE", "<SPELL NAME OR ID>")
|
||||
|
||||
You can use these commands to either whitelist or blacklist spells using their name or their ID; if you wanted the aura to NOT show Chi Wave you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "Chi Wave")
|
||||
|
||||
And if you wanted it to show Chi Wave again you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "Chi Wave")
|
||||
|
||||
Few things to note here are if you want to use spell names you must place them in quotation marks however if you want to use ID's you may not use quotation marks; so an ID example would be and also if the aura is in Whitelisted mode (showing only the spells you told it to) the exclusion table/list will have no effect on it and adding or removing spells to it will not change the behavior, similarly if the aura is in Exclusion/Blacklist mode the whitelisted list will have no effect on it
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", 115008)
|
||||
|
||||
And finally to check what spells are blacklisted or whitelisted you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_LIST")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_LIST")
|
||||
|
||||
Why had I done this? I do not know
|
@@ -0,0 +1,67 @@
|
||||
--DISPLAY
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return string.format("%.f%%", (mana / maxmana) * 100)
|
||||
end
|
||||
|
||||
--NAME
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return aura_env.shorten(mana)
|
||||
end
|
||||
|
||||
--UNIT_POWER
|
||||
function()
|
||||
return true
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return maxmana - mana, maxmana, 1
|
||||
end
|
||||
|
||||
--SPELL_UPDATE_COOLDOWN
|
||||
function()
|
||||
return true
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local id = 109132
|
||||
if IsPlayerSpell(115008) then id = 115008 end
|
||||
local charges, maxCharges, start, duration = GetSpellCharges(id)
|
||||
if charges >= 2 then
|
||||
return 0, 1, 1, 1
|
||||
elseif charges == 1 then
|
||||
expirationTime = start + duration
|
||||
return duration, expirationTime
|
||||
elseif charges < 1 then
|
||||
return 1, 1, 1, 1
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
@@ -0,0 +1,43 @@
|
||||
--TSU
|
||||
--SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER_SPELLS COOLDOWN_MANAGER_SWITCH_MODES
|
||||
function(allstates, e)
|
||||
if e == "RESET_COOLDOWN_MANAGER_SPELLS" then
|
||||
for _, state in pairs(allstates) do
|
||||
state.show = false;
|
||||
state.changed = true;
|
||||
end
|
||||
end
|
||||
if not aura_env.mode then aura_env.mode = 1 end
|
||||
if e == "COOLDOWN_MANAGER_SWITCH_MODES" then
|
||||
if aura_env.mode == 0 then
|
||||
aura_env.mode = 1
|
||||
print(aura_env.mode)
|
||||
else
|
||||
aura_env.mode = 0
|
||||
print(aura_env.mode)
|
||||
end
|
||||
end
|
||||
if not aura_env.spells then WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") end
|
||||
for k,v in pairs(aura_env.spells) do
|
||||
local start, duration = GetSpellCooldown(v)
|
||||
local icon = GetSpellTexture(k)
|
||||
local totalcd = GetSpellBaseCooldown(v)
|
||||
allstates[v] = {
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "timed",
|
||||
icon = icon,
|
||||
}
|
||||
if aura_env.mode == 0 then allstates[v].index = totalcd end
|
||||
if start > 0 and duration > 1.5 then
|
||||
allstates[v].expirationTime = start + duration
|
||||
allstates[v].duration = duration
|
||||
if not allstates[v].timer and aura_env.mode == 1 then allstates[v].timer = C_Timer.NewTimer(duration, function() WeakAuras.ScanEvents("SPELL_UPDATE_COOLDOWN") end) end
|
||||
if aura_env.mode == 1 then allstates[v].index = start + duration end
|
||||
else
|
||||
if aura_env.mode == 1 then allstates[v].index = 0 end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
@@ -0,0 +1,87 @@
|
||||
--PLAYER_SPELLBOOK_UPDATE PLAYER_SPELLBOOK_EXCLUSION_ADD PLAYER_SPELLBOOK_EXCLUSION_REMOVE PLAYER_SPELLBOOK_EXCLUSION_LIST COOLDOWN_MANAGER_SWITCH_SCAN_MODES PLAYER_SPELLBOOK_WHITELIST_ADD PLAYER_SPELLBOOK_WHITELIST_REMOVE PLAYER_SPELLBOOK_WHITELIST_LIST
|
||||
function(e, msg)
|
||||
if not aura_env.mode then aura_env.mode = 1 end
|
||||
if e == "COOLDOWN_MANAGER_SWITCH_SCAN_MODES" then
|
||||
if aura_env.mode == 0 then
|
||||
aura_env.mode = 1
|
||||
print(aura_env.mode)
|
||||
else
|
||||
aura_env.mode = 0
|
||||
print(aura_env.mode)
|
||||
end
|
||||
elseif e == "PLAYER_SPELLBOOK_UPDATE" then
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.SpellExclusion then WeakAurasSaved.CustomTrash.SpellExclusion = {} end
|
||||
if not WeakAurasSaved.CustomTrash.SpellWhitelist then WeakAurasSaved.CustomTrash.SpellWhitelist = {
|
||||
["Fortifying Brew"] = 1,
|
||||
["Life Cocoon"] = 1,
|
||||
["Revival"] = 1,
|
||||
["Paralysis"] = 1,
|
||||
} end
|
||||
aura_env.spells = {}
|
||||
if aura_env.mode == 0 then
|
||||
local index = 1
|
||||
while GetSpellBookItemName(index, "spell") do
|
||||
local name = GetSpellInfo(index, "spell")
|
||||
local id = select(7, GetSpellInfo(index, "spell"))
|
||||
if IsPlayerSpell(id) == true and GetSpellBaseCooldown(id) > 10000 and (not (WeakAurasSaved.CustomTrash.SpellExclusion[name] or WeakAurasSaved.CustomTrash.SpellExclusion[id])) then
|
||||
aura_env.spells[name] = id
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
else
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do
|
||||
local name = GetSpellInfo(k)
|
||||
local id = select(7, GetSpellInfo(k))
|
||||
if id and IsPlayerSpell(id) == true then
|
||||
aura_env.spells[name] = id
|
||||
end
|
||||
end
|
||||
end
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_ADD" then
|
||||
if GetSpellInfo(msg) then
|
||||
if not WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = 1 end
|
||||
print("Spell <", msg, "> added")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_REMOVE" then
|
||||
if GetSpellInfo(msg) then
|
||||
if WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = nil else print("Spell <", msg, "> is not excluded"); return end
|
||||
print("Spell <", msg, "> removed")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_LIST" then
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellExclusion) do
|
||||
print(k,v)
|
||||
end
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_ADD" then
|
||||
if GetSpellInfo(msg) then
|
||||
if not WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = 1 end
|
||||
print("Spell <", msg, "> added")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_REMOVE" then
|
||||
if GetSpellInfo(msg) then
|
||||
if WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = nil else print("Spell <", msg, "> is not excluded"); return end
|
||||
print("Spell <", msg, "> removed")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_LIST" then
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do
|
||||
print(k,v)
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because one or more lines are too long
@@ -0,0 +1,31 @@
|
||||
--TSU
|
||||
--SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER
|
||||
function(allstates, e)
|
||||
if e == "RESET_COOLDOWN_MANAGER" then
|
||||
for _, state in pairs(allstates) do
|
||||
state.show = false;
|
||||
state.changed = true;
|
||||
end
|
||||
end
|
||||
if not aura_env.talents then WeakAuras.ScanEvents("PLAYER_TALENT_UPDATE") end
|
||||
for k,v in pairs(aura_env.talents) do
|
||||
local start, duration = GetSpellCooldown(v)
|
||||
local icon = GetSpellTexture(k)
|
||||
local enable = 0
|
||||
if start == 0 then enable = 1 else enable = 0 end
|
||||
allstates[v] = {
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "timed",
|
||||
icon = icon,
|
||||
enable = enable,
|
||||
}
|
||||
if start > 0 and duration > 1.5 then
|
||||
allstates[v].expirationTime = start + duration
|
||||
allstates[v].duration = duration
|
||||
allstates[v].index = duration
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
@@ -0,0 +1,17 @@
|
||||
--PLAYER_TALENT_UPDATE
|
||||
function(e, msg)
|
||||
aura_env.talents = {}
|
||||
for row = 1, 7 do
|
||||
for column = 1, 3 do
|
||||
local id, name = GetTalentInfo(row, column, 1)
|
||||
local sel = select(10, GetTalentInfoByID(id))
|
||||
local sid = select(6, GetTalentInfoByID(id))
|
||||
if GetSpellBaseCooldown(sid) > 0 and sel == true then
|
||||
aura_env.talents[name] = sid
|
||||
end
|
||||
end
|
||||
end
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
end
|
@@ -0,0 +1 @@
|
||||
d0esnaqiquQfjj1LGQsnkqPtbQ8kqu0SaHBbvf7cQYWujoMKQLPu4zGu10arUgikzBGu5Bcv14GQQZPOcVdQk5EuI9jufhusSqqrpuLKjkP4IqYgvuLpQuQrcsrNusIvQiVurfzMkvUPKK2jLQFQOmuqvlvOYtbMQQCvqk9vvsDwHQ0AbrH3QOs3vrvTxQ(lKAWKdlyXkf9yHmziUSuBgQ8zHYOvQ60sSAqk8AqHzRWTvP2nf)wfdNsz5QQNRKPl66qz7usFxsPXRuY5bjRxrf17brL7dIQ2pAVU)CqWFE6GLd2apiHx947GBhG4ae)5Gy)tToaAolUQazmZ(RYohGuwqdmtuwS2oimgoaQz4WT60TJpBa9xCqiklw73Velw)R6bPD74t9loyzle1U9loy1dCWFkM0b7qnVNd23Ly7tFEZXLlXV(CCb6GoiH)lqhKUCXXHpqc)oyCci(Zbzy0MCd)5GBSrw8NNE6GmmAt6phCJnYI)80thGuWHReHnsO8NdUXgzXFE6Pd(HO2Fo4gBKf)5PNoaxiklhJ)CWn2il(ZtpDGnR2YWOnP)CWn2il(ZtpDW)mA)5GBSrw8NNE6aSvJoAewlFtpDqWuUdz7W0b)ow5yEqzRDacuMWDjk2)GzZb9w2cgKgX30bfehaz)cJ2KuxDodKtTMLdmy3VFjwS(VC71DqTfKCVpV54YL4xh)BCj(qc)XVo(VGFhh(aj87PdI8NBVU)Cq2BL1N3XKGYCUD7BajheIYI1(9lXI1)QEqA3(fhK)sSy93FoiHYw7GiSvEUDqe2kp3O3xqAhKL7gXbT12KlhaGh1UDOHw4RPYdf6RMnBxnZU2ovCOaOEOVA2SD1m7A7ORAf7v2gvCoicBLNBhWjCyMOSCmWggJvgYEbbvdhNOOOOk4OAklwOQoouaup0xnB2UAMDTD0vTI9kBJkUQPY9THItuuuuuuuu4oFk0qqTYq2ufdLTq5VGnmgRmK9cokKdNOOOOOOOOOOOOwziB8w7p1szHcxySA8fNOOOOOOOOOOOOwziB8I2hmXAeklu5hRXxCIIIIIIIIQniCIIIIQniCIIIIQGJYCsQa2pGUnwXldJ2KlQCFBOUUdWOc2pSWdefmOS2MCbB1WVRs8Iko0Vk7qz)HgAHVMkpuvdhvBq4effffUZNcgqyLQyOSfk)fSbSFaDBSIxggTjxWrHC4efffffff14efguRm8tiOqW(HSCmuwO2UtGTEmU6CgiNAnWAfoorrrrrrrrnorHbvj6yOSqTDNaB9y86TsSFdlmGJtuuuuuuuuJtuyq1MWMJMYc1forrrrrrrrvWrTYWpPSyH6cvUVnuTjS5OPSqvNQhRMQnHnhnLfQluTbHtuuuuuuuuHXyLHSxZ168PSqb54efffffffffffv0(GjwJqzHk)yneCIIIIIIIIIIIIAT)ulLfQ8J1qWjkkkkkkkkkkkQFVo)KYcv(XAi4efffffffffffLT)j2VxRhu2AkluvNL7gPAi4efffffffffffvj6yOSqvIogi4efffffffffffvBcBoAkluTjS5OHGtuuuuuuuuqEorrrrrrrrvWrTYWpPIhQlubdcfc2pKLJHkEOQJhKfvUVnCIIIIIIIIIIIIkmgRmK9AUwNpE9w2k)qwoMx5UPSqTYWpPGmPqW(HSCmCIIIIIIIIIIIIkmgRmK9AUwNpEiy)qwogkluiy)qwogorrrrrrrrrrrrfgJvgYEnxRZhVIbP3IYcfc2pKLJHtuuuuuuuuTbHtuuuuTbHtuuuu)oX(gQ8J1CQnioicBLNB0ju2AhSYq2y2qcz7GO9DemCqBTnPdWHngROGXHPNoW2)e73Rf8)oQSkhJBhsoi7TY6WFkM0bxHY(dvCoyFxITpD7q)goyCci(Zbzy0MCd)5GBSrw8NNE6GmmAt6phCJnYI)80thGuWHReHnsO8NdUXgzXFE6Pd(HO2Fo4gBKf)5PNoWMvBzy0M0Fo4gBKf)5PNo4FgT)CWn2il(ZtpDaUquwog)5GBSrw8NNE6PdYERS(8oM0bvIIkiTjddk4)9QG0MiOCGb7(9lXI1)LBFdh87yLJ5bLT2bLOJXb1wqY9UDOFdhK9wzDhGVT5GcIdMbdheqqkz5ycd05Velw)x(ZTx3Foi)LyX6V)CWcBZ2ABs4)nUYwoaapQD7CqcLT2bryR8C7G2ABYLdGFxL4fvCOFv2HY(dn0cFnvEOCWcBZ2ABsagoCLTCa6RQaEObVkX9Cqe2kp3oGt4Wmrz5yGTHG6EfdoorrrrfW(b0TXkEzy0MCrzHcYb55effffUZN6FQLYcvDiOIpfYHtuuuuuuuu4oFQOZa72qzHQoeuqpfYHtuuuuuuuuuuuuJtuyqvqGGYeUBkluB35lmAtwfdUdS)tTqqfDgy3giOQdhNOOOOOOOOOOOOgNOWGA1dkluRE0rjS1Vab12D(cJ2KvXG7atOQsnWwqGdoorrrrrrrrrrrrnorHb1QGqzHA1JokHf6GGA7oFHrBYQyWDGjuvPgyliWbhNOOOOOOOOOOOOk4O2UtGTEmGzy1xDodKtTgyxfe4OIhQlubdc1QhuwSqLFSMk33gorrrrrrrrrrrrrrrrfW(b0TXkEzy0MCnxt4UNpLfQvbHtuuuuuuuuuuuuTbHtuuuuuuuuTbHtuuuuTbHtuuuux3byub7hw4bIcguwBtUGT64qbq9qF1Sz7Qz212rx1k2RSnQ4QgoorrrrDDhGrfSFyHhikyqzTn5c2QJdfa1d9vZMTRMzxBhDvRyVY2OIdnaEu72bQgoorrrrDDhGrfSFyHhikyqzTn5c2QHFxL4fvCObWJA3oyoB2Ccn0cFnvEOQgoo1geheHTYZn6ekBTdARTjDqBTnPdGMDyK7Dqe2kp3O3xqAhKL7gXthGzYFjwS(7pp90thGuwqdmtuwS2oiyGYbfJ1(VAhMoOykj6vg(zJ42R7GOZzGCQ14W0bbt5oKLJXFoaxXuw79NdS97vNoyZdMjQRPJcq5GekBTdS97vNE6PNE6aRU96qAJ6E6o
|
239
Complete Projects/Legion/ABS.lua
Normal file
239
Complete Projects/Legion/ABS.lua
Normal file
@@ -0,0 +1,239 @@
|
||||
--UPDATE_BIND_TABLE UPDATE_BINDS UPDATE_BAR_TABLE UPDATE_BARS DELETE_SET LIST_SETS
|
||||
--[[
|
||||
UPDATE_BIND_TABLE saves current binds
|
||||
UPDATE_BINDS restores saved binds
|
||||
UPDATE_BAR_TABLE saves current bar layout also supports sets
|
||||
UPDATE_BARS restores bar layout; defaults to the "default" set
|
||||
DELETE_SET deletes a specified set
|
||||
LIST_SETS lists all sets
|
||||
DELETE and LIST only work for bar layouts
|
||||
|
||||
|
||||
|
||||
/run WeakAuras.ScanEvents("UPDATE_BINDS")
|
||||
/run WeakAuras.ScanEvents("UPDATE_BIND_TABLE")
|
||||
|
||||
]]
|
||||
function(e, ...)
|
||||
if InCombatLockdown() ~= 1 then
|
||||
if e == "UPDATE_BIND_TABLE" then
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BindTableTwo then WeakAurasSaved.CustomTrash.BindTableTwo = {} end
|
||||
for i = 1, GetNumBindings() do
|
||||
local comm, bind, bind2 = GetBinding(i)
|
||||
if comm and bind2 and not WeakAurasSaved.CustomTrash.BindTableTwo[comm] then
|
||||
print("Adding", comm, "with bind", bind2, "to bind table")
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm] = {}
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm].bind = bind2
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm].index = i
|
||||
end
|
||||
if comm and not bind2 and WeakAurasSaved.CustomTrash.BindTableTwo[comm] then
|
||||
print("Removing", comm, "with no bind from the bind table")
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm] = nil
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_BINDS" then
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BindTableTwo) do
|
||||
local command, bind, bind2 = GetBinding(v.index)
|
||||
if bind2 ~= v.bind then
|
||||
--The key should be aura_env.keyBinds[command] but the key is bind2
|
||||
print("Key", command, "has bind", bind2, "but should have", v.bind)
|
||||
if bind2 then SetBinding(bind2) end
|
||||
if v.bind then SetBinding(v.bind, command) end
|
||||
end
|
||||
end
|
||||
SaveBindings(1)
|
||||
elseif e == "UPDATE_BAR_TABLE" then
|
||||
local arg2 = "default"
|
||||
if ... then arg2 = ... end
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable then WeakAurasSaved.CustomTrash.BarTable = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable[arg2] then WeakAurasSaved.CustomTrash.BarTable[arg2] = {} end
|
||||
for i = 1, 72 do
|
||||
PickupAction(i)
|
||||
if GetCursorInfo() then
|
||||
local type = GetCursorInfo()
|
||||
local id, name = nil, nil
|
||||
if not type then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = nil end
|
||||
if type == "spell" then
|
||||
id = select(4, GetCursorInfo())
|
||||
elseif type == "mount" then
|
||||
id = select(2, GetCursorInfo())
|
||||
elseif type == "macro" then
|
||||
id = select(2, GetCursorInfo())
|
||||
name = select(1, GetMacroInfo(id))
|
||||
elseif type == "item" then
|
||||
id = select(2, GetCursorInfo())
|
||||
elseif type == "equipmentset" then
|
||||
name = select(2, GetCursorInfo())
|
||||
end --elseif end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable[arg2][i] then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = {} end
|
||||
if id ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].id or type ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].type then
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].type = type
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].id = id
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].name = name
|
||||
if not name then
|
||||
print("Adding", type, "by id", id, "on slot", i, "to the table")
|
||||
elseif name then
|
||||
print("Adding", type, "by id", id, "and name", name, "on slot", i, "to the table")
|
||||
end
|
||||
end
|
||||
end
|
||||
PickupAction(i)
|
||||
end
|
||||
elseif e == "UPDATE_BARS" then
|
||||
local arg2 = "default"
|
||||
if ... then arg2 = ... end
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable[arg2]) do
|
||||
if v.type == "spell" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(4, GetCursorInfo())
|
||||
if id ~= v.id then
|
||||
ClearCursor()
|
||||
PickupSpell(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupSpell(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
elseif v.type == "mount" then
|
||||
local mid, mindex
|
||||
--Looking for mount in mount journal
|
||||
for i = 1, C_MountJournal.GetNumMounts() do
|
||||
mid = select(12, C_MountJournal.GetDisplayedMountInfo(i))
|
||||
local ishave = select(11, C_MountJournal.GetDisplayedMountInfo(i))
|
||||
if mid == v.id then
|
||||
mindex = i
|
||||
break
|
||||
end
|
||||
if ishave == false then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
--Checking what's on the bar
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
if id ~= v.id and mindex then
|
||||
ClearCursor()
|
||||
C_MountJournal.Pickup(mindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
elseif not GetCursorInfo() and mindex then
|
||||
ClearCursor()
|
||||
C_MountJournal.Pickup(mindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
elseif v.type == "macro" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
local name = select(1, GetMacroInfo(id))
|
||||
if id ~= v.id or name ~= v.name then
|
||||
ClearCursor()
|
||||
PickupMacro(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
local name = GetMacroInfo(v.id)
|
||||
if name == v.name then
|
||||
PickupMacro(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
elseif v.type == "equipmentset" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
local eqindex
|
||||
for i = 1, GetNumEquipmentSets() do
|
||||
local nam = GetEquipmentSetInfo(i)
|
||||
if nam == v.name then
|
||||
eqindex = i
|
||||
break
|
||||
end
|
||||
end
|
||||
if eqindex then
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local name = select(2, GetCursorInfo())
|
||||
if name ~= v.name then
|
||||
ClearCursor()
|
||||
PickupEquipmentSet(eqindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupEquipmentSet(eqindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
elseif v.type == "item" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
local ios, jos
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local id = link:match("item:(%d+):")
|
||||
if id then
|
||||
id = tonumber(id)
|
||||
if id == v.id then
|
||||
ios = i
|
||||
jos = j
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if ios and jos then
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
if id ~= v.id then
|
||||
ClearCursor()
|
||||
PickupContainerItem(ios, jos)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupContainerItem(ios, jos)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
end --elseif end
|
||||
end
|
||||
elseif e == "DELETE_SET" then
|
||||
local arg2 = ...
|
||||
if arg2 and WeakAurasSaved.CustomTrash.BarTable[arg2] then
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2] = nil
|
||||
end
|
||||
elseif e == "LIST_SETS" then
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable) do
|
||||
print(k)
|
||||
end
|
||||
end --elseif end
|
||||
end
|
||||
end
|
318
Complete Projects/Legion/Achiv Inspector.lua
Normal file
318
Complete Projects/Legion/Achiv Inspector.lua
Normal file
@@ -0,0 +1,318 @@
|
||||
--UPDATE_MOUSEOVER_UNIT PLAYER_TARGET_CHANGED
|
||||
function()
|
||||
if not UnitExists("target") and UnitExists("mouseover") and UnitIsPlayer("mouseover") then
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
bossKills =
|
||||
{
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
}
|
||||
SetAchievementComparisonUnit("mouseover")
|
||||
end
|
||||
if not UnitExists("mouseover") and UnitExists("target") and UnitIsPlayer("target") then
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
bossKills =
|
||||
{
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
}
|
||||
SetAchievementComparisonUnit("target")
|
||||
end
|
||||
end
|
||||
|
||||
--INSPECT_ACHIEVEMENT_READY
|
||||
function()
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
for k,v in ipairs(aura_env.TOS) do
|
||||
if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then
|
||||
local bossname = select(2, GetAchievementInfo(aura_env.TOS[k][1]))
|
||||
bossname = bossname:match("[a-zA-Z' ]*kills")
|
||||
bossname = bossname:gsub(" kills", "")
|
||||
aura_env.output = aura_env.output .. bossname .. "\n"
|
||||
if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" then
|
||||
bossKills[k][1] = GetComparisonStatistic(aura_env.TOS[k][1])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" then
|
||||
bossKills[k][2] = GetComparisonStatistic(aura_env.TOS[k][2])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" then
|
||||
bossKills[k][3] = GetComparisonStatistic(aura_env.TOS[k][3])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then
|
||||
bossKills[k][4] = GetComparisonStatistic(aura_env.TOS[k][4])
|
||||
end
|
||||
end
|
||||
end
|
||||
ClearAchievementComparisonUnit()
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- RF BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][1]) > 0 then
|
||||
output = output .. bossKills[k][1] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- NM BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][2]) > 0 then
|
||||
output = output .. bossKills[k][2] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- HC BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][3]) > 0 then
|
||||
output = output .. bossKills[k][3] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- Myth BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][4]) > 0 then
|
||||
output = output .. bossKills[k][4] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.TOS =
|
||||
{
|
||||
{ --Goroth
|
||||
11877, -- [1]
|
||||
11878, -- [2]
|
||||
11879, -- [3]
|
||||
11880, -- [4]
|
||||
}, -- [1]
|
||||
{ --Inquisition
|
||||
11881, -- [1]
|
||||
11882, -- [2]
|
||||
11883, -- [3]
|
||||
11884, -- [4]
|
||||
}, -- [2]
|
||||
{ --Harjatan
|
||||
11885, -- [1]
|
||||
11886, -- [2]
|
||||
11887, -- [3]
|
||||
11888, -- [4]
|
||||
}, -- [3]
|
||||
{ --Sisters
|
||||
11889, -- [1]
|
||||
11890, -- [2]
|
||||
11891, -- [3]
|
||||
11892, -- [4]
|
||||
}, -- [4]
|
||||
{ --Mistress
|
||||
11893, -- [1]
|
||||
11894, -- [2]
|
||||
11895, -- [3]
|
||||
11896, -- [4]
|
||||
}, -- [5]
|
||||
{ --Host
|
||||
11897, -- [1]
|
||||
11898, -- [2]
|
||||
11899, -- [3]
|
||||
11900, -- [4]
|
||||
}, -- [6]
|
||||
{ --Maiden
|
||||
11901, -- [1]
|
||||
11902, -- [2]
|
||||
11903, -- [3]
|
||||
11904, -- [4]
|
||||
}, -- [7]
|
||||
{ --Avatar
|
||||
11905, -- [1]
|
||||
11906, -- [2]
|
||||
11907, -- [3]
|
||||
11908, -- [4]
|
||||
}, -- [8]
|
||||
{ --Kil'jaeden
|
||||
11909, -- [1]
|
||||
11910, -- [2]
|
||||
11911, -- [3]
|
||||
11912, -- [4]
|
||||
}, -- [9]
|
||||
}
|
||||
aura_env.NH =
|
||||
{
|
||||
{ --Skorp
|
||||
10940, -- [1]
|
||||
10941, -- [2]
|
||||
10942, -- [3]
|
||||
10943, -- [4]
|
||||
}, -- [1]
|
||||
{ --Anomaly
|
||||
10944, -- [1]
|
||||
10945, -- [2]
|
||||
10946, -- [3]
|
||||
10947, -- [4]
|
||||
}, -- [2]
|
||||
{ --Trilliax
|
||||
10948, -- [1]
|
||||
10949, -- [2]
|
||||
10950, -- [3]
|
||||
10951, -- [4]
|
||||
}, -- [3]
|
||||
{ --Aluriel
|
||||
10952, -- [1]
|
||||
10953, -- [2]
|
||||
10954, -- [3]
|
||||
10955, -- [4]
|
||||
}, -- [4]
|
||||
{ --Augur
|
||||
10956, -- [1]
|
||||
10957, -- [2]
|
||||
10959, -- [3]
|
||||
10960, -- [4]
|
||||
}, -- [5]
|
||||
{ --Botanist
|
||||
10961, -- [1]
|
||||
10962, -- [2]
|
||||
10963, -- [3]
|
||||
10964, -- [4]
|
||||
}, -- [6]
|
||||
{ --Tich
|
||||
10965, -- [1]
|
||||
10966, -- [2]
|
||||
10967, -- [3]
|
||||
10968, -- [4]
|
||||
}, -- [7]
|
||||
{ --Krosus
|
||||
10969, -- [1]
|
||||
10970, -- [2]
|
||||
10971, -- [3]
|
||||
10972, -- [4]
|
||||
}, -- [8]
|
||||
{ --Elisande
|
||||
10973, -- [1]
|
||||
10974, -- [2]
|
||||
10975, -- [3]
|
||||
10976, -- [4]
|
||||
}, -- [9]
|
||||
{ --Gul'dan
|
||||
10977, -- [1]
|
||||
10978, -- [2]
|
||||
10979, -- [3]
|
||||
10980, -- [4]
|
||||
}, -- [10]
|
||||
}
|
||||
aura_env.output = ""
|
9
Complete Projects/Legion/Active Seeds.lua
Normal file
9
Complete Projects/Legion/Active Seeds.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
function()
|
||||
local seeds = 0
|
||||
for i = 1, 100 do
|
||||
if UnitDebuff("nameplate" .. i, "Seed of Corruption") then
|
||||
seeds = seeds + 1
|
||||
end
|
||||
end
|
||||
return seeds
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user