home » builders » builder's lessons » sample objects - instruments

Sample objects - instruments

Not all instruments have to be magical. Bards will use them just for roleplay, to sing with and play etc. Make sure to flag magic those that have magical affects to them.

Magical Instrument

#8305
silver stringed harp~
{F0}a silver stringed harp~
{F0}A silver stringed harp lies here.~
~
ITEM_TYPE_INSTRUMENT
FLAG_MAGIC
CAN_WEAR_TAKE|CAN_WEAR_HOLD
QUALITY_AVERAGE MATERIAL_SILVER COND_PERFECT SIZE_MEDIUM
40 4 4 SPELL_CHARM_PERSON 0 0

Non-magical Instrument

Note that by hard code, only bards are able to use the play command to activate an instrument. If you are wanting to allow someone else to play it then you will need to put a program on the harp like the one below to make it happen.

#8535
mouth harp~
{30}a mouth harp~
{30}A small instrument of some type lies here.~
~
ITEM_TYPE_INSTRUMENT
0
CAN_WEAR_TAKE|CAN_WEAR_HOLD
QUALITY_AVERAGE MATERIAL_SOFTWOOD COND_PERFECT SIZE_TINY
0 0 0 0 0 0
E
mouth harp~
It's a piece of wood with several stiff strips of metal
projecting from it.  They can be plucked to make a sort
of music.
~
intercept_prog play~
if wear_loc($o) != -1
  if guild($n) == Bards
    mpechoat $n You play a lively tune on the mouth harp.
    mpechoaround $n $n plays a lively tune on the mouth harp.
  else
    if guild($n) == Rangers
      mpechoat $n You play a woodsy tune on the mouth harp.
      mpechoaround $n $n plays a woodsy tune on the mouth harp.
    else
      mpechoat $n You attempt to play a tune on a mouth harp but sound like a cat in heat.
      mpechoaround $n $n attempts to play a tune on a mouth harp but sounds like a cat in heat.
    endif
  endif
else
  mpechoat $n You need to hold the mouth harp in order to play it.
endif
~
|