search:

General



Rooms & Areas



Presence



Systems



Wiki Help



pmwiki.org



edit menu
Edit Page Upload Security

first version February 11th, 2002
updated December 11th, 2006


Overview:

The purpose of this document is to provide reference on how to create a store using the Eaxia online creation system (OLC) and shows examples of a small store. It will also provide the format guidelines for submitting development projects. All content should be submitted to your department manager in *.TXT format (simple text, such as Windows notepad) through e-mail.


Store Components:

Stores have three primary components:
1. Rooms (usually only one)
2. Items
3. Script


1.0 Rooms
See How To Build Rooms for specific details on room building. The room should resemble a store that fits the area it's being placed in. The room needs to have flag 13 (Load/Unload) turned on. Here's an example:

  >show_room_data
Room data for room 00003557:
Area index: 0
Script: 0
Flags 1: 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0
Flags 2: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Elevation: 0 Climate: 0 Forage: 0
Name: 'Semanri, Aezaza's Gems'
LOOK: 'Aezaza's gem shop is a quaint little store. Cozy and very tidy, it appears
the young lass runs the store alone and sits neatly behind a glass case displaying
many gems and ornaments. A catalog displaying her wares sits in the very center of
the glass counter for any to read.'
Obvious exits: out.
Objects/NPCs: NONE.
No GO-direction exits.

Notice that flag 03 (Indoors) is on because this shop is inside. Flag 11 (Janitor-Proof) is not, however, as it would be redundant with flag 13 on.


2.0 Items
Each item should initially be built exactly as the player should have it using other OLC document guides and the OLC-helper program. For instance, this would be a diamond before it is ready to be bought:

  >show_object_data diamond
Object data for a gigantic black diamond:
Object ID: 27234
Ar/Ds/Nm: 'a' 'black' 'diamond'
Script: 0
There are no items inside of it.
Data1: 0 0 0 0 5 0 1 3
Data2: 0 0 0 0 0 0 0 0
Data3: 0 0 0 0 0 0 0 0
LOOK:
READ:

The item should then have "Object type flags" 03 and 07 marked ("Invisible" and "Manipulate While Invisible"), the "Value" should reflect the price of the item, and the Data3/Value1 field should be 23. The diamond now looks like this:

  >show_object_data diamond
Object data for a gigantic black diamond:
Object ID: 27234
Ar/Ds/Nm: 'a' 'black' 'diamond'
Script: 0
There are no items inside of it.
Data1: 0 0 0 136 5 100000 1 3
Data2: 0 0 0 0 0 0 0 0
Data3: 23 0 0 0 0 0 0 0
LOOK:
READ:




2.1 Technical Items
If your store sells items that have a technical use and require the Data3/Value1 field to have a different value, then make your item have this value in the Data3/Value8 field instead. For example, a normal empty vial (used in alchemy to hold certain liquids and potions) may look something like this:

  >show_object_data vial
Object data for an empty vial:
Object ID: 7775
Ar/Ds/Nm: 'an' 'empty' 'vial'
Script: 0
There are no items inside of it.
Data1: 0 0 0 136 12 0 1 1
Data2: 0 0 0 0 0 0 0 0
Data3: 6 0 0 0 0 0 0 0
LOOK:
READ:

Since it uses Data 3/Value 1 to identify itself as having a technical use (code 6 means "empty vial / container for use in alchemy"), this code needs to be moved into Data3/Value8 instead, to make room for code 23 ("object is for sale in this store"). The final version of this item looks like this:

  >show_object_data vial
Object data for an empty vial:
Object ID: 7775
Ar/Ds/Nm: 'an' 'empty' 'vial'
Script: 0
There are no items inside of it.
Data1: 0 0 0 136 12 500 1 1
Data2: 0 0 0 0 0 0 0 0
Data3: 23 0 0 0 0 0 0 6
LOOK:
READ:

3.0 Script
Every store has a room script attached to it that identifies it as a store and controls store-specific actions, such as the BUY command. It also protects the items from being picked up and from players putting items inside objects that are for sale. There are three parts to this process: the utility script (which is used in every store), the store catalog (which is custom to each and every store), and a hidden store container object.


3.1 Utility Script
The utility script number is 1264. It should be attached with the CHANGE_ROOM_SCRIPT command. Our store should look something like this now:

  >show_room_data
Room data for room 00003557:
Area index: 0
Script: 1264
Flags 1: 0 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0
Flags 2: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Elevation: 0 Climate: 0 Forage: 0
Name: 'Semanri, Aezaza's Gems'
LOOK: 'Aezaza's gem shop is a quaint little store. Cozy and very tidy, it appears
the young lass runs the store alone and sits neatly behind a glass case displaying
many gems and ornaments. A catalog displaying her wares sits in the very center of
the glass counter for any to read.'
Obvious exits: out.
Objects/NPCs: NONE.
No GO-direction exits.




3.2 Catalog Script
The catalog script requires a small amount of EaxiaSEL programming knowledge. If you feel confident that you can create this script yourself, do so. Otherwise, please send a list of what each page in the catalog should look like as well as the listing in the "table of contents" for the catalog itself to systems@eaxia.com for assistance.

