Jump to content

Character status


Recommended Posts

Can I somehow know if certain character is online?
It seems like I can do it for account using tbl_UserAccount, but I can't find anything that shows certain character online

Edited by Omi
Link to post
Share on other sites
18 hours ago, Omi said:

Can I somehow know if certain character is online?
It seems like I can do it for account using tbl_UserAccount, but I can't find anything that shows certain character online

use custom query logic for that, like:

isOnline = lastlogintime > lastlogofftime ? true : false;

SQL Query:

/******
-- Author: ExDeus Dev
-- Website: https://exdeus.dev
-- Query: Check account is online or not
******/
USE [RF_USER]
SELECT [serial]
      ,[lastlogintime]
      ,[lastlogofftime]
      ,(CASE WHEN [lastlogintime] > [lastlogofftime] THEN 'TRUE' ELSE 'false' END) AS isOnline
  FROM [RF_User].[dbo].[tbl_UserAccount]

 

Edited by DeusEx
Added sample query

exdeus.dev ]
WebCP | Private Course

Link to post
Share on other sites
1 hour ago, DeusEx said:

use custom query logic for that, like:

isOnline = lastlogintime > lastlogofftime ? true : false;

SQL Query:

/******
-- Author: ExDeus Dev
-- Website: https://exdeus.dev
-- Query: Check account is online or not
******/
USE [RF_USER]
SELECT [serial]
      ,[lastlogintime]
      ,[lastlogofftime]
      ,(CASE WHEN [lastlogintime] > [lastlogofftime] THEN 'TRUE' ELSE 'false' END) AS isOnline
  FROM [RF_User].[dbo].[tbl_UserAccount]

 

This is what I was talking about - you can find accounts that are online, but not character.

There is a log table in RF_World (don’t remember it’s name) that stores log for character selection. Using this you can somehow determine selected character. But If a player does a relog  without logging of (back to character selection) then this action is never been logged anywhere. 
To sum up: if a player is on character selection screen, than he is technically online according to tbl_UserAccount, but still not online as a character

Link to post
Share on other sites
2 hours ago, Omi said:

This is what I was talking about - you can find accounts that are online, but not character.

There is a log table in RF_World (don’t remember it’s name) that stores log for character selection. Using this you can somehow determine selected character. But If a player does a relog  without logging of (back to character selection) then this action is never been logged anywhere. 
To sum up: if a player is on character selection screen, than he is technically online according to tbl_UserAccount, but still not online as a character

Use two tables and create your own function, you can take the log char selection under RF_World > tbl_characterselect_log_xxxxxxx

exdeus.dev ]
WebCP | Private Course

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...