Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 09:02 PM.


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