Welcome to the Builder Academy

Question Communication

More
03 Feb 2018 20:45 #7535 by WhiskyTest
Replied by WhiskyTest on topic Communication
Code:
ACMD(do_tele) { skip_spaces(&argument); if (IS_NPC(ch) || !GET_SKILL(ch, SKILL_TELE)) { send_to_char(ch, "You have no idea how.\r\n"); return; } if (!*argument) send_to_char(ch, "Yes, but WHAT do you want to tele?\r\n"); else { char understood[MAX_INPUT_LENGTH + 14], not_understood[MAX_INPUT_LENGTH + 14], *msg; struct char_data *vict; if (CONFIG_SPECIAL_IN_COMM && legal_communication(argument)) parse_at(argument); snprintf(not_understood, sizeof(not_understood), "$n\tc seems to try tell you something that you don't understand.\tn"); snprintf(understood, sizeof(understood), "$n\tc tele\tn: %s\tn", argument); for (vict = world[IN_ROOM(ch)].people; vict; vict = vict->next_in_room) { if (vict == ch) continue; if (!IS_NPC(vict) && !GET_SKILL(vict, SKILL_TELE)) { msg = act(not_understood, FALSE, ch, 0, vict, TO_VICT | DG_NO_TRIG); } else { msg = act(understood, FALSE, ch, 0, vict, TO_VICT | DG_NO_TRIG); } if (vict != ch && GET_POS(vict) > POS_SLEEPING) add_history(vict, msg, HIST_TELL); } if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT)) send_to_char(ch, "%s", CONFIG_OK); else { snprintf(understood, sizeof(understood), "\tcYou tele\tn: %s", argument); msg = act(understood, FALSE, ch, 0, 0, TO_CHAR | DG_NO_TRIG); add_history(ch, msg, HIST_TELL); } } /* Trigger check. */ speech_mtrigger(ch, argument); speech_wtrigger(ch, argument); }
The following user(s) said Thank You: JTP

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

Time to create page: 0.181 seconds