Condemned

Check Online Status of Character

5 posts in this topic

ENUM_AvatarOnlineStatus_Online

I've been searching for hours trying to find a function that I can use to check the online status of a character. This is the only thing I have run across.

The problem is it doesn't show any examples how to use this.

How do I use this? If there are other ways to check online status can someone please point me into a direction thanks!

Edited by Condemned
forum messed up message

Share this post


Link to post
Share on other sites

You can check the status of the character only if this character is added to the list of friends or in your guild:

• guild.GetMemberInfo( memberId )

• social.GetFriendInfo( friendId )

Share this post


Link to post
Share on other sites

So I would use something like

local onlineStatus = social.GetFriendInfo.SysOnlineStatus

or 

local onlineStatus = social.GetFriendInfo.IsLogged

 

??

Share this post


Link to post
Share on other sites

Example for checking the status of an avatar from the friends list:

function checkstatus()
local friends = social.GetFriendList()
for _, v in pairs(friends) do
local friendInfo = social.GetFriendInfo(v)
LogInfo(friendInfo.name, " ", friendInfo.sysOnlineStatus)
	end
end

As a result, a list of characters and their avatar status will appear in the mods.txt file (online / offline / in alt / mobile).

If you just need to know online / offline status, then:

function checkstatus()
local friends = social.GetFriendList()
for _, v in pairs(friends) do
local friendInfo = social.GetFriendInfo(v)
LogInfo(friendInfo.name, " ", friendInfo.isLogged)
	end
end

There will be a list of characters with a value of true / false (online / offline).

Share this post


Link to post
Share on other sites

Ty I had some help from Zurion and he was able to help me thanks so much for your help though this cleared some things up for me. Still new to addon making maybe one day I will be good. :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now