home » builders » builder's lessons » restringing generic objects

Restringing generic objects

There are some objects in the game that have been hard coded to do specific things, but yet we as builders would like to make them unique. We cannot make a new vnum of them because then the hard code would not work, but we can rename them using progs. Such items that have been renamed in the game for quests etc have been amulets of communication, spell pouches, spell books and so on.

The following is a prog that when the PC buys a spell pouch from the shop keeper, it hands them one that has been renamed to have the guilds colours. This rename is only available to guild members so it helps to make the renamed item unique to that group of characters that is a member of that guild.

>buy_prog i68~
if guild($n) == Enchanters
  if actorhasobjnum(25419)
    mpecho $I picks up a black velvet spellpouch off the shelf.
    mposet on $n i68 name i68 velvet spellpouch pouch emerald runes
    mposet on $n i68 short {80}a velvet spellpouch {20}embossed with emerald runes
    mposet on $n i68 long {80}A velvet spellpouch {20}embossed with emerald runes {80}lies here.
    mposet on $n i68 ed addline 'velvet spellpouch emerald runes' {20}Emerald runes 
	 sparkle faintly{80}  on the soft black velvet of the spellpouch.
  endif
endif
~
|

Vnum 68 is the standard spellpouch. Note for the purpose of happy html, I had to word wrap the ed line. You would not do this in your area file, because then the command would not work.