Exxsamuari Posted August 11, 2012 Author Share Posted August 11, 2012 how would you make somones charactor stay logied in 10 seconds after they exit?i need this because in pvp if someone just decides to logout before they die and get away, or fighting a mob. thats crap loli have no idea where i might start this please let me know if you have any idea thanks. Link to comment Share on other sites More sharing options...
Draken Posted August 11, 2012 Share Posted August 11, 2012 Not sure how to do it but I do see a problem with having this.what if you have a crappy internet connection and get disconnected from the server a lot?It would suck to be fighting (or hell just walking around) and getting disconnected ( which is a pain already) then logging back in just to find out you died because something killed you in that 10 secs when your player was left in the world. Link to comment Share on other sites More sharing options...
Matt Posted August 11, 2012 Share Posted August 11, 2012 @DrAken:> Not sure how to do it but I do see a problem with having this.> > what if you have a crappy internet connection and get disconnected from the server a lot?> > It would suck to be fighting (or hell just walking around) and getting disconnected ( which is a pain already) then logging back in just to find out you died because something killed you in that 10 secs when your player was left in the world.I hear what you're saying, but that would be the fault of the player's internet. If a player disconnects constantly, then its hard to imagine why that person would keep playing. Yes, it would suck for the player to die and lose their items due to a connection issue, but the instant loggout can be abused in one way giving the player a massive advantage; he can avoid dying and losing items in a situation in which an NPC(s) or player(s) rightfully overpowered him. Link to comment Share on other sites More sharing options...
Vortigem Posted August 11, 2012 Share Posted August 11, 2012 I'm with the OP, I would use a solution for this situation as well. Link to comment Share on other sites More sharing options...
JohnPony Posted August 12, 2012 Share Posted August 12, 2012 Should be something similar to this, i just wrote this outside the IDE so i don't even know if it will work, nor if the syntax are correct. But you should be able to get the idea.``` TempPlayer(attacker).LastCombat = GetTickCount + 10000 TempPlayer(victim).LastCombat = GetTickCount + 10000 TempPlayer(attacker).CanLogout = False TempPlayer(victim).CanLogout = False```Goes somewhere in the player attack player sub```CanLogout As Boolean LastCombat As Long```Goes in the temporary player rec. ```For i = 1 To Player_HighIndex If Tick > Player(i).LastCombat Then TempPlayer(i).CanLogout = True Else TempPlayer(i).CanLogout = False End If Next i```Somewhere in the server loop.Like i said, i doubt this even works considering i didn't even write nor test it in the IDE, but you should get the idea.Regards,General Pony Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now