O'Reilly logo

Flash Multiplayer Virtual Worlds by Makzan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing inventory in the SmartFoxServer

We need to create a table in our virtual world database to store the items. Similar to creating a table player's position in Chapter 6, Walking Around the World, we use PhpMyAdmin to create the items table with the following schema. The id is an auto incremental primary key.

Field

Type

Description

id

int

Auto incremental ID for reference to a unique item entry.

type

int

The type ID of the item, specifying which item it is.

owner

varchar(50)

The owner avatar name of the item.

bag_id

int

The bag that this item is in.

position

int

The position of the item inside the bag.

create_time

datetime

The creation time of this item.

extra_info

varchar(255)

Some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required