Re: More questions.. (geez:P)

From: ShadowLord (dkoepke@california.com)
Date: 04/21/96


On Sat, 20 Apr 1996, Travelling Bluesman wrote:

> In structs.h you add a new flag, for afk it would probably be PLR_AFK in
> the PLR_FLAGS section.  Then in act.informative.c you add a line in
> do_who like this:
> 
>   if(PLR_FLAGGED(tch, PLR_AFK))
>     strcat(buf, " (afk)");
> 
> You also add something like this in show_char_to_char.

	Just curious why you'd use PLR for AFK?  It seems like something
belongs with PRFs.  I no it makes no difference, but to me, PLR seems like
something individual mortals cannot toggle on/off on themselves.  AFK does
not fit with that.  Just a comment.  Doesn't really matter where it goes
between the two.

> The way I usually do this is make separate affect bitvectors for each
> multiple attack... ie.  AFF_SECOND, AFF_THIRD, AFF_FOURTH and then
> check for them in perform_violence in fight.c that was you can easily set
> them for mobs in the affections bitvector.

	I still think this is a waste of bitvektors.  I would just use an
"apr" variable in mob_specials_data and set it via especs.

> I have seen that on Merc muds what you probably want to do is add the
> #w and #W to in the messages file and then run it through the same 
> replace_string procedure that the regular attacks are run through.
> Shouldn't be too hard just a lot of typing in the messages file. :)

	That's a blatant waste of time.  It's far easier to just make the
MUD report a message through a function:

	if (GET_POS(vict) == POS_DEAD) {
	  /* The death message */
	} else {
	  sprintf(buf, "You %s $N with your deadly %s.", dam_messgs[msg],
		  spells[type]);
	  act(buf, FALSE, ch, 0, vict, TO_CHAR);
	  .
	  .
	  .
	}

	Something like that anyway.  It's easy code, just a bit of
thinking on the quickest way to do it is neccessary.  Heh, I don't mean to
sound like I'm trying to put you down, just I think more people should
think about how they could go about writing the code before they do it.
Nine times out of ten there is probably an easier way to do what you
wanted with the same amount of flexibility.  Of course, the method you
suggest has a slight advantage in making it possible to have a bit more
flexibility, although you can incorperate both methods (kind of).



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