GHI_Event

Pilus edited this page Aug 11, 2015 · 1 revision
Clone this wiki locally

Syntax

obj = GHI_GHI_Event(event,func) obj.function()

Arguments

event
''String''
This is a blizzard game event. See WoW Programming[http://wowprogramming.com/docs/events] for a complete list of events.
func
''Function''
When the event defined before fires, this function will go off.

Example

local killMessFunc = function(event,...)

local timestamp, type, hideCaster,

sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...;

if type == "PARTY_KILL" then

print("You killed a "..destName)

end

end

local killmess = GHI_Event("COMBAT_LOG_EVENT_UNFILTERED",killMessFunc)

This script will cause you to see a message telling you what you just killed when you or a party member kill something.