/run T,F=T or 0,F or CreateFrame("frame")if X then X=nil else X=function()local t=GetTime()if t-T>60 then SendChatMessage("10人监狱10职业,来的M我打1","channel",nil,2);T=t;end;end;end;F:SetScript("OnUpdate",X) 这个就是需要的宏,可以改 t>60中的60,这个数字是喊话间隔时间
那就需要先用一个宏编写一个内部函数 该函数仅为写入喊话功能和内容 然后用另外一个宏编写我这个自动喊话的判定条件 然后代入第一个宏的函数 这样就把整个功能分成两个模块了...稍微演示一下 第一个宏:内部功能函数创建 /脚本 function zl() SendChatMessage("自定义喊话内容","channel",nil,2) end 第二个宏:自动喊话功能 /script T,F=T or 0,F or CreateFrame("frame")if X then X=nil else X=function() local t=GetTime() if t-T>60 then zl() T=t end end end F:SetScript("OnUpdate",X) 先把两个宏做好 每次进入游戏后先点击第一个宏一次 然后每次需要激活/关闭自动喊话时点第二个宏即可