Skip to content

Instantly share code, notes, and snippets.

@zachwlewis
Created March 2, 2013 23:02
Show Gist options
  • Save zachwlewis/5073674 to your computer and use it in GitHub Desktop.
Save zachwlewis/5073674 to your computer and use it in GitHub Desktop.
Gets a characters profession information and print it out.
function GetProfessionInformation()
local prof1, prof2, archaeology, fishing, cooking, firstAid = GetProfessions()
if prof1 ~= nil then PrintProfessionInformation(prof1) end
if prof2 ~= nil then PrintProfessionInformation(prof2) end
if archaeology ~= nil then PrintProfessionInformation(archaeology) end
if fishing ~= nil then PrintProfessionInformation(fishing) end
if cooking ~= nil then PrintProfessionInformation(cooking) end
if firstAid ~= nil then PrintProfessionInformation(firstAid) end
end
function PrintProfessionInformation(index)
local name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset, skillLine, skillModifier = GetProfessionInfo(index)
print(name.." ("..skillLevel.."/"..maxSkillLevel..")")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment