Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-23-2009, 10:30 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
onPlayerAttributesUpdated()

An event occuring when a player get their attributes changed by RC ('edit attributes' or '/open <account>' for example).

Parameters: Player object or account name
Usage: I had in mind using it for an automatic staff-abuse detector, but it could have other usages as well.

Having this function would make it easier to make systems monitoring staff-abuse.
Instead of having a timeout checking all the player's variables every that amount of seconds, a function like this would eliminate just that.

Thoughts?

PS, would be nice to have onServerOptionsUpdated() too
__________________
Reply With Quote
  #2  
Old 05-23-2009, 12:12 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
I support this/these idea(s).
__________________
Reply With Quote
  #3  
Old 05-23-2009, 06:48 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
Awesome idea; it could also be used to solve some problems with items stored in flags (e.g. cutting off when you update with RC), though I can't think of a perfect way right now, since this would still require you to use text files. I suppose you could do something like

PHP Code:
function onPlayerAttributesUpdated(pl) {
  
temp.items.loadVars("players/" pl.account);
  
  for (
temp.item items.getDynamicVarNames()) {
    
pl.clientr.item.(@ item[0]) = {item[1], item[2], [...]};
  }

__________________
Reply With Quote
  #4  
Old 05-23-2009, 06:55 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbk1994 View Post
Awesome idea; it could also be used to solve some problems with items stored in flags (e.g. cutting off when you update with RC), though I can't think of a perfect way right now, since this would still require you to use text files. I suppose you could do something like

PHP Code:
function onPlayerAttributesUpdated(pl) {
  
temp.items.loadVars("players/" pl.account);
  
  for (
temp.item items.getDynamicVarNames()) {
    
pl.clientr.item.(@ item[0]) = {item[1], item[2], [...]};
  }

Yep, if you have an item system or any other system using variables with a value length over 255, you could use the event to fix the variable.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:05 AM.


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