Re: 2 questions

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 03/01/98


On Sun, 1 Mar 1998, Fili wrote:

->1) Is there a command in stock circle to get someone to stop following
->you? (I cant believe I dont know this by now...)

I don't think there is a command specifically for that, but there's an
easy enough workaround:

  > group all
  > ungroup

will disband your group and stop everyone from following you.  Even
though stopping someone from following you is rather unrealistic;
besides, which, if they want to keep following you, they simply retype
"follow fili" and keep doing it.  It might be interesting to code a
skill to lose a follower...or, actually, "hide" should do it (but
doesn't).  You obviously can't follow someone that is sneaking or
hiding (the idea being that if you can't see them, how can you follow
them?)

->2) Has someone posted a fix for the MobProg act progs yet? (I'm going to
->code one if not)

I don't know for certain, but I think the problem with the mobprog act
program is that mobiles get sent out of act() too early by the SEND_OK
macro.  A possible fix is to put a check if the char is to mobile
SEND_OK to continue if we have a mobile with mobprog (or just a
mobile) and then prevent SEND_TO_Q from being reached by mobiles.  Eh,
since I figure that mobprogs already does the last two steps, it's
just a little modification to SEND_OK, something like

  #define SEND_OK(ch) (((ch)->desc || (scripted_mob)) && ...)

the scripted_mob being replaced by the check of whether or not we have
a mobile and it's scripted, and the rest of the macro being unaltered.
Note that parentheses are important here, especially around the
scripted_mob check (which will probably be something like "IS_NPC(ch)
&& HAS_ACTPROG(ch)").  Without the parentheses, the code is ambiguous
and open to false interpretation, e.g.,

  if (a && b || c)

could mean "if a and b are true, or if c is true" or it could mean "if
a is true and b or c is true".  To the first possible definition, the
following conditions are true:

  a = 1, b = 1, c = 1
  a = 1, b = 1, c = 0
  a = 0, b = 1, c = 1
  a = 1, b = 0, c = 1
  a = 0, b = 0, c = 1

but for the second, the following conditions are true:

  a = 1, b = 1, c = 1
  a = 1, b = 0, c = 1
  a = 1, b = 1, c = 0

Not that everyone doesn't already know this on this list, because
we're all well-skilled C programmers--or at least have a book.  So
I'm just rambling...:)

-dak


     +------------------------------------------------------------+
     | 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