Mark Object code and protecting objects from abuse

For builders to discuss and ask building questions.
Post Reply
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Deity objects

Post by Dalvyn » Wed Aug 06, 2003 12:33 am

Well I just grabbed the first prog from the first deity object I could find in the supp objects file. It is a wear prog that you use, and you do a check for deity, != means that it is not equal to Gond. You do some little echos, and then you junk the item at the END of the prog. Don't junk it before the end else things wont happen right.

Code: Select all

>wear_prog 100~
if deity($n) != Gond
  mpechoat $n The sash disappears into one of its pockets.
  mpechoaround $n $n's sash disappears into one of its pockets.
  mpjunk i1248 $n
endif
~
You can deduct hitpoints too by doing

Code: Select all

mpmadd $n currhp -20
But make sure you have the appropriate hurty echo when you do this.
Post Reply