home » builders » builder's lessons » sample objects - scrolls and potions

Sample objects - scrolls and potions

Do NOT make recall scrolls and potions. Use Vnums 50 and 51 in your area. Also check the free objects list to see if the potion with the spell you want is not already available in that list.

Potions

In order for a potion to be reused with the brew skill you need to follow a set naming convention. Below are two potions that demonstrate the convention. You must first describe the potion container. For instance the ones below are glass jars. After the container then you will state the spell that is within it. This means once quaffed what is left is just a yellow glass jar for the first, and a pink glass jar for the second. The jars are empty. The jars can then be used by characters who use the brew skill. The main thing that the code looks for is the word "of". What is before the of will be what remains after the potion is quaffed, and what is after the of, including the of, will be removed by the code after the potion is quaffed.

You can put up to three spells in a potion. The level of the spell and the number of spells will determine the value of the potion. Potions are magical items so be sure to put a magic flag on them. This magic flag does last even when the potion jar is empty. In order to drink a potion a player must hold it so you must put CAN_WEAR_HOLD on the object.

#8549
potion invisibility yellow glass jar~
{B0}a yellow glass jar of invisibility~
{B0}A yellow glass jar lies here.~
~
ITEM_TYPE_POTION
FLAG_MAGIC
CAN_WEAR_TAKE|CAN_WEAR_HOLD
QUALITY_AVERAGE MATERIAL_GLASS COND_PERFECT SIZE_SMALL
30 SPELL_INVIS SPELL_NONE SPELL_NONE 0 0
E
yellow glass jar~
It is made of glass that is as yellow as the sun.
~
#8550
potion strength pink glass jar~
{D0}a pink glass jar of strength~
{D0}A pink glass jar lies here.~
~
ITEM_TYPE_POTION
FLAG_MAGIC
CAN_WEAR_TAKE|CAN_WEAR_HOLD
QUALITY_AVERAGE MATERIAL_GLASS COND_PERFECT SIZE_SMALL
30 SPELL_STRENGTH SPELL_NONE SPELL_NONE 0 0
E
pink glass jar~
The glass is a pretty pink and it is shaped like a flower.
~

Scrolls

As with potions, scrolls can have up to three spells on them. In order to recite a scroll, a player must be able to hold it, so make sure to put the CAN_WEAR_HOLD flag on the object. Scrolls are magical items, so should be flagged as magic.

#8039
wizardly scroll protection~
{70}scroll of protection~
{70}A wizardly scroll of protection lies abandoned here. ~
~
ITEM_TYPE_SCROLL
FLAG_MAGIC
CAN_WEAR_TAKE|CAN_WEAR_HOLD
QUALITY_AVERAGE MATERIAL_PAPER COND_PERFECT SIZE_MEDIUM
30 SPELL_PROTECTION SPELL_NONE SPELL_NONE 0 0
E
wizardly scroll protection~
It's a scroll that contains a spell that will help protect you.
~