Welcome to the Builder Academy

Question Skill question

More
28 Mar 2018 22:50 #7825 by JTP
Replied by JTP on topic Skill question
Thomas would all # in the messages file, let me use acts in a skill as messages instead ?

Please Log in or Create an account to join the conversation.

More
29 Mar 2018 13:23 #7839 by thomas
Replied by thomas on topic Skill question
You'll be sending some on/off color codes, but apart from that, no problem: github.com/tbamud/tbamud/blob/master/src/fight.c#L548
Code:
send_to_char(vict, CCRED(vict, C_CMP)); act(msg->die_msg.victim_msg, FALSE, ch, weap, vict, TO_VICT | TO_SLEEP); // <- msg == NULL is a no-op send_to_char(vict, CCNRM(vict, C_CMP)); act(msg->die_msg.room_msg, FALSE, ch, weap, vict, TO_NOTVICT); // <- msg == NULL is a no-op } else { if (msg->hit_msg.attacker_msg) { send_to_char(ch, CCYEL(ch, C_CMP)); act(msg->hit_msg.attacker_msg, FALSE, ch, weap, vict, TO_CHAR); send_to_char(ch, CCNRM(ch, C_CMP)); } send_to_char(vict, CCRED(vict, C_CMP)); act(msg->hit_msg.victim_msg, FALSE, ch, weap, vict, TO_VICT | TO_SLEEP); // <- msg == NULL is a no-op send_to_char(vict, CCNRM(vict, C_CMP)); act(msg->hit_msg.room_msg, FALSE, ch, weap, vict, TO_NOTVICT); // <- msg == NULL is a no-op } } else if (ch != vict) { /* Dam == 0 */ if (msg->miss_msg.attacker_msg) { send_to_char(ch, CCYEL(ch, C_CMP)); act(msg->miss_msg.attacker_msg, FALSE, ch, weap, vict, TO_CHAR); send_to_char(ch, CCNRM(ch, C_CMP)); } send_to_char(vict, CCRED(vict, C_CMP)); act(msg->miss_msg.victim_msg, FALSE, ch, weap, vict, TO_VICT | TO_SLEEP); // <- msg == NULL is a no-op send_to_char(vict, CCNRM(vict, C_CMP)); act(msg->miss_msg.room_msg, FALSE, ch, weap, vict, TO_NOTVICT); // <- msg == NULL is a no-op
But it should work.

Please Log in or Create an account to join the conversation.

More
29 Mar 2018 14:37 - 29 Mar 2018 15:03 #7840 by JTP
Replied by JTP on topic Skill question
Ok now i get messages from my acts...Just need to fiddle when to use TRUE or FALSE and get the right $n $n etc

What does the TRUE or FALSE do ?

Right now i have TRUE in all 3, both to_room/vict/char, seems to work.
Last edit: 29 Mar 2018 15:03 by JTP.

Please Log in or Create an account to join the conversation.

More
29 Mar 2018 15:10 #7842 by JTP
Replied by JTP on topic Skill question
Hmmm vict sees both TO_ROOM and TO_VICT message, not good

Please Log in or Create an account to join the conversation.

More
29 Mar 2018 15:22 #7843 by JTP
Replied by JTP on topic Skill question
And when is it ch, 0, vict

And when vict, 0, ch ?

Please Log in or Create an account to join the conversation.

More
29 Mar 2018 16:34 #7844 by JTP
Replied by JTP on topic Skill question
And i see some places in the code use:

#if 0
.....
act....
#endif

When is that a good idea to use ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.331 seconds