Destroy

     destroy - syntax: destroy(CH,objkey,[options]) 

Destroy is like 'purgeobj' but destroys items on another character. Mostly used to remove quest components from a character. As with transfer, the first argument can be a name or a 'ch' variable. The second argument can be "all" or an object key. "All" cannot be used on a player.

By default, destroy removes all instances of the item. The only option used by this function is LP_ONEONLY which will cause only one instance of the item to be destroyed.

   --- Lands of Legend prog. Tests if character has all 4 apples, 
   --- loads portal (meeting mandatory 1 per area requirement), gives
   --- to char, removes the 4 apples from their inventory then 
   --- transfers them to Aylor recall.
   if carries(ch,"legend-5") and carries(ch,"legend-6") and
      carries(ch,"legend-7") and carries(ch,"legend-37") then
      say("Congratulations! You found my apple trees!")
      local tobj = oload("legend-48")
      give(tobj,ch)
      social("shake",ch)
      destroy(ch,"legend-37")
      destroy(ch,"legend-5")
      destroy(ch,"legend-7")
      destroy(ch,"legend-6")
      echo ("*poof*")
      transfer(ch,"aylor-0")
      return
   end