Re: Dam Messages and Spells

From: Wesley Fonvergne (tadrith@GATEKEEP.NET)
Date: 01/31/98


        Ah. That was fairly stupid of me...I attempted to do at it the wrong way,
as implementing another # operator in the dam_message array. Well, you live
and learn! :)

>to do this, all you have to do is add the lines marked with a plus:
>
>  act(buf, FALSE, ch, NULL, victim, TO_NOTVICT);
>
>  /* damage message to damager */
>  send_to_char(CCYEL(ch, C_CMP), ch);
>+  sprintf(buf, "(%d Damage) ", dam);
>+  send_to_char(buf, 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_CMP), ch);
>
>  /* damage message to damagee */
>  send_to_char(CCRED(victim, C_CMP), victim);
>+  sprintf(buf, "(%d Damage) ", dam);
>+  send_to_char(buf, victim);
>  buf = replace_string(dam_weapons[msgnum].to_victim,
>
>
>this will show the damage to the person hitting and the person being
>hit..you could also add it to the first one to show the onlookers..also,
>you can do something similar in skill_message to have the damage show for
>skills..it ends up looking like:
>
>(23 Damage) You hit Tadrith hard!
>
>
>as to the other thing, i would think that all you'd need to do is use the
>spells[] array..then just do something like this:
>
>sprintf(buf, "Your %s hits $n hard!", spells[spell_num]);
>act(buf, ch, victim, NULL, TRUE);
>
>you'd get spell_num from whatever the attack_type is..
>
>all of the above is psuedo code..
>
>siv
>
>
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>     +------------------------------------------------------------+
>
>


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