[Circle] [NEWBIE][CODE] Color to Rooms

From: Mike Prior (mike.prior@neis.com.au)
Date: 08/21/96


Dear all,

I am only a newbie coder, so this question will be utterly ridiculous
for you all, but please don't flame me. I'm a sensitive guy :P

I can understand the lines for adding the color to the damager and
damagee, but I don't know the syntax for adding color so that the room
will see it too.  Is it another send_to_char statement?

Could someone fill in the blanks for me please...

[SNIPPET]

/* damage message to onlookers */
---> 
  buf = replace_string(dam_weapons[msgnum].to_room,
	  attack_hit_text[w_type].singular, attack_hit_text[w_type].plural);
  act(buf, FALSE, ch, NULL, victim, TO_NOTVICT);
--->

  /* damage message to damager */
  send_to_char(CCGRN(ch, C_NRM), ch);
  buf = replace_string(dam_weapons[msgnum].to_char,
	  attack_hit_text[w_type].singular, attack_hit_text[w_type].plural);
  act(buf, FALSE, ch, NULL, victim, TO_CHAR);
  send_to_char(CCNRM(ch, C_NRM), ch);

  /* damage message to damagee */
  send_to_char(CCYEL(victim, C_NRM), victim);
  buf = replace_string(dam_weapons[msgnum].to_victim,
	  attack_hit_text[w_type].singular, attack_hit_text[w_type].plural);
  act(buf, FALSE, ch, NULL, victim, TO_VICT | TO_SLEEP);
  send_to_char(CCNRM(victim, C_NRM), victim);

[END SNIPPET]

Thanks to anyone that can help me, I'm improving slowly so soon you
won't have to put up with silly questions like this from me.  No doubt,
someone new will come along to take my place though ;)

Regards
Mike
+-----------------------------------------------------------+
| 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/07/00 PST