Ok down to last problem...i only want this communications to be used by people who learned it...thats easy enough.
But then i want people who havent learned it, to get a different messge then those that also have learned it..
Here it is, but as you can see, that i see 5 messages from sender, where i should never see the hi one, and ofc just only get 1 of the others...history shows the right one and just 1 as it should...Hope one of you can solve this:
Code:
109h 100m 222v >
Testchar seems to try tell you something that you dont understand.
Testchar tele: hi
Testchar seems to try tell you something that you dont understand.
Testchar seems to try tell you something that you dont understand.
Testchar seems to try tell you something that you dont understand.
109h 100m 222v > history all
16:38 Testchar seems to try tell you something that you dont understand.
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 buf[MAX_INPUT_LENGTH + 14], *msg;
struct char_data *vict;
if (CONFIG_SPECIAL_IN_COMM && legal_communication(argument))
parse_at(argument);
for (vict = world[IN_ROOM(ch)].people; vict; vict = vict->next_in_room)
if (!IS_NPC(vict) && !GET_SKILL(vict, SKILL_TELE)) {
snprintf(buf, sizeof(buf), "$n\tc seems to try tell you something that you dont understand.");
msg = act(buf, FALSE, ch, 0, 0, TO_ROOM | DG_NO_TRIG);
} else {
snprintf(buf, sizeof(buf), "$n\tc tele\tn: %s", argument);
msg = act(buf, FALSE, ch, 0, 0, TO_ROOM | DG_NO_TRIG);
}
for (vict = world[IN_ROOM(ch)].people; vict; vict = vict->next_in_room)
if (vict != ch && GET_POS(vict) > POS_SLEEPING)
add_history(vict, msg, HIST_TELE);
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
send_to_char(ch, "%s", CONFIG_OK);
else {
sprintf(buf, "\tcYou tele\tn: %s", argument);
msg = act(buf, FALSE, ch, 0, 0, TO_CHAR | DG_NO_TRIG);
add_history(ch, msg, HIST_TELE);
}
}
/* Trigger check. */
speech_mtrigger(ch, argument);
speech_wtrigger(ch, argument);
}