Thread: Item DataBase
View Single Post
  #4  
Old 12-23-2011, 03:26 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
Quote:
Originally Posted by Gunderak View Post
Use SQLITE for an item db, or even a DBNPC and then have method of sending and retrieving data from it.
That would be an even better item system.

One bad thing about what you're currently using, this. variables as soon as you restart graal it's value will be reset to null.
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".
__________________
Quote:
Reply With Quote