[CODE] what on earth is wrong here??

From: Søren Peter skou (tigerdyr@internet.dk)
Date: 10/13/96


Hiya all..

Thanks to the people who helped with PULSE_FAST, It really works now
(after I started using GDB.. *gig*), only one question left on that one
is 1 RL_SEC the lowest you can go??

oki, to the problem more pressing right now, I have a MOB called spoof,
with a little function that makes him teleport around on random, but
only sometimes, cause he's also a scavenger so he can pick up things.

Problem is sometimes when you're in room with spoof, you get teleported
away, no matter *WHAT* you do, code is as follows :

/* START SPOOF */ 

SPECIAL(spoof)
{  
  struct char_data *vict;
  extern int top_of_world;

  if (GET_POS(ch) != POS_FIGHTING) 
  {
    switch (number(0,30))
    {
      case 0:
      	act("$n peers around to see if anyone is looking.\r\n",FALSE,
ch,0, 0, TO_ROOM)
      	act("$n makes a magical gesture and suddemly
disappears.\r\n",FALSE, ch,0, 0, TO_ROOM)
      	act("You Teleport somewhere else.\r\n",FALSE, ch,0, 0, TO_ROOM)
        char_from_room(ch);
        char_to_room(ch, number(0, top_of_world));
	act("You hear something that sounds like *SPOOF*", FALSE, ch, 0, 0,
TO_ROOM);
        look_at_room(ch, 0);
       return(1);
       default:
       return(0);
    }  
   }
}

/* END SPOOF */

Noway I can see what is wrong, of course it adds a little spice to the
game that you teleport somewhere else just by being nearby this fella
and just look, but thats not the intention of it.

Anyone any idea to what i'm doing wrong??? It's no use of putting in a
check if it's a mob or not, then it's only mobs who will get teleported
around, but still, it's only spoof who needs to be teleported.

Help1 :)

/Soren total overseeing the obvious.
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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