Lua GetPlayerRace

From ArcEmu-Wiki
Jump to: navigation, search

Description

Used to find the targeted player's race, if a target is present, else returns false. Player only command.

Return values

  • 1: Human / Mensch
  • 3: Dwarf / Zwerg
  • 4: Nightelf / Nachtelf
  • 7: Gnom
  • 11: Draenei
  • 2: Orc
  • 5: Undeath / Untoter
  • 6: Taur
  • 8: Troll
  • 10: Bloodelf / Blutelf


Usage/Example

function NPC_Gossip(Unit, Event, player)
  local race = player:GetPlayerRace()
  if (race == 1) then
    Unit:SendChatMessage(14, 0, "I'm Human")
  end
end
Personal tools