This particular shop has a script that looks like this (ignore the mutilation of the spacing. If you copy this to Windows notepad and turn word wrap off, it should appear normal):

  IF (($parameter1 $$ "PAGE") && ($parameter1 != ""))
{
IF ($parameter2 == "1")
{
MSGP You open to page 1 of the catalog and read:
MSGP
MSGP
MSGP Rare gems:
MSGP
MSGP deep violet chunk of glowing ensyiatite ................ 200,000 gold
MSGP gigantic black diamond ................................. 100,000 gold
MSGP brilliant huge blood sapphire ........................... 60,000 gold
MSGP massive black ruby ...................................... 60,000 gold
MSGP large marble sculpted from a brilliant blue starfire .... 30,000 gold
MSGP red diamond dust ........................................ 30,000 gold
MSGP large red sapphire ...................................... 20,000 gold
MSGP gigantic ruby ........................................... 15,000 gold
MSGP huge Semanri emerald ..................................... 7,500 gold
MSGP huge white-and-blue sapphire ............................. 2,500 gold
MSGP
MSGP
MSGP A note at the bottom reads "To order an item, simply BUY it. You may want to
CHECK it first to make sure you don't accidently buy the wrong merchandise though."
RETURN 1
}
ELSE_IF ($parameter2 == "2")
{
MSGP You open to page 2 of the catalog and read:
MSGP
MSGP
MSGP Enysiatite Jewelry:
MSGP
MSGP crystal-mesh gloves ............... 100,000 gold
MSGP ensyiatite spectacles .............. 60,000 gold
MSGP radiant earrings ................... 40,000 gold
MSGP fireball earrings .................. 40,000 gold
MSGP platinum tiara ..................... 25,000 gold
MSGP glowing rod ........................ 15,000 gold
MSGP twisted ring ....................... 10,000 gold
MSGP silver chain ........................ 5,000 gold
MSGP
MSGP
MSGP Note that these are not the full descriptions. Please CHECK the item to see
their full descriptions.
MSGP
MSGP A note at the bottom reads "To order an item, simply BUY it. You may want to
CHECK it first to make sure you don't accidently buy the wrong merchandise though."
RETURN 1
}
ELSE_IF ($parameter2 == "3")
{
MSGP You open to page 3 of the catalog and read:
MSGP
MSGP
MSGP Weapons:
MSGP
MSGP diamond-tipped arrows .......... 10,000 gold
MSGP emerald longsword ............... 6,500 gold
MSGP ruby blade ...................... 5,000 gold
MSGP
MSGP
MSGP Note that these are not the full descriptions. Please CHECK the item to see
their full descriptions.
MSGP
MSGP A note at the bottom reads "To order an item, simply BUY it. You may want to
CHECK it first to make sure you don't accidently buy the wrong merchandise though."
RETURN 1
}
ELSE_IF ($parameter2 == "4")
{
MSGP You open to page 4 of the catalog and read:
MSGP
MSGP
MSGP Tools:
MSGP
MSGP gem-cutting tools .................. 500 gold
MSGP
MSGP
MSGP Note that these are not the full descriptions. Please CHECK the item to see
their full descriptions.
MSGP
MSGP A note at the bottom reads "To order an item, simply BUY it. You may want to
CHECK it first to make sure you don't accidently buy the wrong merchandise though." RETURN 1
}
ELSE_IF ($parameter2 != "")
{
MSGP You realize the catalog only has 4 pages.
RETURN 1
}
MSGP Read which page of the catalog?
RETURN 1
}
ELSE_IF (($parameter1 $$ "CATALOG") && ($parameter1 != ""))
{
MSGP
MSGP Welcome to Aezaza's Gems!
MSGP
MSGP READ a certain PAGE number from our catalog for details:
MSGP
MSGP Page 1: Rare Gems
MSGP Page 2: Ensyiatite Jewelry
MSGP Page 3: Weapons
MSGP Page 4: Tools
MSGP
RETURN 1
}

RETURN 0




3.3 Store Container Object
You will need to create an object that holds two more pieces of information for the store. The object should be created using the following template:

  CREATE_OBJECT
CHANGE_OBJECT_NAME item - - storedata
CHANGE_OBJECT_SHORTDESC storedata storedata for XXXXX
CHANGE_OBJECT_FULLDESC storedata YYYYY
CHANGE_OBJECT_DATA1 storedata 0 0 0 264 14 0 0 0
CHANGE_OBJECT_DATA3 storedata 0 ZZZZZ 0 0 0 0 0 0

Replace the following in the template:

XXXXX should be replaced with the name of the store. In our example, this is "Aezaza's Gems".

YYYYY should be replaced with how the person speaks, including their name. In our example, this is "Aezaza whispers in a soft voice to you,".

ZZZZZ should be replaced with the number assigned to your catalog script. In our example, this is "1265".

The final object used in this example, looks like this:

  CREATE_OBJECT
CHANGE_OBJECT_NAME item - - storedata
CHANGE_OBJECT_SHORTDESC storedata storedata for Aezaza's Gems
CHANGE_OBJECT_FULLDESC storedata Aezaza whispers in a soft voice to you,
CHANGE_OBJECT_DATA1 storedata 0 0 0 264 14 0 0 0
CHANGE_OBJECT_DATA3 storedata 0 1265 0 0 0 0 0 0

Drop this item in the store. Make sure to test your store thoroughly.

Recent Changes - Page History - Printable View
Page last modified on May 11, 2010, at 12:59 PM EST
PmWiki 2.20-beta16 - www.PmWiki.org