Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-24-2009, 06:04 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
loadPlayer()

Would be wonderful if there was a way to modify the attributes of offline players. Something like

PHP Code:
temp.pl loadPlayer("cbk1994");
pl.clientr.var = "foo"
If the player is online, loadPlayer should just return the TServerPlayer object (like findPlayer).

I'm not sure what the most effective way to save changes is, but I'm sure it's somehow possible. I'm guessing the garbage collector, which "destroys" the object, could save it once all references to it have been dropped (the function ends)?
__________________
Reply With Quote
  #2  
Old 08-24-2009, 06:37 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
It'd be nice to edit variables like that instead of having a DB-NPC and queuing actions to be executed when they log on. Hell even if we could only read variables it would definitely come in handy.
__________________
Quote:
Reply With Quote
  #3  
Old 08-24-2009, 07:09 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Could this be done by editing the players files in the accounts folder?

I remember some time ago a friend gave themselves full folder rights by changing it in their accounts folder...so, if that is possible, couldnt you also edit variables in the player via the players file?

e: Im not saying to do that, im just saying isnt it possible. Because if its possible that way, im sure they could add a built in function to do it...because the only way to accomplish that would be to give the npc server write rights to the accounts folder...and that could be bad if the wrong people knew about that.
__________________

Reply With Quote
  #4  
Old 08-24-2009, 07:40 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by oo_jazz_oo View Post
Could this be done by editing the players files in the accounts folder?

I remember some time ago a friend gave themselves full folder rights by changing it in their accounts folder...so, if that is possible, couldnt you also edit variables in the player via the players file?

e: Im not saying to do that, im just saying isnt it possible. Because if its possible that way, im sure they could add a built in function to do it...because the only way to accomplish that would be to give the npc server write rights to the accounts folder...and that could be bad if the wrong people knew about that.
Yes, the accounts folder holds folder rights, as well as all the other rights, which is why you should avoid giving the NPC-server write access to the accounts folder. However, yes, it would be possible using the accounts folder.
__________________
Reply With Quote
  #5  
Old 08-24-2009, 07:46 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Well then, it shouldn't be that hard to implement what you asked. ;P

I think this would make alot of things easier...it sure as hell could have helped me in the past. >_>
__________________

Reply With Quote
  #6  
Old 08-24-2009, 11:31 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
You can load offline players but not modify / save yet:
PHP Code:
temp.pl = new TServerPlayer("cbk1994");
echo(
"check: " temp.pl.nick);
temp.pl.destroy(); 
Reply With Quote
  #7  
Old 08-24-2009, 02:26 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
but not modify / save
Well, that's the point, that's what we're requesting. Please?
Reply With Quote
  #8  
Old 08-24-2009, 03:51 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Stefan View Post
You can load offline players but not modify / save yet:
PHP Code:
temp.pl = new TServerPlayer("cbk1994");
echo(
"check: " temp.pl.nick);
temp.pl.destroy(); 
Just wondering, do you have to explicitly destroy it?
Reply With Quote
  #9  
Old 08-24-2009, 09:50 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stefan View Post
You can load offline players but not modify / save yet:
PHP Code:
temp.pl = new TServerPlayer("cbk1994");
echo(
"check: " temp.pl.nick);
temp.pl.destroy(); 
Excellent, this should be documented somewhere. I'll try to add it to the wiki later.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.