[Release ]Checking if character is online or not

Results 1 to 4 of 4
  1. #1
    @work onyourrisk is offline
    MemberRank
    Jan 2008 Join Date
    IndiaLocation
    706Posts

    thumbs up [Release ]Checking if character is online or not

    I was having vacation so, was passing through some posts here...

    I found there are many people interested in checking if the player is online and online player count...

    I have found and already discussed also that [date].mir files are having the log our character logged in and out . . . So using this details i've programmed a login log manager that logs if the player is online or not....

    You can find it here : http://forum.ragezone.com/f98/login-log-manager-656635/
    -----
    Problem : If a character is online and it used web service it will cause problems

    Problem with the given tool : The tool is using db connection and consume more memory , It updates the table every 5 seconds so it will cause more lag issue

    But here i have attached a PHP script that will not require any sql info to be added because it will not keep log of player online but this script will check if the player is online or not at runtime...

    For Example :
    If your character is online and you want to take Rebirth online --> it will not allow you and it will give a message that you have to log out.

    If your character is offline then it will work just fine, and it will allow you to take Rebirth.

    /////// LOGIC ///////

    What i have studied in *.mir file is :

    When your character is completely logged in game the log entry :
    "[WORLD_LOGIN:E]"

    When your character is completely logged out of game the log entry :
    "SAFEDELETE2 :"

    So, we can find the last entry of the character in the file and check if the entry is "SAFEDELETE2 :" there or not....

    If it is there --> Character is logged out --> He/She can use Web service
    If it is NOT there --> Character is NOT logged out --> He/She can NOT use Web service . . . .

    --> In case the character logged out "yesterday" and is not logged in "today" then the log will not have any entry thats why it will display error that the character is online , So I've handled it by displaying a notice below the error you will find it in script.
    Attached Files Attached Files
    Last edited by onyourrisk; 11-01-12 at 06:49 AM.


  2. #2
    @work onyourrisk is offline
    MemberRank
    Jan 2008 Join Date
    IndiaLocation
    706Posts

    Re: Checking if character is online or not

    If you find any bug or have any suggestion then post here it will help us to get better and efficient functioning

  3. #3
    Noob Prot is offline
    MemberRank
    Jan 2007 Join Date
    Gurgaon, IndiaLocation
    517Posts

    Re: Checking if character is online or not

    I think the same kind of script can be made to show the list of online players. But it will be complicated as the file changes after 12:00 am ..
    Btw this one is better as i was going to use the tool u posted earlier.. and yes it consumes some ram so will switch to the php one!

  4. #4
    @work onyourrisk is offline
    MemberRank
    Jan 2008 Join Date
    IndiaLocation
    706Posts

    Re: Checking if character is online or not

    To show players online, we need to insert the data into an db server, what I think is . . . If we make another table than using charac0 to keep the log of online players, it will cause less lag. I'll work on it and will share it here



Advertisement