View Single Post
  #3  
Old 04-01-2010, 04:06 PM
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
At the most basic level you could use something like this:

clientr.item.(@itemname) = {type, quantity};

or..

clientr.item.(@type).(@itemname) = quantity;

For easier implementation you'll want to make a class called itemfunctions and join it to the player when they login using a line like this:

player.join("itemfunctions");

Then in your itemfunctions class you could have public functions like addItem, takeItem, hasItem that you could use in your actual code, on the serverside to call those functions you would simply use:

player.addItem("Rocks", 999);

Of course the actual parameters would be different depending on the system but that's the basic gist of it.
__________________
Quote:
Reply With Quote