All pastes #93870 Raw Edit

Stuff

public text v1 · immutable
#93870 ·published 2006-07-20 20:43 UTC
rendered paste body
Hitman = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceConsole-2.0")
function Hitman:OnEnable()
    self:RegisterEvent("PLAYER_ENTER_COMBAT")
    self:RegisterEvent("PLAYER_LEAVE_COMBAT")
end
function Hitman:PLAYER_ENTER_COMBAT()
  if not self.inCombat then
    self.inCombat = true
    self:Print("Autoattack On")
  end  
end
function Hitman:PLAYER_LEAVE_COMBAT()
  if self.inCombat then
    self.inCombat = false
    self:Print("Autoattack Off")
  end
end