View Single Post
  #1  
Old 10-08-2011, 08:54 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Client Flags Limit

The hat system on Lexia uses client flags to store your hats. This seemed fine, until the client flag stopped accepting more hats since there is a limit on how many items a client flag could contain. I now want to store it in a database NPC. Obviously, this would change most of the hat system, so does anybody have any ideas, or alternatives to using an NPC? The hat system script is below.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  if (
client.hats == NULL) {
    
client.hats "hat1.png";
  }
}

function 
onPlayerChats() {
  
tokens player.chat.tokenize(" ");
  
hats client.hats.tokenize(",");
  if (
tokens[0] == "removehat") {
    
player.attr[1] = "none.png";
  }

EDIT: I have added the ability to add hats by script to staff, and it works fine. The issue is the external RC doesn't scroll far enough. The scripted RC adjusts its size to fit though, don't know why the external RC acts that way.
__________________
Reply With Quote