00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #if defined(macintosh)
00031 #include <types.h>
00032 #else
00033 #include <sys/types.h>
00034 #include <sys/time.h>
00035 #endif
00036 #include <stdio.h>
00037 #include <string.h>
00038 #include <stdlib.h>
00039 #include <time.h>
00040 #include "merc.h"
00041 #include "interp.h"
00042 #include "recycle.h"
00043 #include "tables.h"
00044 #include <ctype.h>
00045
00046
00047
00048 void do_delet (CHAR_DATA * ch, char *argument)
00049 {
00050 send_to_char ("You must type the full command to delete yourself.\n\r",
00051 ch);
00052 }
00053
00054 void do_delete (CHAR_DATA * ch, char *argument)
00055 {
00056 char strsave[MAX_INPUT_LENGTH];
00057
00058 if (IS_NPC (ch))
00059 return;
00060
00061 if (ch->pcdata->confirm_delete)
00062 {
00063 if (argument[0] != '\0')
00064 {
00065 send_to_char ("Delete status removed.\n\r", ch);
00066 ch->pcdata->confirm_delete = FALSE;
00067 return;
00068 }
00069 else
00070 {
00071 sprintf (strsave, "%s%s", PLAYER_DIR, capitalize (ch->name));
00072 wiznet ("$N turns $Mself into line noise.", ch, NULL, 0, 0, 0);
00073 stop_fighting (ch, TRUE);
00074 do_function (ch, &do_quit, "");
00075 unlink (strsave);
00076 return;
00077 }
00078 }
00079
00080 if (argument[0] != '\0')
00081 {
00082 send_to_char ("Just type delete. No argument.\n\r", ch);
00083 return;
00084 }
00085
00086 send_to_char ("Type delete again to confirm this command.\n\r", ch);
00087 send_to_char ("WARNING: this command is irreversible.\n\r", ch);
00088 send_to_char
00089 ("Typing delete with an argument will undo delete status.\n\r", ch);
00090 ch->pcdata->confirm_delete = TRUE;
00091 wiznet ("$N is contemplating deletion.", ch, NULL, 0, 0, get_trust (ch));
00092 }
00093
00094
00095
00096
00097
00098 void do_permit (CHAR_DATA *ch, char *argument)
00099 {
00100 CHAR_DATA *victim;
00101 BUFFER *buf;
00102 char buffer[MSL];
00103 int pChar=0;
00104 buf = new_buf();
00105 bool found;
00106 bool permit_full;
00107 int col=0;
00108 int pChar2=0;
00109
00110 if (argument[0] == '\0')
00111 {
00112 send_to_char("The following people have your permission\n\r",ch);
00113 send_to_char("-----------------------------------------\n\r",ch);
00114
00115 for (pChar = 0; pChar < MAX_PERMIT; pChar++)
00116 {
00117 if (ch->permit[pChar] == NULL)
00118 continue;
00119 sprintf(buffer, "{c%-10s{x ", ch->permit[pChar]->name);
00120 add_buf(buf, buffer);
00121 if (++col % 3 == 0)
00122 add_buf(buf, "\n\r");
00123 found = TRUE;
00124 }
00125 add_buf(buf, "{x\n\r\n\r");
00126 if (!found)
00127 send_to_char("No one has your permission.\n\r",ch);
00128 else
00129 page_to_char(buf_string(buf), ch);
00130 free_buf(buf);
00131 return;
00132 }
00133
00134 if ((victim = get_char_world(ch, argument)) == NULL)
00135 {
00136 send_to_char("They are not currently playing at the moment.\n\r",ch);
00137 return;
00138 }
00139 if (IS_NPC(victim))
00140 {
00141 send_to_char("You may not permit NPCs.\n\r",ch);
00142 return;
00143 }
00144
00145 if (ch == victim)
00146 {
00147 send_to_char("But you already have your own permission...weirdo.\n\r",ch);
00148 return;
00149 }
00150
00151 for (pChar = 0; pChar < MAX_PERMIT; pChar++)
00152 {
00153 if (ch->permit[pChar] == victim)
00154 {
00155 send_to_char("They are already permited!\n\r",ch);
00156 return;
00157 }
00158 }
00159
00160 for (pChar = 0; pChar < MAX_PERMIT; pChar++)
00161 {
00162 if (ch->permit[pChar] == NULL)
00163 {
00164 ch->permit[pChar] = victim;
00165 printf_to_char(ch, "%s has been given permission\n\r", victim->name);
00166 for (pChar2 =0;pChar2 < MAX_PERMIT;pChar2++)
00167 {
00168 if (victim->permited_by[pChar2] == NULL)
00169 {
00170 victim->permited_by[pChar2] = ch;
00171 printf_to_char(victim, "%s has given you permission.\n\r", ch->name);
00172 break;
00173 }
00174 }
00175 permit_full = FALSE;
00176 break;
00177 }
00178 permit_full = TRUE;
00179 }
00180
00181 if (permit_full)
00182 {
00183 send_to_char("You have already reached your maximum permissions.\n\r",ch);
00184 return;
00185 }
00186 return;
00187
00188
00189
00190 }
00191
00192
00193
00194
00195
00196
00197 void do_unpermit (CHAR_DATA *ch, char *argument)
00198 {
00199 CHAR_DATA *victim;
00200
00201 int pChar=0;
00202 int pChar2=0;
00203
00204 if (argument[0] == '\0')
00205 {
00206 send_to_char("Syntax: unpermit person\n\r",ch);
00207 return;
00208 }
00209
00210 if ((victim = get_char_world(ch,argument)) == NULL)
00211 {
00212 send_to_char("They are not playing.\n\r",ch);
00213 return;
00214 }
00215 if (IS_NPC(victim))
00216 {
00217 send_to_char("Not on NPCs\n\r",ch);
00218 return;
00219 }
00220
00221 for (pChar=0;pChar < MAX_PERMIT;pChar++)
00222 {
00223 if (ch->permit[pChar] == victim)
00224 {
00225 ch->permit[pChar] = NULL;
00226 printf_to_char(ch, "You have removed %s's permission.\n\r",victim->name);
00227 for (pChar2 =0;pChar2 < MAX_PERMIT; pChar2++)
00228 {
00229 if (victim->permited_by[pChar2] == ch)
00230 {
00231 victim->permited_by[pChar2] = NULL;
00232 printf_to_char(victim, "%s has removed your permission!\n\r",ch->name);
00233 break;
00234 }
00235 }
00236 }
00237
00238
00239 }
00240 return;
00241 }
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259 void do_channels (CHAR_DATA * ch, char *argument)
00260 {
00261 char buf[MAX_STRING_LENGTH];
00262
00263
00264 send_to_char (" channel status\n\r", ch);
00265 send_to_char ("---------------------\n\r", ch);
00266
00267 send_to_char ("{dgossip{x ", ch);
00268 if (!IS_SET (ch->comm, COMM_NOGOSSIP))
00269 send_to_char ("ON\n\r", ch);
00270 else
00271 send_to_char ("OFF\n\r", ch);
00272
00273 send_to_char ("{aauction{x ", ch);
00274 if (!IS_SET (ch->comm, COMM_NOAUCTION))
00275 send_to_char ("ON\n\r", ch);
00276 else
00277 send_to_char ("OFF\n\r", ch);
00278
00279 send_to_char ("{emusic{x ", ch);
00280 if (!IS_SET (ch->comm, COMM_NOMUSIC))
00281 send_to_char ("ON\n\r", ch);
00282 else
00283 send_to_char ("OFF\n\r", ch);
00284
00285 send_to_char ("{qQ{x/{fA{x ", ch);
00286 if (!IS_SET (ch->comm, COMM_NOQUESTION))
00287 send_to_char ("ON\n\r", ch);
00288 else
00289 send_to_char ("OFF\n\r", ch);
00290
00291 send_to_char ("{hQuote{x ", ch);
00292 if (!IS_SET (ch->comm, COMM_NOQUOTE))
00293 send_to_char ("ON\n\r", ch);
00294 else
00295 send_to_char ("OFF\n\r", ch);
00296
00297 send_to_char ("{tgrats{x ", ch);
00298 if (!IS_SET (ch->comm, COMM_NOGRATS))
00299 send_to_char ("ON\n\r", ch);
00300 else
00301 send_to_char ("OFF\n\r", ch);
00302
00303 if (IS_IMMORTAL (ch))
00304 {
00305 send_to_char ("{igod channel{x ", ch);
00306 if (!IS_SET (ch->comm, COMM_NOWIZ))
00307 send_to_char ("ON\n\r", ch);
00308 else
00309 send_to_char ("OFF\n\r", ch);
00310 }
00311
00312 send_to_char ("{tshouts{x ", ch);
00313 if (!IS_SET (ch->comm, COMM_SHOUTSOFF))
00314 send_to_char ("ON\n\r", ch);
00315 else
00316 send_to_char ("OFF\n\r", ch);
00317
00318 send_to_char ("{ktells{x ", ch);
00319 if (!IS_SET (ch->comm, COMM_DEAF))
00320 send_to_char ("ON\n\r", ch);
00321 else
00322 send_to_char ("OFF\n\r", ch);
00323
00324 send_to_char ("{tquiet mode{x ", ch);
00325 if (IS_SET (ch->comm, COMM_QUIET))
00326 send_to_char ("ON\n\r", ch);
00327 else
00328 send_to_char ("OFF\n\r", ch);
00329
00330 if (IS_SET (ch->comm, COMM_AFK))
00331 send_to_char ("You are AFK.\n\r", ch);
00332
00333 if (IS_SET (ch->comm, COMM_SNOOP_PROOF))
00334 send_to_char ("You are immune to snooping.\n\r", ch);
00335
00336 if (ch->lines != PAGELEN)
00337 {
00338 if (ch->lines)
00339 {
00340 sprintf (buf, "You display %d lines of scroll.\n\r",
00341 ch->lines + 2);
00342 send_to_char (buf, ch);
00343 }
00344 else
00345 send_to_char ("Scroll buffering is off.\n\r", ch);
00346 }
00347
00348 if (ch->prompt != NULL)
00349 {
00350 sprintf (buf, "Your current prompt is: %s\n\r", ch->prompt);
00351 send_to_char (buf, ch);
00352 }
00353
00354 if (IS_SET (ch->comm, COMM_NOSHOUT))
00355 send_to_char ("You cannot shout.\n\r", ch);
00356
00357 if (IS_SET (ch->comm, COMM_NOTELL))
00358 send_to_char ("You cannot use tell.\n\r", ch);
00359
00360 if (IS_SET (ch->comm, COMM_NOCHANNELS))
00361 send_to_char ("You cannot use channels.\n\r", ch);
00362
00363 if (IS_SET (ch->comm, COMM_NOEMOTE))
00364 send_to_char ("You cannot show emotions.\n\r", ch);
00365
00366 }
00367
00368
00369
00370 void do_deaf (CHAR_DATA * ch, char *argument)
00371 {
00372
00373 if (IS_SET (ch->comm, COMM_DEAF))
00374 {
00375 send_to_char ("You can now hear tells again.\n\r", ch);
00376 REMOVE_BIT (ch->comm, COMM_DEAF);
00377 }
00378 else
00379 {
00380 send_to_char ("From now on, you won't hear tells.\n\r", ch);
00381 SET_BIT (ch->comm, COMM_DEAF);
00382 }
00383 }
00384
00385
00386
00387 void do_quiet (CHAR_DATA * ch, char *argument)
00388 {
00389 if (IS_SET (ch->comm, COMM_QUIET))
00390 {
00391 send_to_char ("Quiet mode removed.\n\r", ch);
00392 REMOVE_BIT (ch->comm, COMM_QUIET);
00393 }
00394 else
00395 {
00396 send_to_char ("From now on, you will only hear says and emotes.\n\r",
00397 ch);
00398 SET_BIT (ch->comm, COMM_QUIET);
00399 }
00400 }
00401
00402
00403
00404 void do_afk (CHAR_DATA * ch, char *argument)
00405 {
00406 char buf[MAX_STRING_LENGTH];
00407 if (IS_SET (ch->comm, COMM_AFK))
00408 {
00409 send_to_char ("AFK mode removed. Type 'replay' to see tells.\n\r",
00410 ch);
00411 if (ch->pcdata->afk_message != NULL)
00412 {
00413 send_to_char ("AFK message cleared.\n\r",ch);
00414 ch->pcdata->afk_message = NULL;
00415 }
00416 REMOVE_BIT (ch->comm, COMM_AFK);
00417 }
00418 else
00419 {
00420 if (argument[0] != '\0')
00421 {
00422 sprintf(buf, "AFK message: %s\n\r", argument);
00423 send_to_char(buf,ch);
00424 ch->pcdata->afk_message = str_dup(argument);
00425 }
00426 send_to_char ("You are now in AFK mode.\n\r", ch);
00427 SET_BIT (ch->comm, COMM_AFK);
00428 }
00429 }
00430
00431 void do_replay (CHAR_DATA * ch, char *argument)
00432 {
00433 if (IS_NPC (ch))
00434 {
00435 send_to_char ("You can't replay.\n\r", ch);
00436 return;
00437 }
00438
00439 if (buf_string (ch->pcdata->buffer)[0] == '\0')
00440 {
00441 send_to_char ("You have no tells to replay.\n\r", ch);
00442 return;
00443 }
00444
00445 page_to_char (buf_string (ch->pcdata->buffer), ch);
00446 clear_buf (ch->pcdata->buffer);
00447 }
00448
00449
00450 void do_auction (CHAR_DATA * ch, char *argument)
00451 {
00452 char buf[MAX_STRING_LENGTH];
00453 DESCRIPTOR_DATA *d;
00454
00455 if (argument[0] == '\0')
00456 {
00457 if (IS_SET (ch->comm, COMM_NOAUCTION))
00458 {
00459 send_to_char ("{aAuction channel is now ON.{x\n\r", ch);
00460 REMOVE_BIT (ch->comm, COMM_NOAUCTION);
00461 return;
00462 }
00463 else
00464 {
00465 send_to_char ("{aAuction channel is now OFF.{x\n\r", ch);
00466 SET_BIT (ch->comm, COMM_NOAUCTION);
00467 return;
00468 }
00469 }
00470 else
00471 {
00472
00473 if (IS_SET (ch->comm, COMM_QUIET))
00474 {
00475 send_to_char ("You must turn off quiet mode first.\n\r", ch);
00476 return;
00477 }
00478
00479 if (IS_SET (ch->comm, COMM_NOCHANNELS))
00480 {
00481 send_to_char
00482 ("The gods have revoked your channel priviliges.\n\r", ch);
00483 return;
00484 }
00485
00486 REMOVE_BIT (ch->comm, COMM_NOAUCTION);
00487 }
00488
00489 sprintf (buf, "{xYou auction '{c%s{x'{x\n\r", argument);
00490 send_to_char (buf, ch);
00491 for (d = descriptor_list; d != NULL; d = d->next)
00492 {
00493 CHAR_DATA *victim;
00494
00495 victim = d->original ? d->original : d->character;
00496
00497 if (d->connected == CON_PLAYING &&
00498 d->character != ch &&
00499 !IS_SET (victim->comm, COMM_NOAUCTION) &&
00500 !IS_SET (victim->comm, COMM_QUIET))
00501 {
00502 act_new ("{x$n auctions '{c$t{x'{x",
00503 ch, argument, d->character, TO_VICT, POS_DEAD);
00504 }
00505 }
00506 }
00507
00508
00509 void do_clan_gossip (CHAR_DATA *ch, char *argument)
00510 {
00511 char buf[MAX_STRING_LENGTH];
00512 DESCRIPTOR_DATA *d;
00513
00514 if (argument[0] == '\0')
00515 {
00516 if (IS_SET(ch->comm, COMM_NOCGOS))
00517 {
00518 send_to_char("Clan Gossip is now ON.\n\r", ch);
00519 REMOVE_BIT(ch->comm, COMM_NOCGOS);
00520 }
00521 else
00522 {
00523 send_to_char("Clan Gossip is now OFF.\n\r",ch);
00524 SET_BIT(ch->comm, COMM_NOCGOS);
00525 }
00526 }
00527 else
00528 {
00529 if (IS_SET(ch->comm, COMM_QUIET))
00530 {
00531 send_to_char("You must turn off quiet mode first.\n\r",ch);
00532 return;
00533 }
00534 if (IS_SET(ch->comm, COMM_NOCHANNELS))
00535 {
00536 send_to_char("The gods have revoked your channel privliges.\n\r",ch);
00537 return;
00538 }
00539
00540 REMOVE_BIT(ch->comm, COMM_NOCGOS);
00541 sprintf(buf, "{xYou clan gossip '{R%s{x'\n\r", argument);
00542 send_to_char(buf,ch);
00543
00544 for(d = descriptor_list; d != NULL; d = d->next)
00545 {
00546 CHAR_DATA *victim;
00547 victim = d->original ? d->original : d->character;
00548
00549 if (d->connected == CON_PLAYING &&
00550 d->character != ch && !IS_SET(victim->comm, COMM_NOCGOS) &&
00551 !IS_SET(victim->comm, COMM_QUIET))
00552 {
00553 act_new("{x$n clan gossips: '{R$t{x'\n\r",ch,argument,d->character,TO_VICT, POS_SLEEPING);
00554 }
00555 }
00556 }
00557 }
00558
00559
00560
00561
00562 void do_gossip (CHAR_DATA * ch, char *argument)
00563 {
00564 char buf[MAX_STRING_LENGTH];
00565 DESCRIPTOR_DATA *d;
00566
00567 if (argument[0] == '\0')
00568 {
00569 if (IS_SET (ch->comm, COMM_NOGOSSIP))
00570 {
00571 send_to_char ("Gossip channel is now ON.\n\r", ch);
00572 REMOVE_BIT (ch->comm, COMM_NOGOSSIP);
00573 }
00574 else
00575 {
00576 send_to_char ("Gossip channel is now OFF.\n\r", ch);
00577 SET_BIT (ch->comm, COMM_NOGOSSIP);
00578 }
00579 }
00580 else
00581 {
00582
00583 if (IS_SET (ch->comm, COMM_QUIET))
00584 {
00585 send_to_char ("You must turn off quiet mode first.\n\r", ch);
00586 return;
00587 }
00588
00589 if (IS_SET (ch->comm, COMM_NOCHANNELS))
00590 {
00591 send_to_char
00592 ("The gods have revoked your channel priviliges.\n\r", ch);
00593 return;
00594
00595 }
00596
00597 REMOVE_BIT (ch->comm, COMM_NOGOSSIP);
00598
00599 sprintf (buf, "{xYou gossip '{W%s{x'{x\n\r", argument);
00600 send_to_char (buf, ch);
00601 for (d = descriptor_list; d != NULL; d = d->next)
00602 {
00603 CHAR_DATA *victim;
00604
00605 victim = d->original ? d->original : d->character;
00606
00607 if (d->connected == CON_PLAYING &&
00608 d->character != ch &&
00609 !IS_SET (victim->comm, COMM_NOGOSSIP) &&
00610 !IS_SET (victim->comm, COMM_QUIET))
00611 {
00612 act_new ("{x$n gossips '{W$t{x'{x",
00613 ch, argument, d->character, TO_VICT, POS_SLEEPING);
00614 }
00615 }
00616 }
00617 }
00618
00619 void do_grats (CHAR_DATA * ch, char *argument)
00620 {
00621 char buf[MAX_STRING_LENGTH];
00622 DESCRIPTOR_DATA *d;
00623
00624 if (argument[0] == '\0')
00625 {
00626 if (IS_SET (ch->comm, COMM_NOGRATS))
00627 {
00628 send_to_char ("Grats channel is now ON.\n\r", ch);
00629 REMOVE_BIT (ch->comm, COMM_NOGRATS);
00630 }
00631 else
00632 {
00633 send_to_char ("Grats channel is now OFF.\n\r", ch);
00634 SET_BIT (ch->comm, COMM_NOGRATS);
00635 }
00636 }
00637 else
00638 {
00639
00640 if (IS_SET (ch->comm, COMM_QUIET))
00641 {
00642 send_to_char ("You must turn off quiet mode first.\n\r", ch);
00643 return;
00644 }
00645
00646 if (IS_SET (ch->comm, COMM_NOCHANNELS))
00647 {
00648 send_to_char
00649 ("The gods have revoked your channel priviliges.\n\r", ch);
00650 return;
00651
00652 }
00653
00654 REMOVE_BIT (ch->comm, COMM_NOGRATS);
00655
00656 sprintf (buf, "{xYou grats '{C%s{x'{x\n\r", argument);
00657 send_to_char (buf, ch);
00658 for (d = descriptor_list; d != NULL; d = d->next)
00659 {
00660 CHAR_DATA *victim;
00661
00662 victim = d->original ? d->original : d->character;
00663
00664 if (d->connected == CON_PLAYING &&
00665 d->character != ch &&
00666 !IS_SET (victim->comm, COMM_NOGRATS) &&
00667 !IS_SET (victim->comm, COMM_QUIET))
00668 {
00669 act_new ("{x$n grats '{C$t{x'{x",
00670 ch, argument, d->character, TO_VICT, POS_SLEEPING);
00671 }
00672 }
00673 }
00674 }
00675
00676
00677
00678 void do_banish (CHAR_DATA *ch, char *argument)
00679 {
00680 char buf[MAX_STRING_LENGTH];
00681 char arg1[MAX_STRING_LENGTH];
00682
00683 CHAR_DATA *victim;
00684
00685 if (ch->level > 51)
00686 {
00687 argument = one_argument(argument, arg1);
00688
00689 if (arg1[0] == '\0' || argument[0] == '\0')
00690 {
00691 send_to_char("Syntax (immortal only) - banish [kingdom/clan] <person>\n\r",ch);
00692 return;
00693 }
00694 if (!str_prefix(arg1, "kingdom"))
00695 {
00696 if (argument[0] == '\0')
00697 {
00698 send_to_char("Syntax (immortal only) - banish kingdom <person>\n\r",ch);
00699 return;
00700 }
00701 if ((victim = get_char_world(ch, argument)) == NULL)
00702 {
00703 send_to_char("They are not here.\n\r",ch);
00704 return;
00705 }
00706 if (IS_NPC(victim))
00707 {
00708 send_to_char("They are not here.\n\r",ch);
00709 return;
00710 }
00711 if (victim->king == 0)
00712 {
00713 send_to_char("They are not part of a kingdom.\n\r",ch);
00714 return;
00715 }
00716 sprintf(buf, "%s %s!\n\r",victim->name, kingdom_table[victim->king].banish_string);
00717 send_to_all("",buf);
00718 if (kingdom_data[victim->king].member_count >=1)
00719 kingdom_data[victim->king].member_count--;
00720 else
00721 kingdom_data[victim->king].member_count =0;
00722
00723 save_kingdom_data();
00724 victim->king = 0;
00725 return;
00726 }
00727 if (!str_prefix(arg1, "clan"))
00728 {
00729 if (argument[0] == '\0')
00730 {
00731 send_to_char ("Syntax (immortal only) - banish clan <person>\n\r",ch);
00732 return;
00733 }
00734 if ((victim = get_char_world(ch, argument)) == NULL)
00735 {
00736 send_to_char("They are not here.\n\r",ch);
00737 return;
00738 }
00739 if (IS_NPC(victim))
00740 {
00741 send_to_char("They are not here.\n\r",ch);
00742 return;
00743 }
00744 if (victim->clan == 0)
00745 {
00746 send_to_char("They are not part of a clan.\n\r",ch);
00747 return;
00748 }
00749 sprintf(buf, "%s %s!\n\r",victim->name, clan_table[victim->clan].banish_string);
00750 send_to_all("",buf);
00751 victim->clan = 0;
00752 return;
00753 }
00754 return;
00755 }
00756 if (ch->clan != 0)
00757 {
00758 if (argument[0] == '\0')
00759 {
00760 send_to_char ("Syntax - banish <person>\n\r",ch);
00761 return;
00762 }
00763 if (!IS_SET(ch->cclan, CLAN_LEADER))
00764 {
00765 send_to_char("You are not a clan leader.\n\r",ch);
00766 return;
00767 }
00768 if ((victim = get_char_world(ch, argument)) == NULL)
00769 {
00770 send_to_char("They are not here.\n\r",ch);
00771 return;
00772 }
00773 if (IS_NPC(victim))
00774 {
00775 send_to_char("They are not here.\n\r",ch);
00776 return;
00777 }
00778 if (victim->clan != ch->clan)
00779 {
00780 send_to_char("They are not in YOUR clan.\n\r",ch);
00781 return;
00782 }
00783 sprintf(buf, "%s has been kicked out of your clan.\n\r",victim->name);
00784 send_to_char(buf,ch);
00785 sprintf(buf, "%s has been kicked out of the clan %s!\n\r", victim->name, clan_table[victim->clan].banish_string);
00786 send_to_all("",buf);
00787 victim->clan = 0;
00788 return;
00789 }
00790 if (ch->king != 0)
00791 {
00792 if (argument[0] == '\0')
00793 {
00794 send_to_char ("Syntax - banish <person>\n\r",ch);
00795 return;
00796 }
00797 if (!IS_SET(ch->kking, KING_LEADER))
00798 {
00799 send_to_char ("You are not a kingdom leader.\n\r",ch);
00800 return;
00801 }
00802 if ((victim = get_char_world(ch, argument)) == NULL)
00803 {
00804 send_to_char("They are not here.\n\r",ch);
00805 return;
00806 }
00807 if (IS_NPC(victim))
00808 {
00809 send_to_char("They are not here.\n\r",ch);
00810 return;
00811 }
00812 if (victim->king != ch->king)
00813 {
00814 send_to_char("They are not a member of YOUR kingdom.\n\r",ch);
00815 return;
00816 }
00817 sprintf(buf, "%s has been kicked out of your kingdom.\n\r",victim->name);
00818 send_to_char(buf,ch);
00819 sprintf(buf, "%s has been kicked out of the kingdom of %s!\n\r",victim->name, kingdom_table[victim->king].banish_string);
00820 if (kingdom_data[victim->king].member_count >=1)
00821 kingdom_data[victim->king].member_count--;
00822 else
00823 kingdom_data[victim->king].member_count = 0;
00824
00825 save_kingdom_data();
00826 send_to_all("",buf);
00827 victim->king = 0;
00828 return;
00829 }
00830 return;
00831 }
00832
00833
00834 void do_quote (CHAR_DATA * ch, char *argument)
00835 {
00836 char buf[MAX_STRING_LENGTH];
00837 DESCRIPTOR_DATA *d;
00838
00839 if (argument[0] == '\0')
00840 {
00841 if (IS_SET (ch->comm, COMM_NOQUOTE))
00842 {
00843 send_to_char ("{xQuest channel is now ON.{x\n\r", ch);
00844 REMOVE_BIT (ch->comm, COMM_NOQUOTE);
00845 }
00846 else
00847 {
00848 send_to_char ("{xQuest channel is now OFF.{x\n\r", ch);
00849 SET_BIT (ch->comm, COMM_NOQUOTE);
00850 }
00851 }
00852 else
00853 {
00854
00855 if (IS_SET (ch->comm, COMM_QUIET))
00856 {
00857 send_to_char ("You must turn off quiet mode first.\n\r", ch);
00858 return;
00859 }
00860
00861 if (IS_SET (ch->comm, COMM_NOCHANNELS))
00862 {
00863 send_to_char
00864 ("The gods have revoked your channel priviliges.\n\r", ch);
00865 return;
00866
00867 }
00868
00869 REMOVE_BIT (ch->comm, COMM_NOQUOTE);
00870
00871 sprintf (buf, "{xYou quest '{M%s{x'{x\n\r", argument);
00872 send_to_char (buf, ch);
00873 for (d = descriptor_list; d != NULL; d = d->next)
00874 {
00875 CHAR_DATA *victim;
00876
00877 victim = d->original ? d->original : d->character;
00878
00879 if (d->connected == CON_PLAYING &&
00880 d->character != ch &&
00881 !IS_SET (victim->comm, COMM_NOQUOTE) &&
00882 !IS_SET (victim->comm, COMM_QUIET))
00883 {
00884 act_new ("{x$n quests '{M$t{h'{x",
00885 ch, argument, d->character, TO_VICT, POS_SLEEPING);
00886 }
00887 }
00888 }
00889 }
00890
00891
00892 void do_question (CHAR_DATA * ch, char *argument)
00893 {
00894 char buf[MAX_STRING_LENGTH];
00895 DESCRIPTOR_DATA *d;
00896
00897 if (argument[0] == '\0')
00898 {
00899 if (IS_SET (ch->comm, COMM_NOQUESTION))
00900 {
00901 send_to_char ("Q/A channel is now ON.\n\r", ch);
00902 REMOVE_BIT (ch->comm, COMM_NOQUESTION);
00903 }
00904 else
00905 {
00906 send_to_char ("Q/A channel is now OFF.\n\r", ch);
00907 SET_BIT (ch->comm, COMM_NOQUESTION);
00908 }
00909 }
00910 else
00911 {
00912
00913 if (IS_SET (ch->comm, COMM_QUIET))
00914 {
00915 send_to_char ("You must turn off quiet mode first.\n\r", ch);
00916 return;
00917 }
00918
00919 if (IS_SET (ch->comm, COMM_NOCHANNELS))
00920 {
00921 send_to_char
00922 ("The gods have revoked your channel priviliges.\n\r", ch);
00923 return;
00924 }
00925
00926 REMOVE_BIT (ch->comm, COMM_NOQUESTION);
00927
00928 sprintf (buf, "{xYou ask '{Y%s{x{x'{x\n\r", argument);
00929 send_to_char (buf, ch);
00930 for (d = descriptor_list; d != NULL; d = d->next)
00931 {
00932 CHAR_DATA *victim;
00933
00934 victim = d->original ? d->original : d->character;
00935
00936 if (d->connected == CON_PLAYING &&
00937 d->character != ch &&
00938 !IS_SET (victim->comm, COMM_NOQUESTION) &&
00939 !IS_SET (victim->comm, COMM_QUIET))
00940 {
00941 act_new ("{x$n ask '{Y$t{x'{x",
00942 ch, argument, d->character, TO_VICT, POS_SLEEPING);
00943 }
00944 }
00945 }
00946 }
00947
00948
00949 void do_answer (CHAR_DATA * ch, char *argument)
00950 {
00951 char buf[MAX_STRING_LENGTH];
00952 DESCRIPTOR_DATA *d;
00953
00954 if (argument[0] == '\0')
00955 {
00956 if (IS_SET (ch->comm, COMM_NOQUESTION))
00957 {
00958 send_to_char ("Q/A channel is now ON.\n\r", ch);
00959 REMOVE_BIT (ch->comm, COMM_NOQUESTION);
00960 }
00961 else
00962 {
00963 send_to_char ("Q/A channel is now OFF.\n\r", ch);
00964 SET_BIT (ch->comm, COMM_NOQUESTION);
00965 }
00966 }
00967 else
00968 {
00969
00970 if (IS_SET (ch->comm, COMM_QUIET))
00971 {
00972 send_to_char ("You must turn off quiet mode first.\n\r", ch);
00973 return;
00974 }
00975
00976 if (IS_SET (ch->comm, COMM_NOCHANNELS))
00977 {
00978 send_to_char
00979 ("The gods have revoked your channel priviliges.\n\r", ch);
00980 return;
00981 }
00982
00983 REMOVE_BIT (ch->comm, COMM_NOQUESTION);
00984
00985 sprintf (buf, "{xYou answer '{Y%s{x'{x\n\r", argument);
00986 send_to_char (buf, ch);
00987 for (d = descriptor_list; d != NULL; d = d->next)
00988 {
00989 CHAR_DATA *victim;
00990
00991 victim = d->original ? d->original : d->character;
00992
00993 if (d->connected == CON_PLAYING &&
00994 d->character != ch &&
00995 !IS_SET (victim->comm, COMM_NOQUESTION) &&
00996 !IS_SET (victim->comm, COMM_QUIET))
00997 {
00998 act_new ("{x$n answers '{Y$t{x'{x",
00999 ch, argument, d->character, TO_VICT, POS_SLEEPING);
01000 }
01001 }
01002 }
01003 }
01004
01005
01006 void do_music (CHAR_DATA * ch, char *argument)
01007 {
01008 char buf[MAX_STRING_LENGTH];
01009 DESCRIPTOR_DATA *d;
01010
01011 if (argument[0] == '\0')
01012 {
01013 if (IS_SET (ch->comm, COMM_NOMUSIC))
01014 {
01015 send_to_char ("Music channel is now ON.\n\r", ch);
01016 REMOVE_BIT (ch->comm, COMM_NOMUSIC);
01017 }
01018 else
01019 {
01020 send_to_char ("Music channel is now OFF.\n\r", ch);
01021 SET_BIT (ch->comm, COMM_NOMUSIC);
01022 }
01023 }
01024 else
01025 {
01026
01027 if (IS_SET (ch->comm, COMM_QUIET))
01028 {
01029 send_to_char ("You must turn off quiet mode first.\n\r", ch);
01030 return;
01031 }
01032
01033 if (IS_SET (ch->comm, COMM_NOCHANNELS))
01034 {
01035 send_to_char
01036 ("The gods have revoked your channel priviliges.\n\r", ch);
01037 return;
01038 }
01039
01040 REMOVE_BIT (ch->comm, COMM_NOMUSIC);
01041
01042 sprintf (buf, "{xYou MUSIC: '{C%s{e'{x\n\r", argument);
01043 send_to_char (buf, ch);
01044 sprintf (buf, "{x$n MUSIC: '{C%s{x'", argument);
01045 for (d = descriptor_list; d != NULL; d = d->next)
01046 {
01047 CHAR_DATA *victim;
01048
01049 victim = d->original ? d->original : d->character;
01050
01051 if (d->connected == CON_PLAYING &&
01052 d->character != ch &&
01053 !IS_SET (victim->comm, COMM_NOMUSIC) &&
01054 !IS_SET (victim->comm, COMM_QUIET))
01055 {
01056 act_new ("{x$n MUSIC: '{C$t{e'{x",
01057 ch, argument, d->character, TO_VICT, POS_SLEEPING);
01058 }
01059 }
01060 }
01061 }
01062
01063
01064
01065
01066
01067 void do_kingdomtalk (CHAR_DATA *ch, char *argument)
01068 {
01069 char buf[MAX_STRING_LENGTH];
01070 DESCRIPTOR_DATA *d;
01071
01072 if (!is_kingdom(ch) || ch->king == 0)
01073 {
01074 send_to_char("You are not in a kingdom\n\r",ch);
01075 return;
01076 }
01077 if (argument[0] == '\0')
01078 {
01079 if (IS_SET(ch->kking, KING_NOKING))
01080 {
01081 send_to_char("Kingdom channel now {RON{x\n\r",ch);
01082 REMOVE_BIT (ch->kking, KING_NOKING);
01083 return;
01084 }
01085 else
01086 {
01087 send_to_char("Kingdom channel now {ROFF{x\n\r",ch);
01088 SET_BIT(ch->kking, KING_NOKING);
01089 return;
01090 }
01091 return;
01092 }
01093 if (IS_SET (ch->comm, COMM_NOCHANNELS))
01094 {
01095 send_to_char("The gods have revoked your channel priviliges.\n\r",ch);
01096 return;
01097 }
01098 REMOVE_BIT (ch->kking, KING_NOKING);
01099 sprintf(buf, "{xYou kingdom: '{R%s{x'\n\r", argument);
01100 send_to_char(buf,ch);
01101
01102 for (d = descriptor_list; d != NULL; d = d->next)
01103 {
01104 if (d->connected == CON_PLAYING && d->character != ch && is_same_kingdom(ch, d->character) &&
01105 !IS_SET(d->character->kking, KING_NOKING) && !IS_SET(d->character->comm, COMM_QUIET))
01106 {
01107 act_new ("$n kingdom: '{R$t{x'{x", ch, argument, d->character, TO_VICT,
01108 POS_DEAD);
01109 }
01110 }
01111 return;
01112
01113 }
01114
01115 void do_clantalk (CHAR_DATA * ch, char *argument)
01116 {
01117 char buf[MAX_STRING_LENGTH];
01118 DESCRIPTOR_DATA *d;
01119
01120 if (!is_clan (ch) || clan_table[ch->clan].independent)
01121 {
01122 send_to_char ("You aren't in a clan.\n\r", ch);
01123 return;
01124 }
01125 if (argument[0] == '\0')
01126 {
01127 if (IS_SET (ch->cclan, COMM_NOCLAN))
01128 {
01129 send_to_char ("Clan channel is now {RON{x\n\r", ch);
01130 REMOVE_BIT (ch->cclan, COMM_NOCLAN);
01131 }
01132 else
01133 {
01134 send_to_char ("Clan channel is now {DOFF{x\n\r", ch);
01135 SET_BIT (ch->cclan, COMM_NOCLAN);
01136 }
01137 return;
01138 }
01139
01140 if (IS_SET (ch->comm, COMM_NOCHANNELS))
01141 {
01142 send_to_char ("The gods have revoked your channel priviliges.\n\r",
01143 ch);
01144 return;
01145 }
01146
01147 REMOVE_BIT (ch->cclan, COMM_NOCLAN);
01148
01149 sprintf (buf, "You clan '{R%s{x'\n\r", argument);
01150 send_to_char (buf, ch);
01151 sprintf (buf, "$n clans '{R%s{x'", argument);
01152 for (d = descriptor_list; d != NULL; d = d->next)
01153 {
01154 if (d->connected == CON_PLAYING &&
01155 d->character != ch &&
01156 is_same_clan (ch, d->character) &&
01157 !IS_SET (d->character->comm, COMM_NOCLAN) &&
01158 !IS_SET (d->character->comm, COMM_QUIET))
01159 {
01160 act_new ("$n clans '{R$t{x'{x", ch, argument, d->character, TO_VICT,
01161 POS_DEAD);
01162 }
01163 }
01164
01165 return;
01166 }
01167 void do_oocclan_talk (CHAR_DATA *ch, char *argument)
01168 {
01169 char buf[MAX_STRING_LENGTH];
01170 DESCRIPTOR_DATA *d;
01171
01172 if (ch->clan == 0)
01173 {
01174 send_to_char("You are not in a clan.\n\r",ch);
01175 return;
01176 }
01177 if (argument[0] == '\0')
01178 {
01179
01180 if (IS_SET(ch->cclan, CLAN_NOOOCCLAN))
01181 {
01182 send_to_char("OOCClan is now on.\n\r",ch);
01183 REMOVE_BIT(ch->cclan, CLAN_NOOOCCLAN);
01184 return;
01185 }
01186 if (!IS_SET(ch->cclan, CLAN_NOOOCCLAN))
01187 {
01188 send_to_char("OOCClan is now off.\n\r",ch);
01189 REMOVE_BIT(ch->cclan, CLAN_NOOOCCLAN);
01190 return;
01191 }
01192 return;
01193 }
01194 if (IS_SET(ch->comm, COMM_NOCHANNELS))
01195 {
01196 send_to_char("The Gods have revoked your channel privliages.\n\r",ch);
01197 return;
01198 }
01199 sprintf(buf, "You OOC Clan: '{G%s{x'\n\r", argument);
01200 send_to_char(buf,ch);
01201 sprintf(buf, "%s OOC Clan: '{G%s{x'\n\r", ch->name, argument);
01202 for (d = descriptor_list; d != NULL; d = d->next)
01203 {
01204 if (d->connected == CON_PLAYING &&
01205 d->character != ch &&
01206 is_same_clan (ch, d->character) &&
01207 !IS_SET (d->character->comm, CLAN_NOOOCCLAN) &&
01208 !IS_SET (d->character->comm, COMM_QUIET))
01209 {
01210 act_new ("$n OOC clan: '{G$t{x'{x", ch, argument, d->character, TO_VICT,
01211 POS_DEAD);
01212 }
01213 }
01214 }
01215
01216
01217
01218
01219
01220
01221 void do_broadcast (CHAR_DATA *ch, char *argument)
01222 {
01223 DESCRIPTOR_DATA *d;
01224 char buf[MSL];
01225 char buffer[MSL*2];
01226 char *pbuf;
01227 if (argument[0]=='\0')
01228 {
01229 send_to_char ("Can't broadcast a message without a message.\n\r",ch);
01230 return;
01231 }
01232 act_new ("{w({DBroadcast from {R$n{w){x: {C$t{x", ch, argument, NULL, TO_CHAR, POS_DEAD);
01233 for (d = descriptor_list; d != NULL; d = d->next)
01234 {
01235 if (d->connected >= -15 && d->character != ch)
01236 {
01237
01238 act_new ("{w({DBroadcast from {R$n{w){x: {C$t{x", ch, argument, d->character,TO_VICT,POS_DEAD);
01239
01240
01241
01242
01243
01244
01245
01246 }
01247 }
01248
01249
01250 return;
01251 }
01252
01253
01254 void do_ooc (CHAR_DATA *ch, char *argument)
01255 {
01256 DESCRIPTOR_DATA *d;
01257
01258 if (IS_SET(ch->comm, COMM_NOCHANNELS))
01259 {
01260 send_to_char("The Gods have revoked your channel privliages.\n\r",ch);
01261 return;
01262 }
01263
01264 if (argument[0] == '\0')
01265 {
01266 if (IS_SET (ch->comm, COMM_NOOOC))
01267 {
01268 send_to_char ("OOC channel is now ON\n\r", ch);
01269 REMOVE_BIT (ch->comm, COMM_NOOOC);
01270 }
01271 else
01272 {
01273 send_to_char ("OOC channel is now OFF\n\r", ch);
01274 SET_BIT (ch->comm, COMM_NOOOC);
01275 }
01276 return;
01277 }
01278
01279 REMOVE_BIT (ch->comm, COMM_NOOOC);
01280
01281 act_new ("{xYou OOC: '{C$t{x'",ch, argument, NULL, TO_CHAR, POS_DEAD);
01282
01283 for (d = descriptor_list; d != NULL; d = d->next)
01284 {
01285 if (d->connected == CON_PLAYING && !IS_SET (d->character->comm, COMM_NOOOC))
01286 {
01287 act_new ("$n OOC: '{C$t{x'", ch, argument, d->character, TO_VICT,
01288 POS_DEAD);
01289 }
01290 }
01291
01292 return;
01293 }
01294
01295
01296
01297
01298
01299 void do_pray (CHAR_DATA * ch, char *argument)
01300 {
01301 DESCRIPTOR_DATA *d;
01302
01303 if (argument[0]=='\0')
01304 {
01305 send_to_char ("What would you like to pray?\n\r",ch);
01306 return;
01307 }
01308 act_new ("{r[{Y$n {Gprays{r]{x: {G$t{x", ch, argument, NULL, TO_CHAR, POS_DEAD);
01309 for (d = descriptor_list; d != NULL; d = d->next)
01310 {
01311 if (d->connected == CON_PLAYING &&
01312 IS_IMMORTAL (d->character) &&
01313 !IS_SET (d->character->comm, COMM_NOWIZ))
01314 {
01315 act_new ("{r[{Y$n {Gprays{r]:{G $t{x", ch, argument, d->character, TO_VICT,
01316 POS_DEAD);
01317 }
01318 }
01319
01320 return;
01321 }
01322 void do_admintalk (CHAR_DATA *ch, char * argument)
01323 {
01324 DESCRIPTOR_DATA *d;
01325 if (IS_SET(ch->comm, COMM_NOCHANNELS))
01326 {
01327 send_to_char("The Gods have revoked your channel privliages.\n\r",ch);
01328 return;
01329 }
01330 if (argument[0] == '\0')
01331 {
01332 if (IS_SET(ch->chann, CHAN_ADMIN))
01333 {
01334 send_to_char("Admin channel is now ON\n\r",ch);
01335 REMOVE_BIT(ch->chann, CHAN_ADMIN);
01336 }
01337 else
01338 {
01339 send_to_char("Admin channel is now OFF\n\r",ch);
01340 SET_BIT(ch->chann, CHAN_ADMIN);
01341 }
01342 return;
01343 }
01344 REMOVE_BIT(ch->chann, CHAN_ADMIN);
01345 act_new("{r[{CAdmin - {D$n{r]{x {R$t{x", ch, argument, NULL, TO_CHAR, POS_DEAD);
01346 for (d = descriptor_list; d != NULL ; d = d->next)
01347 {
01348 if (d->connected == CON_PLAYING &&
01349 IS_IMMORTAL(d->character) && !IS_SET(d->character->chann, CHAN_ADMIN)
01350 && get_trust(d->character) > 58)
01351
01352
01353 {
01354
01355
01356 act_new("{r[{CAdmin - {D$n{r]{x {R$t{x", ch, argument, d->character, TO_VICT, POS_DEAD);
01357
01358 }
01359 }
01360 return;
01361 }
01362
01363
01364 void do_immtalk (CHAR_DATA * ch, char *argument)
01365 {
01366 DESCRIPTOR_DATA *d;
01367
01368 if (IS_SET(ch->comm, COMM_NOCHANNELS))
01369 {
01370 send_to_char("The Gods have revoked your channel privliages.",ch);
01371 return;
01372 }
01373
01374 if (argument[0] == '\0')
01375 {
01376 if (IS_SET (ch->comm, COMM_NOWIZ))
01377 {
01378 send_to_char ("Immortal channel is now ON\n\r", ch);
01379 REMOVE_BIT (ch->comm, COMM_NOWIZ);
01380 }
01381 else
01382 {
01383 send_to_char ("Immortal channel is now OFF\n\r", ch);
01384 SET_BIT (ch->comm, COMM_NOWIZ);
01385 }
01386 return;
01387 }
01388
01389 REMOVE_BIT (ch->comm, COMM_NOWIZ);
01390
01391 act_new ("{y[{C$n{y]{x: {y$t{x", ch, argument, NULL, TO_CHAR, POS_DEAD);
01392 for (d = descriptor_list; d != NULL; d = d->next)
01393 {
01394 if (d->connected == CON_PLAYING &&
01395 IS_IMMORTAL (d->character) &&
01396 !IS_SET (d->character->comm, COMM_NOWIZ))
01397 {
01398 act_new ("{y[{C$n{y]{x:{y $t{x", ch, argument, d->character, TO_VICT,
01399 POS_DEAD);
01400 }
01401 }
01402
01403 return;
01404 }
01405
01406 void do_btell (CHAR_DATA *ch, char *argument)
01407 {
01408 if (IS_SET(ch->chann, CHAN_NOBEEP))
01409 {
01410 send_to_char("For now on, your tells will beep.\n\r",ch);
01411 REMOVE_BIT (ch->chann, CHAN_NOBEEP);
01412 return;
01413 }
01414 if (!IS_SET(ch->chann, CHAN_NOBEEP))
01415 {
01416 send_to_char("For now on, your tells will not beep.\n\r",ch);
01417 SET_BIT(ch->chann, CHAN_NOBEEP);
01418 return;
01419 }
01420
01421 return;
01422 }
01423
01424
01425
01426
01427
01428
01429
01430
01431
01432
01433
01434
01435 void do_dsay (CHAR_DATA * ch, char *argument)
01436
01437 {
01438 CHAR_DATA *victim;
01439 char buf[MAX_STRING_LENGTH];
01440 char arg[MAX_INPUT_LENGTH];
01441 argument = one_argument (argument, arg);
01442 CHAR_DATA *to;
01443 if (arg[0]== '\0' || argument[0] == '\0')
01444 {
01445 send_to_char("What would you like to say, and to whom?.\n\r",ch);
01446 return;
01447 }
01448 if ((victim = get_char_room(ch, arg)) == NULL)
01449 {
01450 send_to_char("They arn't here.\n\r",ch);
01451 return;
01452 }
01453 sprintf(buf, "{x%s says (to You) '{g%s{x'\n\r", IS_NPC(ch) ? ch->short_descr : ch->name, argument);
01454 send_to_char(buf,victim);
01455 if (IS_NPC(victim))
01456 {
01457 sprintf(buf, "{xYou say (to %s) '{g%s{x'\n\r", victim->short_descr, argument);
01458 }
01459 else
01460 {
01461 sprintf(buf, "{xYou say (to %s) '{g%s{x'\n\r", victim->name, argument);
01462 }
01463 send_to_char(buf,ch);
01464 for (to=ch->in_room->people ; to != NULL; to = to->next_in_room )
01465 {
01466 if (to != ch && to != victim && to->position != POS_SLEEPING)
01467 {
01468 if (IS_NPC(victim))
01469 {
01470 sprintf(buf, "{x%s says (to %s) '{g%s{x'\n\r",IS_NPC(ch) ? ch->short_descr : ch->name,
01471 victim->short_descr, argument);
01472 }
01473 else
01474 {
01475 sprintf(buf, "{x%s says (to %s) '{g%s{x'\n\r",IS_NPC(ch) ? ch->short_descr : ch->name,
01476 victim->name, argument);
01477 }
01478 send_to_char(buf,to);
01479 }
01480 }
01481 return;
01482 }
01483
01484
01485
01486 void do_whisper (CHAR_DATA * ch, char *argument)
01487 {
01488 if(argument[0] == '\0')
01489 {
01490 send_to_char ("What would you like to whisper?\n\r", ch);
01491 return;
01492 }
01493 act("{x$n whispers, '{c$T{x'", ch, NULL, argument, TO_ROOM);
01494 act("You whisper, '{c$T{x'",ch, NULL, argument, TO_CHAR);
01495
01496 if (!IS_NPC(ch))
01497 {
01498 CHAR_DATA *mob, *mob_next;
01499 for (mob = ch->in_room->people; mob != NULL; mob = mob_next)
01500 {
01501 mob_next = mob->next_in_room;
01502
01503
01504
01505 if (IS_NPC(mob) && HAS_TRIGGER (mob, TRIG_SPEECH) && mob->position ==mob->pIndexData->default_pos)
01506 mp_act_trigger (argument, mob,ch, NULL,NULL,TRIG_SPEECH);
01507 }
01508 }
01509 return;
01510 }
01511
01512
01513
01514 void do_say (CHAR_DATA * ch, char *argument)
01515 {
01516 if (!IS_NPC(ch) && IS_SET(ch->comm, COMM_NOCHANNELS))
01517 {
01518 send_to_char("You may not speak!\n\r",ch);
01519 return;
01520 }
01521
01522 if (argument[0] == '\0')
01523 {
01524 send_to_char ("Say what?\n\r", ch);
01525 return;
01526 }
01527
01528 act ("{x$n says '{g$T{x'{x", ch, NULL, argument, TO_ROOM);
01529 act ("{xYou say '{g$T{x'{x", ch, NULL, argument, TO_CHAR);
01530
01531 if (!IS_NPC (ch))
01532 {
01533 CHAR_DATA *mob, *mob_next;
01534 for (mob = ch->in_room->people; mob != NULL; mob = mob_next)
01535 {
01536 mob_next = mob->next_in_room;
01537 if (IS_NPC (mob) && HAS_TRIGGER (mob, TRIG_SPEECH)
01538 && mob->position == mob->pIndexData->default_pos)
01539 mp_act_trigger (argument, mob, ch, NULL, NULL, TRIG_SPEECH);
01540 }
01541 }
01542 return;
01543 }
01544
01545
01546
01547 void do_shout (CHAR_DATA * ch, char *argument)
01548 {
01549 DESCRIPTOR_DATA *d;
01550
01551 if (argument[0] == '\0')
01552 {
01553 if (IS_SET (ch->comm, COMM_SHOUTSOFF))
01554 {
01555 send_to_char ("You can hear shouts again.\n\r", ch);
01556 REMOVE_BIT (ch->comm