|
2025-06-10 12:59
조회: 1,212
추천: 0
(미해결)파티원 차단 징표 자동배정 텍스트메세지 출력 가능여부안녕하세요 개발이나 언어 코드는 1도 모르는데요, 갑자기 문득 생각나서 챗지피티를 이용해 만들어보려다 위크오라는 안되고 애드온으로는 어찌저찌 만들긴 했습니다. 탱힐딜 구분은 되는데 전문화 구분이 잘안되고 챗지피티도 결국 못헤서 여기 문의합니다 보통 우리가 쐐기돌때 탱커가 딜러들 차단징 알려주잖아요? 징기 별 고술 동그 냥 다야 이런걸 매번 수작업으로 하기 정말 귀찮은데 아무리 찾아봐도 위크오라나 매크로 애드온이 없어서요 혹시 이와 관련된거 아시는분이나 위크오라 또는 애드온으로 구현 가능한지 아시는분 계실까요? 혹은 제가 이미 챗지피티로 만든 애드온이 있는데 코드 봐주실수 있는분 계실런지요 이게 구현이 되면 모든 와우저들에게 큰 도움이 되지않을까 싶어요
EXP
11,020
(52%)
/ 11,401
와우 갓겜
|
서수남팬클럽
local frame = CreateFrame("Frame")
frame:RegisterEvent("ADDON_LOADED")
frame:RegisterEvent("GROUP_ROSTER_UPDATE")
frame:RegisterEvent("INSPECT_READY")
local unitsToInspect = {}
local inspectedSpecs = {}
local pendingInspect = false
local iconTexts = {"별", "동그", "다이아"}
local function IsValidDPS(class, specName)
if class == "ROGUE" or class == "WARRIOR" or class == "DEATHKNIGHT" or class == "DEMONHUNTER" then
return "근접딜러"
end
if (class == "SHAMAN" and specName == "고양") or
(class == "MONK" and specName == "풍운") or
(class == "PALADIN" and specName == "징벌") or
(class == "HUNTER" and specName == "생존") or
(class == "DRUID" and specName == "야성") then
return "근접딜러"
end
if class == "SHAMAN" and specName == "정기" then
return "원거리딜러_2순위"
end
if (class == "MAGE") or
(class == "HUNTER" and (specName == "사격" or specName == "야수")) or
(class == "EVOKER" and (specName == "황폐" or specName == "증강")) or
(class == "WARLOCK" and (specName == "파괴" or specName == "고통")) then
return "원거리딜러_3순위"
end
if (class == "WARLOCK" and specName == "악마") or
(class == "PRIEST" and specName == "암흑") or
(class == "DRUID" and specName == "조화") then
return "원거리딜러_4순위"
end
return nil
end
local function StartInspection()
wipe(unitsToInspect)
wipe(inspectedSpecs)
pendingInspect = false
local groupType = IsInRaid() and "raid" or "party"
local max = IsInRaid() and GetNumGroupMembers() or GetNumSubgroupMembers()
table.insert(unitsToInspect, "player")
for i = 1, max do
local unit = groupType .. i
if UnitExists(unit) and UnitName(unit) ~= UnitName("player") then
table.insert(unitsToInspect, unit)
end
end
if #unitsToInspect > 0 then
pendingInspect = true
NotifyInspect(unitsToInspect[1])
end
end
local function ContinueInspection()
if #unitsToInspect == 0 then return end
local unit = table.remove(unitsToInspect, 1)
if unit and CanInspect(unit) then
NotifyInspect(unit)
end
end
local function FinalizeMarking()
local roleGroups = {
["근접딜러"] = {},
["원거리딜러_2순위"] = {},
["원거리딜러_3순위"] = {},
["원거리딜러_4순위"] = {}
}
for unit, specID in pairs(inspectedSpecs) do
local _, class = UnitClass(unit)
local _, specName = GetSpecializationInfoByID(specID)
local role = IsValidDPS(class, specName)
if role then
local name = UnitName(unit)
if name then
table.insert(roleGroups[role], name)
end
end
end
local ordered = {}
for _, role in ipairs({"근접딜러", "원거리딜러_2순위", "원거리딜러_3순위", "원거리딜러_4순위"}) do
for _, name in ipairs(roleGroups[role]) do
if #ordered < 3 then
table.insert(ordered, name)
end
end
end
local chatType = IsInRaid() and "RAID" or (IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "PARTY")
SendChatMessage("[징표 배정 - 딜러 3인]", chatType)
for i, name in ipairs(ordered) do
local icon = iconTexts[i] or "?"
SendChatMessage(name .. " → " .. icon .. " 차단", chatType)
end
end
frame:SetScript("OnEvent", function(_, event, arg)
if event == "ADDON_LOADED" and arg == addonName then
SLASH_MARKASSIGN1 = "/징표"
SlashCmdList["MARKASSIGN"] = StartInspection
elseif event == "INSPECT_READY" and pendingInspect then
local unit = unitsToInspect[1]
if unit then
local specID = GetInspectSpecialization(unit)
if specID and specID ~= 0 then
inspectedSpecs[unit] = specID
end
end
table.remove(unitsToInspect, 1)
if #unitsToInspect > 0 then
C_Timer.After(0.5, ContinueInspection)
else
FinalizeMarking()
end
end
end)