Thread: Item DataBase
View Single Post
  #5  
Old 12-23-2011, 04:56 AM
DeCeaseD DeCeaseD is offline
Registered User
Join Date: Jan 2008
Posts: 247
DeCeaseD will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
Ignore him he doesn't know what he's talking about.

SQL, NPC Flags, Files are all just storage for the item data. Establish a basic item system first:

For tracking the quantity of the item:
clientr.item.("item name") = quantity

Store item data in a DB:
this.("item name") = {item, data};

For making the data of the weapon accessible to your client-side scripts set the following as needed in player flags (this should be a mirror of your DB data):
clientr.data.("item name") = {item, data}

Search MUDlib on the forums for discussion on the topic of "item systems".
For my first item system DB I actually did it so that a players items were stored in a DB, than the information was retrieved via an item info DB since I found that items in client flags tend to become a bit wholesome after awhile, just wondering if it was a bad thing to do it this way?
Reply With Quote