• 0

    posted a message on Critmeister does not work with 4.2. Help!
    That was it, everything works great again. Thanks
    Posted in: AddOn HELP!
  • 0

    posted a message on Critmeister does not work with 4.2. Help!
    It is working again, but it is now showing crits from all the players around me as well. Can it just show my crits?
    Posted in: AddOn HELP!
  • 0

    posted a message on Critmeister does not work with 4.2. Help!
    I do not know how to program, what do i change in the LUA?
    Posted in: AddOn HELP!
  • 0

    posted a message on Critmeister does not work with 4.2. Help!
    I use Critmeister to display and record crits. i like it because it displays them in the chat channel. When 4.2 came out, it does not work. Can anyone help me.
    I will post the code at this link on WowAce.
    http://paste.wowace.com/3608/
    Posted in: AddOn HELP!
  • 0

    posted a message on Display Critical hits in chat?
    That was it!!!! It works!!!!! Thank, you, thank you, thank you!
    Posted in: Addon Ideas
  • 0

    posted a message on Display Critical hits in chat?
    I tried the suggestion but it did not work.

    I will paste the original LUA-

    --
    --	Critmeister
    --	Tells you when you crit and gathers stats for each crit.
    --	Created by Clorell/Keruni of Argent Dawn [US]
    --	$Id: Critmeister.lua 21 2009-12-03 18:11:56Z xocide $
    --
    
    -------------------------------------------------------
    -- Critmeister
    Critmeister = LibStub("AceAddon-3.0"):NewAddon("Critmeister", "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0", "LibSink-2.0", "LibEffects-1.0")
    local L = LibStub("AceLocale-3.0"):GetLocale("Critmeister", false)
    local LSM = LibStub("LibSharedMedia-3.0")
    
    -------------------------------------------------------
    -- Critmeister Version
    Critmeister.revision = tonumber(("23"):match("%d+"))
    Critmeister.version = GetAddOnMetadata('Critmeister', 'Version')
    if(Critmeister.revision == nil) then
    	Critmeister.version = "SVN"
    end
    local VERSION = Critmeister.version
    
    -------------------------------------------------------
    -- Register some media
    LSM:Register("sound", "Rubber Ducky", [[Sound\Doodad\Goblin_Lottery_Open01.wav]])
    LSM:Register("sound", "Cartoon FX", [[Sound\Doodad\Goblin_Lottery_Open03.wav]])
    LSM:Register("sound", "Explosion", [[Sound\Doodad\Hellfire_Raid_FX_Explosion05.wav]])
    LSM:Register("sound", "Shing!", [[Sound\Doodad\PortcullisActive_Closed.wav]])
    LSM:Register("sound", "Wham!", [[Sound\Doodad\PVP_Lordaeron_Door_Open.wav]])
    LSM:Register("sound", "Simon Chime", [[Sound\Doodad\SimonGame_LargeBlueTree.wav]])
    LSM:Register("sound", "War Drums", [[Sound\Event Sounds\Event_wardrum_ogre.wav]])
    LSM:Register("sound", "Cheer", [[Sound\Event Sounds\OgreEventCheerUnique.wav]])
    LSM:Register("sound", "Humm", [[Sound\Spells\SimonGame_Visual_GameStart.wav]])
    LSM:Register("sound", "Short Circuit", [[Sound\Spells\SimonGame_Visual_BadPress.wav]])
    LSM:Register("sound", "Fel Portal", [[Sound\Spells\Sunwell_Fel_PortalStand.wav]])
    LSM:Register("sound", "Fel Nova", [[Sound\Spells\SeepingGaseous_Fel_Nova.wav]])
    
    -------------------------------------------------------
    -- Default options
    local defaults = {
    	profile = {
    		PostCrits = true,
    		PostChatFrame = true,
    		Message = L["CRIT_MSG_DEFAULT"],
    		showhighestnon = true,
    		Effects = {
    			Flash = false,
    			Shake = false,
    		},
    		Sound = {
    			Playsound = true,
    			SoundFile = "Explosion",
    		},
    		minimapButton = {
    			minimapPos = 200,
    			radius = 80,
    			hide = false,
    			rounding = 10,
    		},
    		SinkOptions = {
    			sink20OutputSink = "Default",
    		},
    		critRecords = {
    			SinkOptions = {
    				sink20OutputSink = "Default",
    			},
    		},
    		critstats = {},
    	},
    }
    
    -------------------------------------------------------
    -- Just some required things...
    local combatTime = 0
    local combatTickTimer
    local critRecord = LibStub("LibSink-2.0")
    function Critmeister:OnInitialize()
    	self:Print("v"..VERSION.." running.")
    	self.db = LibStub("AceDB-3.0"):New("CritmeisterDB", defaults)
    	self.opt = self.db.profile
    	self.critstats = self.db.profile.critstats
    
    	-- Updater
    	if not self.opt.ver then
    		for a,b in pairs(self.critstats) do
    			if not b.highestnon then
    				b.highestnon = 0
    			end
    		end
    		self.opt.ver = 1
    	end
    	
    	self.db.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged")
    	self.db.RegisterCallback(self, "OnProfileCopied", "OnProfileChanged")
    	self.db.RegisterCallback(self, "OnProfileReset", "OnProfileChanged")
    
    	self:SetSinkStorage(self.opt.SinkOptions)
    	critRecord:SetSinkStorage(self.opt.critRecords.SinkOptions)
    	
    	-- Player stuff
    	playerClass0, playerClass1 = UnitClass("player")
    	self.playerClass = playerClass1
    	self.playerName = UnitName("player")
    	
    	self:SetupOptions()
    end
    
    function Critmeister:OnEnable()
    	self:RegisterEvent("PLAYER_REGEN_DISABLED")
    	self:RegisterEvent("PLAYER_REGEN_ENABLED")
    	self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    end
    
    -------------------------------------------------------
    -- Profiles Stuff
    function Critmeister:OnProfileChanged(event, database, newProfileKey)
    	self.db = db
    	self.opt = db.profile
    	self:Print("Profile changed.")
    end
    
    function Critmeister:PLAYER_REGEN_DISABLED()
    	combatTickTimer = self:ScheduleRepeatingTimer("combatTick", 1)
    end
    
    function Critmeister:PLAYER_REGEN_ENABLED()
    	self:CancelTimer(combatTickTimer)
    	combatTime = 0
    end
    
    function Critmeister:combatTick()
    	combatTime = combatTime+1;
    	for key,crit in pairs(self.critstats) do
    		crit.totaltime = crit.totaltime + 1
    	end
    end
    
    function Critmeister:handleCrit(spellID,amount,type)
    	local link = nil
    	local name = nil
    	local icon = nil
    	if(type == 'spell') then
    		link = GetSpellLink(spellID)
    		name = GetSpellInfo(spellID)
    		icon = select(3,GetSpellInfo(spellID))
    	elseif(type == 'melee') then
    		link = 'Melee Swing'
    		name = 'Melee Swing'
    		icon = "Interface\\Icons\\INV_sword_39"
    	end
    	
    	-- Check if the critstats record exists or not
    	if not self.critstats[spellID] then
    		self.critstats[spellID] = {
    			spellID = spellID,
    			name = name,
    			highest = 0,
    			highestnon = 0,
    			count = 0,
    			totaltime = 0, 
    			icon = icon,
    		}
    	end
    	
    	-- Get the crit info
    	local crit = self.critstats[spellID]
    
    	-- update the highest crit
    	if(crit.highest < amount) then
    		crit.highest = amount
    		self:postNewCritRecord(name,amount)
    	end
    	
    	-- increment the crit count
    	crit.count = crit.count+1
    	
    	self:postCrit(spellID,amount,type)
    end
    
    function Critmeister:handleNonCrit(spellID,amount,type)
    	local link = nil
    	local name = nil
    	local icon = nil
    	if(type == 'spell') then
    		link = GetSpellLink(spellID)
    		name = GetSpellInfo(spellID)
    		icon = select(3,GetSpellInfo(spellID))
    	elseif(type == 'melee') then
    		link = 'Melee Swing'
    		name = 'Melee Swing'
    		icon = "Interface\\Icons\\INV_sword_39"
    	end
    	
    	-- Check if the critstats record exists or not
    	if not self.critstats[spellID] then
    		self.critstats[spellID] = {
    			spellID = spellID,
    			name = name,
    			highest = 0,
    			highestnon = 0,
    			count = 0,
    			totaltime = 0, 
    			icon = icon,
    		}
    	end
    	
    	-- Get the crit info
    	local crit = self.critstats[spellID]
    	
    	-- update the highest non crit
    	if(crit.highestnon < amount) then
    		crit.highestnon = amount
    	end
    end
    
    function Critmeister:COMBAT_LOG_EVENT_UNFILTERED(event,...)
    	local msg,type,msg2,name,msg3,msg4,name2 = select(1, ...)
    
    	if(name == self.playerName) then
    		if(type == "SPELL_DAMAGE") then
    			local spellID, spellName, spellSchool = select(9, ...)
    			local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = select(12, ...)
    			if(critical) then
    				self:handleCrit(spellID,amount,'spell')
    			else
    				self:handleNonCrit(spellID,amount,'spell')
    			end
    		elseif(type == "SPELL_HEAL") then
    			local spellID, spellName, spellSchool = select(9, ...)
    			local amount, overhealing, absorb, critical = select(12, ...)
    			if(critical) then
    				self:handleCrit(spellID,amount,'spell')
    			else
    				self:handleNonCrit(spellID,amount,'spell')
    			end
    		elseif(type == 'SWING_DAMAGE') then
    			local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = select(9, ...)
    			if(critical) then
    				self:handleCrit('-1',amount,'melee')
    			else
    				self:handleNonCrit('-1',amount,'melee')
    			end
    		end
    	end
    end
    
    function Critmeister:postCrit(ID,amount,type)
    	local link = nil
    	local name = nil
    	if(type == 'spell') then
    		link = GetSpellLink(ID)
    		name = GetSpellInfo(ID)
    	elseif(type == 'melee') then
    		link = 'Melee Swing'
    		name = 'Melee Swing'
    	end
    	-- Post Crit
    	if (self.opt.PostCrits) then
    		-- Chat Frame
    		if (self.opt.PostChatFrame) then
    			self:Print(self.opt.Message:format(name, amount))
    		end
    		local pourBefore = ""
    		if(self.opt.SinkOptions.sink20OutputSink == "Channel") then
    			pourBefore = "[Critmeister]: "
    		end
    		self:Pour(pourBefore..self.opt.Message:format(name, amount));
    	end
    	-- Play Sound
    	if (self.opt.Sound.Playsound) then
    		PlaySoundFile(LSM:Fetch("sound", self.opt.Sound.SoundFile))
    	end
    	-- Flash Screen
    	if(self.opt.Effects.Flash) then
    		self:Flash()
    	end
    	-- Shake Screen
    	if(self.opt.Effects.Shake) then
    		self:Shake()
    	end
    end
    
    --
    function Critmeister:postNewCritRecord(critName,amount)
    		-- Chat Frame
    		if (self.opt.PostChatFrame) then
    			self:Print(L["NEW_CRIT_RECORD"]:format(critName, amount))
    		end
    		critRecord:Pour(L["NEW_CRIT_RECORD"]:format(critName, amount));
    end
    
    -- Used to build the GameTooltip
    function Critmeister:critStatsTooltip()
    	for a,crit in pairs(self.critstats) do
    		if(crit.name) then
    			GameTooltip:AddLine(crit.name, 0, 1, 0)
    			GameTooltip:AddTexture(crit.icon)
    			
    			self:addCritInfoToTooltip(crit)
    			
    			GameTooltip:AddLine(" ")
    		end
    	end
    end
    
    function Critmeister:addCritInfoToTooltip(critInfo)
    	if critInfo.count > 0 then
    		GameTooltip:AddDoubleLine(L["CRITS"], critInfo.count, nil, nil, nil, 1,1,1)
    	else
    		GameTooltip:AddDoubleLine(L["CRITS"], "N/A", nil, nil, nil, 1,1,1)
    	end
    	
    	if critInfo.highest > 0 then
    		GameTooltip:AddDoubleLine(L["HIGHEST"], critInfo.highest, nil, nil, nil, 1,1,1)
    	else
    		GameTooltip:AddDoubleLine(L["HIGHEST"], "N/A", nil, nil, nil, 1,1,1)
    	end
    	
    	local cpm = 0
    	if critInfo.count > 0 then
    		cpm = critInfo.count / (critInfo.totaltime / 60)
    	end
    	
    	if critInfo.count > 0 then
    		GameTooltip:AddDoubleLine(L["CPM"], string.format("%.2f", cpm), nil, nil, nil, 1,1,1)
    	else
    		GameTooltip:AddDoubleLine(L["CPM"], "N/A", nil, nil, nil, 1,1,1)
    	end
    end
    
    function Critmeister:resetStats()
    	self.critstats = {}
    	self.opt.critstats = {}
    end
    
    -------------------------------------------------------
    -- About Critmeister
    function Critmeister:AboutCritmeister()
    	self:Print("Version "..VERSION)
    	self:Print("Created by Clorell of Argent Dawn [US]")
    end
    
    -------------------------------------------------------
    -- Critmeister Options Stuff
    local options = {
    	type = "group",
    	name = "Critmeister",
    	get = function(info) return Critmeister.opt[ info[#info] ] end,
    	set = function(info, value) Critmeister.opt[ info[#info] ] = value end,
    	args = {
    		General = {
    			order = 1,
    			type = "group",
    			name = L["GENERAL_SETTINGS"],
    			desc = L["GENERAL_SETTINGS"],
    			args = {
    				enablepost = {
    					order = 1,
    					type = "header",
    					name = L["ENABLE_POSTING"],
    				},
    				PostCrits = {
    					order = 2,
    					name = L["POST_CRITS"],
    					desc = L["POST_CRITS_DESC"],
    					type = "toggle",
    				},
    				postwhere = {
    					order = 3,
    					type = "header",
    					name = L["WHERE_TO_POST"],
    				},
    				PostChatFrame = {
    					order = 4,
    					name = L["CHAT_FRAME"],
    					desc = L["CHAT_FRAME_DESC"],
    					type = "toggle",
    					disabled = function() return not Critmeister.opt.PostCrits end
    				},
    				Sink = Critmeister:GetSinkAce3OptionsDataTable(),
    				screenEffectsDesc = {
    					order = 6,
    					type = "header",
    					name = L["SCREEN_EFFECTS"],
    				},
    				Flash = {
    					order = 7,
    					name = L["FLASH_SCREEN"],
    					desc = L["FLASH_SCREEN_DESC"],
    					type = "toggle",
    					get = function(info) return Critmeister.opt.Effects[ info[#info] ] end,
    					set = function(info, value)
    						Critmeister.opt.Effects[ info[#info] ] = value
    					end,
    				},
    				Shake = {
    					order = 8,
    					name = L["SHAKE_SCREEN"],
    					desc = L["SHAKE_SCREEN_DESC"],
    					type = "toggle",
    					get = function(info) return Critmeister.opt.Effects[ info[#info] ] end,
    					set = function(info, value)
    						Critmeister.opt.Effects[ info[#info] ] = value
    					end,
    				},
    				minimapButtonDesc = {
    					order = 9,
    					type = "header",
    					name = L["MINIMAPBUTTONSETTINGS"],
    				},
    				minimapButtonHide = {
    					order = 10,
    					name = L["HIDEMINIMAPBUTTON"],
    					desc = L["HIDEMINIMAPBUTTON"],
    					type = "toggle",
    					get = function(info) return Critmeister.opt.minimapButton.hide end,
    					set = function(info, value)
    						Critmeister:GetModule("CritmeisterLDB"):ToggleMMButton(value)
    						Critmeister.opt.minimapButton.hide = value
    					end,
    				},
    			},
    		}, -- General
    		CritRecords = {
    			order = 2,
    			type = "group",
    			name = "Crit Record Options",
    			args = {
    				Sink = critRecord:GetSinkAce3OptionsDataTable(),
    			},
    		}, -- CritRecords
    		CritStats = {
    			order = 4,
    			type = "group",
    			name = L["CONFIG_STATS"],
    			desc = L["CONFIG_STATS"],
    			args = {
    				headerTooltip = {
    					order = 1,
    					type = "header",
    					name = L["TOOLTIP_OPTIONS"],
    				},
    				showhighestnon = {
    					order = 2,
    					name = L["SHOWHIGHESTNON"],
    					desc = L["SHOWHIGHESTNON"],
    					type = "toggle",
    				},
    				headerReset = {
    					order = 10,
    					type = "header",
    					name = L["RESET_STATS"],
    				},
    				resetstats = {
    					order = 11,
    					type = "execute",
    					name = L["RESET_STATS"],
    					desc = L["RESET_STATS_DESC"],
    					func = function()
    						Critmeister:resetStats()
    					end,
    				},
    			},
    		}, -- CritStats
    		Messages = {
    			order = 2,
    			type = "group",
    			name = "Messages",
    			desc = "Crit Messages",
    			get = function(info) return Critmeister.opt[ info[#info] ] end,
    			set = function(info, value)
    				Critmeister.opt[ info[#info] ] = value
    			end,
    			args = {
    				intro = {
    					order = 1,
    					type = "description",
    					name = L["CONFIG_CRIT_MESSAGE"],
    				},
    				Message = {
    					type = "input",
    					order = 2,
    					name = L["CRIT_MSG"],
    					desc = L["CRIT_MSG"],
    				},
    				msginfo = {
    					order = 3,
    					type = "description",
    					name = L["CRIT_MSG_DESC"],
    				},
    			},
    		}, -- Messages
    		Sound = {
    			order = 3,
    			type = "group",
    			name = "Sound Settings",
    			desc = "Sound Settings",
    			get = function(info) return Critmeister.opt.Sound[ info[#info] ] end,
    			set = function(info, value)
    				Critmeister.opt.Sound[ info[#info] ] = value
    			end,
    			args = {
    				intro = {
    					order = 1,
    					type = "description",
    					name = L["CONFIG_CRIT_SOUND"],
    				},
    				Playsound = {
    					type = "toggle",
    					order = 2,
    					name = L["ENABLE_SOUND"],
    					desc = L["ENABLE_SOUND_DESC"],
    				},
    				SoundFile = {
    					type = "select", dialogControl = 'LSM30_Sound',
    					order = 4,
    					name = L["SOUND_TO_PLAY"],
    					desc = L["SOUND_TO_PLAY"],
    					values = AceGUIWidgetLSMlists.sound,
    					disabled = function() return not Critmeister.opt.Sound.Playsound end,
    				},
    			},
    		}, -- Sound
    	},
    }
    Critmeister.options = options
    
    -- Option table for the slash command only
    local optionsSlash = {
    	type = "group",
    	name = "Slash Command",
    	order = -3,
    	args = {
    		about = {
    			type = "execute",
    			name = L["ABOUT_CMD"],
    			desc = L["ABOUT_CMD_DESC"],
    			func = function()
    				Critmeister:AboutCritmeister()
    			end,
    			guiHidden = true,
    		},
    		config = {
    			type = "execute",
    			name = L["CONFIGURE_CMD"],
    			desc = L["CONFIGURE_CMD_DESC"],
    			func = function()
    				Critmeister:ShowConfig()
    			end,
    			guiHidden = true,
    		},
    		stats = {
    			type = "execute",
    			name = L["STATS_CMD"],
    			desc = L["STATS_CMD_DESC"],
    			func = function()
    				Critmeister:critStats()
    			end,
    			guiHidden = true,
    		},
    	},
    }
    Critmeister.optionsSlash = optionsSlash
    options.args.General.args.Sink.order = 5
    options.args.General.args.Sink.inline = true
    options.args.General.args.Sink.disabled = function() return not Critmeister.opt.PostCrits end
    options.args.CritRecords.args.Sink.order = 2
    options.args.CritRecords.args.Sink.inline = true
    
    function Critmeister:getCritStats()
    	return self.opt.critstats
    end
    
    function Critmeister:SetupOptions()
    	self.optionsFrames = {}
    
    	-- setup options table
    	LibStub("AceConfigRegistry-3.0"):RegisterOptionsTable("Critmeister", options)
    	LibStub("AceConfig-3.0"):RegisterOptionsTable("Critmeister Commands", optionsSlash, "Critmeister")
    	local ACD3 = LibStub("AceConfigDialog-3.0")
    
    	-- The ordering here matters, it determines the order in the Blizzard Interface Options
    	self.optionsFrames.Critmeister = ACD3:AddToBlizOptions("Critmeister", nil, nil, "General")
    	self.optionsFrames.Messages = ACD3:AddToBlizOptions("Critmeister", "Messages", "Critmeister", "Messages")
    	self.optionsFrames.Sound = ACD3:AddToBlizOptions("Critmeister", "Record Messages", "Critmeister", "CritRecords")
    	self.optionsFrames.Sound = ACD3:AddToBlizOptions("Critmeister", "Sound Settings", "Critmeister", "Sound")
    	self.optionsFrames.CritStats = ACD3:AddToBlizOptions("Critmeister", L["CONFIG_STATS"], "Critmeister", "CritStats")
    	self:RegisterModuleOptions("Profiles", LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db), "Profiles")
    end
    
    function Critmeister:RegisterModuleOptions(name, optionTbl, displayName)
    	options.args[name] = (type(optionTbl) == "function") and optionTbl() or optionTbl
    	self.optionsFrames[name] = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("Critmeister", displayName, "Critmeister", name)
    end
    
    function Critmeister:ShowConfig()
    	-- Open the profiles tab before, so the menu expands
    	InterfaceOptionsFrame_OpenToCategory(self.optionsFrames.Profiles)
    	InterfaceOptionsFrame_OpenToCategory(self.optionsFrames.Critmeister)
    end
    
    Posted in: Addon Ideas
  • 0

    posted a message on Display Critical hits in chat?
    I opened the LUA and found this line:

    function Critmeister:COMBAT_LOG_EVENT_UNFILTERED(event,...)
    local msg,type,msg2,name,msg3,msg4,name2 = select(1, ...)


    What do i need to change?
    Posted in: Addon Ideas
  • 0

    posted a message on Display Critical hits in chat?
    I use Critmeister because of the ability to see my critical hits as they happen in the chat box. After the battle i can scroll the chat box and see the crits. After 4.1 came out it does not work anymore. Is there a way to fix it or maybe another add on that does the same. Critline, AZCrit, and Critical alert only record highest Crit records and do not actively show in chat as the battle happens like Critmeister does.
    any help would be appreciated.
    Posted in: Addon Ideas
  • To post a comment, please or register a new account.