[CODE] Teleport spell -- extract objects

From: Brian (brian@IMI-BOTTLING.COM)
Date: 04/11/98

I'm using the "new teleport" spell from the snippet site, which uses a
percentage chance of killing the castor during teleportation.  Only recently
did someone finally die from teleportation, and I found out that their items
are not removed from the game as they should be.  Instead they are in "an
unknown location".  Here's the code segment for the percentage chance, and
the removal and extraction of the casters items:

 -- SNIP --

if (prob < 3) {
   send_to_char("Your spell goes awry as you teleport into solid
matter!\r\n", ch);
   act("$n miscasts a teleport spell, and disappears.", TRUE, ch, 0, 0,

     for (i = 0; i < NUM_WEARS; i++)
  if (GET_EQ(ch, i))
    unequip_char(ch, i);
   while (ch->carrying) {
   foolz_objs = ch->carrying;

   sprintf(buf, "(GC) %s has misteleported, attempting to teleport to %s,
and died.", GET_NAME(ch), GET_NAME(victim));
   mudlog(buf, BRF, LVL_IMMORT, TRUE);

-- SNIP --

Can anyone see why the items are not being removed/extracted correctly?

 - Brian

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |

This archive was generated by hypermail 2b30 : 12/15/00 PST