레이블이 Alert인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Alert인 게시물을 표시합니다. 모든 게시물 표시

2019년 1월 29일 화요일

쿨기 사용 알림

Lua

KoKR
--Spell Alert
local _SAt = {}
local _SAn = {}
local _SAch = IsInGroup(2) and "INSTANCE_CHAT" or IsInRaid() and "RAID" or IsInGroup(1) and "PARTY" or "YELL"

_SAt = {
--[spellID] = true, --spellName
[47788] = true, --수호 영혼
[33206] = true, --고억
} --타게팅

_SAn = {
--[spellID] = true, --spellName
[62618] = true, --방벽
[64843] = true, --천찬
} --논타겟

local alert=CreateFrame("Frame")
alert:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
alert:SetScript("OnEvent", function(...)
local _,combatEvent,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags, destRaidFlags,spellID,spellName,_,param1,_,_,param4 = CombatLogGetCurrentEventInfo()

if combatEvent=="SPELL_CAST_SUCCESS" and sourceGUID == UnitGUID("player") then
    if _SAt[spellID] and destGUID ~= UnitGUID("player") then
        SendChatMessage(destName.." 님께 "..GetSpellLink(spellID), _SAch)
    elseif _SAn[spellID] then
        SendChatMessage(GetSpellLink(spellID).." 사용!", _SAch)
    end
end
end)

EnUS
--Spell Alert
local _SAt = {}
local _SAn = {}
local _SAch = IsInGroup(2) and "INSTANCE_CHAT" or IsInRaid() and "RAID" or IsInGroup(1) and "PARTY" or "YELL"

_SAt = {
--[spellID] = true, --spellName
[47788] = true, --Guardian Spirit
[33206] = true, --Pain Suppression
} --targeting spells

_SAn = {
--[spellID] = true, --spellName
[62618] = true, --Power Word: Barrier
[64843] = true, --Divine Hymn
} --non targeting spells

local alert=CreateFrame("Frame")
alert:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
alert:SetScript("OnEvent", function(...)
local _,combatEvent,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags, destRaidFlags,spellID,spellName,_,param1,_,_,param4 = CombatLogGetCurrentEventInfo()

if combatEvent=="SPELL_CAST_SUCCESS" and sourceGUID == UnitGUID("player") then
    if _SAt[spellID] and destGUID ~= UnitGUID("player") then
        SendChatMessage(GetSpellLink(spellID).." on "destName, _SAch)
    elseif _SAn[spellID] then
        SendChatMessage(GetSpellLink(spellID).." up!", _SAch)
    end
end
end)

2018년 6월 7일 목요일

차단 성공/ 실패 알림

Lua
local alert=CreateFrame("Frame")
alert:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
alert:SetScript("OnEvent", function(...)
local _,combatEvent,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags, destRaidFlags,spellID,spellName,_,param1,_,_,param4 = CombatLogGetCurrentEventInfo()

if sourceGUID==UnitGUID("player") and destName~=nil then
    if spellID==183752 or spellID==47528 or spellID==96231 or spellID==106839 or spellID==6552 or spellID==119910 or spellID==57994 or spellID==147362 or spellID==187707 or spellID==2139 or spellID==1766 or spellID==116705 then
    if combatEvent=="SPELL_INTERRUPT" then
        print("\124cffff0000차단\124r : "..destName.."의 "..GetSpellLink(param1)) -- 차단
    else
        print("차단실패 : "..destName)
        end
    end
end
end)

일반적인 주요 전투이벤트 경보는 차단 경보 관련글을 참조

차단에 성공할 경우 차단 : 대상의 주문명, 차단에 실패한 경우 차단실패 : 대상이름이 출력됨
실패 경보를 원하는 사람이 있어서 만들었지만 쓸데없이 스캔범위가 넓어지고 차단 기술의 Spell ID를 일일이 등록해 줘야 하는 단점이 있음

특정 대상 접근시 경보 - 이름표

이름표를 활성화한 경우 이름표가 보이는 시점에 경보를 울림
if uName == "경보할 유닛 이름" 을 넣어서 사용
은신한 유닛은 이름표가 바로 보이지 않는 경우가 많기 때문에 판정이 정확하지 않음

1. 소리 알림
Lua
 local HTD = CreateFrame("Frame")
HTD:RegisterEvent("NAME_PLATE_UNIT_ADDED")
HTD:SetScript("OnEvent", function(self,event,...)
local uID = ...
local uName = GetUnitName(uID)
if event == "NAME_PLATE_UNIT_ADDED" then
    if uName == "찰스 가스틀리" or uName=="고든 맥켈라르" then
        PlaySound(8960)
    end
end
end)

2. 채팅창+경보프레임 알림
Lua
local HTD = CreateFrame("Frame")
HTD:RegisterEvent("NAME_PLATE_UNIT_ADDED")
HTD:SetScript("OnEvent", function(self,event,...)
local uID = ...
local uName = GetUnitName(uID)
if event == "NAME_PLATE_UNIT_ADDED" then
    if uName == "닉네임" then
        RaidNotice_AddMessage(RaidWarningFrame,uName.." 접근!!",ChatTypeInfo["RAID_WARNING"]);print("124cffff4800접근 경보 ▶ 124r"..uName)
    end
end
end)


