onPlayerLogout()
Would it be possible to allow scripts to modify the object created by this function? I would like to erase a load of clientr. flags when the player logs off.
|
You can create a similar effect by doing so when the moment they log on. Though, I agree, that would be nice.
|
Great idea! I would like that. :D
|
That'd be awesome.
|
I'm guessing you'd use something like that clientrc command to view offline player's details.
|
Quote:
|
Not sure what they are.. all I want to have is the ability for any to script to write to an offline player.
For example, PHP Code:
|
Quote:
It would be the same thing to clear them the moment they logged back on. Clearing their strings while they're offline does you no good, since no changes will be effected until the next time they log on anyways. I don't really see why you would need to write to offline players, when you can do the same thing the moment they log on. Have an NPC check to see if the player is online, and if they log off, then have it save to a DB or something and then have the DB be read when a player logs on and if their account is in the DB, then the strings would clear. There are several ways you can do such a thing, or rather, create the same effect. |
Apparently having alot of clientr. 's leads to a slower login.
|
Quote:
That shouldn't happen. I believe Graal truncates a player's flags after it exceeds a certain amount. |
Well...it's still an idea >_<
|
Quote:
So far to my knowledge there is no end to the flags you can store on a player, in 4+ years at babylon i never found one. |
Hehe, I had a problem thinking the length was too long, I later found out I had a function that caused lag on clientside that was no longer used.. lol =(
|
Quote:
When the player logs in, they need to download all of their weapons, client.flags, clientr.flags, saved attributes, and all of the surrounding players/NPCs. Would it be better to locally store client/r.flags and other data and let there be a single packet that the server would have to send in order for those to be used? Wouldn't know if it does that. Even better, the server could specify to the client which flags it can't pre-load from local storage before using them. I wonder if the login event in the control-NPC is executed before the player loads anything else, otherwise it would be kindof strange to delete client/r.flags when that happens. |
Normally you can write the game so that it doesn't use any client/clientr flags that are not necessary. Most flags don't require a lot of network bandwidth though since e.g. items use similar names and can be easily compressed when sent to the client.
The reason why you currently cannot modify the player data (except on kingdoms) is that the gserver is managing the player data and when the npcserver is handling the logout the gserver has already saved and deleted the player object. This will be changed sometime in the future though, there will be special npcservers managing the player login and rights, and the playerworld npcserver will manage the game data itself. |
All times are GMT +2. The time now is 08:05 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.