Originally Posted by Shinni
|
hey, look i modified a code, added channels and commented guild part, but addon still wont listen guilds chats
any clue?
DailyAutoshare
Code:
local function OnChatMessage(eventCode, channelType, fromName, messageText, isCustomerService)
--local guildMessage = DAS.EvaluateGuildInvite(channelType, fromName, messageText)
--if guildMessage or (not DAS.GetActiveIn()) then return end
-- 0: say
-- 2: whisper
-- 3: party
-- 31: zone
if (channelType == 3 or channelType == 2) then -- group
if DAS.IsMatch(messageText, "share") or DAS.IsMatch(messageText, "quest") or DAS.IsMatch(messageText, "please") then
DAS.TryShareActiveDaily(fromName)
end
if DAS.IsMatch(messageText, "stop") then
DAS.TryDisableAutoShare(eventCode, channelType, fromName, messageText, isCustomerService)
end
end
if DAS.FindInList({0, 2, 31, 12, 13, 14, 15, 16}, channelType) then -- zone, say, whisper, guilds
if (fromName == "") or (nil == fromName) then return end
if DAS.IsMatch(fromName, GetUnitName('player'))
then
if not DAS.IsMatch(messageText, "+") then return end
DAS.SetAutoAcceptInvite(true)
zo_callLater(function() DAS.SetAutoAcceptInvite(false) end, 5000)
end
if GetBingoMatch(messageText) then
DAS.TryInvite(fromName)
end
end
end