2018년 6월 6일 수요일

미니맵 위치 표시(Minimap ping)

Lua
 --미니맵 핑테러 검거
CreateFrame("FRAME","p")
p:RegisterEvent("MINIMAP_PING")
p:SetScript("OnEvent",function(s,e,u)
    local pn=UnitName(u)
    local _,c=UnitClass(u)
    local color=RAID_CLASS_COLORS[c]
    if pn~=UnitName("player") then
        print("Ping : \124c"..color.colorStr..pn.."\124r - "..tonumber(date("%H"))..":"..tonumber(date("%M"))..":"..tonumber(date("%S")))
    end
end)

 Script
/run local p=CreateFrame("FRAME")p:RegisterEvent("MINIMAP_PING")p:SetScript("OnEvent",function(s,e,u)local pn=UnitName(u)if pn~=UnitName("player") then print("Ping : \124cffff0000"..pn.."\124r")end end) 
현재 위치에 미니맵 핑 찍기
7.x.x Legion
/run Minimap:PingLocation(GetPlayerMapPosition("player"))
8.0.1 BfA
/run Minimap:PingLocation(C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit("player"),"player"))

2018년 6월 5일 화요일

[안건종료] 투물추적기

구글 드라이브 링크
 InvisAlert

시시한 투명의 물약 사용시 경보 + 내가 공격대장일 경우 자동으로 올부공 승격

격아 작동 업데이트

주문 이벤트 경보 (Spell Alert)

BfA
Lua
--Spell Alert
local alert=CreateFrame("Frame")
alert:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
alert:SetScript("OnEvent", function(...)
local _,combatEvent,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags, destRaidFlags,spellID,spellName,_,param1,_,_,param4 = CombatLogGetCurrentEventInfo()

if sourceGUID == UnitGUID("player") and combatEvent=="SPELL_INTERRUPT" then
    print("\124cffff0000차단\124r : "..destName.."의 "..GetSpellLink(param1)) -- 차단 Interrupt
elseif sourceGUID == UnitGUID("player") and combatEvent=="SPELL_DISPEL" and (bit.band(destFlags,COMBATLOG_OBJECT_REACTION_FRIENDLY)==COMBATLOG_OBJECT_REACTION_FRIENDLY) then
    print("\124cff00ff00해제\124r : "..destName.."의 "..GetSpellLink(param1)) -- 해제(아군) Dispel(friendly)
elseif sourceGUID == UnitGUID("player") and combatEvent=="SPELL_DISPEL" and (bit.band(destFlags,COMBATLOG_OBJECT_REACTION_HOSTILE)==COMBATLOG_OBJECT_REACTION_HOSTILE) then
    print("\124cffff0000해제\124r : "..destName.."의 "..GetSpellLink(param1)) -- 해제(적) Dispel(hostile)
elseif sourceGUID == UnitGUID("player") and combatEvent=="SPELL_STOLEN" then
    print("\124cffff0000훔치기\124r : "..destName.."의 "..GetSpellLink(param1)) -- 훔치기 Steal
elseif destGUID == UnitGUID("player") and combatEvent=="SPELL_MISSED" and param1=="REFLECT" then
    print("\124cffff0000반사\124r : "..sourceName.."의 "..GetSpellLink(spellID)) -- 반사 Reflect
end
end)


차단 해제 마훔 반사 등등 이벤트 발생시 개인 채팅창으로 알림
이벤트 : ㅁㅁ의 기술명 형식으로 출력

Example








참조 : 차단 성공/ 실패, 쿨기 사용

채팅창 막타 알림 스크립트

매 결정타 획득시 채팅창으로 ㅁㅁㅁ 처치! 라는 메시지 출력
파티 상태가 아닐 경우는 일반 대화, 파티 상태일 경우 해당 파티에 맞는 대화창으로 출력됨
비슷한 기능을 하는 Killing Blow라는 애드온을 사용할 수도 있음
SendChatMessage나 print 대신 PlaySound API를 넣으면 소리 경보로 변경됨

1. 대화로 출력

local KB=CreateFrame("Frame")
KB:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
KB:SetScript("OnEvent", function(...)
local _,combatEvent,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags, destRaidFlags,spellID,spellName,_,param1,_,_,param4 = CombatLogGetCurrentEventInfo()
if combatEvent=="PARTY_KILL" then
if sourceGUID == UnitGUID("player") then
        if select(1,strsplit("-",destGUID)) == "Player" then
        SendChatMessage(destName.." 처치!", IsInGroup(2) and "INSTANCE_CHAT" or IsInRaid() and "RAID" or IsInGroup(1) and "PARTY" or "SAY")
        end
    end
end
end)
 --막타알림





2. 혼자만 보기

local KB=CreateFrame("Frame")
KB:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
KB:SetScript("OnEvent", function(...)
local _,combatEvent,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags, destRaidFlags,spellID,spellName,_,param1,_,_,param4 = CombatLogGetCurrentEventInfo()
if combatEvent=="PARTY_KILL" then
    if sourceGUID == UnitGUID("player") then
        if select(1,strsplit("-",destGUID)) == "Player" then
        print(destName.." 처치!")
        end
    end
end
end)
--막타알림