热门排行
简介
魔兽世界怀旧服轻量级杀怪种类统计(KillCountBroadcast)一款针对怀旧服制作的杀怪统计插件,主要方便一波流带小号甄别漏怪与否,建议愿意使用的朋友也使用wowlua这个插件来运行,喜欢的朋友快来下载吧。
插件功能
建议愿意使用的朋友也使用wowlua这个插件来运行(官方的不支持中文,要替换Font文件夹内的字体文件),
因为这个插件调试很方便,可以保存多个脚本,想调用哪个调用哪个,所以现在我已习惯用wowlua直接运行脚本。
具体代码如下:
Code lua:
fram= CreateFrame("Frame", nil, UIParent) fram:SetWidth(76) fram:SetHeight(36) --fram:SetFrameStrata("BACKGROUND") local height = GetScreenHeight() local width = GetScreenWidth() fram:SetPoint("CENTER", width * 0.4,-(height * 0.25)) fram:SetMovable(true) fram:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") fram:RegisterEvent("PLAYER_REGEN_DISABLED") fram:RegisterEvent("PLAYER_REGEN_ENABLED") fram:RegisterEvent("CHAT_MSG_WHISPER")--私聊 local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo local killedhistory ={} local nowkilled local starttime local ChatTypelist = { "SAY" , "EMOTE" , "YELL", "PARTY", "GUILD" , "OFFICER", "RAID", "RAID_WARNING", "INSTANCE_CHAT", "BATTLEGROUND", "WHISPER", "CHANNEL", "AFK", "DND" } local chanel = ChatTypelist[4] local autochanel = false --自动切换喊话频道开关,为了避免在公共频道频繁喊话,默认关闭 function setchanel () if(not autochanel)then return end local temp if(UnitInRaid("player") and chanel ~= ChatTypelist[7] ) then temp = ChatTypelist[7] else if(UnitInParty("player") and chanel ~= ChatTypelist[4] ) then temp = ChatTypelist[4] else temp = ChatTypelist[1] end end if( temp ~= chanel) then chanel = temp print("更改喊话频道:",chanel) end end local enCombat = false fram:SetScript("OnEvent",function(self,event,...) if(event =="PLAYER_REGEN_DISABLED") then if(not nowkilled) then starttime = date("%Y-%m-%d %H:%M:%S") end --如果没有杀死怪的记录,就重置时间 SendChatMessage("进入战斗!!" ,chanel ,nil,nil) enCombat = true else if(event =="PLAYER_REGEN_ENABLED") then enCombat = false setchanel () SendChatMessage("战斗结束!!" ,chanel ,nil,nil) --SendChatMessage("战斗结束!!" ,"CHANNEL" ,nil,2) --print("nowkilled = ",nowkilled,table.getn(nowkilled)) if(nowkilled) then if(not ckbtn1:GetChecked()) then return end local titled=false local monsterCount =0 for k,v in pairs(nowkilled) do monsterCount = monsterCount + v if(not titled) then SendChatMessage("本次杀怪数量如下:" ,chanel ,nil,nil) titled = true end SendChatMessage("共 "..v.." 只 "..k ,chanel ,nil,nil) --SendChatMessage("共 "..v.." 只 "..k ,"CHANNEL" ,nil,2) killedhistory[#killedhistory+1] = nowkilled end SendChatMessage("总共 "..monsterCount.." 只 " ,chanel ,nil,nil) nowkilled = nil end else if (event=="COMBAT_LOG_EVENT_UNFILTERED") then local timestamp, subEvent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, param12, param13, param14, param15, param16, param17, param18, param19, param20, param21, param22, param23, param24 = CombatLogGetCurrentEventInfo() if(subEvent == "UNIT_DIED") then print("死亡:",subEvent,destName) if(not nowkilled or nowkilled == nil) then nowkilled ={} end if(nowkilled[destName]) then nowkilled[destName] = nowkilled[destName] +1 else nowkilled[destName] = 1 end end --print(timestamp, subEvent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, param12, param13, param14, param15, param16, param17, param18, param19, param20, param21, param22, param23, param24) else if (event=="CHAT_MSG_WHISPER") then if(not ckbtn2:GetChecked()) then return end msg, player, _, channel_name, _, status, _, channel_id,_, _, _, guid, BNguid= ...; local tb = { ".*有.*坑", ".*有.*位置", ".*有.*位子", ".*什么.*等级", ".*多少.*等级", } for i=1,#tb do if(string.match(msg,tb[i])) then local partyMember = GetNumGroupMembers() if(partyMember and partyMember > 1) then --print(" partyMember", partyMember) local lvls = {} for h=1,partyMember-1 do --print("当前队员:"..player..tostring(UnitLevel("party"..h))) lvls[#lvls + 1] = UnitLevel("party"..h) end SendChatMessage("当前队伍:"..partyMember.."人,等级分别为:"..table.concat(lvls,","),"Whisper","Common",player) break end end end end end end end end ); ckbtn1=CreateFrame("CheckButton", nil, fram,"UICheckButtonTemplate") fontstring1 = fram:CreateFontString(nil, "ARTWORK", "GameFontNormal") fontstring1:SetFont(GameFontNormal:GetFont(),12) --GameFontNormal:GetFont() fontstring1:SetText("开启广播") fontstring1:SetPoint("LEFT",30,0) ckbtn1.text = fontstring1 ckbtn1:SetPoint("LEFT") ckbtn1:SetChecked("True") ckbtn2=CreateFrame("CheckButton", nil, fram,"UICheckButtonTemplate") fontstring2 = fram:CreateFontString(nil, "ARTWORK", "GameFontNormal") fontstring2:SetFont(GameFontNormal:GetFont(),12) --GameFontNormal:GetFont() fontstring2:SetText("自动回复") fontstring2:SetPoint("LEFT",30,-30) ckbtn2.text = fontstring2 ckbtn2:SetPoint("LEFT") ckbtn2:SetChecked("True") ckbtn2:SetPoint("LEFT",0,-30) btn = CreateFrame("Button", nil, fram,"UIPanelButtonTemplate,SecureActionButtonTemplate") btn:SetText("打印统计") btn:SetWidth(76) btn:SetHeight(36) btn:SetPoint("LEFT",0,-60) btn:SetScript("OnClick",function() for k,v in pairs(killedhistory[#killedhistory]) do SendChatMessage("共 "..v.." 只 "..k ,"SAY" ,nil,nil) end end );
插件安装步骤
在我们得到文件名为Interface.rar的压缩包之后(当然这文件先随意放哪都行,只要找得到,不用象我图中这么放魔兽路径下)
然后双击或者右键再点打开都可以的.
选择解压到
然后选择自己的魔兽怀旧服安装路径.注意不要安装到正式服去了,不然没用的.
怀旧服的目录中肯定是含有"_classic_"的.
来检查下,解压完成后,安装路径中一定依次固定的三个文件夹名如图中所示.
我装了一些常用插件和我喜欢的插件,如果你AddOns文件夹下是和以下图中类似的文件名那恭喜你就安装好了.重新进客户端就可以了.