for memberIndex = 1, GetPlayerGuildMemberIndex(guildId) do
makes no sense as GetPlayerGuildMemberIndex(guildId) will always return your own player's memberIndex in that guild.
So this will always be YOU (ME).
-> "Player" = always YOUR currently logged in character (or account).
If you want to loop the guildIds members and check it's NOT you just use GetPlayerGuildMemberIndex(guildId) once to get your own index and exclude it from the loop then, and for all other entries found do check the zones.
Untested!
Lua Code:
for guildIndex = 1, GetNumGuilds() do
local guildId = GetGuildId(guildIndex)
local numMembers, numOnline = GetGuildInfo(guildId)
local myPlayerMemberIndex = GetPlayerGuildMemberIndex(guildId)
for memberIndex = 1, numMembers, 1 do --instead of numMembers you coudl use GetNumGuildMembers(guildId) too, but numMembers is already there so reuse it
if memberIndex ~= myPlayerMemberIndex then
--local memberIndex = GetPlayerGuildMemberIndex(guildId)
local memberName, _, _, memberStatus = GetGuildMemberInfo(guildId, memberIndex)
local _, _, memberZone = GetGuildMemberCharacterInfo(guildId, memberIndex)
if memberName ~= GetUnitDisplayName("player") then
if memberZone == GetUnitZone("player") and memberStatus ~= PLAYER_STATUS_OFFLINE then
df("|c6666FF[RidinDirty]|r Traveling to " .. memberName .. " locally")----temp test chat
end
end
end
end
end