home » builders » builder's lessons » marking objects

Marking objects

You have the ability to mark an object as being "owned" by a PC. This field is only viewable by an immortal. It can be used to prevent someone using an object that was not used by them, or just to monitor who was given the object first. It can be used for IC reasons, and it is used for OOC reasons when we suspect abuse of an object is happening.

To set a mark on an object use mposet.

>speech_prog p key words go here~
if quest(15, 4, $W) == 8
  mpoload 7501
  mposet i7501 mark $n
  mpgive i7501 $n
  mpmset $W quest 15 4 9
endif
~

The following program checks to see if the PC owns the object before allowing them to use it.

>wear_prog 100~
if ownsmark($n)
  mpechoat $n {80}You feel the dagger merge with your soul.
else
  mpechoat $n The dagger rejects you as it you are not its soul owner.
  mpechoaround $n The dagger rejects $N.
  mpmadd $n currhp -200
  mplog EVENT: $n has been rejected by a black dagger because $e did not own it.  Vnum i7501
  mpecho {80}The dagger collapses into a shadow.
  mpjunk i7501 $n
endif
~
|

This is what an immortal sees on an object that has been marked when they type ostat.

Name: shield faerdale i28406
Vnum: 28406  Type: shield  Count: 1  Gcount: 1  Cost: 5385  Weight: 6
Serial#: 8954  TopIdxSerial#: 8954  TopSerial#: 11571
Short description: a shield of faerdale
Long description: A shield of Faerdale lies here.
Ownership Mark: Mystra
Wear flags : take hold
Extra flags: magic

The other thing you can do is log when an object is given away. The deities will see the log as it happens if they are on line. Also we grep the logs every month or two, or when a problem is reported.

>give_prog 100~
mplog GIVEAWAY: $n has give a faerdalian shield to $t.
~

$t is the recipient of the shield. GIVEAWAY is the logging condition being grepped for. A builder can type help logging on the testport to see all that we log for in the game.

Another way to protect a quest object from being abused, is to place FLAG_UNIQUE on it. This prevents more than one of this object from being worn by a PC.