If it's a oneshoot, you can dump pChat.chars per exemple
It contains all members of your guilds, key is UserID, value is lastchar.
/script pChat.opts.dump = pChat.chars
then reloadui and open pChat.lua of your savedvars.
Or do something like this :
Lua Code:
local defaults = {}
chars = ZO_SavedVars:NewAccountWide('DUMPGUILD', 1, nil, defaults)
for guild = 1, GetNumGuilds() do
-- Guildname
local guildId = GetGuildId(guild)
local guildName = GetGuildName(guildId)
-- Occurs sometimes
if(not guildName or (guildName):len() < 1) then
guildName = "Guild " .. guildId
end
-- Init array for guild
chars[guildName] = {}
-- Iterate over each guild member
for member = 1, GetNumGuildMembers(guildId) do
-- Get account name and character name
local account = GetGuildMemberInfo(guildId, member)
local hasChar, character = GetGuildMemberCharacterInfo(guildId, member)
if hasChar and character then
-- Remove extra characters.
character = zo_strformat(SI_UNIT_NAME, character)
chars[guildName][account] = character
end
end
end