|
2018-11-27 01:03
조회: 5,595
추천: 3
해제/차단 lua 스크립트인데 조언 부탁드려요강남쌍칼님, 배틀리님께서 공유해주신 격아용 차단 lua 스크립트 잘 사용중인데요.
기존에 있는 스크립트를 쓰고 광역 해제시, "대상의 [해제한 디버프명(차단된 스킬명)] 해제(차단)" "대상의 [해제한 디버프명(차단된 스킬명)] 해제(차단)" "대상의 [해제한 디버프명(차단된 스킬명)] 해제(차단)" 이렇게 채팅창이 도배되는 사태가 일어납니다. "대상의 [해제한 디버프명(차단된 스킬명)] 해제(차단) x3(카운트)" 이런식으로 변경하려면 기존 루아 스크립트에서 어떻게 고쳐야 할까요. c언어나 이런쪽을 전혀 배운적이 없어서 제 자의대로 고쳐봤는데 오류가 뜹니다. 도움 또는 조언 주시면 정말정말 감사하겠습니다. -------------------------------------------------------------------------------------- local function sendChatMessage(count, xlink, name, text, ch) if (count == 1) then text = name.."의 "..xlink " "..text else text = name.."의 "..xlink..text.."x"..count end end local SpellCount, CharName = 0, ""; local si=CreateFrame("Frame") si:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") si:SetScript("OnEvent",function() local _,combatEvent,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags, destRaidFlags,spellID,spellName,_,param1,_,_,param4 = CombatLogGetCurrentEventInfo() if (not combatEvent) then return end local channel = "SAY"; if sourceGUID == UnitGUID("pet") and combatEvent == "SPELL_INTERRUPT" then -- 소환수 차단 알림 SendChatMessage("Pet's"..GetSpellLink(spellID).."▶"..destName.."의 "..GetSpellLink(param1), channel) elseif (sourceGUID == UnitGUID("player")) then if (combatEvent == "SPELL_INTERRUPT" or combatEvent == "SPELL_DISPEL") then SpellCount = SpellCount + 1 local xlink = combatEvent == GetSpellLink(param1) local text = combatEvent == "SPELL_INTERRUPT" and " 차단" or combatEvent == "SPELL_DISPEL" and " 해제"; if (SpellCount ~= 0) then CharName = CharName == destName and destName or ""; sendChatMessage(SpellCount, xlink, CharName, text, channel) SpellCount, CharName = 0, "" end end CharName = destName end end) -------------------------------------------------------------------------------------- 다른 부분도 오류가 있는 거 같지만, 중간에 local xlink = combatEvent == GetSpellLink(param1) 이 부분이 확실하지 않지만 문제가 되는 것 같습니다.ㅠ 복붙한 내용이 많아서 그런데, 위에 CharName이 의미하는 게 무언지도 궁금하네요. 오류 메세지 내용은, -------------------------------------------------------------------------------------- attempt to call local 'xlink' (a string value) 라고 오류가 뜨고 아래에는--boolean value 라고 뜰때도 있어요.. Locals: count = 1 xlink = "|cff71d5ff|Hspell:252697:0|h[맹독성 늪지대 가스]|h|r" name = "제 닉네임" text = " 해제" ch = "SAY" (*temporary) = "제 닉네임" (*temporary) = "의 " (*temporary) = "|cff71d5ff|Hspell:252697:0|h[맹독성 늪지대 가스]|h|r" (*temporary) = " " (*temporary) = "attempt to call local 'xlink' (a string value)" -------------------------------------------------------------------------------------- 이렇게 뜹니다. 참고한 배틀리님 스크립트 링크는 입니다. 방향을 조금이라도 알면 좋겠는데 자꾸 오류만 떠서 답답하네요..ㅠ
EXP
57,882
(29%)
/ 60,001
|
눈먹사