How To Automatically Disconnect A Player?

Welcome in the osRose emulator Project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

How To Automatically Disconnect A Player?

Postby rave on Sun Aug 11, 2013 7:28 am

Is there a code or should i add or change something.
cause what i wanted to do is that

if a player doesnt move or what something like AFK within 10 mins or 30mins
he will automatically disconnected in game

is that even possible?
rave
Clown
Clown
 
Posts: 459
Joined: Thu Dec 10, 2009 1:07 pm

Re: How To Automatically Disconnect A Player?

Postby PurpleYouko on Mon Aug 12, 2013 2:54 pm

Yes it should be pretty easy to do.
You would just have to add a timer to the player class to monitor the time that the last command packet was sent from the client PC then have a timeout period of 10 minutes or so.

You have to remember though that rose is specifically designed to allow for AFK players in the form of shops so your idea would utterly destroy any economy that you have going in your server.

You could get a bit clever and check the player's stance to see if he is in a shop or not i suppose.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: How To Automatically Disconnect A Player?

Postby rave on Tue Aug 13, 2013 10:57 pm

You would just have to add a timer to the player class to monitor the time that the last command packet was sent from the client PC then have a timeout period of 10 minutes or so.


how can this be happen can you please show me the code for it?
and can i exempt the players who are using the vend skill so that they wont be affected with the 10 mins auto dc time?
rave
Clown
Clown
 
Posts: 459
Joined: Thu Dec 10, 2009 1:07 pm


Return to Support - OsRose Emulator

Who is online

Users browsing this forum: No registered users and 7 guests