CREATING CONTAINERS IN MAJIK

'Container' is any object, which can contain other items, for example
chests, bags or purses. All functions common to all items are not documented 
here, consult creating_items.txt instead.

Let's define an example container.

*-*-*-*- chest.c -*-*-*-*       

inherit "/inherit/container.c";

void create_container()
{
        set_name(({ "chest", "big chest", "landlubber chest", "big landlubber chest"}));
        set_short("A big landlubber chest");
        set_long("This is a big wooden landlubber chest, with big iron lock on it\n");

        set_dimensions(60, 60, 150);            
        set_container_dimensions(55, 55, 145);
        set_weight(10000);                              
        set_hp(100);
        set_maxhp(100);
        set_material("wood");

        set_solid();
        set_closable();
        set_lockable();
        set_open();
        set_unlocked();

}
  
*-*-*-*-*-*-

(functions with :** are mandatory!)

:**             set_container_dimensions(int x, y, z)

This function defines the empty size inside container which can be used to
store other objects. 

:               set_solid()

Set_solid() makes container a 'solid container'. Solid container has a fixed
side, for example a wooden chest. Non-solid container's size equals to the
amount of stored items, for example a bag.

:               set_closable()

This allows the container to be opened and closed. I guess there isn't much
use for containers without this :).

:               set_lockable()

Use this to allow container to be locked.

:               set_open(), set_closed()

Makes the container open or closed.

:               set_locked(), set_unlocked()

Not much to say, container is either locked or unlocked. 

*-*-*-*-

+) Dazzt





