<<
path:
root/public/nswa.git/html/nswa_hello.lua
blob: a12678e1d5413b9052628f34a8095548fdae39c2
[raw]
[clear marker]
13local is_in_group = false
14local has_greeted = false
17local frame = CreateFrame("Frame")
18frame:RegisterEvent("GROUP_ROSTER_UPDATE")
21local function send_message(msg)
22 if IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
23 SendChatMessage(msg, "INSTANCE_CHAT")
24 elseif IsInGroup() then
25 SendChatMessage(msg, "PARTY")
29local function greet_group()
30 local delay = math.random(DELAY_MIN, DELAY_MAX)
31 C_Timer.After(delay, function()
32 local msg = messages[ math.random(#messages) ]
37frame:SetScript("OnEvent", function()
38 if IsInGroup() and not IsInRaid() then
39 if not is_in_group then
40 if not has_greeted then