Lua GO RegisterGameObjectEvent

From ArcEmu-Wiki
Jump to: navigation, search

Usage

   :RegisterGameObjectEvent(entry, ev, str) 

Description

Binds our function to our gameobject

Example

In this case our gameobject has an entryid of 999000 and its event is 'onuse'

   function Teleport_Orgrimmar(pUnit, Event, pMisc)
       pMisc:Teleport(1, 1499.55, -4406.91, 23.1642)
   end 
   RegisterGameObjectEvent(999000, 2, "Teleport_Orgrimmar")
Personal tools