act_comm.c
sd-2.0.2b/src/act_comm.c · 177.2 KB
From the archive sd-2.0.2b.tar.bz2
Download the archive « Back to the archive contents
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik Stærfeldt, Tom Madsen, and Katja Nyboe. *
* *
* Merc Diku Mud improvements copyright (C) 1992, 1993 by Michael *
* Chastain, Michael Quan, and Mitchell Tse. *
* *
* ROM 2.4 is copyright 1993-1995 Russ Taylor *
* ROM has been brought to you by the ROM consortium *
* Russ Taylor (rtaylor@pacinfo.com) *
* Gabrielle Taylor (gtaylor@pacinfo.com) *
* Brian Moore (rom@rom.efn.org) *
* ROT 2.0 is copyright 1996-1999 by Russ Walsh *
* DRM 1.0a is copyright 2000-2002 by Joshua Chance Blackwell *
* SD 2.0 is copyright 2004-2006 by Patrick Mylund Nielsen *
***************************************************************************/
#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#include <sys/time.h>
#endif
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include "sd.h"
#include "recycle.h"
#include "tables.h"
#include "db.h"
#include "olc.h"
CH_CMD ( do_clear )
{
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
send_to_char ( "\n\r\n\r\n\r\n\r\n\r\n\r", ch );
}
/* RT code to delete yourself */
CH_CMD ( do_delet )
{
send_to_char ( "You must type the full command to delete yourself.\n\r",
ch );
}
CH_CMD ( do_delete )
{
char strsave[MAX_INPUT_LENGTH];
if ( IS_NPC ( ch ) )
return;
if ( IS_IMMORTAL ( ch ) )
{
send_to_char ( "You are immortal! You cannot delete!\n\rIf you wish to be relieved from duty, talk to Rhaelar.\n\r", ch );
return;
}
if ( IS_SET ( ch->act2, PLR2_PKVIOLENT ) )
{
send_to_char ( "You cannot delete while you are still {Rviolent{x!\n\r", ch );
return;
}
if ( ch->pcdata->confirm_delete )
{
if ( argument[0] != '\0' )
{
send_to_char ( "Delete status removed.\n\r", ch );
ch->pcdata->confirm_delete = FALSE;
return;
}
else
{
/* if ( is_clead ( ch ) )
update_clanlist ( ch, ch->clead, FALSE, TRUE );
if ( is_clan ( ch ) )
update_clanlist ( ch, ch->clan, FALSE, FALSE ); */
/* backup_char_obj ( ch ); */
do_remove ( ch, "all" );
do_drop ( ch, "all" );
do_sacrifice ( ch, "all.newbie" );
do_announce ( ch, "{Dhas {Rdeleted{D.{x\n\r" );
send_to_char ( "{DTired of this thing called {RL{ri{Rf{re{D?{x\n\r", ch );
send_to_char ( "{DYou bow down for the last time to pray to {MS{mina{D,{x\n\r", ch );
send_to_char ( "{DUnsheath your {Cd{cagge{Cr{D, and {Yt{yh{Yr{yu{Ys{yt{D it into your {Rh{rear{Rt{D.{x\n\r", ch );
send_to_char ( "{DYou begin to hear the voice of {rR{Dhaela{rr{D calling...{x\n\r", ch );
send_to_char ( "{D'{rDon't let the door hit you on the ass, {YLOSER{D!'{x\n\r\n\r", ch );
send_to_char ( "\n\r\n\r", ch );
send_to_char ( "{wIf you deleted for a specific reason, e.g. a player harrassing you\n\r", ch );
send_to_char ( "{wor something along those lines, please file a complaint to rhaelar@sdmud.com,\n\r", ch);
send_to_char ( "{wdescribing what made you delete, and what we can do to avoid other players\n\r", ch);
send_to_char ( "{wdeleting for the same reason in the future.\n\r\n\r", ch);
sprintf ( strsave, "%s%s", PLAYER_DIR, capitalize ( ch->name ) );
wiznet ( "$N turns $Mself into line noise.", ch, NULL, 0, 0, 0 );
stop_fighting ( ch, TRUE );
if ( ch->level > HERO )
{
update_anclist ( ch, 1 );
}
force_quit ( ch, "" );
unlink ( strsave );
return;
}
}
if ( argument[0] != '\0' )
{
send_to_char ( "Just type delete. No argument.\n\r", ch );
return;
}
send_to_char ( "Type delete again to confirm this command.\n\r", ch );
send_to_char ( "WARNING: this command is irreversible.\n\r", ch );
send_to_char
( "Typing delete with an argument will undo delete status.\n\r", ch );
ch->pcdata->confirm_delete = TRUE;
wiznet ( "$N is contemplating deletion.", ch, NULL, 0, 0,
get_trust ( ch ) );
}
CH_CMD ( do_rerol )
{
send_to_char ( "You must type the full command to reroll yourself.\n\r",
ch );
}
/*CH_CMD ( do_questforge )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char flag[3][MAX_INPUT_LENGTH];
int wc = 0, dt = 0, flags = 0, i;
OBJ_DATA *obj;
char buf[MAX_STRING_LENGTH];
char numstr[31];
AFFECT_DATA af;
argument = one_argument ( argument, arg1 );
argument = one_argument ( argument, arg2 );
argument = one_argument ( argument, flag[0] );
argument = one_argument ( argument, flag[1] );
argument = one_argument ( argument, flag[2] );
if ( IS_NPC ( ch ) )
{
send_to_char ( "You are an NPC. Go away.\n\r", ch );
return;
}
if ( ( ch->in_room == NULL ) || ( ch->in_room->vnum != 3398 ) )
{
send_to_char ( "Does this look like the journeymen guild?\n\r", ch );
return;
}
if ( arg1[0] == '\0' )
{
send_to_char
( "{cSyntax{D:{x qforge <weaponclass> <damagetype> <flag1> <flag2> <flag3>\n\r",
ch );
send_to_char
( " qforge wclass {D- {clist available weapon classes{x\n\r",
ch );
send_to_char
( " qforge dtype {D- {clist available damage types{x\n\r", ch );
send_to_char
( " qforge flags {D- {clist available weapon flags{x\n\r", ch );
return;
}
if ( !str_cmp ( arg1, "wclass" ) )
{
send_to_char ( "{cValid weapon classes are{D:{x\n\r", ch );
do_help ( ch, "wclass" );
return;
}
else if ( !str_cmp ( arg1, "dtype" ) )
{
send_to_char ( "{cValid damage types are{D:{x\n\r", ch );
do_help ( ch, "wdam" );;
return;
}
else if ( !str_cmp ( arg1, "flags" ) )
{
send_to_char ( "{cValid weapon flags are{D:{x\n\r", ch );
do_help ( ch, "wtype" );
return;
}
else if ( arg2[0] == '\0' || flag[0][0] == '\0' || flag[1][0] == '\0' ||
flag[2][0] == '\0' )
{
do_questforge ( ch, "" );
return;
}
if ( ch->qps - 200 < 0 )
{
send_to_char
( "Forging a weapon costs 200 immquest points. You don't have enough.\n\r",
ch );
return;
}
if ( ( weapon_lookup ( arg1 ) == -1 ) && str_cmp ( arg1, "exotic" ) )
{
send_to_char
( "This weapon class is not available. Valid classes are:\n\r",
ch );
do_help ( ch, "wclass" );
return;
}
wc = weapon_type ( arg1 );
if ( ( ( dt = attack_lookup ( arg2 ) ) == 0 ) ||
( ( dt >= 40 ) && ( dt <= 60 ) ) )
{
send_to_char
( "This damage type is not available. Valid types are:\n\r", ch );
do_help ( ch, "wdam" );
return;
}
for ( i = 0; i < 3; i++ )
{
switch ( i )
{
case 0:
sprintf ( numstr, "first" );
break;
case 1:
sprintf ( numstr, "second" );
break;
case 2:
sprintf ( numstr, "third" );
break;
}
if ( flag_value ( weapon_type2, flag[i] ) == NO_FLAG )
{
sprintf ( buf,
"The %s flag you have specified is not available. Valid flags are:\n\r",
numstr );
send_to_char ( buf, ch );
af.bitvector = 0;
af.location = APPLY_HITROLL;
af.modifier = ch->level / 5;
affect_to_obj ( obj, &af );
af.location = APPLY_DAMROLL;
af.modifier = ch->level / 5;
affect_to_obj ( obj, &af );
af.location = APPLY_HIT;
af.modifier = ch->level;
affect_to_obj ( obj, &af );
af.location = APPLY_MANA;
af.modifier = ch->level;
affect_to_obj ( obj, &af );
af.location = APPLY_MOVE;
af.modifier = ch->level;
affect_to_obj ( obj, &af );
af.location = APPLY_SAVES;
af.modifier = ch->level / 8;
affect_to_obj ( obj, &af );
obj_to_char ( obj, ch );
act ( "$n forges $p.", ch, obj, NULL, TO_ROOM );
act ( "You forge $p.", ch, obj, NULL, TO_CHAR );
send_to_char ( "200 immquest points have been deducted.\n\r", ch );
//printf_log("%s forges a %s (%s/%s) at %d.",
//ch->name,weapon_class[wc].name,attack_table[dt].name,
//flag_string(weapon_type2,flags),ch->in_room->vnum);
return;
}
*/
CH_CMD ( do_reform )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
int amount;
argument = one_argument ( argument, arg1 );
argument = one_argument ( argument, arg2 );
if ( arg1[0] == '\0' || arg2[0] == '\0' )
{
send_to_char ( "\n\rSyntax:\n\r", ch );
send_to_char ( "reform <type> <amount>\n\r", ch );
send_to_char ( "\n\rtypes - AQP IQP\n\r", ch );
return;
}
amount = is_number ( arg2 ) ? atol ( arg2 ) : -1;
if ( !str_prefix ( arg1, "AQP" ) )
{
if ( IS_NPC ( ch ) )
{
printf_to_char ( ch, "Mobs have no need to do that" );
return;
}
if ( amount > ch->pcdata->questpoints )
{
printf_to_char ( ch,
"\n\rHow can you reform %d AQP when you only have %ld?",
amount, ch->pcdata->questpoints );
return;
}
if ( amount < 0 )
{
printf_to_char ( ch, "\n\rOnly positive amounts allowed...\n\r" );
return;
}
if ( amount % 20 == 0 )
{
ch->pcdata->questpoints -= amount;
ch->qps += amount / 20;
printf_to_char ( ch,
"\n\rYou reform %d AQP. You gained %d, and now have a total of %d IQP.\n\r",
amount, (amount / 20), ch->qps );
return;
}
else
{
printf_to_char ( ch,
"\n\rAmount {WMUST{x be divisible by 20\n\r" );
return;
}
}
if ( !str_prefix ( arg1, "IQP" ) )
{
if ( IS_NPC ( ch ) )
{
printf_to_char ( ch, "Mobs have no need to do that" );
return;
}
if ( amount < 0 || amount > 200 )
{
send_to_char
( "\n\rYou can only reform up to 200 iqp at a time.\n\r",
ch );
return;
}
if ( amount > ch->qps )
{
printf_to_char ( ch,
"\n\rHow can you reform %d IQP when you only have %ld?\n\r",
amount, ch->pcdata->questpoints );
return;
}
if ( amount < 0 )
{
printf_to_char ( ch, "\n\rOnly positive amounts allowed...\n\r" );
return;
}
ch->qps -= amount;
ch->pcdata->questpoints += amount * 20;
printf_to_char ( ch,
"\n\rYou reform %d IQP. Your now have %ld AQP.\n\r",
amount, ch->pcdata->questpoints );
return;
}
do_reform ( ch, "" );
return;
}
struct tier_type
{
int num;
long bit;
};
const struct tier_type tier_table[] = {
{1, TIER_01},
{2, TIER_02},
{3, TIER_03},
{4, TIER_04},
{0, 0}
};
CH_CMD ( do_reroll )
{
if ( reboot_countdown > 0 && reboot_countdown < 11 )
{
send_to_char
( "Sorry, the mud is getting ready for a reboot.\n\rPlease try again later.\n\r",
ch );
return;
}
if ( ch->pcdata->rerolltimer > 0 )
{
printf_to_char ( ch, "You cannot reroll so soon after your last reroll. There are %d minutes left until you can reroll.\n\r", ch->pcdata->rerolltimer );
return;
}
DESCRIPTOR_DATA *d;
char /*strsave[MAX_INPUT_LENGTH], */buf[MAX_STRING_LENGTH];
char player_psswd[MAX_STRING_LENGTH], player_title[MAX_STRING_LENGTH];
char player_name[MAX_INPUT_LENGTH], player_prmpt[MAX_INPUT_LENGTH];
char player_cname[MAX_INPUT_LENGTH], player_spouse[MAX_INPUT_LENGTH];
char player_namereroll[MAX_INPUT_LENGTH];
//char *player_whostring;
int player_plat, player_gold, player_slvr, player_tier, player_comm, player_played;
int player_iqp, player_aqp, player_clan, player_clan_rank, player_clead, player_balance;
int player_pkkills, player_pkdeaths, player_awins, player_alosses, iClass, iSecv, wNet;
int ctier, player_trust, player_twins, player_tkills, player_tdeaths, player_times_rerolled;
int player_mkill, player_mdeath, player_shares, player_exiletime, player_noclantime;
long player_stances[11];
bool is_helper = FALSE;
int i;
/*
player_last_note;
int player_last_idea, player_last_penalty, player_last_news, player_last_changes;
int player_last_weddings, player_last_jokes, player_times_rerolled; */
bool wasHero = FALSE;
if ( IS_NPC ( ch ) || ( d = ch->desc ) == NULL )
return;
if ( IS_IMMORTAL ( ch ) )
{
send_to_char ( "You are immortal! You cannot reroll!\n\rIf you wish to be relieved from duty, talk to Rhaelar.\n\r", ch );
return;
}
if ( ch->level < LEVEL_HERO && !IS_SET ( ch->act, PLR_REROLL ) )
{
sprintf ( buf,
"You must be level %d or already have rerolled to reroll.\n\r",
LEVEL_HERO );
send_to_char ( buf, ch );
return;
}
if ( ch->level >= LEVEL_HERO )
wasHero = TRUE;
iClass = ch->class;
if ( ch->pcdata->confirm_reroll )
{
if ( argument[0] == '\0' )
{
send_to_char ( "Reroll status removed.\n\r", ch );
ch->pcdata->confirm_reroll = FALSE;
return;
}
else
{
if ( !is_number ( argument ) )
{
send_to_char ( "Reroll status removed.\n\r", ch );
ch->pcdata->confirm_reroll = FALSE;
return;
}
/* Make sure ctier is not greater or less than number tiers in tier_table */
else if ( ( ctier = atoi ( argument ) ) <= 0 || ctier > 4 )
{
send_to_char
( "That is not a valid tier. Please type REROLL <tier>.\n\r",
ch );
return;
}
if ( !IS_SET ( ch->pcdata->tier, tier_table[ctier - 1].bit ) )
{
send_to_char
( "That tier is not available to you.\n\rReroll status removed.\n\r",
ch );
ch->pcdata->confirm_reroll = FALSE;
return;
}
/* do_backup ( ch, NULL ); */
rerolls_today++;
backup_char_obj ( ch );
save_char_obj ( ch );
/* if ( is_clead ( ch ) )
update_clanlist ( ch, ch->clead, FALSE, TRUE );
if ( is_clan ( ch ) )
update_clanlist ( ch, ch->clan, FALSE, FALSE ); */
if ( ch->level > HERO )
update_anclist ( ch, 1 );
/*
* Send a nice informational message.
*/
//sprintf ( strsave, "%s%s", PLAYER_DIR, capitalize ( ch->name ) );
stop_fighting ( ch, TRUE );
send_to_char
( "{RYou have chosen to reroll. You will now be dropped in at the\n\r",
ch );
send_to_char
( "race selection section of character creation, and will be allowed\n\r",
ch );
send_to_char
( "to choose from a wider selection of races and classes.\n\r\n\r",
ch );
send_to_char ( "\n\r{R[{WHit Enter to Continue{R]{x\n\r", ch );
sprintf ( player_name, "%s", capitalize ( ch->name ) );
sprintf ( player_namereroll, "%scock", capitalize ( ch->name ) );
sprintf ( player_cname, "%s", ch->pcdata->cname );
sprintf ( player_spouse, "%s", ch->pcdata->spouse );
sprintf ( player_psswd, "%s", ch->pcdata->pwd );
sprintf ( player_title, "%s", ch->pcdata->title );
sprintf ( player_prmpt, "%s", ch->prompt );
/* if ( ch->pcdata->who_descr[0] != '\0' )
sprintf ( player_whostring, "%s", ch->pcdata->who_descr ); */
player_iqp = ch->qps;
player_aqp = ch->pcdata->questpoints;
player_clan = ch->clan;
player_clan_rank = ch->clan_rank;
player_clead = ch->clead;
player_balance = ch->pcdata->balance;
wNet = ch->wiznet;
iSecv = ch->pcdata->security;
player_tier = ch->pcdata->tier;
player_comm = ch->comm;
player_trust = get_trust ( ch );
player_plat = ch->platinum != 0 ? 1 : 0;
player_gold = ch->gold <= 25 ? ch->gold : 25;
player_slvr = ch->silver != 0 ? ch->silver : 0;
player_played = ( ch->played + ( int ) ( current_time - ch->logon ) );
player_pkkills = ch->pcdata->pkkills;
player_pkdeaths = ch->pcdata->pkdeaths;
player_awins = ch->pcdata->awins;
player_alosses = ch->pcdata->alosses;
player_twins = ch->pcdata->twins;
player_tkills = ch->pcdata->tkills;
player_tdeaths = ch->pcdata->tdeaths;
/*
player_last_note = ch->pcdata->last_note;
player_last_idea = ch->pcdata->last_idea;
player_last_penalty = ch->pcdata->last_penalty;
player_last_news = ch->pcdata->last_news;
player_last_changes = ch->pcdata->last_changes;
player_last_weddings = ch->pcdata->last_weddings;
player_last_jokes = ch->pcdata->last_jokes;
*/
player_times_rerolled = ch->pcdata->times_rerolled;
player_mkill = ch->pcdata->mkill;
player_mdeath = ch->pcdata->mdeath;
player_shares = ch->pcdata->shares;
player_exiletime = ch->pcdata->exiletime;
player_noclantime = ch->pcdata->noclantime;
if ( IS_SET ( ch->act2, PLR2_HELPER ) )
is_helper = TRUE;
/*
for (i=0; i < 11; i++)
ch->stance[i] = player_stances[i];
*/
for (i=0; i < 11; i++)
player_stances[i] = ch->stance[i];
do_announce ( ch, "{Dhas just begun {Grerolling{D.{x" );
/*
* "After extract_char the ch is no longer valid!"
*/
/* Free note that might be there somehow */
if (ch->pcdata->in_progress)
free_note (ch->pcdata->in_progress);
extract_char ( ch, TRUE );
//unlink ( strsave );
/*
* Delete the pfile, but don't boot the character.
* Instead, do a load_char_obj to get a new ch,
* saving the password, and some variables. Then,
* set the PLR_REROLL bit and drop the player in at
* CON_BEGIN_REROLL.
*
* This fine lil' piece of code no longer deletes
* the pfile. It was never necessary. Rhaelar 01'2005
*/
load_char_obj ( d, player_namereroll );
/*
* Lets reset some critical things - Rhaelar 01'2005
* Don't need this anymore cause load_char_obj loads a
* completely clean new pfile. No memory remains.
*/
/*d->character->level = 0;
d->character->pet = NULL;
d->character->affected = NULL;
d->character->carrying = NULL;
d->character->carry_weight = 0;
d->character->carry_number = 0;
d->character->gen_data = NULL;
bzero ( d->character->pcdata->learned, MAX_SKILL );
bzero ( d->character->pcdata->group_known, MAX_GROUP );
d->character->pcdata->points = 0; */
/* Reset over - Now for transitioning... */
d->character->gold = player_gold;
d->character->silver = player_slvr;
d->character->platinum = player_plat;
d->character->prompt = str_dup ( player_prmpt );
d->character->pcdata->pwd = str_dup ( player_psswd );
d->character->pcdata->title = str_dup ( player_title );
d->character->pcdata->socket = str_dup ( d->host );
d->character->name = str_dup ( player_name );
d->character->pcdata->cname = str_dup ( player_cname );
d->character->pcdata->spouse = str_dup ( player_spouse );
// d->character->pcdata->who_descr = str_dup ( player_whostring );
d->character->pcdata->tier = player_tier;
d->character->comm = player_comm;
d->character->trust = player_trust;
d->character->pcdata->security = iSecv;
d->character->wiznet = wNet;
d->character->qps = player_iqp;
d->character->pcdata->questpoints = player_aqp;
d->character->clan = player_clan;
d->character->clan_rank = player_clan_rank;
d->character->clead = player_clead;
d->character->pcdata->balance = player_balance;
d->character->pcdata->pkkills = player_pkkills;
d->character->pcdata->pkdeaths = player_pkdeaths;
d->character->pcdata->awins = player_awins;
d->character->pcdata->alosses = player_alosses;
d->character->pcdata->twins = player_twins;
d->character->pcdata->tkills = player_tkills;
d->character->pcdata->tdeaths = player_tdeaths;
d->character->played = player_played;
/*
d->character->pcdata->last_note = player_last_note;
d->character->pcdata->last_idea = player_last_idea;
d->character->pcdata->last_penalty = player_last_penalty;
d->character->pcdata->last_news = player_last_news;
d->character->pcdata->last_changes = player_last_changes;
d->character->pcdata->last_weddings = player_last_weddings;
d->character->pcdata->last_jokes = player_last_jokes;
*/
d->character->pcdata->times_rerolled = player_times_rerolled + 1;
d->character->pcdata->mkill = player_mkill;
d->character->pcdata->mdeath = player_mdeath;
d->character->pcdata->shares = player_shares;
d->character->pcdata->rerolltimer = 10;
d->character->pcdata->exiletime = player_exiletime;
d->character->pcdata->noclantime = player_noclantime;
if ( is_helper )
SET_BIT ( ch->act2, PLR2_HELPER );
// wiznet ( "$N has rerolled.", d->character, NULL, 0, 0, 0 );
for (i=0; i < 11; i++)
ch->stance[i] = player_stances[i];
SET_BIT ( d->character->pcdata->ctier,
tier_table[ctier - 1].bit );
SET_BIT ( d->character->act, PLR_REROLL );
ch->pcdata->confirm_reroll = FALSE;
d->connected = CON_BEGIN_REROLL;
return;
}
}
if ( argument[0] != '\0' )
{
send_to_char
( "To set reroll status type REROLL with no arguments.\n\r", ch );
send_to_char ( "Proper syntax will be show at that time.\n\r", ch );
return;
}
/* NOTE: these next two statements needed as a catch-all *
* to prevent the need of a pwipe, -- Seronis *
******************************************************* */
SET_BIT ( d->character->pcdata->tier, TIER_01 );
SET_BIT ( d->character->pcdata->tier, class_table[iClass].tier );
if ( wasHero )
SET_BIT ( d->character->pcdata->tier, class_table[iClass].tier_next );
send_to_char ( "Reroll status confirmed. This command is NOT \n\r", ch );
send_to_char ( "reversable. Type REROLL with no arguments to \n\r", ch );
send_to_char ( "remove reroll status. \n\r\n\r", ch );
send_to_char ( "Syntax: REROLL <tier> \n\r", ch );
send_to_char ( "You are allowed to select from the following\n\r", ch );
send_to_char ( "Tiers: ", ch );
if ( IS_SET ( ch->pcdata->tier, TIER_01 ) )
send_to_char ( "1 ", ch );
if ( IS_SET ( ch->pcdata->tier, TIER_02 ) )
send_to_char ( "2 ", ch );
if ( IS_SET ( ch->pcdata->tier, TIER_03 ) )
send_to_char ( "3 ", ch );
if ( IS_SET ( ch->pcdata->tier, TIER_04 ) )
send_to_char ( "4 ", ch );
send_to_char ( "\n\r", ch );
ch->pcdata->confirm_reroll = TRUE;
wiznet ( "$N is contemplating rerolling.", ch, NULL, 0, 0,
get_trust ( ch ) );
}
CH_CMD ( do_ancient )
{
if ( ch->level < LEVEL_HERO )
{
printf_to_char ( ch,
"{xYou must be level %d to become an Ancient.\n\r",
LEVEL_HERO );
return;
}
if ( ch->level == 202 )
{
send_to_char ( "You are already an Ancient.\n\r", ch );
return;
}
if ( IS_NPC ( ch ) )
{
send_to_char ( "Mobs can't become Ancients!\n\r", ch );
return;
}
if ( IS_IMMORTAL ( ch ) )
{
send_to_char ( "Immortals have no need to become Ancients!\n\r", ch );
return;
}
/* if ( !IS_SET ( class_table[ch->class].tier, TIER_04 ) )
{
send_to_char ( "{xYou must be tier 4 to become an Ancient.\n\r", ch );
return;
} */
if ( ch->pcdata->questpoints < 10000 )
{
send_to_char
( "You must have 10,000 autoquest points to become an Ancient.\n\r",
ch );
return;
}
if ( ch->qps < 5 )
{
send_to_char
( "You must have 5 immquest points to become an Ancient.\n\r",
ch );
return;
}
if ( ch->platinum < 1000 )
{
send_to_char
( "You must be carrying 1000 platinum to become an Ancient.\n\r",
ch );
return;
}
send_to_char
( "{RCongratulations! You have become an {YA{yn{Yc{yi{Ye{yn{Yt{R!!!{x\n\r",
ch );
do_announce ( ch, "has just become an {YA{yn{Yc{yi{Ye{yn{Yt{x!!!\n\r" );
ch->level += 1;
ch->pcdata->questpoints -= 10000;
ch->qps -= 5;
ch->platinum -= 1000;
ch->max_hit += 10000;
ch->max_mana += 10000;
ch->max_move += 10000;
ch->pcdata->perm_hit += 10000;
ch->pcdata->perm_mana += 10000;
ch->pcdata->perm_move += 10000;
ch->hit = ch->max_hit;
ch->mana = ch->max_mana;
ch->move = ch->max_move;
/* do_backup ( ch, NULL ); */
update_anclist ( ch, ch->level );
backup_char_obj ( ch );
save_char_obj ( ch );
return;
}
/* show suppression settings - Gregor Stipicic aka Fade, 2001 */
CH_CMD ( do_verbose )
{
#define VER_OO(ch,flag) (!IS_SET((ch)->pcdata->verbose,(flag))?" {y({YON{y){x":"{b({BOFF{b){x")
char arg[MAX_INPUT_LENGTH];
argument = one_argument ( argument, arg );
if ( IS_NPC ( ch ) )
return;
if ( arg[0] == '\0' )
{
send_to_char ( "{CV{cerbose{x settings{D:\n\r", ch );
printf_to_char ( ch,
"{CW{ceapon flags{D : %s\n\r{CD{codge/etc. {D : %s{x\n\r",
VER_OO ( ch, VERBOSE_FLAGS ), VER_OO ( ch,
VERBOSE_DODGE ) );
printf_to_char ( ch, "{CO{cbject effects{D: %s{x\n\r",
VER_OO ( ch, VERBOSE_BURN ) );
printf_to_char ( ch,
"{cShields are %scompressed into one line.{x\n\r",
IS_SET ( ch->pcdata->verbose,
VERBOSE_SHIELD ) ? "" : "not " );
return;
}
if ( !str_prefix ( arg, "weapon" ) )
{
if ( IS_SET ( ch->pcdata->verbose, VERBOSE_FLAGS ) )
{
REMOVE_BIT ( ch->pcdata->verbose, VERBOSE_FLAGS );
send_to_char ( "{cWeapon flags are no longer suppressed.{x\n\r",
ch );
}
else
{
SET_BIT ( ch->pcdata->verbose, VERBOSE_FLAGS );
send_to_char ( "{cWeapon flags are suppressed now.{x\n\r", ch );
}
return;
}
if ( !str_prefix ( arg, "dodge" ) )
{
if ( IS_SET ( ch->pcdata->verbose, VERBOSE_DODGE ) )
{
REMOVE_BIT ( ch->pcdata->verbose, VERBOSE_DODGE );
send_to_char
( "{cDodges, parries, and shield blocks are no longer suppressed.{x\n\r",
ch );
}
else
{
SET_BIT ( ch->pcdata->verbose, VERBOSE_DODGE );
send_to_char
( "{cDodges, parries, and shield blocks are suppressed now.{x\n\r",
ch );
}
return;
}
if ( !str_prefix ( arg, "object" ) )
{
if ( IS_SET ( ch->pcdata->verbose, VERBOSE_BURN ) )
{
REMOVE_BIT ( ch->pcdata->verbose, VERBOSE_BURN );
send_to_char
( "{cObject effects (burning potions, etc.) are no longer suppressed.{x\n\r",
ch );
}
else
{
SET_BIT ( ch->pcdata->verbose, VERBOSE_BURN );
send_to_char
( "{cObject effects (burning potions, etc.) are suppressed now.{x\n\r",
ch );
}
return;
}
if ( !str_prefix ( arg, "shields" ) )
{
if ( IS_SET ( ch->pcdata->verbose, VERBOSE_SHIELD ) )
{
REMOVE_BIT ( ch->pcdata->verbose, VERBOSE_SHIELD );
SET_BIT ( ch->pcdata->verbose, VERBOSE_SHIELD_COMP );
send_to_char
( "{cShields are no longer compressed into one line.{x\n\r",
ch );
}
else
{
SET_BIT ( ch->pcdata->verbose, VERBOSE_SHIELD );
REMOVE_BIT ( ch->pcdata->verbose, VERBOSE_SHIELD_COMP );
send_to_char
( "{cShields are compressed into one line now.{x\n\r", ch );
}
return;
}
send_to_char
( "{cSyntax{D: {CVerbose {cweapon{D/{cflags{D/{cdodge{D/{cobject{D/{cshields{x\n\r",
ch );
return;
}
/* RT code to display channel status */
CH_CMD ( do_channels )
{
char buf[MAX_STRING_LENGTH];
/* lists all channels and their status */
send_to_char ( "\n\r{WChannel{x {RStatus{x\n\r", ch );
send_to_char ( "{x-------{D---------{W=========={D-------{x---------\n\r",
ch );
send_to_char ( "{WIC{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOGOSSIP ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WOOC{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOOOC ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WCURSE {x", ch );
if ( !IS_SET ( ch->comm, COMM_CURSE ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WRace Talk {x", ch );
if ( !IS_SET ( ch->comm, COMM_NORACE ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WSocial{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOSOCIAL ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WAnnounce {x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOANNOUNCE ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WClan Gossip{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOCGOSSIP ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WQuest Gossip{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOCGOSSIP ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
/*
send_to_char("ooc ",ch);
if (!IS_SET(ch->comm,COMM_NOOOC))
send_to_char("ON\n\r",ch);
else
send_to_char("OFF\n\r",ch);
*/
send_to_char ( "{WMusic{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOMUSIC ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WAuction{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOAUCTION ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WQ/A {x", ch );
if ( !IS_SET ( ch->comm, COMM_NOASK ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WQuote {x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOQUOTE ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WGrats{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOGRATS ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
/*
send_to_char ( "{WCheers{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOCHEER ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
*/
send_to_char ( "{WHints{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOHINT ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
if ( IS_IMMORTAL ( ch ) )
{
send_to_char ( "{WImmchat{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOWIZ ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
}
send_to_char ( "{WShouts{x ", ch );
if ( !IS_SET ( ch->comm, COMM_NOSHOUT ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WTells{x ", ch );
if ( !IS_SET ( ch->comm, COMM_DEAF ) )
send_to_char ( "{YON{x\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r", ch );
send_to_char ( "{WQuiet Mode{x ", ch );
if ( IS_SET ( ch->comm, COMM_QUIET ) )
send_to_char ( "{YON{x\n\r\n\r", ch );
else
send_to_char ( "{yOFF{x\n\r\n\r", ch );
send_to_char ( "{x-------{D---------{W=========={D-------{x---------\n\r",
ch );
if ( IS_SET ( ch->comm, COMM_AFK ) )
send_to_char ( "{WYou are {RAFK{W.{x\n\r", ch );
if ( IS_SET ( ch->comm, COMM_STORE ) )
send_to_char ( "{WYou store tells during fights.{x\n\r", ch );
/*
if ( IS_SET ( ch->comm, COMM_SNOOP_PROOF ) )
send_to_char ( "{WYou are immune to snooping.{x\n\r", ch );
*/
if ( ch->lines != PAGELEN )
{
if ( ch->lines )
{
sprintf ( buf, "{WYou display{Y %d{W lines of scroll.{x\n\r",
ch->lines + 2 );
send_to_char ( buf, ch );
}
else
send_to_char ( "{WScroll buffering is off.{x\n\r", ch );
}
if ( ch->prompt != NULL )
{
sprintf ( buf, "{WYour current prompt is:{x %s{x\n\r", ch->prompt );
send_to_char ( buf, ch );
}
if ( IS_SET ( ch->comm, COMM_NOSHOUT ) )
send_to_char ( "{WYou cannot shout.{x\n\r", ch );
if ( IS_SET ( ch->comm, COMM_NOTELL ) )
send_to_char ( "{WYou cannot use tell.{x\n\r", ch );
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
send_to_char ( "{WYou cannot use channels.{x\n\r", ch );
if ( IS_SET ( ch->comm, COMM_NOEMOTE ) )
send_to_char ( "{WYou cannot show emotions.{x\n\r", ch );
}
/* RT deaf blocks out all shouts */
CH_CMD ( do_deaf )
{
if ( IS_SET ( ch->comm, COMM_DEAF ) )
{
send_to_char ( "You can now hear tells again.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_DEAF );
}
else
{
send_to_char ( "From now on, you won't hear tells.\n\r", ch );
SET_BIT ( ch->comm, COMM_DEAF );
}
}
/*
CH_CMD ( do_cheers )
{
if ( IS_SET ( ch->comm, COMM_NOCHEER ) )
{
send_to_char ( "You will now see announcements when people level again.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOCHEER );
}
else
{
send_to_char ( "From now on, you won't get announcements when people level.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOCHEER );
}
}
*/
/* RT quiet blocks out all communication */
CH_CMD ( do_quiet )
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "Quiet mode removed.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_QUIET );
}
else
{
send_to_char ( "From now on, you will only hear says and emotes.\n\r",
ch );
SET_BIT ( ch->comm, COMM_QUIET );
}
}
/*
void do_afw ( CHAR_DATA *ch, char * argument)
{
char buf[MAX_STRING_LENGTH];
if (IS_SET(ch->comm,COMM_AFW))
{
if(ch->tells)
{
sprintf( buf, "AFW mode removed. You have {R%d{x tells waiting.\n\r", ch->tells );
send_to_char( buf, ch );
send_to_char("Type 'replay' to see tells.\n\r",ch);
}
else
{
send_to_char("AFW mode removed. You have no tells waiting.\n\r",ch);
}
REMOVE_BIT(ch->comm,COMM_AFW);
}
else
{
send_to_char("You are now in AFW mode.\n\r",ch);
SET_BIT(ch->comm,COMM_AFW);
}
}*/
/* afk command */
CH_CMD ( do_afk )
{
char buf[MAX_STRING_LENGTH];
if ( IS_SET ( ch->comm, COMM_AFK ) )
{
if ( ch->tells )
{
sprintf ( buf,
"AFK mode removed. You have {R%d{x tells waiting.\n\r",
ch->tells );
send_to_char ( buf, ch );
send_to_char ( "Type 'replay' to see tells.\n\r", ch );
}
else
{
send_to_char
( "AFK mode removed. You have no tells waiting.\n\r", ch );
}
REMOVE_BIT ( ch->comm, COMM_AFK );
}
else
{
send_to_char ( "You are now in AFK mode.\n\r", ch );
SET_BIT ( ch->comm, COMM_AFK );
}
}
CH_CMD ( do_autostore )
{
if ( IS_SET ( ch->comm, COMM_STORE ) )
{
send_to_char ( "You will no longer store tells during fights.\n\r",
ch );
REMOVE_BIT ( ch->comm, COMM_STORE );
}
else
{
send_to_char ( "You will now store tells during fights.\n\r", ch );
SET_BIT ( ch->comm, COMM_STORE );
}
}
CH_CMD ( do_replay )
{
if ( IS_NPC ( ch ) )
{
send_to_char ( "You can't replay.\n\r", ch );
return;
}
if ( buffer_string ( ch->pcdata->buffer )[0] == '\0' )
{
send_to_char ( "You have no tells to replay.\n\r", ch );
return;
}
page_to_char ( buffer_string ( ch->pcdata->buffer ), ch );
//clear_buf ( ch->pcdata->buffer );
buffer_clear ( ch->pcdata->buffer );
ch->tells = 0;
}
CH_CMD ( do_racetalk )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
if ( IS_NPC ( ch ) )
return;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NORACE ) )
{
send_to_char ( "Race channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NORACE );
}
else
{
send_to_char ( "Race channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NORACE );
}
}
else
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channels priviliges.\n\r", ch );
return;
}
/* if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r"
"restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
} */
REMOVE_BIT ( ch->comm, COMM_NORACE );
/*
if ( !IS_NPC ( ch ) && ch->pcdata->condition[COND_DRUNK] > 10 )
argument = makedrunk ( ch, argument );
*/
sprintf ( buf, "{W$n {c-{C={D%s{C={c-{x '{r$t{x'",
pc_race_table[ch->race].name );
act_new ( buf, ch, argument, NULL, TO_CHAR, POS_DEAD );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && victim != ch &&
victim->race == ch->race && !IS_NPC ( victim ) &&
!IS_SET ( victim->comm, COMM_NORACE ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
act_new ( buf, ch, argument, d->character, TO_VICT,
POS_SLEEPING );
}
}
}
}
CH_CMD ( do_curse )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_CURSE ) )
{
send_to_char ( "{DC{RU{DRSE{x channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_CURSE );
}
else
{
send_to_char ( "{DC{RU{DRSE{x channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_CURSE );
}
}
else /* flame message sent, turn gossip on if it isn't already */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges{x\n\r", ch );
return;
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
/* if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
} */
REMOVE_BIT ( ch->comm, COMM_CURSE );
/*
if ( !IS_NPC ( ch ) && ch->pcdata->condition[COND_DRUNK] > 10 )
argument = makedrunk ( ch, argument );
*/
sprintf ( buf, "{cYou {r-{R={DC{cu{DRSE{R={r- {x'{R%s{x'\n\r",
argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_CURSE ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "{x$n {r-{R={DC{cu{DRSE{R={r- {x'{R$t{x'", ch,
argument, d->character, TO_VICT, POS_SLEEPING );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
/* RT ooc rewritten in ROM style */
CH_CMD ( do_ooc )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOOOC ) )
{
send_to_char ( "Ooc and Chat channels are now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOOOC );
}
else
{
send_to_char ( "Ooc and Chat channels are now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOOOC );
}
}
else /* ooc message sent, turn ooc on if it is off */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
REMOVE_BIT ( ch->comm, COMM_NOOOC );
}
/* if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
} */
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
/*
if ( !IS_NPC ( ch ) && ch->pcdata->condition[COND_DRUNK] > 10 )
argument = makedrunk ( ch, argument );
*/
/* I want to use smash_colour here, but it overflows the buffer :( - Rhaelar 12'2004 */
sprintf ( buf, "{g-{G={xYou{G={g- {D({yOOC{D){x '{c%s{x'\n\r",
argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOOOC ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "{g-{G={x$n{G={g-{D ({yOOC{D){x '{c$t{x'", ch,
argument, d->character, TO_VICT, POS_DEAD );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
CH_CMD ( do_chat )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOOOC ) )
{
send_to_char ( "Ooc and Chat channels are now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOOOC );
}
else
{
send_to_char ( "Ooc and Chat channels are now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOOOC );
}
}
else /* ooc message sent, turn ooc on if it is off */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
REMOVE_BIT ( ch->comm, COMM_NOOOC );
}
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
sprintf ( buf, "{g-{G={wYou{G={g- {D({WChat{D){x '{c%s{x'\n\r",
argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOOOC ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "{g-{G={x$n{G={g-{D ({WChat{D){x '{c$t{x'", ch,
argument, d->character, TO_VICT, POS_DEAD );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
CH_CMD ( do_pray )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOPRAY ) )
{
send_to_char ( "Pray channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOPRAY );
}
else
{
send_to_char ( "Pray channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOPRAY );
}
}
else /* pray message sent, turn pray on if it is off */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
REMOVE_BIT ( ch->comm, COMM_NOPRAY );
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
sprintf ( buf, "{g-{G={wYou{G={g- {D({MPray{D){x '{W%s{x'\n\r",
argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
IS_IMMORTAL ( d->character ) &&
!IS_SET ( victim->comm, COMM_NOPRAY ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "{g-{G={x$n{G={g-{D ({MPray{D){x '{W$t{x'", ch,
argument, d->character, TO_VICT, POS_DEAD );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
/* RT chat replaced with ROM gossip */
CH_CMD ( do_gossip )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOGOSSIP ) )
{
send_to_char ( "IC channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOGOSSIP );
}
else
{
send_to_char ( "IC channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOGOSSIP );
}
}
else /* gossip message sent, turn gossip on if it isn't already */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
}
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
if ( ( !str_infix ( " fuck ", argument ) ) ||
( !str_prefix ( "fuck ", argument ) ) ||
( !str_suffix ( " fuck", argument ) ) ||
( !str_suffix ( " fuck.", argument ) ) ||
( !str_suffix ( " fuck!", argument ) ) ||
( !str_cmp ( "fuck", argument ) ) ||
( !str_cmp ( "fuck.", argument ) ) ||
( !str_cmp ( "fuck!", argument ) ) ||
( !str_cmp ( "shit", argument ) ) ||
( !str_cmp ( "shit.", argument ) ) ||
( !str_cmp ( "shit!", argument ) ) ||
( !str_infix ( " shit ", argument ) ) ||
( !str_prefix ( "shit ", argument ) ) ||
( !str_suffix ( " shit", argument ) ) ||
( !str_suffix ( " shit.", argument ) ) ||
( !str_suffix ( " shit!", argument ) ) )
{
if ( !IS_IMMORTAL ( ch ) )
{
send_to_char
( "Don't let the IMM's catch you talking like that!\n\r",
ch );
return;
}
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
REMOVE_BIT ( ch->comm, COMM_NOGOSSIP );
/*
if ( !IS_NPC ( ch ) && ch->pcdata->condition[COND_DRUNK] > 10 )
argument = makedrunk ( argument, ch );
*/
// argument = makedrunk ( argument, ch );
sprintf ( buf,
"{y-{Y={WYOU{Y={y- {w[{RI{rn {RC{rharacter{w] {x'{D%s{x'\n\r",
argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOGOSSIP ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
//MORE DRUNK
/* if ( !IS_NPC ( ch ) &&
ch->pcdata->condition[COND_DRUNK] > 10 )
argument = makedrunk ( argument, ch ); */
//END
act_new
( "{w[{RI{rn {RC{rharacter{w] {y-{Y={B$n{Y={y-{x '{D$t{x'",
ch, argument, d->character, TO_VICT, POS_SLEEPING );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
CH_CMD ( do_qgossip )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( !ch->on_quest && !IS_IMMORTAL ( ch ) )
{
send_to_char ( "You are not on a quest!\n\r", ch );
return;
}
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOQGOSSIP ) )
{
send_to_char ( "Quest gossip channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOQGOSSIP );
}
else
{
send_to_char ( "Quest gossip channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOQGOSSIP );
}
}
else /* qgossip message sent, turn qgossip on if it isn't already */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
}
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
if ( ( !str_infix ( " fuck ", argument ) ) ||
( !str_prefix ( "fuck ", argument ) ) ||
( !str_suffix ( " fuck", argument ) ) ||
( !str_suffix ( " fuck.", argument ) ) ||
( !str_suffix ( " fuck!", argument ) ) ||
( !str_cmp ( "fuck", argument ) ) ||
( !str_cmp ( "fuck.", argument ) ) ||
( !str_cmp ( "fuck!", argument ) ) ||
( !str_cmp ( "shit", argument ) ) ||
( !str_cmp ( "shit.", argument ) ) ||
( !str_cmp ( "shit!", argument ) ) ||
( !str_infix ( " shit ", argument ) ) ||
( !str_prefix ( "shit ", argument ) ) ||
( !str_suffix ( " shit", argument ) ) ||
( !str_suffix ( " shit.", argument ) ) ||
( !str_suffix ( " shit!", argument ) ) )
{
if ( !IS_IMMORTAL ( ch ) )
{
send_to_char
( "Don't let the IMM's catch you talking like that!\n\r",
ch );
return;
}
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
REMOVE_BIT ( ch->comm, COMM_NOQGOSSIP );
sprintf ( buf, "You qgossip '{C%s{x'\n\r", argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOQGOSSIP ) &&
!IS_SET ( victim->comm, COMM_QUIET ) &&
( ( victim->on_quest ) || IS_IMMORTAL ( victim ) ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "$n qgossips '{C$t{x'", ch, argument,
d->character, TO_VICT, POS_SLEEPING );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
CH_CMD ( do_grats )
{
char buf[MAX_STRING_LENGTH];
char bufy[MAX_STRING_LENGTH];
char bufz[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
buf[0] = '\0';
bufy[0] = '\0';
bufz[0] = '\0';
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOGRATS ) )
{
send_to_char ( "Grats channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOGRATS );
}
else
{
send_to_char ( "Grats channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOGRATS );
}
}
else /* grats message sent, turn grats on if it isn't already */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
}
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
if ( ( !str_infix ( " fuck ", argument ) ) ||
( !str_prefix ( "fuck ", argument ) ) ||
( !str_suffix ( " fuck", argument ) ) ||
( !str_suffix ( " fuck.", argument ) ) ||
( !str_suffix ( " fuck!", argument ) ) ||
( !str_cmp ( "fuck", argument ) ) ||
( !str_cmp ( "fuck.", argument ) ) ||
( !str_cmp ( "fuck!", argument ) ) ||
( !str_cmp ( "shit", argument ) ) ||
( !str_cmp ( "shit.", argument ) ) ||
( !str_cmp ( "shit!", argument ) ) ||
( !str_infix ( " shit ", argument ) ) ||
( !str_prefix ( "shit ", argument ) ) ||
( !str_suffix ( " shit", argument ) ) ||
( !str_suffix ( " shit.", argument ) ) ||
( !str_suffix ( " shit!", argument ) ) )
{
if ( !IS_IMMORTAL ( ch ) )
{
send_to_char
( "Don't let the IMM's catch you talking like that!\n\r",
ch );
return;
}
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
REMOVE_BIT ( ch->comm, COMM_NOGRATS );
sprintf ( buf, "You {RG{Yr{Ra{Yt{Rs{x '%s{x'\n\r", argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOGRATS ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "$n {RG{Yr{Ra{Yt{Rs{x '{x$t{x'", ch, argument,
d->character, TO_VICT, POS_SLEEPING );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
CH_CMD ( do_quote )
{
char buf[MAX_STRING_LENGTH * 3];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOQUOTE ) )
{
send_to_char ( "Quote channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOQUOTE );
}
else
{
send_to_char ( "Quote channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOQUOTE );
}
}
else /* quote message sent, turn quote on if it isn't already */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
}
if ( ( !str_infix ( " fuck ", argument ) ) ||
( !str_prefix ( "fuck ", argument ) ) ||
( !str_suffix ( " fuck", argument ) ) ||
( !str_suffix ( " fuck.", argument ) ) ||
( !str_suffix ( " fuck!", argument ) ) ||
( !str_cmp ( "fuck", argument ) ) ||
( !str_cmp ( "fuck.", argument ) ) ||
( !str_cmp ( "fuck!", argument ) ) ||
( !str_cmp ( "shit", argument ) ) ||
( !str_cmp ( "shit.", argument ) ) ||
( !str_cmp ( "shit!", argument ) ) ||
( !str_infix ( " shit ", argument ) ) ||
( !str_prefix ( "shit ", argument ) ) ||
( !str_suffix ( " shit", argument ) ) ||
( !str_suffix ( " shit.", argument ) ) ||
( !str_suffix ( " shit!", argument ) ) )
{
if ( !IS_IMMORTAL ( ch ) )
{
send_to_char
( "Don't let the IMM's catch you talking like that!\n\r",
ch );
return;
}
}
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
REMOVE_BIT ( ch->comm, COMM_NOQUOTE );
sprintf ( buf, "{g-{G={bYou{G={g- {Rquote{x '{c%s{x'\n\r", argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOQUOTE ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "{g-{G={b$n{G={g- {Rquotes{x '$t{x'", ch,
argument, d->character, TO_VICT, POS_SLEEPING );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
void social_channel ( const char *format, CHAR_DATA * ch, const void *arg2,
int type )
{
static char *const he_she[] = { "it", "he", "she" };
static char *const him_her[] = { "it", "him", "her" };
static char *const his_her[] = { "its", "his", "her" };
CHAR_DATA *to;
CHAR_DATA *vch = ( CHAR_DATA * ) arg2;
const char *str;
char *i;
char *point;
char buf[MAX_STRING_LENGTH];
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char ( "The gods have revoked your channel priviliges.\n\r",
ch );
return;
}
if ( !format || !*format )
return;
if ( !ch || !ch->desc || !ch->in_room )
return;
to = char_list;
if ( type == TO_VICT )
{
if ( !vch )
{
bug ( "Act: null vch with TO_VICT.", 0 );
return;
}
if ( !vch->in_room )
return;
to = vch;
}
if ( type == TO_CHAR )
{
if ( ch == NULL )
{
return;
}
to = ch;
}
for ( ; to; to = to->next )
{
if ( !to->desc || to->position < POS_RESTING || !to->in_room )
continue;
if ( type == TO_CHAR && to != ch )
continue;
if ( type == TO_VICT && ( to != vch || to == ch ) )
continue;
if ( type == TO_ROOM && to == ch )
continue;
if ( type == TO_NOTVICT && ( to == ch || to == vch ) )
continue;
if ( IS_SET ( to->comm, COMM_NOSOCIAL ) ||
IS_SET ( to->comm, COMM_QUIET ) )
continue;
point = buf;
sprintf ( buf, "[Gmote] " );
point += 8;
str = format;
while ( *str )
{
if ( *str != '$' )
{
*point++ = *str++;
continue;
}
i = NULL;
switch ( *str )
{
case '$':
++str;
i = " <@@@> ";
if ( !arg2 && *str >= 'A' && *str <= 'Z' && *str != 'G' )
{
bug ( "Act: missing arg2 for code %d.", *str );
i = " <@@@> ";
}
else
{
switch ( *str )
{
default:
bug ( "Act: bad code %d.", *str );
i = " <@@@> ";
break;
case 'T':
i = ( char * ) arg2;
break;
case 'n':
i = PERS ( ch, to );
break;
case 'N':
i = PERS ( vch, to );
break;
case 'e':
i = he_she[URANGE ( 0, ch->sex, 2 )];
break;
case 'E':
i = he_she[URANGE ( 0, vch->sex, 2 )];
break;
case 'm':
i = him_her[URANGE ( 0, ch->sex, 2 )];
break;
case 'M':
i = him_her[URANGE ( 0, vch->sex, 2 )];
break;
case 's':
i = his_her[URANGE ( 0, ch->sex, 2 )];
break;
case 'S':
i = his_her[URANGE ( 0, vch->sex, 2 )];
break;
}
}
break;
default:
*point++ = *str++;
break;
}
++str;
while ( ( *point = *i ) != '\0' )
++point, ++i;
}
*point++ = '\n';
*point++ = '\r';
*point = '\0';
buf[0] = UPPER ( buf[0] );
send_to_char ( "{W", to );
if ( to->desc )
write_to_buffer ( to->desc, buf, point - buf );
send_to_char ( "{x", to );
}
return;
}
/* RT ask channel */
CH_CMD ( do_ask )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOASK ) )
{
send_to_char ( "Q/A channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOASK );
}
else
{
send_to_char ( "Q/A channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOASK );
}
}
else /* ask sent, turn Q/A on if it isn't already */
{
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
}
if ( ( !str_infix ( " fuck ", argument ) ) ||
( !str_prefix ( "fuck ", argument ) ) ||
( !str_suffix ( " fuck", argument ) ) ||
( !str_suffix ( " fuck.", argument ) ) ||
( !str_suffix ( " fuck!", argument ) ) ||
( !str_cmp ( "fuck", argument ) ) ||
( !str_cmp ( "fuck.", argument ) ) ||
( !str_cmp ( "fuck!", argument ) ) ||
( !str_cmp ( "shit", argument ) ) ||
( !str_cmp ( "shit.", argument ) ) ||
( !str_cmp ( "shit!", argument ) ) ||
( !str_infix ( " shit ", argument ) ) ||
( !str_prefix ( "shit ", argument ) ) ||
( !str_suffix ( " shit", argument ) ) ||
( !str_suffix ( " shit.", argument ) ) ||
( !str_suffix ( " shit!", argument ) ) )
{
if ( !IS_IMMORTAL ( ch ) )
{
send_to_char
( "Don't let the IMM's catch you talking like that!\n\r",
ch );
return;
}
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
REMOVE_BIT ( ch->comm, COMM_NOASK );
sprintf ( buf, "You ask '{y%s{x'\n\r", argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOASK ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "$n asks '{y$t{x'", ch, argument, d->character,
TO_VICT, POS_SLEEPING );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
/* RT answer channel - uses same line as asks */
CH_CMD ( do_answer )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOASK ) )
{
send_to_char ( "Q/A channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOASK );
}
else
{
send_to_char ( "Q/A channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOASK );
}
}
else /* answer sent, turn Q/A on if it isn't already */
{
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
}
if ( ( !str_infix ( " fuck ", argument ) ) ||
( !str_prefix ( "fuck ", argument ) ) ||
( !str_suffix ( " fuck", argument ) ) ||
( !str_suffix ( " fuck.", argument ) ) ||
( !str_suffix ( " fuck!", argument ) ) ||
( !str_cmp ( "fuck", argument ) ) ||
( !str_cmp ( "fuck.", argument ) ) ||
( !str_cmp ( "fuck!", argument ) ) ||
( !str_cmp ( "shit", argument ) ) ||
( !str_cmp ( "shit.", argument ) ) ||
( !str_cmp ( "shit!", argument ) ) ||
( !str_infix ( " shit ", argument ) ) ||
( !str_prefix ( "shit ", argument ) ) ||
( !str_suffix ( " shit", argument ) ) ||
( !str_suffix ( " shit.", argument ) ) ||
( !str_suffix ( " shit!", argument ) ) )
{
if ( !IS_IMMORTAL ( ch ) )
{
send_to_char
( "Don't let the IMM's catch you talking like that!\n\r",
ch );
return;
}
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
REMOVE_BIT ( ch->comm, COMM_NOASK );
sprintf ( buf, "You answer '{y%s{x'\n\r", argument );
send_to_char ( buf, ch );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOASK ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "$n answers '{y$t{x'", ch, argument,
d->character, TO_VICT, POS_SLEEPING );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
/* RT music channel */
CH_CMD ( do_music )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
int wtime;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOMUSIC ) )
{
send_to_char ( "Music channel is now ON.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOMUSIC );
}
else
{
send_to_char ( "Music channel is now OFF.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOMUSIC );
}
}
else /* music sent, turn music on if it isn't already */
{
if ( IS_SET ( ch->comm, COMM_QUIET ) )
{
send_to_char ( "You must turn off quiet mode first.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOCHANNELS ) )
{
send_to_char
( "The gods have revoked your channel priviliges.\n\r", ch );
return;
}
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
if ( ( !str_infix ( " fuck ", argument ) ) ||
( !str_prefix ( "fuck ", argument ) ) ||
( !str_suffix ( " fuck", argument ) ) ||
( !str_suffix ( " fuck.", argument ) ) ||
( !str_suffix ( " fuck!", argument ) ) ||
( !str_cmp ( "fuck", argument ) ) ||
( !str_cmp ( "fuck.", argument ) ) ||
( !str_cmp ( "fuck!", argument ) ) ||
( !str_cmp ( "shit", argument ) ) ||
( !str_cmp ( "shit.", argument ) ) ||
( !str_cmp ( "shit!", argument ) ) ||
( !str_infix ( " shit ", argument ) ) ||
( !str_prefix ( "shit ", argument ) ) ||
( !str_suffix ( " shit", argument ) ) ||
( !str_suffix ( " shit.", argument ) ) ||
( !str_suffix ( " shit!", argument ) ) )
{
if ( !IS_IMMORTAL ( ch ) )
{
send_to_char
( "Don't let the IMM's catch you talking like that!\n\r",
ch );
return;
}
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
REMOVE_BIT ( ch->comm, COMM_NOMUSIC );
sprintf ( buf, "You {CM{cU{CS{cI{CC{x: '{w%s{x'\n\r", argument );
send_to_char ( buf, ch );
sprintf ( buf, "$n {CM{cU{CS{cI{CC{x: '{w%s{x'", argument );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOMUSIC ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act_new ( "{W$n {cM{CU{cS{CI{cC{x: '{w$t{x'", ch,
argument, d->character, TO_VICT, POS_SLEEPING );
}
}
}
}
wtime = UMAX ( 2, 9 - ( ch->level ) );
WAIT_STATE ( ch, wtime );
}
CH_CMD ( do_hints )
{
if(IS_NPC(ch))
return;
if(IS_SET(ch->comm,COMM_NOHINT))
{
REMOVE_BIT(ch->comm, COMM_NOHINT);
send_to_char("Hint channel is now ON.\n\r",ch);
return;
}
else
{
SET_BIT(ch->comm, COMM_NOHINT);
send_to_char("Hint channel is now OFF.\n\r",ch);
return;
}
}
CH_CMD ( do_announce )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
if ( argument[0] != '\0' )
{
sprintf ( buf, "{m-{M-{R>{r> {D$n {D%s{x", argument );
act_new ( "{m-{M-{R>{r> {D$n {W$t{x", ch,
argument, NULL, TO_CHAR, POS_DEAD );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOANNOUNCE ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
act_new ( "{m-{M-{R>{r> {D$n {D$t{x", ch,
argument, d->character, TO_VICT, POS_DEAD );
}
}
}
return;
}
CH_CMD ( do_noannounce )
{
if ( IS_SET ( ch->comm, COMM_NOANNOUNCE ) )
{
REMOVE_BIT ( ch->comm, COMM_NOANNOUNCE );
send_to_char ( "You will now see announcements again.\n\r", ch );
}
else
{
SET_BIT ( ch->comm, COMM_NOANNOUNCE );
send_to_char ( "You will no longer see announcements.\n\r", ch );
}
return;
}
void do_gmessage ( char *argument )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
sprintf ( buf, "%s", argument );
for ( d = descriptor_list; d; d = d->next )
{
if ( d->connected == CON_PLAYING )
{
send_to_char ( buf, d->character );
}
}
return;
}
CH_CMD ( do_immtalk )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *d;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOWIZ ) )
{
send_to_char ( "Immortal channel is now ON\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOWIZ );
}
else
{
send_to_char ( "Immortal channel is now OFF\n\r", ch );
SET_BIT ( ch->comm, COMM_NOWIZ );
}
return;
}
REMOVE_BIT ( ch->comm, COMM_NOWIZ );
sprintf ( buf, "{W[{BI{bmm{BC{bhat{w] {r-{R={G$n{R={r- {x'{C%s{x'",
argument );
act_new ( "{W[{BI{bmm{BC{bhat{W] {r-{R={G$n{R={r- {x'{C$t{x'", ch,
argument, NULL, TO_CHAR, POS_DEAD );
for ( d = descriptor_list; d != NULL; d = d->next )
{
if ( d->connected == CON_PLAYING && IS_IMMORTAL ( d->character ) &&
!IS_SET ( d->character->comm, COMM_NOWIZ ) )
{
act_new ( "{W[{BI{bmm{BC{bhat{W] {r-{R={G$n{R={r-{x'{C$t{x'", ch,
argument, d->character, TO_VICT, POS_DEAD );
}
}
return;
}
/*
* Different statements for punctuation at the end of a say now.
* -Marquoz (marquoz@gost.net)
*/
CH_CMD ( do_say )
{
int length;
if ( IS_SET ( ch->comm, COMM_NOSAY ) )
{
send_to_char ( "You are not allowed to say anything.\n\r", ch );
return;
}
if ( argument[0] == '\0' )
{
send_to_char ( "Say what?\n\r", ch );
return;
}
/* Make the words drunk if needed */
/* if (IS_DRUNK(ch))
*/
/* if ( !IS_NPC ( ch ) && ch->pcdata->condition[COND_DRUNK] > 10 )
argument = makedrunk ( argument, ch ); */
length = strlen ( argument );
/*
* trailing {7 is to assure the last ' is colored right
* trailing {x is to assure no colour bleed from the green -M
* Added in functionality for different ways to say
*/
if ( argument[length - 1] == '!' )
{
/* 'something!' = exclaim */
if ( argument[length - 2] != '!' )
{
act ( "{W$n {Yexclaims{x '{W$T{x'{x", ch, NULL, argument,
TO_ROOM );
act ( "{WYou {Yexclaim{x '{W$T'{x", ch, NULL, argument, TO_CHAR );
}
/* 'something!!!' = screams */
else
{
act ( "{W$n {Rscreams {x'{W$T{x'{x", ch, NULL, argument,
TO_ROOM );
act ( "{WYou {Rscream {x'{W$T{x'{x", ch, NULL, argument,
TO_CHAR );
}
}
else if ( argument[length - 1] == '?' )
{
/* 'something?!' = boggles */
if ( argument[length - 2] == '!' )
{
act ( "{W$n {gboggles {x'{W$T{x'{x", ch, NULL, argument,
TO_ROOM );
act ( "{WYou {gboggle {x'{W$T{x'{x", ch, NULL, argument,
TO_CHAR );
}
/* 'something?' = asks */
else if ( argument[length - 2] != '?' )
{
act ( "{W$n {Casks {x'{W$T{x'{x", ch, NULL, argument, TO_ROOM );
act ( "{WYou{C ask {x'{W$T{x'{x", ch, NULL, argument, TO_CHAR );
}
/* 'something??' = confusedly asks */
else if ( argument[length - 20] != '?' )
{
act ( "{W$n {Gdemands {x'{W$T{x'{x", ch, NULL, argument,
TO_ROOM );
act ( "{WYou {Gdemand {x'{W$T{x'{x", ch, NULL, argument,
TO_CHAR );
}
}
/* 'something...' = mutter */
else if ( argument[length - 1] == '.' && argument[length - 2] == '.' &&
argument[length - 3] == '.' )
{
act ( "{W$n{D mutters {x'{W$T{x'{x", ch, NULL, argument, TO_ROOM );
act ( "{WYou{D mutter {x'{W$T{x'{x", ch, NULL, argument, TO_CHAR );
}
/* '=), :) = chuckles */
else if ( argument[length - 1] == ')' &&
( argument[length - 2] == '=' || argument[length - 2] == ':' ) )
{
act ( "{W$n {cchuckles {x'{W$T{x'{x", ch, NULL, argument, TO_ROOM );
act ( "{WYou {cchuckle {x'{W$T{x'{x", ch, NULL, argument, TO_CHAR );
}
/* '=(, :( = sulks */
else if ( argument[length - 1] == '(' &&
( argument[length - 2] == '=' || argument[length - 2] == ':' ) )
{
act ( "{W$n {bsulks {x'{W$T{x'{x", ch, NULL, argument, TO_ROOM );
act ( "{WYou {bsulk {x'{W$T{x'{x", ch, NULL, argument, TO_CHAR );
}
/* '=P, :P = smirks */
else if ( argument[length - 1] == 'P' &&
( argument[length - 2] == '=' || argument[length - 2] == ':' ) )
{
act ( "{W$n {rsmirks {x'{W$T{x'{x", ch, NULL, argument, TO_ROOM );
act ( "{WYou {rsmirk {x'{W$T{x'{x", ch, NULL, argument, TO_CHAR );
}
/* ';) = leers */
else if ( argument[length - 1] == ')' && ( argument[length - 2] == ';' ) )
{
act ( "{W$n {yleers {x'{W$T{x'{x", ch, NULL, argument, TO_ROOM );
act ( "{WYou {yleer {x'{W$T{x'{x", ch, NULL, argument, TO_CHAR );
}
/* '=O, :O = sings */
else if ( argument[length - 1] == 'O' &&
( argument[length - 2] == '=' || argument[length - 2] == ':' ) )
{
act ( "{W$n {Msings {x'{W$T{x'{x", ch, NULL, argument, TO_ROOM );
act ( "{WYou {Msing {x'{W$T{x'{x", ch, NULL, argument, TO_CHAR );
}
/* Add more punctuations with another else if statement here */
else /* Any other punctuation */
{
act ( "{W$n says {x'{W$T{x'{x", ch, NULL, argument, TO_ROOM );
act ( "{WYou say {x'{W$T{x'{x", ch, NULL, argument, TO_CHAR );
}
if ( !IS_NPC ( ch ) )
{
CHAR_DATA *mob, *mob_next;
for ( mob = ch->in_room->people; mob != NULL; mob = mob_next )
{
mob_next = mob->next_in_room;
if ( IS_NPC ( mob ) && HAS_TRIGGER ( mob, TRIG_SPEECH ) &&
mob->position == mob->pIndexData->default_pos )
mp_act_trigger ( argument, mob, ch, NULL, NULL, TRIG_SPEECH );
}
}
return;
}
/*void do_say( CHAR_DATA *ch, char *argument )
{
if ( argument[0] == '\0' )
{
send_to_char( "Say what?\n\r", ch );
return;
}
act( "{W$n says '$T{x'", ch, NULL, argument, TO_ROOM );
act( "{WYou say '$T{x'", ch, NULL, argument, TO_CHAR );
if ( !IS_NPC(ch) )
{
CHAR_DATA *mob, *mob_next;
for ( mob = ch->in_room->people; mob != NULL; mob = mob_next )
{
mob_next = mob->next_in_room;
if ( IS_NPC(mob) && HAS_TRIGGER( mob, TRIG_SPEECH )
&& mob->position == mob->pIndexData->default_pos )
mp_act_trigger( argument, mob, ch, NULL, NULL, TRIG_SPEECH );
}
}
return;
}*/
CH_CMD ( do_shout )
{
DESCRIPTOR_DATA *d;
if ( argument[0] == '\0' )
{
if ( IS_SET ( ch->comm, COMM_NOSHOUT ) )
{
send_to_char ( "You can hear shouts again.\n\r", ch );
REMOVE_BIT ( ch->comm, COMM_NOSHOUT );
}
else
{
send_to_char ( "You will no longer hear shouts.\n\r", ch );
SET_BIT ( ch->comm, COMM_NOSHOUT );
}
return;
}
if ( IS_SET ( ch->comm, COMM_NOSHOUT ) )
{
send_to_char ( "You can't shout.\n\r", ch );
return;
}
if ( ( ch->in_room->vnum == ROOM_VNUM_CORNER ) &&
( !IS_IMMORTAL ( ch ) ) )
{
send_to_char
( "Just keep your nose in the corner like a good little player.\n\r",
ch );
return;
}
/*
if ( IS_SET ( class_table[ch->class].tier, TIER_01 ) && ch->level < 20 )
{
send_to_char ( "Sorry, due to abusive players, we've been forced to put a level\n\r" "restriction on all channels. If you have any questions, use the\n\r"
"pray command and hopefully you'll get an answer. For basic help\n\r"
"try 'help' and 'help summary' or send an immortal a tell. When\n\r"
"you've reached level 20, you'll be able to use all channels.\n\r", ch );
return;
}
*/
REMOVE_BIT ( ch->comm, COMM_NOSHOUT );
WAIT_STATE ( ch, 12 );
act ( "{WYou {B**{RSHOUT{B**{x '{W$T{x'", ch, NULL, argument, TO_CHAR );
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
int pos;
bool found = FALSE;
victim = d->original ? d->original : d->character;
if ( d->connected == CON_PLAYING && d->character != ch &&
!IS_SET ( victim->comm, COMM_NOSHOUT ) &&
!IS_SET ( victim->comm, COMM_QUIET ) )
{
for ( pos = 0; pos < MAX_FORGET; pos++ )
{
if ( victim->pcdata->forget[pos] == NULL )
break;
if ( !str_cmp ( ch->name, victim->pcdata->forget[pos] ) )
found = TRUE;
}
if ( !found )
{
act ( "{W$n {B**{RSHOUTS{B** {x'{W$t{x'", ch, argument,
d->character, TO_VICT );
}
}
}
return;
}
CH_CMD ( do_tell )
{
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH];
CHAR_DATA *victim;
int pos;
bool found = FALSE;
int wtime;
if ( IS_SET ( ch->comm, COMM_AFK ) && !IS_IMMORTAL ( ch ) )
{
send_to_char ( "Not while you're still AFK. Type 'afk' to toggle AFK on/off.\n\r", ch );
return;
}
if ( IS_SET ( ch->comm, COMM_NOTELL ) || IS_SET ( cShowing the first 100 KB of 177.2 KB. Download the archive for the full file.