patch_1.4_to_1.4a.gz
patches · 136.9 KB · 2010-03-30
Download « Back to the patches list
diff -c -r /home/5500/olddist/src/Makefile /home/5500/dist/src/Makefile
*** /home/5500/olddist/src/Makefile Tue Jul 28 17:25:41 1998
--- /home/5500/dist/src/Makefile Fri May 28 01:18:59 1999
***************
*** 6,57 ****
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket
#Uncomment the line below if you are getting undefined crypt errors
#NEED_CRYPT = -lcrypt
! DBUGFLG = -DREQUESTS
#Uncomment the line below if you want a performance increase though beware
#your core files may not be as much of a benefit if you do.
#OPT_FLAG = -finline-functions -funroll-loops -fdefer-pop -fstrength-reduce
! C_FLAGS = $(OPT_FLAG) -O -g3 -Wall -Wuninitialized $(PROF) $(NOCRYPT) $(DBUGFLG) -DSMAUG $(SOLARIS_FLAG)
L_FLAGS = $(OPT_FLAG) $(PROF) $(SOLARIS_LINK) $(NEED_CRYPT)
O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o \
! build.o clans.o comm.o comments.o const.o db.o deity.o fight.o \
! handler.o hashstr.o ibuild.o ident.o interp.o magic.o makeobjs.o \
! mapout.o misc.o mpxset.o mud_comm.o mud_prog.o player.o polymorph.o \
requests.o reset.o save.o shops.o skills.o special.o tables.o \
track.o update.o grub.o stat_obj.o ban.o services.o planes.o \
! imm_host.o imc.o imc-mail.o imc-interp.o imc-util.o imc-config.o \
! imc-events.o imc-version.o imc-mercbase.o ice.o icec.o icec-mercbase.o
C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c boards.c \
! build.c clans.c comm.c comments.c const.c db.c deity.c fight.c \
! handler.c hashstr.c ibuild.c ident.c interp.c magic.c makeobjs.c \
! mapout.c misc.c mpxset.c mud_comm.c mud_prog.c player.c polymorph.c \
requests.c reset.c save.c shops.c skills.c special.c tables.c \
track.c update.c grub.c stat_obj.c ban.c services.c planes.c \
! imm_host.c imc.c imc-mail.c imc-interp.c imc-util.c imc-config.c \
! imc-events.c imc-version.c imc-mercbase.c ice.c icec.c icec-mercbase.c
H_FILES = mud.h bet.h imc-config.h imc-mercbase.h imc-mercdefs.h imc.h \
! ice.h icec.h icec-mercbase.h
!
all:
make smaug
smaug: $(O_FILES)
rm -f smaug
! $(CC) $(L_FLAGS) -o smaug $(O_FILES)
chmod g+w smaug
chmod a+x smaug
chmod g+w $(O_FILES)
.c.o: mud.h
! $(CC) -c $(C_FLAGS) $<
clean:
rm -f *.o smaug *~
--- 6,73 ----
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket
+ #Uncomment the line below if you are getting a line like:
+ #interp.c:757: warning: int format, time_t arg (arg 7)
+ #TIME = -DTIMEFORMAT
+
+ #Uncomment the line below if you are getting implicit decleration of re_exec
+ #REG = -DREGEX
+
+ #Uncomment the line below if you are getting undefined re_exec errors
+ #NEED_REG = -lgnuregex
+
#Uncomment the line below if you are getting undefined crypt errors
#NEED_CRYPT = -lcrypt
! #DBUGFLG = -DREQUESTS
#Uncomment the line below if you want a performance increase though beware
#your core files may not be as much of a benefit if you do.
#OPT_FLAG = -finline-functions -funroll-loops -fdefer-pop -fstrength-reduce
! C_FLAGS = $(OPT_FLAG) -O -g3 -Wall -Wuninitialized $(PROF) $(NOCRYPT) $(DBUGFLG) -DSMAUG $(SOLARIS_FLAG) $(TIME) $(REG)
L_FLAGS = $(OPT_FLAG) $(PROF) $(SOLARIS_LINK) $(NEED_CRYPT)
+ #Uncomment the next three comments below if you want to use IMC
+ #USE_IMC = -DUSE_IMC
+
+ #IMC_OFILES = imc.o imc-mail.o imc-interp.o imc-util.o imc-config.o \
+ # imc-events.o imc-version.o imc-mercbase.o ice.o icec.o icec-mercbase.o
+
+ #IMC_CFILES = imc.c imc-mail.c imc-interp.c imc-util.c imc-config.c \
+ # imc-events.c imc-version.c imc-mercbase.c ice.c icec.c icec-mercbase.c
+
O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o \
! build.o clans.o comm.o comments.o const.o db.o deity.o fight.o \
! handler.o hashstr.o ibuild.o ident.o interp.o magic.o makeobjs.o \
! mapout.o misc.o mpxset.o mud_comm.o mud_prog.o player.o polymorph.o \
requests.o reset.o save.o shops.o skills.o special.o tables.o \
track.o update.o grub.o stat_obj.o ban.o services.o planes.o \
! imm_host.o $(IMC_OFILES) colorize.o
C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c boards.c \
! build.c clans.c comm.c comments.c const.c db.c deity.c fight.c \
! handler.c hashstr.c ibuild.c ident.c interp.c magic.c makeobjs.c \
! mapout.c misc.c mpxset.c mud_comm.c mud_prog.c player.c polymorph.c \
requests.c reset.c save.c shops.c skills.c special.c tables.c \
track.c update.c grub.c stat_obj.c ban.c services.c planes.c \
! imm_host.c $(IMC_CFILES) colorize.c
H_FILES = mud.h bet.h imc-config.h imc-mercbase.h imc-mercdefs.h imc.h \
! ice.h icec.h icec-mercbase.h
all:
make smaug
smaug: $(O_FILES)
rm -f smaug
! $(CC) $(L_FLAGS) $(USE_IMC) -o smaug $(O_FILES)
chmod g+w smaug
chmod a+x smaug
chmod g+w $(O_FILES)
.c.o: mud.h
! $(CC) -c $(C_FLAGS) $(USE_IMC) $<
clean:
rm -f *.o smaug *~
diff -c -r /home/5500/olddist/src/act_comm.c /home/5500/dist/src/act_comm.c
*** /home/5500/olddist/src/act_comm.c Tue Jul 28 02:30:02 1998
--- /home/5500/dist/src/act_comm.c Fri May 28 01:18:59 1999
***************
*** 21,29 ****
--- 21,41 ----
#include <stdio.h>
#include <string.h>
#include <time.h>
+ #ifdef REGEX
+ #include <regex.h>
+ #endif
+
+ #ifdef FREEBSD
+ #include <unistd.h>
+ #include <regex.h>
+ #endif
#include "mud.h"
+ #ifdef REGEX
+ extern int re_exec _RE_ARGS ((const char *));
+ #endif
+
#ifndef WIN32
#include <regex.h>
#endif
***************
*** 440,445 ****
--- 452,462 ----
ch_printf( ch, "You %s '%s'\n\r", verb, argument );
sprintf( buf, "$n %ss '$t'", verb );
break;
+ case CHANNEL_TRAFFIC:
+ set_char_color( AT_GOSSIP, ch );
+ ch_printf( ch, "You %s: %s\n\r", verb, argument );
+ sprintf( buf, "$n %ss: $t", verb );
+ break;
case CHANNEL_WARTALK:
set_char_color( AT_WARTALK, ch );
ch_printf( ch, "You %s '%s'\n\r", verb, argument );
***************
*** 501,507 ****
{
char *sbuf = argument;
char lbuf[MAX_INPUT_LENGTH + 4]; /* invis level string + buf */
!
if ( channel != CHANNEL_NEWBIE && NOT_AUTHED(och) )
continue;
if ( channel == CHANNEL_IMMTALK && !IS_IMMORTAL(och) )
--- 518,528 ----
{
char *sbuf = argument;
char lbuf[MAX_INPUT_LENGTH + 4]; /* invis level string + buf */
!
! /* fix by Gorog os that players can ignore others' channel talk */
! if ( is_ignoring(och, ch) && get_trust(ch) <= get_trust(och) )
! continue;
!
if ( channel != CHANNEL_NEWBIE && NOT_AUTHED(och) )
continue;
if ( channel == CHANNEL_IMMTALK && !IS_IMMORTAL(och) )
***************
*** 515,520 ****
--- 536,550 ----
if ( channel == CHANNEL_HIGH && get_trust( och ) < sysdata.think_level )
continue;
+ if ( channel == CHANNEL_TRAFFIC
+ && !IS_IMMORTAL( och )
+ && !IS_IMMORTAL( ch ) )
+ {
+ if (( IS_HERO( ch ) && !IS_HERO( och ) )
+ || ( !IS_HERO( ch ) && IS_HERO( och ) ))
+ continue;
+ }
+
/* Fix by Narn to let newbie council members see the newbie channel. */
if ( channel == CHANNEL_NEWBIE &&
( !IS_IMMORTAL(och) && !NOT_AUTHED(och)
***************
*** 1204,1213 ****
if ( !IS_NPC(victim) && xIS_SET(victim->act, PLR_SILENCE) )
send_to_char( "That player is silenced. They will receive your message but can not respond.\n\r", ch );
! if ( (!IS_IMMORTAL(ch) && !IS_AWAKE(victim) )
! || (!IS_NPC(victim)&&IS_SET(victim->in_room->room_flags, ROOM_SILENCE ) ) )
{
! act( AT_PLAIN, "$E can't hear you.", ch, 0, victim, TO_CHAR );
return;
}
--- 1234,1250 ----
if ( !IS_NPC(victim) && xIS_SET(victim->act, PLR_SILENCE) )
send_to_char( "That player is silenced. They will receive your message but can not respond.\n\r", ch );
! if ( (!IS_IMMORTAL(ch) && !IS_AWAKE(victim) ) )
{
! act( AT_PLAIN, "$E is too tired to discuss such matters with you now.",
! ch, 0, victim, TO_CHAR );
! return;
! }
!
! if (!IS_NPC(victim)&&IS_SET(victim->in_room->room_flags, ROOM_SILENCE ) )
! {
! act(AT_PLAIN, "A magic force prevents your message from being heard.",
! ch, 0, victim, TO_CHAR );
return;
}
***************
*** 1813,1819 ****
send_to_char( "Typo file cleared.\n\r", ch);
return;
}
! if ( !str_cmp( argument, "list" ) ) {
send_to_char( "\n\r VNUM \n\r.......\n\r", ch );
show_file( ch, TYPO_FILE );
} else {
--- 1850,1856 ----
send_to_char( "Typo file cleared.\n\r", ch);
return;
}
! if ( !str_cmp( argument, "list") && get_trust(ch)>=LEVEL_ASCENDANT ) {
send_to_char( "\n\r VNUM \n\r.......\n\r", ch );
show_file( ch, TYPO_FILE );
} else {
***************
*** 2336,2341 ****
--- 2373,2380 ----
{
xREMOVE_BIT( ch->affected_by, AFF_CHARM );
affect_strip( ch, gsn_charm_person );
+ if ( !IS_NPC(ch->master) )
+ ch->master->pcdata->charmies--;
}
if ( can_see( ch->master, ch ) )
***************
*** 2621,2627 ****
&& rch->master == ch
&& !ch->master
&& !ch->leader
! && abs( ch->level - rch->level ) < 8
&& !is_same_group( rch, ch )
&& IS_PKILL( ch ) == IS_PKILL( rch )
)
--- 2660,2666 ----
&& rch->master == ch
&& !ch->master
&& !ch->leader
! && abs( ch->level - rch->level ) < 9
&& !is_same_group( rch, ch )
&& IS_PKILL( ch ) == IS_PKILL( rch )
)
***************
*** 3078,3084 ****
lang_names[lang], NULL, TO_CHAR );
return;
}
! for ( sch = ch->in_room->first_person; sch; sch = sch->next )
if ( IS_NPC(sch) && xIS_SET(sch->act, ACT_SCHOLAR)
&& knows_language( sch, ch->speaking, ch )
&& knows_language( sch, lang_array[lang], sch )
--- 3117,3123 ----
lang_names[lang], NULL, TO_CHAR );
return;
}
! for ( sch = ch->in_room->first_person; sch; sch = sch->next_in_room )
if ( IS_NPC(sch) && xIS_SET(sch->act, ACT_SCHOLAR)
&& knows_language( sch, ch->speaking, ch )
&& knows_language( sch, lang_array[lang], sch )
***************
*** 3142,3147 ****
--- 3181,3197 ----
return;
}
+ void do_traffic( CHAR_DATA *ch, char *argument )
+ {
+ if (NOT_AUTHED(ch))
+ {
+ send_to_char("Huh?\n\r", ch);
+ return;
+ }
+ talk_channel( ch, argument, CHANNEL_TRAFFIC, "openly traffic" );
+ return;
+ }
+
void do_wartalk( CHAR_DATA *ch, char *argument )
{
if (NOT_AUTHED(ch))
***************
*** 3165,3170 ****
--- 3215,3221 ----
}
+ #ifdef PROFANITY_CHECK
void
init_profanity_checker()
{
***************
*** 3180,3185 ****
--- 3231,3237 ----
preg = re_comp( bigregex );
#endif
}
+ #endif
void add_profane_word( char * word)
{
diff -c -r /home/5500/olddist/src/act_info.c /home/5500/dist/src/act_info.c
*** /home/5500/olddist/src/act_info.c Tue Jul 28 02:41:57 1998
--- /home/5500/dist/src/act_info.c Fri May 28 01:18:59 1999
***************
*** 25,30 ****
--- 25,35 ----
#include "mud.h"
+ /* Had to add unknowns because someone added new positions and didn't
+ * update them. Just a band-aid till I have time to fix it right.
+ * This was found thanks to mud@mini.axcomp.com pointing it out :)
+ * --Shaddai
+ */
char * const where_name [] =
{
***************
*** 49,55 ****
"<dual wielded> ",
"<worn on ears> ",
"<worn on eyes> ",
! "<missile wielded> "
};
--- 54,67 ----
"<dual wielded> ",
"<worn on ears> ",
"<worn on eyes> ",
! "<missile wielded> ",
! "<worn on back> ",
! "<worn over face> ",
! "<worn around ankle> ",
! "<worn around ankle> ",
! "<BUG Inform Nivek> ",
! "<BUG Inform Nivek> ",
! "<BUG Inform Nivek> "
};
***************
*** 66,71 ****
--- 78,89 ----
char *format_obj_to_char( OBJ_DATA *obj, CHAR_DATA *ch, bool fShort )
{
static char buf[MAX_STRING_LENGTH];
+ bool glowsee = FALSE;
+
+ /* can see glowing invis items in the dark */
+ if ( IS_OBJ_STAT(obj, ITEM_GLOW) && IS_OBJ_STAT(obj, ITEM_INVIS)
+ && !IS_AFFECTED(ch, AFF_TRUESIGHT) && !IS_AFFECTED(ch, AFF_DETECT_INVIS) )
+ glowsee = TRUE;
buf[0] = '\0';
if ( IS_OBJ_STAT(obj, ITEM_INVIS) ) strcat( buf, "(Invis) " );
***************
*** 95,101 ****
if ( IS_AFFECTED(ch, AFF_DETECT_MAGIC)
&& IS_OBJ_STAT(obj, ITEM_MAGIC) ) strcat( buf, "(Magical) " );
! if ( IS_OBJ_STAT(obj, ITEM_GLOW) ) strcat( buf, "(Glowing) " );
if ( IS_OBJ_STAT(obj, ITEM_HUM) ) strcat( buf, "(Humming) " );
if ( IS_OBJ_STAT(obj, ITEM_HIDDEN) ) strcat( buf, "(Hidden) " );
if ( IS_OBJ_STAT(obj, ITEM_BURIED) ) strcat( buf, "(Buried) " );
--- 113,119 ----
if ( IS_AFFECTED(ch, AFF_DETECT_MAGIC)
&& IS_OBJ_STAT(obj, ITEM_MAGIC) ) strcat( buf, "(Magical) " );
! if ( !glowsee && IS_OBJ_STAT(obj, ITEM_GLOW) ) strcat( buf, "(Glowing) " );
if ( IS_OBJ_STAT(obj, ITEM_HUM) ) strcat( buf, "(Humming) " );
if ( IS_OBJ_STAT(obj, ITEM_HIDDEN) ) strcat( buf, "(Hidden) " );
if ( IS_OBJ_STAT(obj, ITEM_BURIED) ) strcat( buf, "(Buried) " );
***************
*** 106,116 ****
--- 124,139 ----
if ( fShort )
{
+ if ( glowsee && !IS_IMMORTAL(ch) )
+ strcat( buf, "the faint glow of something" );
+ else
if ( obj->short_descr )
strcat( buf, obj->short_descr );
}
else
{
+ if ( glowsee )
+ strcat( buf, "You see the faint glow of something nearby." );
if ( obj->description )
strcat( buf, obj->description );
}
***************
*** 178,183 ****
--- 201,234 ----
}
+ /* This is the punct snippet from Desden el Chaman Tibetano - Nov 1998
+ Email: jlalbatros@mx2.redestb.es
+ */
+ char *num_punct(int foo)
+ {
+ int index, index_new, rest;
+ char buf[16];
+ static char buf_new[16];
+
+ sprintf(buf,"%d",foo);
+ rest = strlen(buf)%3;
+
+ for (index=index_new=0;index<strlen(buf);index++,index_new++)
+ {
+ if (index!=0 && (index-rest)%3==0 )
+ {
+ buf_new[index_new]=',';
+ index_new++;
+ buf_new[index_new]=buf[index];
+ }
+ else
+ buf_new[index_new] = buf[index];
+ }
+ buf_new[index_new]='\0';
+ return strdup(buf_new);
+ }
+
+
/*
* Show a list to a character.
* Can coalesce duplicated items.
***************
*** 416,421 ****
--- 467,477 ----
set_char_color( AT_BLUE, ch );
ch_printf( ch, "%s is surrounded by cascading torrents of energy.\n\r", name );
}
+ if ( IS_AFFECTED(victim, AFF_ACIDMIST) )
+ {
+ set_char_color( AT_GREEN, ch );
+ ch_printf( ch, "%s is visible through a cloud of churning mist.\n\r", name );
+ }
/*Scryn 8/13*/
if ( IS_AFFECTED(victim, AFF_ICESHIELD) )
{
***************
*** 469,484 ****
}
! if ( !IS_NPC( victim)
! && victim->pcdata->clan
! && victim->pcdata->clan->badge
! && ( victim->pcdata->clan->clan_type != CLAN_ORDER
! && victim->pcdata->clan->clan_type != CLAN_GUILD ) )
ch_printf_color( ch, "%s ", victim->pcdata->clan->badge );
! else if ( CAN_PKILL( victim ) )
send_to_char_color( "&P(&wUnclanned&P) ", ch );
! else
! set_char_color( AT_PERSON, ch );
if ( IS_AFFECTED(victim, AFF_INVISIBLE) ) strcat( buf, "(Invis) " );
if ( IS_AFFECTED(victim, AFF_HIDE) ) strcat( buf, "(Hide) " );
--- 525,545 ----
}
! if ( !IS_NPC( victim) )
! {
! if ( IS_IMMORTAL( victim ) && victim->level > 50 )
! send_to_char_color( "&P(&WImmortal&P) ", ch );
! if ( victim->pcdata->clan
! && IS_SET( victim->pcdata->flags, PCFLAG_DEADLY )
! && victim->pcdata->clan->badge
! && ( victim->pcdata->clan->clan_type != CLAN_ORDER
! && victim->pcdata->clan->clan_type != CLAN_GUILD ) )
ch_printf_color( ch, "%s ", victim->pcdata->clan->badge );
! else if ( CAN_PKILL( victim ) && victim->level < 51 )
send_to_char_color( "&P(&wUnclanned&P) ", ch );
! }
!
! set_char_color( AT_PERSON, ch );
if ( IS_AFFECTED(victim, AFF_INVISIBLE) ) strcat( buf, "(Invis) " );
if ( IS_AFFECTED(victim, AFF_HIDE) ) strcat( buf, "(Hide) " );
***************
*** 711,717 ****
act( AT_PLAIN, "You are using:", ch, NULL, NULL, TO_CHAR );
found = TRUE;
}
! if( (!IS_NPC(victim)) && (victim->race>0) && (victim->race<MAX_RACE))
send_to_char(race_table[victim->race]->where_name[iWear], ch);
else
send_to_char( where_name[iWear], ch );
--- 772,778 ----
act( AT_PLAIN, "You are using:", ch, NULL, NULL, TO_CHAR );
found = TRUE;
}
! if( (!IS_NPC(victim)) && (victim->race>0) && (victim->race<MAX_PC_RACE))
send_to_char(race_table[victim->race]->where_name[iWear], ch);
else
send_to_char( where_name[iWear], ch );
***************
*** 736,743 ****
--- 797,816 ----
ch_printf( ch, "\n\r%s ", victim->name );
ch_printf( ch, "is a level %d %s %s.\n\r",
victim->level,
+ IS_NPC(victim)?victim->race<MAX_NPC_RACE&&victim->race>=0?
+ npc_race[victim->race]:"unknown":victim->race<MAX_PC_RACE&&
+ race_table[victim->race]->race_name&&
+ race_table[victim->race]->race_name[0] != '\0'?
+ race_table[victim->race]->race_name:"unknown",
+ IS_NPC(victim)?victim->class<MAX_NPC_CLASS&&victim->class>=0?
+ npc_class[victim->class] : "unknown":victim->class<MAX_PC_CLASS&&
+ class_table[victim->class]->who_name&&
+ class_table[victim->class]->who_name[0] != '\0'?
+ class_table[victim->class]->who_name:"unknown");
+ /* Fix so it shows what is in class table
victim->race<MAX_NPC_RACE&&victim->race>=0?npc_race[victim->race] : "unknown",
victim->class<MAX_NPC_CLASS&&victim->class>=0?npc_class[victim->class] : "unknown" );
+ */
}
if ( number_percent( ) < LEARNED(ch, gsn_peek) )
***************
*** 1352,1359 ****
--- 1425,1444 ----
ch_printf( ch, "%s ", victim->name );
ch_printf( ch, "is a level %d %s %s.\n\r",
victim->level,
+ IS_NPC(victim)?victim->race<MAX_NPC_RACE&&victim->race>=0?
+ npc_race[victim->race] : "unknown":victim->race<MAX_PC_RACE&&
+ race_table[victim->race]->race_name&&
+ race_table[victim->race]->race_name[0] != '\0'?
+ race_table[victim->race]->race_name:"unknown",
+ IS_NPC(victim)?victim->class<MAX_NPC_CLASS&&victim->class>=0?
+ npc_class[victim->class] : "unknown":victim->class<MAX_PC_CLASS&&
+ class_table[victim->class]->who_name&&
+ class_table[victim->class]->who_name[0] != '\0'?
+ class_table[victim->class]->who_name:"unknown");
+ /* New Change
victim->race<MAX_NPC_RACE&&victim->race>=0?npc_race[victim->race] : "unknown",
victim->class<MAX_NPC_CLASS&&victim->class>=0?npc_class[victim->class] : "unknown" );
+ */
}
show_condition( ch, victim );
***************
*** 1880,1903 ****
stop_editing( ch );
return;
}
! if ( (pHelp = get_help(ch, argument)) == NULL ) /* new help */
{
! char argnew[MAX_INPUT_LENGTH];
! int lev;
!
! if ( isdigit(argument[0]) )
! {
! lev = number_argument( argument, argnew );
! argument = argnew;
! }
! else
! lev = get_trust(ch);
! CREATE( pHelp, HELP_DATA, 1 );
! pHelp->keyword = STRALLOC( strupper(argument) );
! pHelp->text = STRALLOC( "" );
! pHelp->level = lev;
! add_help( pHelp );
}
ch->substate = SUB_HELP_EDIT;
ch->dest_buf = pHelp;
start_editing( ch, pHelp->text );
--- 1965,2000 ----
stop_editing( ch );
return;
}
! if ( (pHelp = get_help(ch, argument)) == NULL ) /* new help */
{
! HELP_DATA *tHelp;
! char argnew[MAX_INPUT_LENGTH];
! int lev;
! bool new_help = TRUE;
!
! for ( tHelp=first_help; tHelp; tHelp = tHelp->next )
! if ( !str_cmp( argument, tHelp->keyword) )
! {
! pHelp = tHelp;
! new_help = FALSE;
! break;
! }
! if ( new_help ) {
! if ( isdigit(argument[0]) )
! {
! lev = number_argument( argument, argnew );
! argument = argnew;
! }
! else
! lev = get_trust(ch);
! CREATE( pHelp, HELP_DATA, 1 );
! pHelp->keyword = STRALLOC( strupper(argument) );
! pHelp->text = STRALLOC( "" );
! pHelp->level = lev;
! add_help( pHelp );
! }
}
+
ch->substate = SUB_HELP_EDIT;
ch->dest_buf = pHelp;
start_editing( ch, pHelp->text );
***************
*** 2519,2526 ****
if ( IS_RETIRED( wch ) )
class = "Retired";
else if ( IS_GUEST( wch ) )
! class = "Guest";
! else if ( wch->pcdata->rank && wch->pcdata->rank[0] != '\0' )
class = wch->pcdata->rank;
if ( wch->pcdata->clan )
--- 2616,2635 ----
if ( IS_RETIRED( wch ) )
class = "Retired";
else if ( IS_GUEST( wch ) )
! class = "Guest";
! else if ( wch->pcdata->clan
! && !str_cmp( wch->name, wch->pcdata->clan->leader )
! && wch->pcdata->clan->leadrank[0] != '\0' )
! class = wch->pcdata->clan->leadrank;
! else if ( wch->pcdata->clan
! && !str_cmp( wch->name, wch->pcdata->clan->number1 )
! && wch->pcdata->clan->onerank[0] != '\0' )
! class = wch->pcdata->clan->onerank;
! else if ( wch->pcdata->clan
! && !str_cmp( wch->name, wch->pcdata->clan->number2 )
! && wch->pcdata->clan->tworank[0] != '\0' )
! class = wch->pcdata->clan->tworank;
! else if ( wch->pcdata->rank && wch->pcdata->rank[0] != '\0' )
class = wch->pcdata->rank;
if ( wch->pcdata->clan )
***************
*** 2627,2633 ****
/* First make the structure. */
CREATE( cur_who, WHO_DATA, 1 );
cur_who->text = str_dup( buf );
! if ( IS_IMMORTAL( wch ) )
cur_who->type = WT_IMM;
else if ( fGroup )
if ( wch->leader || (whogr_p && whogr_p->indent) )
--- 2736,2742 ----
/* First make the structure. */
CREATE( cur_who, WHO_DATA, 1 );
cur_who->text = str_dup( buf );
! if ( wch->level > 50 && IS_IMMORTAL( wch ) )
cur_who->type = WT_IMM;
else if ( fGroup )
if ( wch->leader || (whogr_p && whogr_p->indent) )
***************
*** 2876,2881 ****
--- 2985,2999 ----
one_argument( argument, arg );
+ if ( arg[0]!='\0'
+ && (victim=get_char_world(ch, arg)) && !IS_NPC(victim)
+ && IS_SET(victim->pcdata->flags, PCFLAG_DND)
+ && get_trust(ch) < get_trust(victim) )
+ {
+ act( AT_PLAIN, "You didn't find any $T.", ch, NULL, arg, TO_CHAR );
+ return;
+ }
+
set_pager_color( AT_PERSON, ch );
if ( arg[0] == '\0' )
{
***************
*** 2887,2893 ****
&& !IS_NPC(victim)
&& victim->in_room
&& victim->in_room->area == ch->in_room->area
! && can_see( ch, victim ) )
{
found = TRUE;
/* if ( CAN_PKILL( victim ) )
--- 3005,3015 ----
&& !IS_NPC(victim)
&& victim->in_room
&& victim->in_room->area == ch->in_room->area
! && can_see( ch, victim )
! && ( get_trust(ch) >= get_trust(victim)
! || !IS_SET(victim->pcdata->flags, PCFLAG_DND) )
! ) /* if victim has the DND flag ch must outrank them */
!
{
found = TRUE;
/* if ( CAN_PKILL( victim ) )
***************
*** 2896,2903 ****
set_pager_color( AT_PERSON, ch );
*/
pager_printf_color( ch, "&P%-13s ", victim->name );
! if ( CAN_PKILL( victim ) && victim->pcdata->clan
! && victim->pcdata->clan->clan_type != CLAN_ORDER
&& victim->pcdata->clan->clan_type != CLAN_GUILD )
pager_printf_color( ch, "%-18s\t", victim->pcdata->clan->badge );
else if ( CAN_PKILL( victim ) )
--- 3018,3027 ----
set_pager_color( AT_PERSON, ch );
*/
pager_printf_color( ch, "&P%-13s ", victim->name );
! if ( IS_IMMORTAL( victim ) && victim->level > 50 )
! send_to_pager_color( "&P(&WImmortal&P)\t", ch );
! else if ( CAN_PKILL( victim ) && victim->pcdata->clan
! && victim->pcdata->clan->clan_type != CLAN_ORDER
&& victim->pcdata->clan->clan_type != CLAN_GUILD )
pager_printf_color( ch, "%-18s\t", victim->pcdata->clan->badge );
else if ( CAN_PKILL( victim ) )
***************
*** 2955,2961 ****
send_to_char( "They're not here.\n\r", ch );
return;
}
!
diff = victim->level - ch->level;
if ( diff <= -10 ) msg = "You are far more experienced than $N.";
--- 3079,3089 ----
send_to_char( "They're not here.\n\r", ch );
return;
}
! if ( victim == ch )
! {
! send_to_char( "You decide you're pretty sure you could take yourself in a fight.\n\r", ch );
! return;
! }
diff = victim->level - ch->level;
if ( diff <= -10 ) msg = "You are far more experienced than $N.";
***************
*** 3260,3265 ****
--- 3388,3394 ----
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
+ char log_buf[MAX_STRING_LENGTH];
char *pArg;
char *pwdnew;
char *p;
***************
*** 3313,3318 ****
--- 3442,3448 ----
if ( arg1[0] == '\0' || arg2[0] == '\0' )
{
send_to_char( "Syntax: password <new> <again>.\n\r", ch );
+ send_to_char( "Syntax: password <new> <again>.\n\r", ch );
return;
}
***************
*** 3356,3361 ****
--- 3486,3497 ----
ch->pcdata->pwd = str_dup( pwdnew );
if ( IS_SET(sysdata.save_flags, SV_PASSCHG) )
save_char_obj( ch );
+ if ( ch->desc && ch->desc->host[0] != '\0' )
+ sprintf(log_buf, "%s changing password from site %s\n", ch->name,
+ ch->desc->host );
+ else
+ sprintf(log_buf, "%s changing thier password with no descriptor!", ch->name);
+ log_string( log_buf );
send_to_char( "Ok.\n\r", ch );
return;
}
***************
*** 3399,3405 ****
if ( command->level < LEVEL_HERO
&& command->level <= get_trust( ch )
&& (command->name[0] != 'm'
! && command->name[1] != 'p') )
{
pager_printf( ch, "%-12s", command->name );
if ( ++col % 6 == 0 )
--- 3535,3541 ----
if ( command->level < LEVEL_HERO
&& command->level <= get_trust( ch )
&& (command->name[0] != 'm'
! || command->name[1] != 'p') )
{
pager_printf( ch, "%-12s", command->name );
if ( ++col % 6 == 0 )
***************
*** 3417,3423 ****
&& command->level <= get_trust( ch )
&& !str_prefix(argument, command->name)
&& (command->name[0] != 'm'
! && command->name[1] != 'p') )
{
pager_printf( ch, "%-12s", command->name );
found = TRUE;
--- 3553,3559 ----
&& command->level <= get_trust( ch )
&& !str_prefix(argument, command->name)
&& (command->name[0] != 'm'
! || command->name[1] != 'p') )
{
pager_printf( ch, "%-12s", command->name );
found = TRUE;
***************
*** 3462,3467 ****
--- 3598,3606 ----
ch_printf_color( ch, "%s", !IS_SET( ch->deaf, CHANNEL_AUCTION ) ?
" &G+AUCTION" :
" &g-auction" );
+ ch_printf_color( ch, "%s", !IS_SET( ch->deaf, CHANNEL_TRAFFIC ) ?
+ " &G+TRAFFIC" :
+ " &g-traffic" );
ch_printf_color( ch, "%s", !IS_SET( ch->deaf, CHANNEL_QUEST ) ?
" &G+QUEST" :
" &g-quest" );
***************
*** 3566,3571 ****
--- 3705,3711 ----
}
if ( !str_cmp( arg+1, "auction" ) ) bit = CHANNEL_AUCTION;
+ else if ( !str_cmp( arg+1, "traffic" ) ) bit = CHANNEL_TRAFFIC;
else if ( !str_cmp( arg+1, "chat" ) ) bit = CHANNEL_CHAT;
else if ( !str_cmp( arg+1, "clan" ) ) bit = CHANNEL_CLAN;
else if ( !str_cmp( arg+1, "council" ) ) bit = CHANNEL_COUNCIL;
***************
*** 3607,3612 ****
--- 3747,3753 ----
REMOVE_BIT (ch->deaf, CHANNEL_QUEST);
REMOVE_BIT (ch->deaf, CHANNEL_WARTALK);
REMOVE_BIT (ch->deaf, CHANNEL_PRAY);
+ REMOVE_BIT (ch->deaf, CHANNEL_TRAFFIC);
REMOVE_BIT (ch->deaf, CHANNEL_MUSIC);
REMOVE_BIT (ch->deaf, CHANNEL_ASK);
REMOVE_BIT (ch->deaf, CHANNEL_SHOUT);
***************
*** 3624,3636 ****
--- 3765,3780 ----
if (ch->level >= LEVEL_IMMORTAL)
REMOVE_BIT (ch->deaf, CHANNEL_AVTALK);
+ /*
if (ch->level >= sysdata.log_level )
REMOVE_BIT (ch->deaf, CHANNEL_COMM);
+ */
} else if ((!fClear) && (ClearAll))
{
SET_BIT (ch->deaf, CHANNEL_RACETALK);
SET_BIT (ch->deaf, CHANNEL_AUCTION);
+ SET_BIT (ch->deaf, CHANNEL_TRAFFIC);
SET_BIT (ch->deaf, CHANNEL_CHAT);
SET_BIT (ch->deaf, CHANNEL_QUEST);
SET_BIT (ch->deaf, CHANNEL_PRAY);
***************
*** 3652,3659 ****
--- 3796,3805 ----
if (ch->level >= LEVEL_IMMORTAL)
SET_BIT (ch->deaf, CHANNEL_AVTALK);
+ /*
if (ch->level >= sysdata.log_level)
SET_BIT (ch->deaf, CHANNEL_COMM);
+ */
} else if (fClear)
{
***************
*** 4219,4226 ****
victim->sex == SEX_MALE ? "male" :
victim->sex == SEX_FEMALE ? "female" : "neutral",
victim->level,
! capitalize(npc_race[victim->race]),
! npc_class[victim->class],
get_age(victim) );
pager_printf(ch, " %s is a %sdeadly player",
--- 4365,4372 ----
victim->sex == SEX_MALE ? "male" :
victim->sex == SEX_FEMALE ? "female" : "neutral",
victim->level,
! capitalize(race_table[victim->race]->race_name),
! class_table[victim->class]->who_name,
get_age(victim) );
pager_printf(ch, " %s is a %sdeadly player",
***************
*** 4557,4560 ****
--- 4703,4722 ----
}
return FALSE;
+ }
+
+ /* Version info -- Scryn */
+
+ void do_version(CHAR_DATA* ch, char* argument)
+ {
+ if(IS_NPC(ch))
+ return;
+
+ set_char_color(AT_YELLOW, ch);
+ ch_printf(ch, "SMAUG %s.%s\n\r", SMAUG_VERSION_MAJOR, SMAUG_VERSION_MINOR);
+
+ if(IS_IMMORTAL(ch))
+ ch_printf(ch, "Compiled on %s at %s.\n\r", __DATE__, __TIME__);
+
+ return;
}
diff -c -r /home/5500/olddist/src/act_move.c /home/5500/dist/src/act_move.c
*** /home/5500/olddist/src/act_move.c Tue Jul 28 02:30:23 1998
--- /home/5500/dist/src/act_move.c Fri May 28 01:18:59 1999
***************
*** 775,780 ****
--- 775,786 ----
return rNONE;
}
+ if ( room_is_dnd(ch, to_room) )
+ {
+ send_to_char( "That room is \"do not disturb\" right now.\n\r", ch );
+ return rNONE;
+ }
+
if ( !IS_IMMORTAL(ch)
&& !IS_NPC(ch)
&& ch->in_room->area != to_room->area )
***************
*** 1458,1463 ****
--- 1464,1474 ----
{ send_to_char( "You can't do that.\n\r", ch ); return; }
if ( !IS_SET(pexit->exit_info, EX_CLOSED) )
{ send_to_char( "It's already open.\n\r", ch ); return; }
+ if ( IS_SET(pexit->exit_info, EX_LOCKED)
+ &&IS_SET(pexit->exit_info, EX_BOLTED))
+ { send_to_char( "The bolts locked.\n\r", ch ); return; }
+ if ( IS_SET(pexit->exit_info, EX_BOLTED) )
+ { send_to_char( "It's bolted.\n\r", ch ); return; }
if ( IS_SET(pexit->exit_info, EX_LOCKED) )
{ send_to_char( "It's locked.\n\r", ch ); return; }
***************
*** 2668,2671 ****
--- 2679,2794 ----
}
return rNONE;
+ }
+
+ /*
+ * This function bolts a door. Written by Blackmane
+ */
+
+ void do_bolt (CHAR_DATA * ch, char *argument)
+ {
+ char arg[MAX_INPUT_LENGTH];
+ EXIT_DATA *pexit;
+
+ one_argument (argument, arg);
+
+ if (arg[0] == '\0')
+ {
+ send_to_char ("Bolt what?\n\r", ch);
+ return;
+ }
+
+ if ((pexit = find_door (ch, arg, TRUE)) != NULL)
+ {
+
+ if (!IS_SET (pexit->exit_info, EX_ISDOOR))
+ {
+ send_to_char ("You can't do that.\n\r", ch);
+ return;
+ }
+ if (!IS_SET (pexit->exit_info, EX_CLOSED))
+ {
+ send_to_char ("It's not closed.\n\r", ch);
+ return;
+ }
+ if (!IS_SET (pexit->exit_info, EX_ISBOLT))
+ {
+ send_to_char ("You don't see a bolt.\n\r", ch);
+ return;
+ }
+ if (IS_SET (pexit->exit_info, EX_BOLTED))
+ {
+ send_to_char ("It's already bolted.\n\r", ch);
+ return;
+ }
+
+ if (!IS_SET (pexit->exit_info, EX_SECRET)
+ || (pexit->keyword && nifty_is_name (arg, pexit->keyword)))
+ {
+ send_to_char ("*Clunk*\n\r", ch);
+ act (AT_ACTION,"$n bolts the $d.", ch, NULL, pexit->keyword, TO_ROOM);
+ set_bexit_flag (pexit, EX_BOLTED);
+ return;
+ }
+ }
+
+ ch_printf (ch, "You see no %s here.\n\r", arg);
+ return;
+ }
+
+
+
+ /*
+ * This function unbolts a door. Written by Blackmane
+ */
+
+ void do_unbolt (CHAR_DATA * ch, char *argument)
+ {
+ char arg[MAX_INPUT_LENGTH];
+ EXIT_DATA *pexit;
+
+ one_argument (argument, arg);
+
+ if (arg[0] == '\0')
+ {
+ send_to_char ("Unbolt what?\n\r", ch);
+ return;
+ }
+
+ if ((pexit = find_door (ch, arg, TRUE)) != NULL)
+ {
+
+ if (!IS_SET (pexit->exit_info, EX_ISDOOR))
+ {
+ send_to_char ("You can't do that.\n\r", ch);
+ return;
+ }
+ if (!IS_SET (pexit->exit_info, EX_CLOSED))
+ {
+ send_to_char ("It's not closed.\n\r", ch);
+ return;
+ }
+ if (!IS_SET (pexit->exit_info, EX_ISBOLT))
+ {
+ send_to_char ("You don't see a bolt.\n\r", ch);
+ return;
+ }
+ if (!IS_SET (pexit->exit_info, EX_BOLTED))
+ {
+ send_to_char ("It's already unbolted.\n\r", ch);
+ return;
+ }
+
+ if (!IS_SET (pexit->exit_info, EX_SECRET)
+ || (pexit->keyword && nifty_is_name (arg, pexit->keyword)))
+ {
+ send_to_char ("*Clunk*\n\r", ch);
+ act (AT_ACTION,"$n unbolts the $d.",ch,NULL,pexit->keyword,TO_ROOM);
+ remove_bexit_flag (pexit, EX_BOLTED);
+ return;
+ }
+ }
+
+ ch_printf (ch, "You see no %s here.\n\r", arg);
+ return;
}
diff -c -r /home/5500/olddist/src/act_obj.c /home/5500/dist/src/act_obj.c
*** /home/5500/olddist/src/act_obj.c Tue Jul 28 02:30:33 1998
--- /home/5500/dist/src/act_obj.c Fri May 28 01:18:59 1999
***************
*** 41,46 ****
--- 41,49 ----
bool remove_obj args( ( CHAR_DATA *ch, int iWear, bool fReplace ) );
void wear_obj args( ( CHAR_DATA *ch, OBJ_DATA *obj, bool fReplace, sh_int wear_bit ) );
+ char* get_chance_verb args( ( OBJ_DATA *obj ) );
+ char* get_ed_number args( ( OBJ_DATA *obj, int number ) );
+
OBJ_DATA* recursive_note_find args( ( OBJ_DATA *obj, char* argument) );
/*
***************
*** 92,98 ****
return;
}
! if ( IS_SET( obj->magic_flags, ITEM_PKDISARMED ) )
{
if ( CAN_PKILL( ch ) && !get_timer( ch, TIMER_PKILLED ) )
{
--- 95,102 ----
return;
}
! if ( IS_SET( obj->magic_flags, ITEM_PKDISARMED )
! && !IS_NPC( ch ) )
{
if ( CAN_PKILL( ch ) && !get_timer( ch, TIMER_PKILLED ) )
{
***************
*** 410,417 ****
}
/* Killer/owner loot only if die to pkill blow --Blod */
if ( IS_OBJ_STAT( container, ITEM_CLANCORPSE )
! && !IS_NPC( ch )
&& container->action_desc[0] !='\0'
&& str_cmp( name, ch->name )
&& str_cmp( container->action_desc, ch->name ) )
--- 414,424 ----
}
/* Killer/owner loot only if die to pkill blow --Blod */
+ /* Added check for immortal so IMMS can get things out of
+ * corpses --Shaddai */
+
if ( IS_OBJ_STAT( container, ITEM_CLANCORPSE )
! && !IS_NPC( ch ) && !IS_IMMORTAL(ch)
&& container->action_desc[0] !='\0'
&& str_cmp( name, ch->name )
&& str_cmp( container->action_desc, ch->name ) )
***************
*** 886,892 ****
if ( ms_find_obj(ch) )
return;
! if ( xIS_SET( ch->act, PLR_LITTERBUG ) )
{
set_char_color( AT_YELLOW, ch );
send_to_char( "A godly force prevents you from dropping anything...\n\r", ch );
--- 893,899 ----
if ( ms_find_obj(ch) )
return;
! if ( !IS_NPC(ch) && xIS_SET( ch->act, PLR_LITTERBUG ) )
{
set_char_color( AT_YELLOW, ch );
send_to_char( "A godly force prevents you from dropping anything...\n\r", ch );
***************
*** 937,943 ****
act( AT_ACTION, "$n drops some gold.", ch, NULL, NULL, TO_ROOM );
obj_to_room( create_money( number ), ch->in_room );
! send_to_char( "OK.\n\r", ch );
if ( IS_SET( sysdata.save_flags, SV_DROP ) )
save_char_obj( ch );
return;
--- 944,950 ----
act( AT_ACTION, "$n drops some gold.", ch, NULL, NULL, TO_ROOM );
obj_to_room( create_money( number ), ch->in_room );
! send_to_char( "You let the gold slip from your hand.\n\r", ch );
if ( IS_SET( sysdata.save_flags, SV_DROP ) )
save_char_obj( ch );
return;
***************
*** 1113,1125 ****
ch->gold -= amount;
victim->gold += amount;
strcpy(buf, "$n gives you ");
! strcat(buf, arg1);
strcat(buf, (amount > 1) ? " coins." : " coin.");
act( AT_ACTION, buf, ch, NULL, victim, TO_VICT );
act( AT_ACTION, "$n gives $N some gold.", ch, NULL, victim, TO_NOTVICT );
act( AT_ACTION, "You give $N some gold.", ch, NULL, victim, TO_CHAR );
- send_to_char( "OK.\n\r", ch );
mprog_bribe_trigger( victim, ch, amount );
if ( IS_SET( sysdata.save_flags, SV_GIVE ) && !char_died(ch) )
save_char_obj(ch);
--- 1120,1131 ----
ch->gold -= amount;
victim->gold += amount;
strcpy(buf, "$n gives you ");
! strcat(buf, arg1 );
strcat(buf, (amount > 1) ? " coins." : " coin.");
act( AT_ACTION, buf, ch, NULL, victim, TO_VICT );
act( AT_ACTION, "$n gives $N some gold.", ch, NULL, victim, TO_NOTVICT );
act( AT_ACTION, "You give $N some gold.", ch, NULL, victim, TO_CHAR );
mprog_bribe_trigger( victim, ch, amount );
if ( IS_SET( sysdata.save_flags, SV_GIVE ) && !char_died(ch) )
save_char_obj(ch);
***************
*** 1422,1428 ****
&& (( IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR)
&& ch->class == CLASS_WARRIOR )
|| ( IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR)
! && ch->class == 8 )
|| ( IS_OBJ_STAT(obj, ITEM_ANTI_MAGE)
&& ch->class == CLASS_MAGE )
|| ( IS_OBJ_STAT(obj, ITEM_ANTI_THIEF)
--- 1428,1434 ----
&& (( IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR)
&& ch->class == CLASS_WARRIOR )
|| ( IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR)
! && ch->class == CLASS_PALADIN )
|| ( IS_OBJ_STAT(obj, ITEM_ANTI_MAGE)
&& ch->class == CLASS_MAGE )
|| ( IS_OBJ_STAT(obj, ITEM_ANTI_THIEF)
***************
*** 1882,1894 ****
}
else
{
! if ( (tmpobj=get_eq_char(ch, WEAR_WIELD)) != NULL
! && (get_eq_char(ch, WEAR_MISSILE_WIELD) ||
! get_eq_char(ch, WEAR_DUAL_WIELD) ) )
{
send_to_char( "You're already wielding two weapons.\n\r", ch );
return;
}
}
if ( tmpobj )
--- 1888,1909 ----
}
else
{
! OBJ_DATA *mw, *dw, *hd;
!
! tmpobj = get_eq_char(ch, WEAR_WIELD);
! mw = get_eq_char(ch, WEAR_MISSILE_WIELD);
! dw = get_eq_char(ch, WEAR_DUAL_WIELD);
! if ( tmpobj && (mw || dw) )
{
send_to_char( "You're already wielding two weapons.\n\r", ch );
return;
}
+ hd = get_eq_char(ch, WEAR_HOLD);
+ if ( (mw && hd) || (tmpobj && hd) )
+ {
+ send_to_char( "You're already wielding a weapon AND holding something.\n\r", ch );
+ return;
+ }
}
if ( tmpobj )
***************
*** 2185,2191 ****
act( AT_PLAIN, "$p is not an acceptable sacrifice.", ch, obj, 0, TO_CHAR );
return;
}
! if ( IS_SET( obj->magic_flags, ITEM_PKDISARMED ) )
{
if ( CAN_PKILL( ch ) && !get_timer( ch, TIMER_PKILLED ) )
{
--- 2200,2207 ----
act( AT_PLAIN, "$p is not an acceptable sacrifice.", ch, obj, 0, TO_CHAR );
return;
}
! if ( IS_SET( obj->magic_flags, ITEM_PKDISARMED )
! && !IS_NPC( ch ) )
{
if ( CAN_PKILL( ch ) && !get_timer( ch, TIMER_PKILLED ) )
{
***************
*** 2500,2506 ****
/* show item data here */
if (auction->bet > 0)
! sprintf (buf, "\n\rCurrent bid on this item is %d gold.\n\r",auction->bet);
else
sprintf (buf, "\n\rNo bids on this item have been received.\n\r");
set_char_color ( AT_BLUE, ch );
--- 2516,2522 ----
/* show item data here */
if (auction->bet > 0)
! sprintf (buf, "\n\rCurrent bid on this item is %s gold.\n\r", num_punct( auction->bet ) );
else
sprintf (buf, "\n\rNo bids on this item have been received.\n\r");
set_char_color ( AT_BLUE, ch );
***************
*** 2584,2589 ****
--- 2600,2606 ----
send_to_char( ".\n\r", ch );
break;
+ case ITEM_MISSILE_WEAPON:
case ITEM_WEAPON:
sprintf( buf, "Damage is %d to %d (average %d).%s\n\r",
obj->value[1], obj->value[2],
***************
*** 2731,2737 ****
auction->going = 0;
auction->pulse = PULSE_AUCTION; /* start the auction over again */
! sprintf (buf,"A bid of %d gold has been received on %s.\n\r",newbet,auction->item->short_descr);
talk_auction (buf);
return;
--- 2748,2754 ----
auction->going = 0;
auction->pulse = PULSE_AUCTION; /* start the auction over again */
! sprintf (buf,"A bid of %s gold has been received on %s.\n\r",num_punct(newbet),auction->item->short_descr);
talk_auction (buf);
return;
***************
*** 2825,2830 ****
--- 2842,2848 ----
case ITEM_MATCH:
case ITEM_HERB:
case ITEM_WEAPON:
+ case ITEM_MISSILE_WEAPON:
case ITEM_ARMOR:
case ITEM_STAFF:
case ITEM_WAND:
***************
*** 2953,2959 ****
vch = rch;
act( AT_WHITE, "$p falls on $n!", vch, obj, NULL, TO_ROOM );
act( AT_WHITE, "$p falls on you!", vch, obj, NULL, TO_CHAR );
! damage( vch, vch, dam*vch->level, TYPE_UNDEFINED );
}
/* Damage objects */
switch( obj->item_type )
--- 2971,2981 ----
vch = rch;
act( AT_WHITE, "$p falls on $n!", vch, obj, NULL, TO_ROOM );
act( AT_WHITE, "$p falls on you!", vch, obj, NULL, TO_CHAR );
!
! if ( IS_NPC( vch ) && xIS_SET( vch->act, ACT_HARDHAT ) )
! act( AT_WHITE, "$p bounces harmlessly off your head!", vch, obj, NULL, TO_CHAR );
! else
! damage( vch, vch, dam*vch->level, TYPE_UNDEFINED );
}
/* Damage objects */
switch( obj->item_type )
***************
*** 3088,3090 ****
--- 3110,3256 ----
return recursive_note_find(obj->next_content, argument);
}
+
+ void do_rolldie(CHAR_DATA *ch, char *argument)
+ {
+ OBJ_DATA* die;
+
+ char output_string[MAX_STRING_LENGTH];
+ char roll_string[MAX_STRING_LENGTH];
+ char total_string[MAX_STRING_LENGTH];
+
+ char* verb;
+
+ /* char* face_string = NULL;
+ char** face_table = NULL;*/
+ int rollsum = 0;
+ int roll_count = 0;
+
+ int numsides;
+ int numrolls;
+
+ bool* face_seen_table = NULL;
+
+ if ( IS_NPC(ch) )
+ {
+ send_to_char( "Huh?\n\r", ch );
+ return;
+ }
+
+ if ( ( die = get_eq_char(ch, WEAR_HOLD) ) == NULL
+ || die->item_type != ITEM_CHANCE )
+ {
+ ch_printf(ch, "You must be holding an item of chance!\n\r");
+ return;
+ }
+
+ numrolls = (is_number(argument)) ? atoi(argument) : 1;
+ verb = get_chance_verb(die);
+
+ if(numrolls > 100)
+ {
+ ch_printf(ch, "You can't %s more than 100 times!\n\r", verb);
+ return;
+ }
+
+ numsides = die->value[0];
+
+ if(numsides <= 1)
+ {
+ ch_printf(ch, "There is no element of chance in this game!\n\r");
+ return;
+ }
+
+ if(die->value[3] == 1)
+ {
+ if(numrolls > numsides)
+ {
+ ch_printf(ch, "Nice try, but you can only %s %d times.\n\r", verb, numsides);
+ return;
+ }
+ face_seen_table = calloc(numsides, sizeof(bool));
+ if(!face_seen_table)
+ {
+ bug("do_rolldie: cannot allocate memory for face_seen_table array, terminating.\n\r",0);
+ return;
+ }
+ }
+
+ sprintf(roll_string, " ");
+
+ while(roll_count++ < numrolls)
+ {
+ int current_roll;
+ char current_roll_string[MAX_STRING_LENGTH];
+
+ do
+ {
+ current_roll = number_range(1, numsides);
+ } while(die->value[3] == 1 && face_seen_table[current_roll - 1] == TRUE);
+
+ if(die->value[3] == 1)
+ face_seen_table[current_roll - 1] = TRUE;
+
+ rollsum += current_roll;
+
+ if(roll_count > 1)
+ strcat(roll_string, ", ");
+ if(numrolls > 1 && roll_count == numrolls)
+ strcat(roll_string, "and ");
+
+ if(die->value[1] == 1)
+ {
+ char* face_name = get_ed_number(die, current_roll);
+ if(face_name)
+ {
+ char* face_name_copy = strdup(face_name); /* Since I want to tokenize without modifying the original string */
+ sprintf(current_roll_string, "%s", strtok(face_name_copy, "\n"));
+ free(face_name_copy);
+ }
+ else
+ sprintf(current_roll_string, "%d", current_roll);
+ }
+ else
+ sprintf(current_roll_string, "%d", current_roll);
+ strcat(roll_string, current_roll_string);
+ }
+
+ if(numrolls > 1 && die->value[2] == 1)
+ {
+ sprintf(total_string, ", for a total of %d", rollsum);
+ strcat(roll_string, total_string);
+ }
+
+ strcat(roll_string, ".\n\r");
+
+ sprintf(output_string, "You %s%s", verb, roll_string);
+ act( AT_GREEN, output_string, ch, NULL, NULL, TO_CHAR);
+
+ sprintf(output_string, "$n %s%s", verb, roll_string);
+ act( AT_GREEN, output_string, ch, NULL, NULL, TO_ROOM);
+
+ if(face_seen_table)
+ free(face_seen_table);
+ return;
+ }
+
+ char* get_ed_number(OBJ_DATA* obj, int number)
+ {
+ EXTRA_DESCR_DATA* ed;
+ int count;
+
+ for(ed = obj->first_extradesc, count = 1; ed; ed = ed->next, count++)
+ {
+ if(count == number)
+ return ed->description;
+ }
+
+ return NULL;
+ }
+
+ char* get_chance_verb(OBJ_DATA* obj)
+ {
+ return (obj->action_desc[0] != '\0') ? obj->action_desc : "roll$q";
+ }
+
+ /*dice chance deal throw*/
diff -c -r /home/5500/olddist/src/act_wiz.c /home/5500/dist/src/act_wiz.c
*** /home/5500/olddist/src/act_wiz.c Tue Jul 28 02:30:38 1998
--- /home/5500/dist/src/act_wiz.c Fri May 28 01:18:59 1999
***************
*** 23,38 ****
#include <sys/stat.h>
#include <errno.h>
#include "mud.h"
#define RESTORE_INTERVAL 21600
char * const save_flag[] =
{ "death", "kill", "passwd", "drop", "put", "give", "auto", "zap",
! "auction", "get", "receive", "idle", "backup", "quitbackup", "r14", "r15",
! "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26",
! "r27", "r28", "r29", "r30", "r31" };
/* from comm.c */
bool write_to_descriptor args( ( int desc, char *txt, int length ) );
--- 23,45 ----
#include <sys/stat.h>
#include <errno.h>
#include "mud.h"
+ #ifdef WIN32
+ #include <io.h>
+ #define F_OK 0
+ #endif
#define RESTORE_INTERVAL 21600
char * const save_flag[] =
{ "death", "kill", "passwd", "drop", "put", "give", "auto", "zap",
! "auction", "get", "receive", "idle", "backup", "quitbackup", "fill",
! "empty", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24",
! "r25", "r26", "r27", "r28", "r29", "r30", "r31" };
!
+ /* from reset.c */
+ int generate_itemlevel args ( ( AREA_DATA *pArea, OBJ_INDEX_DATA *pObjIndex ));
/* from comm.c */
bool write_to_descriptor args( ( int desc, char *txt, int length ) );
***************
*** 86,91 ****
--- 93,119 ----
}
/*
+ * Toggle "Do Not Disturb" flag. Used to prevent lower level imms from
+ * using commands like "trans" and "goto" on higher level imms.
+ */
+ void do_dnd( CHAR_DATA *ch, char *argument )
+ {
+ if ( !IS_NPC(ch) && ch->pcdata )
+ if ( IS_SET(ch->pcdata->flags, PCFLAG_DND) )
+ {
+ REMOVE_BIT(ch->pcdata->flags, PCFLAG_DND);
+ send_to_char( "Your 'do not disturb' flag is now off.\n\r", ch );
+ }
+ else
+ {
+ SET_BIT(ch->pcdata->flags, PCFLAG_DND);
+ send_to_char( "Your 'do not disturb' flag is now on.\n\r", ch );
+ }
+ else
+ send_to_char( "huh?\n\r", ch );
+ }
+
+ /*
* The "watch" facility allows imms to specify the name of a player or
* the name of a site to be watched. It is like "logging" a player except
* the results are written to a file in the "watch" directory named with
***************
*** 572,577 ****
--- 600,606 ----
}
}
+ /* 02-07-99 New auth messages --Mystaric */
void do_authorize( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
***************
*** 586,603 ****
argument = one_argument( argument, arg2 );
if ( arg1[0] == '\0' )
{
! send_to_char( "Usage: authorize <player> <yes|name|no/deny>\n\r", ch );
send_to_char( "Pending authorizations:\n\r", ch );
send_to_char( " Chosen Character Name\n\r", ch );
send_to_char( "---------------------------------------------\n\r", ch );
for ( d = first_descriptor; d; d = d->next )
if ( (victim = d->character) != NULL && IS_WAITING_FOR_AUTH(victim) )
! ch_printf( ch, " %s@%s new %s %s (%s)...\n\r",
victim->name,
! victim->desc->host,
race_table[victim->race]->race_name,
class_table[victim->class]->who_name,
! IS_PKILL( victim ) ? "Deadly" : "Peaceful" );
return;
}
--- 615,632 ----
argument = one_argument( argument, arg2 );
if ( arg1[0] == '\0' )
{
! send_to_char( "Usage: authorize <player> <yes|name|immsim|mobsim|swear|plain|unpronu|no/deny>\n\r", ch );
send_to_char( "Pending authorizations:\n\r", ch );
send_to_char( " Chosen Character Name\n\r", ch );
send_to_char( "---------------------------------------------\n\r", ch );
for ( d = first_descriptor; d; d = d->next )
if ( (victim = d->character) != NULL && IS_WAITING_FOR_AUTH(victim) )
! ch_printf( ch, " %s@%s new %s %s (%s)...\n\r",
victim->name,
! victim->desc->host,
race_table[victim->race]->race_name,
class_table[victim->class]->who_name,
! IS_PKILL( victim ) ? "Deadly" : "Peaceful" );
return;
}
***************
*** 608,643 ****
set_char_color( AT_IMMORT, victim );
if ( arg2[0]=='\0' || !str_cmp( arg2,"accept" ) || !str_cmp( arg2,"yes" ))
{
! victim->pcdata->auth_state = 3;
! if ( victim->pcdata->authed_by )
! STRFREE( victim->pcdata->authed_by );
! victim->pcdata->authed_by = QUICKLINK( ch->name );
! sprintf( buf, "%s: authorized", victim->name);
! to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
!
! ch_printf( ch, "You have authorized %s.\n\r", victim->name);
!
/* Below sends a message to player when name is accepted - Brittany */
! ch_printf_color( victim, /* B */
"\n\r>he MUD Administrators have accepted the name %s.\n\r"
"You are authorized to enter the Realms at the end of "
"this area.\n\r", victim->name);
return;
}
else if ( !str_cmp( arg2, "no" ) || !str_cmp( arg2, "deny" ) )
{
! send_to_char_color( "&RYou have been denied access.\n\r", victim);
! sprintf( buf, "%s: denied authorization", victim->name);
! to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
! ch_printf( ch, "You have denied %s.\n\r", victim->name);
! do_quit(victim, "");
}
else if ( !str_cmp( arg2, "name" ) || !str_cmp(arg2, "n" ) )
{
! victim->pcdata->auth_state = 2;
! sprintf( buf, "%s: name denied", victim->name);
! to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
ch_printf_color(victim,
"&R\n\rThe MUD Administrators have found the name %s "
"to be unacceptable.\n\r"
--- 637,746 ----
set_char_color( AT_IMMORT, victim );
if ( arg2[0]=='\0' || !str_cmp( arg2,"accept" ) || !str_cmp( arg2,"yes" ))
{
! victim->pcdata->auth_state = 3;
! if ( victim->pcdata->authed_by )
! STRFREE( victim->pcdata->authed_by );
! victim->pcdata->authed_by = QUICKLINK( ch->name );
! sprintf( buf, "%s: authorized", victim->name);
! to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
!
! ch_printf( ch, "You have authorized %s.\n\r", victim->name);
!
/* Below sends a message to player when name is accepted - Brittany */
! ch_printf_color( victim,
"\n\r>he MUD Administrators have accepted the name %s.\n\r"
"You are authorized to enter the Realms at the end of "
"this area.\n\r", victim->name);
return;
}
+
+ else if ( !str_cmp( arg2, "immsim" ) || !str_cmp( arg2, "i" ) )
+ {
+ victim->pcdata->auth_state = 2;
+ sprintf( buf, "%s: name denied - similar to Imm name", victim->name);
+ to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
+
+ send_to_char_color(
+ "&RThe name you have chosen is too similar to that of a current immortal. \n\r"
+ "We ask you to please choose another name using the name command.\n\r", victim);
+ ch_printf( ch, "You requested %s change names.\n\r", victim->name);
+ return;
+ }
+
+ else if ( !str_cmp( arg2, "mobsim" ) || !str_cmp( arg2, "m" ) )
+ {
+ victim->pcdata->auth_state = 2;
+ sprintf( buf, "%s: name denied - similar to mob name", victim->name);
+ to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
+
+ send_to_char_color(
+ "&RThe name you have chosen is too similar to that of certain\n\r"
+ "monsters in the game, in the long run this could cause problems\n\r"
+ "and therefore we are unable to authorize them. Please choose\n\r"
+ "another name using the name command.\n\r", victim);
+ ch_printf( ch, "You requested %s change names.\n\r", victim->name);
+ return;
+ }
+
+ else if ( !str_cmp( arg2, "swear" ) || !str_cmp( arg2, "s" ) )
+ {
+ victim->pcdata->auth_state = 2;
+ sprintf( buf, "%s: name denied - swear word", victim->name);
+ to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
+
+ send_to_char_color(
+ "&RWe will not authorize names containing swear words, in any language.\n\r"
+ "Please choose another name using the name command.\n\r",victim);
+ ch_printf( ch, "You requested %s change names.\n\r", victim->name);
+ return;
+ }
+
+ else if ( !str_cmp( arg2, "plain" ) || !str_cmp( arg2, "p" ) )
+ {
+ victim->pcdata->auth_state = 2;
+ sprintf( buf, "%s: name denied", victim->name);
+ to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
+
+ send_to_char_color(
+ "&RWe would ask you to please attempt to choose a name that is more\n\r"
+ "medieval in nature. Please choose another name using the name\n\r"
+ "command.\n\r",victim);
+ ch_printf( ch, "You requested %s change names.\n\r", victim->name);
+ return;
+ }
+
+ else if ( !str_cmp( arg2, "unprou" ) || !str_cmp( arg2, "u" ) )
+ {
+ victim->pcdata->auth_state = 2;
+ sprintf( buf, "%s: name denied - unpronouncable", victim->name);
+ to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
+
+ send_to_char_color(
+ "&RThe name you have chosen is unpronouncable.\n\r"
+ "Please choose another name using the name\n\r"
+ "command.\n\r",victim);
+ ch_printf( ch, "You requested %s change names.\n\r", victim->name);
+ return;
+ }
+
else if ( !str_cmp( arg2, "no" ) || !str_cmp( arg2, "deny" ) )
{
! send_to_char_color(
! "&RThe name you have chosen and/or the actions you have taken have\n\r"
! "been deemed grossly unacceptable to the administration of this mud.\n\r"
! "We ask you to discontinue such behaviour, or suffer possible banishmemt\n\r"
! "from this mud.\n\r", victim);
! sprintf( buf, "%s: denied authorization", victim->name);
! to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
! ch_printf( ch, "You have denied %s.\n\r", victim->name);
! do_quit(victim, "");
}
else if ( !str_cmp( arg2, "name" ) || !str_cmp(arg2, "n" ) )
{
! victim->pcdata->auth_state = 2;
! sprintf( buf, "%s: name denied", victim->name);
! to_channel( buf, CHANNEL_AUTH, "Auth", LEVEL_NEOPHYTE );
ch_printf_color(victim,
"&R\n\rThe MUD Administrators have found the name %s "
"to be unacceptable.\n\r"
***************
*** 646,659 ****
"The name you choose must be medieval and original.\n\r"
"No titles, descriptive words, or names close to any existing "
"Immortal's name.\n\r", victim->name);
! ch_printf( ch, "You requested %s change names.\n\r", victim->name);
! return;
}
else
{
! send_to_char("Invalid argument.\n\r", ch);
! return;
}
}
--- 749,762 ----
"The name you choose must be medieval and original.\n\r"
"No titles, descriptive words, or names close to any existing "
"Immortal's name.\n\r", victim->name);
! ch_printf( ch, "You requested %s change names.\n\r", victim->name);
! return;
}
else
{
! send_to_char("Invalid argument.\n\r", ch);
! return;
}
}
***************
*** 1042,1047 ****
--- 1145,1156 ----
return;
}
+ void do_ech( CHAR_DATA *ch, char *argument )
+ {
+ send_to_char_color( "&YIf you want to echo something, use 'echo'.\n\r", ch );
+ return;
+ }
+
void do_echo( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
***************
*** 1079,1092 ****
if ( !color )
color = AT_IMMORT;
one_argument(argument, arg);
- if ( !str_cmp( arg, "Thoric" )
- || !str_cmp( arg, "Circe" )
- || !str_cmp( arg, "Haus" )
- || !str_cmp( arg, "Scryn" )
- || !str_cmp( arg, "Blodkai" )) {
- ch_printf( ch, "I don't think %s would like that!\n\r", arg );
- return;
- }
echo_to_all ( color, argument, target );
}
--- 1188,1193 ----
***************
*** 1119,1132 ****
}
one_argument( argument, arg );
- if ( !str_cmp( arg, "Thoric" )
- || !str_cmp( arg, "Circe" )
- || !str_cmp( arg, "Haus" )
- || !str_cmp( arg, "Scryn" )
- || !str_cmp( arg, "Blodkai" ) ) {
- ch_printf( ch, "I don't think %s would like that!\n\r", arg );
- return;
- }
if ( (color = get_color ( argument )) )
{
argument = one_argument ( argument, arg );
--- 1220,1225 ----
***************
*** 1172,1178 ****
send_to_char( "Transfer whom (and where)?\n\r", ch );
return;
}
! if ( !str_cmp( arg1, "all" ) )
{
for ( d = first_descriptor; d; d = d->next )
{
--- 1265,1271 ----
send_to_char( "Transfer whom (and where)?\n\r", ch );
return;
}
! if ( !str_cmp( arg1, "all" ) && get_trust(ch) >= LEVEL_GREATER)
{
for ( d = first_descriptor; d; d = d->next )
{
***************
*** 1226,1231 ****
--- 1319,1339 ----
send_to_char( "They have no physical location!\n\r", ch );
return;
}
+ /* modification to prevent a low level imm from transferring a */
+ /* higher level imm with the DND flag on. - Gorog */
+ if ( !IS_NPC(victim) && get_trust(ch) < get_trust(victim)
+ && victim->desc
+ && (victim->desc->connected == CON_PLAYING
+ || victim->desc->connected == CON_EDITING )
+ && IS_SET(victim->pcdata->flags, PCFLAG_DND) )
+ {
+ pager_printf( ch,
+ "Sorry. %s does not wish to be disturbed.\n\r", victim->name);
+ pager_printf( victim,
+ "Your DND flag just foiled %s's transfer command.\n\r", ch->name);
+ return;
+ }
+ /* end of modification */
if ( victim->fighting )
stop_fighting( victim, TRUE );
***************
*** 1275,1289 ****
return;
}
! /* Added do_atmob and do_atobj to reduce lag associated with at
* --Shaddai
*/
! void do_atmob( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
! ROOM_INDEX_DATA *location;
ROOM_INDEX_DATA *original;
! CHAR_DATA *wch;
set_char_color( AT_IMMORT, ch );
--- 1383,1397 ----
return;
}
! /* Added do_at and do_atobj to reduce lag associated with at
* --Shaddai
*/
! void do_at( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
! ROOM_INDEX_DATA *location = NULL;
ROOM_INDEX_DATA *original;
! CHAR_DATA *wch=NULL, *victim;
set_char_color( AT_IMMORT, ch );
***************
*** 1293,1305 ****
send_to_char( "At where what?\n\r", ch );
return;
}
! if ( ( wch = get_char_world( ch, arg ) ) == NULL
! || !IS_NPC(wch) || wch->in_room == NULL)
{
! send_to_char( "No such mobile in existance.\n\r", ch );
return;
}
! location = wch->in_room;
if ( room_is_private( location ) )
{
if ( get_trust( ch ) < LEVEL_GREATER )
--- 1401,1441 ----
send_to_char( "At where what?\n\r", ch );
return;
}
! if ( is_number( arg ) )
! location = get_room_index( atoi( arg ) );
! else if ( !str_cmp(arg, "pk"))
! location = get_room_index( last_pkroom );
! else if ( ( wch = get_char_world( ch, arg ) ) == NULL
! || wch->in_room == NULL)
! {
! send_to_char( "No such mobile or player in existance.\n\r", ch );
! return;
! }
! if ( !location && wch )
! location = wch->in_room;
!
! if ( !location )
{
! send_to_char( "No such location exists.\n\r", ch );
return;
}
!
! /* The following mod is used to prevent players from using the */
! /* at command on a higher level immortal who has a DND flag */
! if ( wch && !IS_NPC(wch)
! && IS_SET(wch->pcdata->flags, PCFLAG_DND)
! && get_trust(ch) < get_trust(wch) )
! {
! pager_printf( ch,
! "Sorry. %s does not wish to be disturbed.\n\r",
! wch->name);
! pager_printf( wch,
! "Your DND flag just foiled %s's at command.\n\r", ch->name);
! return;
! }
! /* End of modification -- Gorog */
!
!
if ( room_is_private( location ) )
{
if ( get_trust( ch ) < LEVEL_GREATER )
***************
*** 1308,1316 ****
return;
}
else
- {
send_to_char( "Overriding private flag!\n\r", ch );
! }
}
set_char_color( AT_PLAIN, ch );
--- 1444,1458 ----
return;
}
else
send_to_char( "Overriding private flag!\n\r", ch );
! }
!
! if ( (victim=room_is_dnd(ch, location)) )
! {
! pager_printf( ch, "That room is \"do not disturb\" right now.\n\r" );
! pager_printf( victim,
! "Your DND flag just foiled %s's atmob command\n\r", ch->name );
! return;
}
set_char_color( AT_PLAIN, ch );
***************
*** 1333,1338 ****
--- 1475,1481 ----
ROOM_INDEX_DATA *location;
ROOM_INDEX_DATA *original;
OBJ_DATA *obj;
+ CHAR_DATA *victim;
set_char_color( AT_IMMORT, ch );
***************
*** 1358,1430 ****
return;
}
else
- {
send_to_char( "Overriding private flag!\n\r", ch );
- }
}
! set_char_color( AT_PLAIN, ch );
! original = ch->in_room;
! char_from_room( ch );
! char_to_room( ch, location );
! interpret( ch, argument );
!
! if ( !char_died(ch) )
! {
! char_from_room( ch );
! char_to_room( ch, original );
! }
! return;
! }
!
! void do_at( CHAR_DATA *ch, char *argument )
! {
! char arg[MAX_INPUT_LENGTH];
! ROOM_INDEX_DATA *location = NULL;
! ROOM_INDEX_DATA *original;
! DESCRIPTOR_DATA *d;
!
! set_char_color( AT_IMMORT, ch );
!
! argument = one_argument( argument, arg );
! if ( arg[0] == '\0' || argument[0] == '\0' )
! {
! send_to_char( "At where what?\n\r", ch );
! return;
! }
! if ( is_number( arg ) )
! location = get_room_index( atoi( arg ) );
! else if ( !str_cmp(arg, "pk"))
! location = get_room_index( last_pkroom );
! else
! {
! for ( d = first_descriptor; d; d = d->next )
! {
! if ( (d->connected != CON_PLAYING && d->connected != CON_EDITING) ||
! !can_see( ch, d->character ) || str_cmp(d->character->name,arg))
! continue;
! break;
! }
! if ( d )
! location = d->character->in_room;
! }
!
! if ( !location )
{
! send_to_char( "No such location.\n\r", ch );
! return;
! }
! if ( room_is_private( location ) )
! {
! if ( get_trust( ch ) < LEVEL_GREATER )
! {
! send_to_char( "That room is private right now.\n\r", ch );
! return;
! }
! else
! {
! send_to_char( "Overriding private flag!\n\r", ch );
! }
}
set_char_color( AT_PLAIN, ch );
--- 1501,1515 ----
return;
}
else
send_to_char( "Overriding private flag!\n\r", ch );
}
! if ( (victim=room_is_dnd(ch, location)) )
{
! pager_printf( ch, "That room is \"do not disturb\" right now.\n\r" );
! pager_printf( victim,
! "Your DND flag just foiled %s's atobj command\n\r", ch->name );
! return;
}
set_char_color( AT_PLAIN, ch );
***************
*** 1563,1568 ****
--- 1648,1655 ----
case SECT_DESERT: sect = "Desert"; break;
case SECT_OCEANFLOOR: sect = "Oceanfloor"; break;
case SECT_UNDERGROUND: sect = "Underground"; break;
+ case SECT_LAVA: sect = "Lava"; break;
+ case SECT_SWAMP: sect = "Swamp"; break;
}
ch_printf_color( ch, "&cVnum: &w%d &cSector: &w%d (%s) &cLight: &w%d",
***************
*** 1724,1736 ****
return;
}
- void do_moblog( CHAR_DATA *ch, char *argument )
- {
- set_char_color( AT_LOG, ch );
- send_to_char( "\n\r[Date_|_Time] Current moblog:\n\r", ch );
- show_file( ch, MOBLOG_FILE );
- return;
- }
void do_mstat( CHAR_DATA *ch, char *argument )
{
--- 1811,1816 ----
***************
*** 1766,1771 ****
--- 1846,1859 ----
send_to_pager( "Their godly glow prevents you from getting a good look.\n\r", ch );
return;
}
+ if ( IS_NPC( victim) && get_trust( ch ) < LEVEL_GREATER
+ && xIS_SET( victim->act, ACT_STATSHIELD ) )
+ {
+ set_pager_color( AT_IMMORT, ch );
+ send_to_pager( "Their godly glow prevents you from getting a good look.\n\r", ch );
+ return;
+ }
+
pager_printf_color( ch, "\n\r&c%s: &C%-20s", IS_NPC(victim) ? "Mobile name" : "Name", victim->name );
if ( !IS_NPC(victim) )
pager_printf_color( ch, "&cStatus : &w%-10s", CAN_PKILL(victim) ? "Deadly" :
***************
*** 1803,1818 ****
get_curr_lck(victim) );
pager_printf_color( ch,
"&cLevel : &P%-2d ", victim->level );
! if ( victim->class < MAX_NPC_CLASS && victim->class >= 0
! && victim->race < MAX_NPC_RACE && victim->race >= 0 )
! pager_printf_color( ch, "&cClass : &w%-2.2d/%-10s &cRace : &w%-2.2d/%-10s\n\r",
! victim->class,
! npc_class[victim->class],
! victim->race,
npc_race[victim->race],
victim->position );
- else
- send_to_pager( "\n\r", ch );
sprintf( hpbuf, "%d/%d", victim->hit, victim->max_hit );
sprintf( mnbuf, "%d/%d", victim->mana, victim->max_mana );
sprintf( mvbuf, "%d/%d", victim->move, victim->max_move );
--- 1891,1911 ----
get_curr_lck(victim) );
pager_printf_color( ch,
"&cLevel : &P%-2d ", victim->level );
! pager_printf_color( ch, "&cClass : &w%-2.2d/%-10s &cRace : &w%-2.2d/%-10s\n\r",
! victim->class,
! IS_NPC(victim)?victim->class<MAX_NPC_CLASS&&victim->class>=0?
! npc_class[victim->class] : "unknown":victim->class<MAX_PC_CLASS&&
! class_table[victim->class]->who_name&&
! class_table[victim->class]->who_name[0] != '\0'?
! class_table[victim->class]->who_name:"unknown",
! victim->race,
! IS_NPC(victim)?victim->race<MAX_NPC_RACE&&victim->race>=0?
! npc_race[victim->race] : "unknown":victim->race<MAX_PC_RACE&&
! race_table[victim->race]->race_name&&
! race_table[victim->race]->race_name[0] != '\0'?
! race_table[victim->race]->race_name:"unknown",
npc_race[victim->race],
victim->position );
sprintf( hpbuf, "%d/%d", victim->hit, victim->max_hit );
sprintf( mnbuf, "%d/%d", victim->mana, victim->max_mana );
sprintf( mvbuf, "%d/%d", victim->move, victim->max_move );
***************
*** 1973,1981 ****
ext_flag_string(&victim->defenses, defense_flags) );
}
for ( paf = victim->first_affect; paf; paf = paf->next )
if ( (skill=get_skilltype(paf->type)) != NULL )
pager_printf_color( ch,
! "&c%s: &w'%s' mods %s by %d for %d rnds with bits %s.\n\r",
skill_tname[skill->type],
skill->name,
affect_loc_name( paf->location ),
--- 2066,2075 ----
ext_flag_string(&victim->defenses, defense_flags) );
}
for ( paf = victim->first_affect; paf; paf = paf->next )
+ {
if ( (skill=get_skilltype(paf->type)) != NULL )
pager_printf_color( ch,
! "&c%s: &w'%s' mods %s by %d for %d rnds with bits %s.",
skill_tname[skill->type],
skill->name,
affect_loc_name( paf->location ),
***************
*** 1983,1988 ****
--- 2077,2084 ----
paf->duration,
affect_bit_name( &paf->bitvector )
);
+ send_to_char("\n\r", ch);
+ }
return;
}
***************
*** 2332,2341 ****
{
send_to_pager( "\n\r", ch );
found = TRUE;
! pager_printf_color( ch, "&P%s: %s%-12.12s &PIn: &w%-22.22s &P[&w%5d&P] &PTimer: %s%2d",
bag ? "Bagging" : "Corpse",
! bag ? "&R" : "&w",
capitalize( arg1 ),
obj->in_room->area->name,
obj->in_room->vnum,
obj->timer < 1 ? "&w" : obj->timer < 5 ? "&R" : obj->timer < 10 ? "&Y" : "&w",
--- 2428,2438 ----
{
send_to_pager( "\n\r", ch );
found = TRUE;
! pager_printf_color( ch, "&P%s: %s%-12.12s %s &PIn: &w%-22.22s &P[&w%5d&P] &PTimer: %s%2d",
bag ? "Bagging" : "Corpse",
! bag ? "&Y" : "&w",
capitalize( arg1 ),
+ IS_OBJ_STAT( obj, ITEM_CLANCORPSE ) ? "&RPK" : "&R ",
obj->in_room->area->name,
obj->in_room->vnum,
obj->timer < 1 ? "&w" : obj->timer < 5 ? "&R" : obj->timer < 10 ? "&Y" : "&w",
***************
*** 2381,2387 ****
return;
}
!
/* New owhere by Altrag, 03/14/96 */
void do_owhere( CHAR_DATA *ch, char *argument )
{
--- 2478,2484 ----
return;
}
! #if 0
/* New owhere by Altrag, 03/14/96 */
void do_owhere( CHAR_DATA *ch, char *argument )
{
***************
*** 2474,2479 ****
--- 2571,2577 ----
pager_printf(ch, "%d matches.\n\r", icnt);
return;
}
+ #endif
void do_reboo( CHAR_DATA *ch, char *argument )
{
***************
*** 2623,2628 ****
--- 2721,2768 ----
return;
}
+ void do_statshield( CHAR_DATA *ch, char *argument )
+ {
+ char arg[MAX_INPUT_LENGTH];
+ CHAR_DATA *victim;
+
+ set_char_color( AT_IMMORT, ch );
+
+ one_argument( argument, arg );
+ if ( IS_NPC ( ch ) || get_trust( ch ) < LEVEL_GREATER )
+ {
+ send_to_char( "Huh?\n\r", ch );
+ return;
+ }
+ if ( arg[0] == '\0' )
+ {
+ send_to_char( "Statshield which mobile?\n\r", ch );
+ return;
+ }
+ if ( ( victim = get_char_world( ch, arg ) ) == NULL )
+ {
+ send_to_char( "No such mobile.\n\r", ch );
+ return;
+ }
+ if ( !IS_NPC( victim ) )
+ {
+ send_to_char( "You can only statshield mobiles.\n\r", ch );
+ return;
+ }
+ if ( xIS_SET( victim->act, ACT_STATSHIELD ) )
+ {
+ xREMOVE_BIT( victim->act, ACT_STATSHIELD );
+ ch_printf( ch, "You have lifted the statshield on %s.\n\r", victim->short_descr );
+ }
+ else
+ {
+ xSET_BIT( victim->act, ACT_STATSHIELD );
+ ch_printf( ch, "You have applied a statshield to %s.\n\r", victim->short_descr );
+ }
+ return;
+ }
+
+
void do_switch( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
***************
*** 2653,2658 ****
--- 2793,2805 ----
send_to_char( "Ok.\n\r", ch );
return;
}
+ if ( IS_NPC( victim ) && xIS_SET( victim->act, ACT_STATSHIELD )
+ && get_trust( ch ) < LEVEL_GREATER )
+ {
+ set_pager_color( AT_IMMORT, ch );
+ send_to_pager( "Their godly glow prevents you from getting close enough.\n\r", ch );
+ return;
+ }
if ( victim->desc )
{
send_to_char( "Character in use.\n\r", ch );
***************
*** 2663,2669 ****
send_to_char( "You cannot switch into a player!\n\r", ch );
return;
}
!
ch->desc->character = victim;
ch->desc->original = ch;
victim->desc = ch->desc;
--- 2810,2825 ----
send_to_char( "You cannot switch into a player!\n\r", ch );
return;
}
! if ( victim->switched )
! {
! send_to_char( "You can't switch into a player that is switched!\n\r",ch);
! return;
! }
! if ( !IS_NPC(victim) && xIS_SET(victim->act, PLR_FREEZE) )
! {
! send_to_char( "You shouldn't switch into a player that is frozen!\n\r",ch);
! return;
! }
ch->desc->character = victim;
ch->desc->original = ch;
victim->desc = ch->desc;
***************
*** 2873,2886 ****
return;
}
! /* Commented out by Narn, it seems outdated
! if ( IS_OBJ_STAT( pObjIndex, ITEM_PROTOTYPE )
! && pObjIndex->count > 5 )
{
! send_to_char( "That object is at its limit.\n\r", ch );
! return;
}
- */
obj = create_object( pObjIndex, level );
if ( CAN_WEAR(obj, ITEM_TAKE) )
--- 3029,3045 ----
return;
}
! if ( level == 0 )
{
! AREA_DATA *temp_area;
!
! if ( (temp_area = get_area_obj(pObjIndex)) == NULL )
! level = ch->level;
! else {
! level = generate_itemlevel( temp_area, pObjIndex);
! level = URANGE(0, level, LEVEL_AVATAR);
! }
}
obj = create_object( pObjIndex, level );
if ( CAN_WEAR(obj, ITEM_TAKE) )
***************
*** 3611,3626 ****
void do_restore( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
set_char_color( AT_IMMORT, ch );
!
! one_argument( argument, arg );
if ( arg[0] == '\0' )
{
send_to_char( "Restore whom?\n\r", ch );
return;
}
!
if ( !str_cmp( arg, "all" ) )
{
CHAR_DATA *vch;
--- 3770,3792 ----
void do_restore( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
+ char arg2[MAX_INPUT_LENGTH];
+ bool boost=FALSE;
set_char_color( AT_IMMORT, ch );
!
! argument = one_argument( argument, arg );
if ( arg[0] == '\0' )
{
send_to_char( "Restore whom?\n\r", ch );
return;
}
! argument = one_argument( argument, arg2 );
! if ( !str_cmp( arg2, "boost" ) && get_trust( ch ) >= LEVEL_SUB_IMPLEM )
! {
! send_to_char( "Boosting!\n\r", ch );
! boost = TRUE;
! }
if ( !str_cmp( arg, "all" ) )
{
CHAR_DATA *vch;
***************
*** 3650,3664 ****
last_restore_all_time = current_time;
ch->pcdata->restore_time = current_time;
save_char_obj( ch );
! send_to_char( "Ok.\n\r", ch);
for ( vch = first_char; vch; vch = vch_next )
{
vch_next = vch->next;
if ( !IS_NPC( vch ) && !IS_IMMORTAL( vch )
! && !CAN_PKILL( vch ) && !in_arena( vch ) )
{
! vch->hit = vch->max_hit;
vch->mana = vch->max_mana;
vch->move = vch->max_move;
vch->pcdata->condition[COND_BLOODTHIRST] = (10 + vch->level);
--- 3816,3833 ----
last_restore_all_time = current_time;
ch->pcdata->restore_time = current_time;
save_char_obj( ch );
! send_to_char( "Beginning 'restore all' ...\n\r", ch);
for ( vch = first_char; vch; vch = vch_next )
{
vch_next = vch->next;
if ( !IS_NPC( vch ) && !IS_IMMORTAL( vch )
! && !CAN_PKILL( vch ) && !in_arena( vch ) )
{
! if ( boost )
! vch->hit = vch->max_hit*1.5;
! else
! vch->hit = vch->max_hit;
vch->mana = vch->max_mana;
vch->move = vch->max_move;
vch->pcdata->condition[COND_BLOODTHIRST] = (10 + vch->level);
***************
*** 3666,3671 ****
--- 3835,3841 ----
act( AT_IMMORT, "$n has restored you.", ch, NULL, vch, TO_VICT);
}
}
+ send_to_char( "Restored.\n\r", ch );
}
else
{
***************
*** 3678,3692 ****
return;
}
! if ( get_trust( ch ) < LEVEL_LESSER
! && victim != ch
! && !( IS_NPC( victim ) && xIS_SET(victim->act, ACT_PROTOTYPE ) ) )
{
send_to_char( "You can't do that.\n\r", ch );
return;
}
! victim->hit = victim->max_hit;
victim->mana = victim->max_mana;
victim->move = victim->max_move;
if ( victim->pcdata )
--- 3848,3865 ----
return;
}
! if ( get_trust( ch ) < LEVEL_LESSER
! && victim != ch
! && !( IS_NPC( victim ) && xIS_SET(victim->act, ACT_PROTOTYPE ) ) )
{
send_to_char( "You can't do that.\n\r", ch );
return;
}
! if ( boost )
! victim->hit = victim->max_hit*1.5;
! else
! victim->hit = victim->max_hit;
victim->mana = victim->max_mana;
victim->move = victim->max_move;
if ( victim->pcdata )
***************
*** 3694,3700 ****
update_pos( victim );
if ( ch != victim )
act( AT_IMMORT, "$n has restored you.", ch, NULL, victim, TO_VICT );
! send_to_char( "Ok.\n\r", ch );
return;
}
}
--- 3867,3873 ----
update_pos( victim );
if ( ch != victim )
act( AT_IMMORT, "$n has restored you.", ch, NULL, victim, TO_VICT );
! send_to_char( "Restored.\n\r", ch );
return;
}
}
***************
*** 4873,4890 ****
obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_BANNER), 1 );
obj_to_char(obj, victim);
! if ( (victim->class == 0) || (victim->class == 2)
! || (victim->class == 4) || (victim->class == 7) )
{
obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_DAGGER), 1 );
obj_to_char(obj, victim);
}
! else if ( (victim->class == 1) || (victim->class == 5) )
{
obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_MACE), 1 );
obj_to_char(obj, victim);
}
! else if ( (victim->class == 3) || (victim->class == 6) || (victim->class == 8) )
{
obj = create_object(get_obj_index(OBJ_VNUM_SCHOOL_SWORD), 1 );
obj_to_char(obj, victim);
--- 5046,5065 ----
obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_BANNER), 1 );
obj_to_char(obj, victim);
! if ( (victim->class == CLASS_MAGE) || (victim->class == CLASS_THIEF)
! || (victim->class == CLASS_VAMPIRE) || (victim->class == CLASS_AUGURER) )
{
obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_DAGGER), 1 );
obj_to_char(obj, victim);
}
! else if ((victim->class == CLASS_CLERIC) || (victim->class == CLASS_DRUID))
{
obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_MACE), 1 );
obj_to_char(obj, victim);
}
! else if ( (victim->class == CLASS_WARRIOR) ||
! (victim->class == CLASS_RANGER) ||
! (victim->class == CLASS_PALADIN) )
{
obj = create_object(get_obj_index(OBJ_VNUM_SCHOOL_SWORD), 1 );
obj_to_char(obj, victim);
***************
*** 5899,5905 ****
pager_printf_color(ch, " &wMax level difference bestow: &W%-7d", sysdata.bestow_dif );
pager_printf_color(ch, "&wChecking Imm_host is: &W%s\n\r", (sysdata.check_imm_host) ? "ON" : "off" );
pager_printf_color(ch, " &wMorph Optimization is: &W%-7s", (sysdata.morph_opt) ? "ON" : "off");
! pager_printf_color(ch, "&wSaving Pets is: &W%s\n\r", (sysdata.save_pets) ? "ON" : "off" );
pager_printf_color(ch, " &wSave flags: &W%s\n\r", flag_string( sysdata.save_flags, save_flag ) );
pager_printf_color(ch, " &wIdents retries: &W%d\n\r", sysdata.ident_retries);
return;
--- 6074,6081 ----
pager_printf_color(ch, " &wMax level difference bestow: &W%-7d", sysdata.bestow_dif );
pager_printf_color(ch, "&wChecking Imm_host is: &W%s\n\r", (sysdata.check_imm_host) ? "ON" : "off" );
pager_printf_color(ch, " &wMorph Optimization is: &W%-7s", (sysdata.morph_opt) ? "ON" : "off");
! pager_printf_color(ch, "&wSaving Pets is: &W%s\n\r", (sysdata.save_pets) ? "ON" : "off" );
! pager_printf_color(ch, " &wPkill looting is: &W%s\n\r", (sysdata.pk_loot) ? "ON" : "off" );
pager_printf_color(ch, " &wSave flags: &W%s\n\r", flag_string( sysdata.save_flags, save_flag ) );
pager_printf_color(ch, " &wIdents retries: &W%d\n\r", sysdata.ident_retries);
return;
***************
*** 6140,6145 ****
--- 6316,6334 ----
else
sysdata.save_pets = FALSE;
}
+ else if (!str_cmp(arg, "pk_loot" ) )
+ {
+ if ( level )
+ {
+ send_to_char( "Pkill looting is enabled.\n\r", ch );
+ sysdata.pk_loot = TRUE;
+ }
+ else
+ {
+ send_to_char( "Pkill looting is disabled. (use cset pkloot 1 to enable)\n\r", ch );
+ sysdata.pk_loot = FALSE;
+ }
+ }
else if (!str_cmp (arg, "morph_opt" ) )
{
if ( level )
***************
*** 6820,6826 ****
if ( arg1[0] == '\0' )
{
send_to_char( "Syntax: cedit save cmdtable\n\r", ch );
! if ( get_trust(ch) > LEVEL_SUB_IMPLEM || !str_cmp(ch->name, "Nivek"))
{
send_to_char( "Syntax: cedit <command> create [code]\n\r", ch );
send_to_char( "Syntax: cedit <command> delete\n\r", ch );
--- 7009,7015 ----
if ( arg1[0] == '\0' )
{
send_to_char( "Syntax: cedit save cmdtable\n\r", ch );
! if ( get_trust(ch) > LEVEL_SUB_IMPLEM )
{
send_to_char( "Syntax: cedit <command> create [code]\n\r", ch );
send_to_char( "Syntax: cedit <command> delete\n\r", ch );
***************
*** 6835,6841 ****
return;
}
! if ((get_trust(ch) > LEVEL_GREATER || !str_cmp(ch->name, "Nivek"))
&& !str_cmp( arg1, "save" ) && !str_cmp( arg2, "cmdtable") )
{
save_commands();
--- 7024,7030 ----
return;
}
! if (get_trust(ch) > LEVEL_GREATER
&& !str_cmp( arg1, "save" ) && !str_cmp( arg2, "cmdtable") )
{
save_commands();
***************
*** 6844,6851 ****
}
command = find_command( arg1 );
! if ( (!str_cmp(ch->name, "Nivek") || get_trust(ch) > LEVEL_SUB_IMPLEM)
! && !str_cmp( arg2, "create" ) )
{
if ( command )
{
--- 7033,7039 ----
}
command = find_command( arg1 );
! if ( get_trust(ch) > LEVEL_SUB_IMPLEM && !str_cmp( arg2, "create" ) )
{
if ( command )
{
***************
*** 6874,6880 ****
return;
}
else
! if ( command->level > get_trust(ch) && str_cmp(ch->name, "Nivek"))
{
send_to_char( "You cannot touch this command.\n\r", ch );
return;
--- 7062,7068 ----
return;
}
else
! if ( command->level > get_trust(ch) )
{
send_to_char( "You cannot touch this command.\n\r", ch );
return;
***************
*** 6890,6896 ****
return;
}
! if ( get_trust(ch) <= LEVEL_SUB_IMPLEM && str_cmp(ch->name, "Nivek"))
{
do_cedit( ch, "" );
return;
--- 7078,7084 ----
return;
}
! if ( get_trust(ch) <= LEVEL_SUB_IMPLEM )
{
do_cedit( ch, "" );
return;
***************
*** 7007,7013 ****
{
int level = atoi( argument );
! if ( level < 0 || level > get_trust(ch) )
{
send_to_char( "Level out of range.\n\r", ch );
return;
--- 7195,7201 ----
{
int level = atoi( argument );
! if ( (level < 0 || level > get_trust(ch)) )
{
send_to_char( "Level out of range.\n\r", ch );
return;
***************
*** 7130,7139 ****
--- 7318,7335 ----
}
pager_printf_color( ch, "&wCLASS: &W%s\n\r&wPrime Attribute: &W%-14s &wWeapon: &W%-5d &wGuild: &W%-5d\n\r",
class->who_name, affect_loc_name(class->attr_prime), class->weapon, class->guild );
+ pager_printf_color( ch, "&wSecond Attribute: &W%-14s &wDeficient Attribute: &W%-14s\n\r",
+ affect_loc_name(class->attr_second), affect_loc_name(class->attr_deficient) );
pager_printf_color( ch, "&wMax Skill Adept: &W%-3d &wThac0 : &W%-5d &wThac32: &W%d\n\r",
class->skill_adept, class->thac0_00, class->thac0_32 );
pager_printf_color( ch, "&wHp Min/Hp Max : &W%-2d/%-2d &wMana : &W%-3s &wExpBase: &W%d\n\r",
class->hp_min, class->hp_max, class->fMana ? "yes" : "no ", class->exp_base );
+ pager_printf_color( ch, "&wAffected by: &W%s\n\r",
+ affect_bit_name( &class->affected ) );
+ pager_printf_color( ch, "&wResistant to: &W%s\n\r",
+ flag_string(class->resist, ris_flags ));
+ pager_printf_color( ch, "&wSusceptible to: &W%s\n\r",
+ flag_string(class->suscept, ris_flags ) );
if ( arg2[0] != '\0' )
{
int x, y, cnt;
***************
*** 7164,7177 ****
}
/*
* Edit class information -Thoric
*/
void do_setclass( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
struct class_type *class;
! int cl;
set_char_color( AT_PLAIN, ch );
--- 7360,7412 ----
}
/*
+ * Create a new class online. -Shaddai
+ */
+ bool create_new_class( int index, char *argument )
+ {
+ int i;
+
+ if ( index >= MAX_CLASS || class_table[index] == NULL )
+ return FALSE;
+ if ( class_table[index]->who_name )
+ STRFREE( class_table[index]->who_name );
+ if ( argument[0] != '\0' )
+ argument[0] = UPPER(argument[0]);
+ class_table[index]->who_name = STRALLOC( argument );
+ xCLEAR_BITS( class_table[index]->affected );
+ class_table[index]->attr_prime = 0;
+ class_table[index]->attr_second = 0;
+ class_table[index]->attr_deficient = 0;
+ class_table[index]->resist = 0;
+ class_table[index]->suscept = 0;
+ class_table[index]->weapon = 0;
+ class_table[index]->guild = 0;
+ class_table[index]->skill_adept = 0;
+ class_table[index]->thac0_00 = 0;
+ class_table[index]->thac0_32 = 0;
+ class_table[index]->hp_min = 0;
+ class_table[index]->hp_max = 0;
+ class_table[index]->fMana = FALSE;
+ class_table[index]->exp_base = 0;
+ for ( i=0; i< MAX_LEVEL;i++ )
+ {
+ title_table[index][i][0] = str_dup( "Not set." );
+ title_table[index][i][1] = str_dup( "Not set." );
+ }
+ return TRUE;
+ }
+
+ /*
* Edit class information -Thoric
*/
void do_setclass( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
+ FILE *fpList;
+ char classlist[256];
struct class_type *class;
! int cl, value, i;
set_char_color( AT_PLAIN, ch );
***************
*** 7181,7189 ****
--- 7416,7426 ----
if ( arg1[0] == '\0' )
{
send_to_char( "Syntax: setclass <class> <field> <value>\n\r", ch );
+ send_to_char( "Syntax: setclass <class> create\n\r", ch );
send_to_char( "\n\rField being one of:\n\r", ch );
send_to_char( " name prime weapon guild thac0 thac32\n\r", ch );
send_to_char( " hpmin hpmax mana expbase mtitle ftitle\n\r", ch );
+ send_to_char( " second, deficient affected resist suscept\n\r", ch );
return;
}
if ( is_number(arg1) && (cl=atoi(arg1)) >= 0 && cl < MAX_CLASS )
***************
*** 7192,7204 ****
{
class = NULL;
for ( cl = 0; cl < MAX_CLASS && class_table[cl]; cl++ )
if ( !str_cmp(class_table[cl]->who_name, arg1) )
{
class = class_table[cl];
break;
}
}
! if ( !class )
{
send_to_char( "No such class.\n\r", ch );
return;
--- 7429,7450 ----
{
class = NULL;
for ( cl = 0; cl < MAX_CLASS && class_table[cl]; cl++ )
+ {
+ if ( !class_table[cl]->who_name ) continue;
if ( !str_cmp(class_table[cl]->who_name, arg1) )
{
class = class_table[cl];
break;
}
+ }
}
! if ( !str_cmp( arg2, "create" ) && class )
! {
! send_to_char( "That class already exists!\n\r", ch );
! return;
! }
!
! if ( !class && str_cmp(arg2, "create") )
{
send_to_char( "No such class.\n\r", ch );
return;
***************
*** 7210,7215 ****
--- 7456,7500 ----
send_to_char( "Saved.\n\r", ch );
return;
}
+
+
+ if ( !str_cmp( arg2, "create") )
+ {
+ if ( MAX_PC_CLASS >= MAX_CLASS )
+ {
+ send_to_char("You need to up MAX_CLASS in mud and make clean.\n\r",ch);
+ return;
+ }
+ if ( ( create_new_class( MAX_PC_CLASS, arg1 ) ) == FALSE )
+ {
+ send_to_char("Couldn't create a new class.\n\r", ch );
+ return;
+ }
+ write_class_file( MAX_PC_CLASS );
+ MAX_PC_CLASS++;
+ sprintf( classlist, "%s%s", CLASS_DIR, CLASS_LIST );
+
+ if ( ( fpList = fopen( classlist, "w") ) == NULL )
+ {
+ bug("Can't open Class list for writing.", 0 );
+ return;
+ }
+
+ for ( i = 0; i<MAX_PC_CLASS; i++ )
+ fprintf( fpList, "%s%s.class\n", CLASSDIR, class_table[i]->who_name );
+
+ fprintf(fpList, "$\n");
+ fclose( fpList );
+ send_to_char("Done.\n\r", ch );
+ return;
+ }
+
+ if ( !argument )
+ {
+ send_to_char("You must specify an argument.\n\r", ch );
+ return;
+ }
+
if ( !str_cmp( arg2, "name" ) )
{
STRFREE(class->who_name );
***************
*** 7217,7222 ****
--- 7502,7593 ----
send_to_char( "Done.\n\r", ch );
return;
}
+ if ( !str_cmp( arg2, "second" ) )
+ {
+ int x = get_atype( argument );
+
+ if ( x < APPLY_STR || (x > APPLY_CON && x != APPLY_LCK) )
+ send_to_char( "Invalid second attribute!\n\r", ch );
+ else
+ {
+ class->attr_second = x;
+ send_to_char( "Done.\n\r", ch );
+ }
+ return;
+ }
+
+ if ( !str_cmp( arg2, "affected" ) )
+ {
+ if ( !argument || argument[0] == '\0' )
+ {
+ send_to_char( "Usage: setclass <class> affected <flag> [flag]...\n\r", ch );
+ return;
+ }
+ while ( argument[0] != '\0' )
+ {
+ argument = one_argument( argument, arg2 );
+ value = get_aflag( arg2 );
+ if ( value < 0 || value > MAX_BITS )
+ ch_printf( ch, "Unknown flag: %s\n\r", arg2 );
+ else
+ xTOGGLE_BIT( class->affected, value );
+ }
+ send_to_char( "Done.\n\r", ch );
+ return;
+ }
+
+ if ( !str_cmp( arg2, "resist" ) )
+ {
+ if ( !argument || argument[0] == '\0' )
+ {
+ send_to_char( "Usage: setclass <class> resist <flag> [flag]...\n\r", ch);
+ return;
+ }
+ while ( argument[0] != '\0' )
+ {
+ argument = one_argument( argument, arg2 );
+ value = get_risflag( arg2 );
+ if ( value < 0 || value > 31 )
+ ch_printf( ch, "Unknown flag: %s\n\r", arg2 );
+ else
+ TOGGLE_BIT( class->resist, 1 << value );
+ }
+ send_to_char( "Done.\n\r", ch );
+ return;
+ }
+
+ if ( !str_cmp( arg2, "suscept" ) )
+ {
+ if ( !argument || argument[0] == '\0' )
+ {
+ send_to_char( "Usage: setclass <class> suscept <flag> [flag]...\n\r", ch );
+ return;
+ }
+ while ( argument[0] != '\0' )
+ {
+ argument = one_argument( argument, arg2 );
+ value = get_risflag( arg2 );
+ if ( value < 0 || value > 31 )
+ ch_printf( ch, "Unknown flag: %s\n\r", arg2 );
+ else
+ TOGGLE_BIT( class->suscept, 1 << value );
+ }
+ send_to_char( "Done.\n\r", ch );
+ return;
+ }
+ if ( !str_cmp( arg2, "deficient" ) )
+ {
+ int x = get_atype( argument );
+
+ if ( x < APPLY_STR || (x > APPLY_CON && x != APPLY_LCK) )
+ send_to_char( "Invalid deficient attribute!\n\r", ch );
+ else
+ {
+ class->attr_deficient = x;
+ send_to_char( "Done.\n\r", ch );
+ }
+ return;
+ }
if ( !str_cmp( arg2, "prime" ) )
{
int x = get_atype( argument );
***************
*** 7303,7333 ****
if ( !str_cmp( arg2, "ftitle" ) )
{
char arg3[MAX_INPUT_LENGTH];
! int x;
argument = one_argument( argument, arg3 );
if ( arg3[0] == '\0' || argument[0] == '\0' )
{
! send_to_char( "Syntax: setclass <class> ftitle <level> <title>\n\r", ch );
return;
}
! if ( (x=atoi(arg3)) < 0 || x > MAX_LEVEL )
{
send_to_char( "Invalid level.\n\r", ch );
return;
}
! DISPOSE( title_table[cl][x][1] );
! title_table[cl][x-1][1] = str_dup( argument );
}
do_setclass( ch, "" );
}
void do_setrace( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char arg3 [MAX_INPUT_LENGTH];
int value;
char buf[MAX_STRING_LENGTH];
--- 7674,7758 ----
if ( !str_cmp( arg2, "ftitle" ) )
{
char arg3[MAX_INPUT_LENGTH];
! char arg4[MAX_INPUT_LENGTH];
! int x,sex;
argument = one_argument( argument, arg3 );
+ argument = one_argument( argument, arg4 );
if ( arg3[0] == '\0' || argument[0] == '\0' )
{
! send_to_char( "Syntax: setclass <class> ftitle <level> <male/female> <title>\n\r", ch );
return;
}
! if ( (x=atoi(arg4)) < 0 || x > MAX_LEVEL )
{
send_to_char( "Invalid level.\n\r", ch );
return;
}
! if ( !str_cmp( arg4, "Male") )
! sex = 0;
! else
! sex = 1;
! DISPOSE( title_table[cl][x][sex] );
! /* Bug fix below -Shaddai*/
! title_table[cl][x][sex] = str_dup( argument );
}
do_setclass( ch, "" );
}
+ /*
+ * Create an instance of a new race. -Shaddai
+ */
+
+ bool create_new_race( int index, char *argument )
+ {
+ int i = 0;
+ if ( index >= MAX_RACE || race_table[index] == NULL )
+ return FALSE;
+ for ( i = 0; i <= MAX_WHERE_NAME; i++ )
+ race_table[index]->where_name[i] = where_name[i];
+ if ( argument[0] != '\0' )
+ argument[0]=UPPER(argument[0]);
+ sprintf( race_table[index]->race_name,"%-.16s",argument);
+ race_table[index]->class_restriction = 0;
+ race_table[index]->str_plus = 0;
+ race_table[index]->dex_plus = 0;
+ race_table[index]->wis_plus = 0;
+ race_table[index]->int_plus = 0;
+ race_table[index]->con_plus = 0;
+ race_table[index]->cha_plus = 0;
+ race_table[index]->lck_plus = 0;
+ race_table[index]->hit = 0;
+ race_table[index]->mana = 0;
+ xCLEAR_BITS(race_table[index]->affected);
+ race_table[index]->resist = 0;
+ race_table[index]->suscept = 0;
+ race_table[index]->language = 0;
+ race_table[index]->alignment = 0;
+ race_table[index]->minalign = 0;
+ race_table[index]->maxalign = 0;
+ race_table[index]->ac_plus = 0;
+ race_table[index]->exp_multiplier = 0;
+ xCLEAR_BITS(race_table[index]->attacks);
+ xCLEAR_BITS(race_table[index]->defenses);
+ race_table[index]->height = 0;
+ race_table[index]->weight = 0;
+ race_table[index]->hunger_mod = 0;
+ race_table[index]->thirst_mod = 0;
+ race_table[index]->mana_regen = 0;
+ race_table[index]->hp_regen = 0;
+ race_table[index]->race_recall = 0;
+ return TRUE;
+ }
+
void do_setrace( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char arg3 [MAX_INPUT_LENGTH];
+ FILE *fpList;
+ char racelist[256];
int value;
char buf[MAX_STRING_LENGTH];
***************
*** 7339,7347 ****
smash_tilde( argument );
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
! if ( arg1[0] == '\0' )
{
send_to_char( "Syntax: setrace <race> <field> <value>\n\r", ch );
send_to_char( "\n\rField being one of:\n\r", ch );
send_to_char( " name classes strplus dexplus wisplus\n\r", ch );
send_to_char( " intplus conplus chaplus lckplus hit\n\r", ch );
--- 7764,7773 ----
smash_tilde( argument );
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
! if ( arg1[0] == '\0' || arg2[0] == '\0' )
{
send_to_char( "Syntax: setrace <race> <field> <value>\n\r", ch );
+ send_to_char( "Syntax: setrace <race> create \n\r", ch );
send_to_char( "\n\rField being one of:\n\r", ch );
send_to_char( " name classes strplus dexplus wisplus\n\r", ch );
send_to_char( " intplus conplus chaplus lckplus hit\n\r", ch );
***************
*** 7361,7377 ****
{
race = NULL;
for ( ra = 0; ra < MAX_RACE && race_table[ra]; ra++ )
if ( !str_cmp(race_table[ra]->race_name, arg1) )
{
race = race_table[ra];
break;
}
}
! if ( !race )
{
send_to_char( "No such race.\n\r", ch );
return;
}
if ( !str_cmp( arg2, "save" ) )
{
--- 7787,7813 ----
{
race = NULL;
for ( ra = 0; ra < MAX_RACE && race_table[ra]; ra++ )
+ {
+ if ( !race_table[ra]->race_name ) continue;
if ( !str_cmp(race_table[ra]->race_name, arg1) )
{
race = race_table[ra];
break;
}
+ }
}
! if ( !str_cmp( arg2, "create" ) && race )
! {
! send_to_char( "That race already exists!\n\r", ch );
! return;
! }
! else if ( !race && str_cmp(arg2, "create") )
{
send_to_char( "No such race.\n\r", ch );
return;
}
+
+
if ( !str_cmp( arg2, "save" ) )
{
***************
*** 7379,7390 ****
send_to_char( "Saved.\n\r", ch );
return;
}
if( !argument)
{
send_to_char("You must specify an argument.\n\r",ch);
return;
}
-
if ( !str_cmp( arg2, "name" ) )
{
sprintf(race->race_name,"%-.16s",argument);
--- 7815,7854 ----
send_to_char( "Saved.\n\r", ch );
return;
}
+
+ if ( !str_cmp( arg2, "create") )
+ {
+ if ( MAX_PC_RACE >= MAX_RACE )
+ {
+ send_to_char("You need to up MAX_RACE in mud.h and make clean.\n\r",ch);
+ return;
+ }
+ if( (create_new_race( MAX_PC_RACE, arg1 )) == FALSE )
+ {
+ send_to_char("Couldn't create a new race.\n\r", ch );
+ return;
+ }
+ write_race_file( MAX_PC_RACE );
+ MAX_PC_RACE++;
+ sprintf( racelist, "%s%s", RACEDIR, RACE_LIST );
+ if ( ( fpList = fopen( racelist, "w" ) ) == NULL )
+ {
+ bug( "Error opening racelist.", 0 );
+ return;
+ }
+ for ( i = 0; i < MAX_PC_RACE; i++ )
+ fprintf( fpList, "%s%s.race\n", RACEDIR, race_table[i]->race_name );
+ fprintf( fpList, "$\n" );
+ fclose( fpList );
+ send_to_char("Done.\n\r", ch );
+ return;
+ }
+
if( !argument)
{
send_to_char("You must specify an argument.\n\r",ch);
return;
}
if ( !str_cmp( arg2, "name" ) )
{
sprintf(race->race_name,"%-.16s",argument);
***************
*** 7715,7720 ****
--- 8179,8195 ----
if ( arg1[0] == '\0' )
{
send_to_char( "Syntax: showrace <race> \n\r", ch );
+ /* Show the races code addition by Blackmane */
+ for ( i=0;i<MAX_RACE;i++)
+ {
+ if ( i>9 )
+ pager_printf(ch, "%d> %-11s",i,race_table[i]->race_name );
+ else
+ pager_printf(ch, "%d> %-12s",i,race_table[i]->race_name);
+ if ( i%5==0 )
+ send_to_pager("\n\r", ch );
+ }
+ send_to_pager("\n\r", ch );
return;
}
if ( is_number(arg1) && (ra=atoi(arg1)) >= 0 && ra < MAX_RACE )
***************
*** 7976,7981 ****
--- 8451,8486 ----
return;
}
+ void do_fshow( CHAR_DATA *ch, char *argument )
+ {
+ char arg[MAX_INPUT_LENGTH];
+
+ set_char_color( AT_IMMORT, ch );
+
+ one_argument( argument, arg );
+ if ( arg[0] == '\0' )
+ {
+ send_to_char( "Syntax: fshow <moblog | plevel>\n\r", ch );
+ return;
+ }
+ if ( !str_cmp( arg, "moblog" ) )
+ {
+ set_char_color( AT_LOG, ch );
+ send_to_char( "\n\r[Date_|_Time] Current moblog:\n\r", ch );
+ show_file( ch, MOBLOG_FILE );
+ return;
+ }
+ if ( !str_cmp( arg, "plevel" ) )
+ {
+ set_char_color( AT_NOTE, ch );
+ show_file( ch, PLEVEL_FILE );
+ return;
+ }
+ send_to_char( "No such file.\n\r", ch );
+ return;
+ }
+
+
RESERVE_DATA *first_reserved;
RESERVE_DATA *last_reserved;
void save_reserved(void)
***************
*** 8496,8503 ****
PROJECT_DATA *new_project; /* Just to be safe */
if( get_trust(ch) < LEVEL_GOD &&
! str_cmp(ch->name, "Kali")
! && str_cmp(ch->pcdata->council_name, "Code Council"))
{
send_to_char("You are not powerfull enough to add a new project.\n\r",ch);
return;
--- 9001,9007 ----
PROJECT_DATA *new_project; /* Just to be safe */
if( get_trust(ch) < LEVEL_GOD &&
! str_cmp(ch->pcdata->council_name, "Code Council"))
{
send_to_char("You are not powerfull enough to add a new project.\n\r",ch);
return;
***************
*** 8536,8543 ****
if( !str_cmp( arg1, "description" ) )
{
if( get_trust(ch) < LEVEL_GOD &&
! str_cmp(ch->name, "Kali")
! && str_cmp(ch->pcdata->council_name, "Code Council"))
CHECK_SUBRESTRICTED( ch );
ch->tempnum = SUB_NONE;
ch->substate = SUB_PROJ_DESC;
--- 9040,9046 ----
if( !str_cmp( arg1, "description" ) )
{
if( get_trust(ch) < LEVEL_GOD &&
! str_cmp(ch->pcdata->council_name, "Code Council"))
CHECK_SUBRESTRICTED( ch );
ch->tempnum = SUB_NONE;
ch->substate = SUB_PROJ_DESC;
***************
*** 8550,8557 ****
if( !str_cmp( arg1, "delete" ) )
{
NOTE_DATA *log, *tlog;
! if( str_cmp(ch->name, "Kali")
! && str_cmp(ch->pcdata->council_name, "Code Council") &&
get_trust(ch) < LEVEL_ASCENDANT)
{
send_to_char("You are not high enough level to delete a project.\n\r",
--- 9053,9059 ----
if( !str_cmp( arg1, "delete" ) )
{
NOTE_DATA *log, *tlog;
! if( str_cmp(ch->pcdata->council_name, "Code Council") &&
get_trust(ch) < LEVEL_ASCENDANT)
{
send_to_char("You are not high enough level to delete a project.\n\r",
***************
*** 8639,8646 ****
if( pproject->owner && str_cmp( pproject->owner, ch->name ) &&
get_trust(ch) < LEVEL_GREATER
&& pproject->coder && str_cmp(pproject->coder, ch->name) &&
! str_cmp(ch->name, "Kali")
! && str_cmp(ch->pcdata->council_name, "Code Council"))
{
ch_printf( ch, "This is not your project!\n\r" );
return;
--- 9141,9147 ----
if( pproject->owner && str_cmp( pproject->owner, ch->name ) &&
get_trust(ch) < LEVEL_GREATER
&& pproject->coder && str_cmp(pproject->coder, ch->name) &&
! str_cmp(ch->pcdata->council_name, "Code Council"))
{
ch_printf( ch, "This is not your project!\n\r" );
return;
***************
*** 8689,8695 ****
if( pproject->owner && str_cmp(ch->name, pproject->owner) &&
pproject->coder && str_cmp(ch->name, pproject->coder) &&
! get_trust(ch) < LEVEL_GREATER && str_cmp(ch->name, "Kali") &&
str_cmp(ch->pcdata->council_name, "Code Council"))
{
ch_printf( ch, "This is not your project!\n\r" );
--- 9190,9196 ----
if( pproject->owner && str_cmp(ch->name, pproject->owner) &&
pproject->coder && str_cmp(ch->name, pproject->coder) &&
! get_trust(ch) < LEVEL_GREATER &&
str_cmp(ch->pcdata->council_name, "Code Council"))
{
ch_printf( ch, "This is not your project!\n\r" );
***************
*** 8726,8732 ****
if( pproject->owner && pproject->coder &&
str_cmp(ch->name, pproject->owner) && get_trust(ch) < LEVEL_SAVIOR
&& str_cmp(ch->name, pproject->coder)
- && str_cmp(ch->name, "Kali")
&& str_cmp(ch->pcdata->council_name, "Code Council"))
{
ch_printf( ch, "This is not your project!\n\r" );
--- 9227,9232 ----
***************
*** 8772,8779 ****
if( pproject->owner && str_cmp(ch->name, pproject->owner) &&
get_trust(ch) < LEVEL_ASCENDANT &&
pproject->coder && str_cmp(ch->name, pproject->coder ) &&
! str_cmp(ch->name, "Kali")
! && str_cmp(ch->pcdata->council_name, "Code Council"))
{
ch_printf( ch, "This is not your project!\n\r" );
return;
--- 9272,9278 ----
if( pproject->owner && str_cmp(ch->name, pproject->owner) &&
get_trust(ch) < LEVEL_ASCENDANT &&
pproject->coder && str_cmp(ch->name, pproject->coder ) &&
! str_cmp(ch->pcdata->council_name, "Code Council"))
{
ch_printf( ch, "This is not your project!\n\r" );
return;
***************
*** 8791,8797 ****
if( pproject->owner && pproject->coder &&
str_cmp(ch->name, pproject->owner) && get_trust(ch) < LEVEL_SAVIOR
&& str_cmp(ch->name, pproject->coder )
- && str_cmp(ch->name, "Kali")
&& str_cmp(ch->pcdata->council_name, "Code Council"))
{
ch_printf( ch, "This is not your project!\n\r" );
--- 9290,9295 ----
diff -c -r /home/5500/olddist/src/ban.c /home/5500/dist/src/ban.c
*** /home/5500/olddist/src/ban.c Tue Jul 28 02:30:43 1998
--- /home/5500/dist/src/ban.c Fri May 28 01:18:59 1999
***************
*** 452,462 ****
send_to_char("Syntax: ban race <race> <type> <duration>\n\r", ch );
send_to_char("Syntax: ban class <class> <type> <duration>\n\r", ch );
send_to_char("Syntax: ban show <field> <number>\n\r", ch );
! send_to_char(" Where field is site, race or class and number is the ban number.\n\r", ch);
! send_to_char(" No arguments lists the current bans.\n\r", ch );
! send_to_char(" Duration is how long the ban lasts in days.\n\r", ch );
! send_to_char(" Type is one of newbies, mortals, all, or Warn.\n\r", ch );
! send_to_char(" Or type can be a level.\n\r", ch);
return;
}
--- 452,462 ----
send_to_char("Syntax: ban race <race> <type> <duration>\n\r", ch );
send_to_char("Syntax: ban class <class> <type> <duration>\n\r", ch );
send_to_char("Syntax: ban show <field> <number>\n\r", ch );
! send_to_char("Ban site lists current bans.\n\r", ch );
! send_to_char("Duration is the length of the ban in days.\n\r", ch );
! send_to_char("Type can be: newbie, mortal, all, warn or level.\n\r", ch );
! send_to_char("In ban show, the <field> is site, race or class,", ch);
! send_to_char(" and the <number> is the ban number.\n\r", ch );
return;
}
***************
*** 1099,1105 ****
else
return TRUE;
}
! if ( pban->suffix && !str_suffix( pban->name, new_host ) )
{
if ( check_expire( pban ) )
{
--- 1099,1108 ----
else
return TRUE;
}
! /*
! * Bug of switched checks noticed by Cronel
! */
! if ( pban->suffix && !str_prefix( pban->name, new_host ) )
{
if ( check_expire( pban ) )
{
***************
*** 1110,1116 ****
else
return TRUE;
}
! if ( pban->prefix && !str_prefix( pban->name, new_host ) )
{
if ( check_expire( pban ) )
{
--- 1113,1119 ----
else
return TRUE;
}
! if ( pban->prefix && !str_suffix( pban->name, new_host ) )
{
if ( check_expire( pban ) )
{
***************
*** 1273,1282 ****
return;
}
! UNLINK( pban,
! (type==BAN_SITE)?first_ban:(type==BAN_CLASS)?first_ban_class:first_ban_race,
! (type==BAN_SITE)?last_ban:(type==BAN_CLASS)?last_ban_class:last_ban_race,
! next, prev );
free_ban( pban );
return;
}
--- 1276,1289 ----
return;
}
! switch ( type )
! {
! case BAN_SITE: UNLINK(pban, first_ban, last_ban, next, prev); break;
! case BAN_CLASS: UNLINK(pban, first_ban_class, last_ban_class, next,
! prev ); break;
! case BAN_RACE: UNLINK(pban, first_ban_race, last_ban_race, next,
! prev); break;
! }
free_ban( pban );
return;
}
diff -c -r /home/5500/olddist/src/boards.c /home/5500/dist/src/boards.c
*** /home/5500/olddist/src/boards.c Tue Jul 28 02:44:01 1998
--- /home/5500/dist/src/boards.c Fri May 28 01:18:59 1999
***************
*** 22,28 ****
--- 22,30 ----
#include <time.h>
#include <sys/stat.h>
#include "mud.h"
+ #ifdef USE_IMC
#include "imc-mercbase.h"
+ #endif
/* Defines for voting on notes. -- Narn */
***************
*** 125,131 ****
fprintf( fpout, "Post_group %s~\n", tboard->post_group );
fprintf( fpout, "Extra_readers %s~\n", tboard->extra_readers );
fprintf( fpout, "Extra_removers %s~\n", tboard->extra_removers );
!
fprintf( fpout, "End\n" );
}
fclose( fpout );
--- 127,146 ----
fprintf( fpout, "Post_group %s~\n", tboard->post_group );
fprintf( fpout, "Extra_readers %s~\n", tboard->extra_readers );
fprintf( fpout, "Extra_removers %s~\n", tboard->extra_removers );
! if ( tboard->ocopymessg )
! fprintf( fpout, "OCopymessg %s~\n", tboard->ocopymessg );
! if ( tboard->olistmessg )
! fprintf( fpout, "OListmessg %s~\n", tboard->olistmessg );
! if ( tboard->opostmessg )
! fprintf( fpout, "OPostmessg %s~\n", tboard->opostmessg );
! if ( tboard->oreadmessg )
! fprintf( fpout, "OReadmessg %s~\n", tboard->oreadmessg );
! if ( tboard->oremovemessg )
! fprintf( fpout, "ORemovemessg %s~\n", tboard->oremovemessg );
! if ( tboard->otakemessg )
! fprintf( fpout, "OTakemessg %s~\n", tboard->otakemessg );
! if ( tboard->postmessg )
! fprintf( fpout, "Postmessg %s~\n", tboard->postmessg );
fprintf( fpout, "End\n" );
}
fclose( fpout );
***************
*** 477,483 ****
pnote->date,
pnote->subject );
}
! act( AT_ACTION, "$n glances over the notes.", ch, NULL, NULL, TO_CANSEE );
return;
}
else
--- 492,501 ----
pnote->date,
pnote->subject );
}
! if ( board->olistmessg )
! act( AT_ACTION, board->olistmessg, ch, NULL, NULL, TO_CANSEE );
! else
! act( AT_ACTION, "$n glances over the notes.", ch, NULL, NULL, TO_CANSEE );
return;
}
else
***************
*** 555,561 ****
pnote->to_list,
pnote->subject );
}
! act( AT_ACTION, "$n glances over the notes.", ch, NULL, NULL, TO_CANSEE );
return;
}
else
--- 573,582 ----
pnote->to_list,
pnote->subject );
}
! if ( board->olistmessg )
! act( AT_ACTION, board->olistmessg, ch, NULL, NULL, TO_CANSEE );
! else
! act( AT_ACTION, "$n glances over the notes.", ch, NULL, NULL, TO_CANSEE );
return;
}
else
***************
*** 643,649 ****
pager_printf( ch, "Votes:\n\rYes: %s\n\rNo: %s\n\rAbstain: %s\n\r",
pnote->yesvotes, pnote->novotes, pnote->abstentions );
}
! act( AT_ACTION, "$n reads a note.", ch, NULL, NULL, TO_CANSEE );
return;
}
}
--- 664,673 ----
pager_printf( ch, "Votes:\n\rYes: %s\n\rNo: %s\n\rAbstain: %s\n\r",
pnote->yesvotes, pnote->novotes, pnote->abstentions );
}
! if ( board->oreadmessg )
! act( AT_ACTION, board->oreadmessg, ch, NULL, NULL, TO_CANSEE );
! else
! act( AT_ACTION, "$n reads a note.", ch, NULL, NULL, TO_CANSEE );
return;
}
}
***************
*** 914,920 ****
--- 938,946 ----
struct stat fst;
/* char *pn;*/
char fname[1024];
+ #ifdef USE_IMC
bool imc = FALSE;
+ #endif
if(get_trust(ch) < sysdata.write_mail_free )
{
***************
*** 962,968 ****
arg_passed[0] = UPPER(arg_passed[0]);
! /* if ((pn = strchr(arg_passed, '@'))!=NULL)*/
if (strchr(arg_passed, '@')!=NULL)
{
if (get_trust(ch) < sysdata.imc_mail_level)
--- 988,994 ----
arg_passed[0] = UPPER(arg_passed[0]);
! #ifdef USE_IMC
if (strchr(arg_passed, '@')!=NULL)
{
if (get_trust(ch) < sysdata.imc_mail_level)
***************
*** 971,990 ****
"notes to other muds.\n\r", sysdata.imc_mail_level);
return;
}
- /* *pn = '\0';
- if (is_name("all", arg_passed))
- {
- ch_printf(ch, "You cannot send IMC mail to ALL.\n\r");
- return;
- }
- *pn = '@';*/
imc = TRUE;
}
sprintf( fname, "%s%c/%s", PLAYER_DIR, tolower(arg_passed[0]),
capitalize( arg_passed ) );
if ( !IS_MAIL || imc || stat( fname, &fst ) != -1 || !str_cmp(arg_passed, "all") )
{
paper->value[2] = 1;
ed = SetOExtra(paper, "_to_");
--- 997,1014 ----
"notes to other muds.\n\r", sysdata.imc_mail_level);
return;
}
imc = TRUE;
}
+ #endif
sprintf( fname, "%s%c/%s", PLAYER_DIR, tolower(arg_passed[0]),
capitalize( arg_passed ) );
+ #ifdef USE_IMC
if ( !IS_MAIL || imc || stat( fname, &fst ) != -1 || !str_cmp(arg_passed, "all") )
+ #else
+ if ( !IS_MAIL || stat( fname, &fst ) != -1 || !str_cmp(arg_passed, "all") )
+ #endif
{
paper->value[2] = 1;
ed = SetOExtra(paper, "_to_");
***************
*** 1030,1036 ****
--- 1054,1062 ----
if ( !str_cmp( arg, "post" ) )
{
char *strtime, *to, *subj, *text/*, *np = NULL*/;
+ #ifdef USE_IMC
bool imc = FALSE;
+ #endif
if ( ( paper = get_eq_char(ch, WEAR_HOLD) ) == NULL
|| paper->item_type != ITEM_PAPER )
***************
*** 1065,1071 ****
subj = get_extra_descr( "_subject_", paper->first_extradesc );
text = get_extra_descr( "_text_", paper->first_extradesc );
! /* if (to && (np = strchr(to, '@'))!=NULL)*/
if (to && strchr(to, '@')!=NULL)
{
if ( !subj || !*subj )
--- 1091,1097 ----
subj = get_extra_descr( "_subject_", paper->first_extradesc );
text = get_extra_descr( "_text_", paper->first_extradesc );
! #ifdef USE_IMC
if (to && strchr(to, '@')!=NULL)
{
if ( !subj || !*subj )
***************
*** 1079,1090 ****
return;
}
- /* {
- send_to_char( "The IMC board is not here.\n\r", ch );
- return;
- }*/
imc = TRUE;
}
board = find_board( ch );
if ( !board )
--- 1105,1113 ----
return;
}
imc = TRUE;
}
+ #endif
board = find_board( ch );
if ( !board )
***************
*** 1092,1115 ****
send_to_char( "There is no bulletin board here to post your note on.\n\r", ch );
return;
}
if ( (imc && board->board_obj != sysdata.imc_mail_vnum) ||
(!imc && board->board_obj == sysdata.imc_mail_vnum) )
{
send_to_char( "You can only post IMC mail on the IMC board.\n\r", ch );
return;
}
! /* if (imc)
! {
! if (np)
! *np = '\0';
! if (is_name("all", to))
! {
! send_to_char( "You may not post notes to ALL on the IMC board.\n\r", ch);
! return;
! }
! if (np)
! *np = '@';
! }*/
if ( !can_post( ch, board ) )
{
send_to_char( "A magical force prevents you from posting your note here...\n\r", ch );
--- 1115,1128 ----
send_to_char( "There is no bulletin board here to post your note on.\n\r", ch );
return;
}
+ #ifdef USE_IMC
if ( (imc && board->board_obj != sysdata.imc_mail_vnum) ||
(!imc && board->board_obj == sysdata.imc_mail_vnum) )
{
send_to_char( "You can only post IMC mail on the IMC board.\n\r", ch );
return;
}
! #endif
if ( !can_post( ch, board ) )
{
send_to_char( "A magical force prevents you from posting your note here...\n\r", ch );
***************
*** 1122,1128 ****
return;
}
! act( AT_ACTION, "$n posts a note.", ch, NULL, NULL, TO_ROOM );
CREATE( pnote, NOTE_DATA, 1 );
pnote->date = STRALLOC( strtime );
--- 1135,1144 ----
return;
}
! if ( board->opostmessg )
! act ( AT_ACTION, board->opostmessg, ch, NULL, NULL, TO_ROOM );
! else
! act( AT_ACTION, "$n posts a note.", ch, NULL, NULL, TO_ROOM );
CREATE( pnote, NOTE_DATA, 1 );
pnote->date = STRALLOC( strtime );
***************
*** 1136,1149 ****
pnote->novotes = str_dup( "" );
pnote->abstentions = str_dup( "" );
if ( imc )
imc_post_mail(ch, pnote->sender, pnote->to_list, pnote->date,
pnote->subject, pnote->text);
LINK( pnote, board->first_note, board->last_note, next, prev );
board->num_posts++;
write_board( board );
! send_to_char( "You post your note on the board.\n\r", ch );
extract_obj( paper );
return;
}
--- 1152,1170 ----
pnote->novotes = str_dup( "" );
pnote->abstentions = str_dup( "" );
+ #ifdef USE_IMC
if ( imc )
imc_post_mail(ch, pnote->sender, pnote->to_list, pnote->date,
pnote->subject, pnote->text);
+ #endif
LINK( pnote, board->first_note, board->last_note, next, prev );
board->num_posts++;
write_board( board );
! if ( board->postmessg )
! act( AT_ACTION, board->postmessg, ch, NULL, NULL, TO_CHAR );
! else
! send_to_char( "You post your note on the board.\n\r", ch );
extract_obj( paper );
return;
}
***************
*** 1268,1283 ****
send_to_char( "Ok.\n\r", ch );
if ( take == 1 )
{
! act( AT_ACTION, "$n takes a note.", ch, NULL, NULL, TO_ROOM );
obj_to_char(paper, ch);
}
else if ( take == 2 )
{
! act( AT_ACTION, "$n copies a note.", ch, NULL, NULL, TO_ROOM );
obj_to_char(paper, ch);
}
else
! act( AT_ACTION, "$n removes a note.", ch, NULL, NULL, TO_ROOM );
return;
}
}
--- 1289,1315 ----
send_to_char( "Ok.\n\r", ch );
if ( take == 1 )
{
! if ( board->otakemessg )
! act( AT_ACTION, board->otakemessg, ch, NULL, NULL, TO_ROOM );
! else
! act( AT_ACTION, "$n takes a note.", ch, NULL, NULL, TO_ROOM );
obj_to_char(paper, ch);
}
else if ( take == 2 )
{
! if ( board->ocopymessg )
! act( AT_ACTION, board->ocopymessg, ch, NULL, NULL, TO_ROOM );
! else
! act( AT_ACTION, "$n copies a note.", ch, NULL, NULL, TO_ROOM );
obj_to_char(paper, ch);
}
else
! {
! if ( board->oremovemessg )
! act( AT_ACTION, board->oremovemessg, ch, NULL, NULL, TO_ROOM );
! else
! act( AT_ACTION, "$n removes a note.", ch, NULL, NULL, TO_ROOM );
! }
return;
}
}
***************
*** 1313,1318 ****
--- 1345,1358 ----
ungetc( letter, fp );
CREATE( board, BOARD_DATA, 1 );
+ /* Setup pointers --Shaddai */
+ board->otakemessg = NULL;
+ board->opostmessg = NULL;
+ board->oremovemessg = NULL;
+ board->olistmessg = NULL;
+ board->ocopymessg = NULL;
+ board->oreadmessg = NULL;
+ board->postmessg = NULL;
#ifdef KEY
#undef KEY
***************
*** 1364,1371 ****
--- 1404,1419 ----
KEY( "Min_post_level", board->min_post_level, fread_number( fp ) );
KEY( "Min_remove_level", board->min_remove_level,fread_number( fp ) );
KEY( "Max_posts", board->max_posts, fread_number( fp ) );
+ case 'O':
+ KEY( "OTakemessg", board->otakemessg, fread_string_nohash(fp));
+ KEY( "OCopymessg", board->ocopymessg, fread_string_nohash(fp));
+ KEY( "OReadmessg", board->oreadmessg, fread_string_nohash(fp));
+ KEY( "ORemovemessg", board->oremovemessg, fread_string_nohash(fp));
+ KEY( "OListmessg", board->olistmessg, fread_string_nohash(fp));
+ KEY( "OPostmessg", board->opostmessg, fread_string_nohash(fp));
case 'P':
KEY( "Post_group", board->post_group, fread_string_nohash( fp ) );
+ KEY( "Postmessg", board->postmessg, fread_string_nohash(fp));
case 'R':
KEY( "Read_group", board->read_group, fread_string_nohash( fp ) );
case 'T':
***************
*** 1535,1540 ****
--- 1583,1590 ----
send_to_char( "\n\rField being one of:\n\r", ch );
send_to_char( " ovnum read post remove maxpost filename type\n\r", ch );
send_to_char( " read_group post_group extra_readers extra_removers\n\r", ch );
+ send_to_char ("The following will affect how an action is sent:\n\r", ch );
+ send_to_char (" oremove otake olist oread ocopy opost postmessg\n\r", ch );
return;
}
***************
*** 1611,1617 ****
send_to_char( "Done. (posting group set)\n\r", ch );
return;
}
!
if ( !str_cmp( arg2, "extra_removers" ) )
{
if ( !argument || argument[0] == '\0' )
--- 1661,1806 ----
send_to_char( "Done. (posting group set)\n\r", ch );
return;
}
! if ( !str_cmp( arg2, "postmessg" ) )
! {
! if ( !argument || argument[0] == '\0' )
! {
! send_to_char( "No message specified.\n\r", ch );
! return;
! }
! if ( board->postmessg )
! DISPOSE( board->postmessg );
! if ( !str_cmp( argument, "none" ) )
! board->postmessg = NULL;
! else
! {
! sprintf( buf, "%s", argument );
! board->postmessg = str_dup( buf );
! }
! write_boards_txt( );
! send_to_char("Done.\n\r", ch );
! return;
! }
! if ( !str_cmp( arg2, "opost" ) )
! {
! if ( !argument || argument[0] == '\0' )
! {
! send_to_char( "No message specified.\n\r", ch );
! return;
! }
! if ( board->opostmessg )
! DISPOSE( board->opostmessg );
! if ( !str_cmp( argument, "none" ) )
! board->opostmessg = NULL;
! else
! {
! sprintf( buf, "%s", argument );
! board->opostmessg = str_dup( buf );
! }
! write_boards_txt( );
! send_to_char("Done.\n\r", ch );
! return;
! }
! if ( !str_cmp( arg2, "oremove" ) )
! {
! if ( !argument || argument[0] == '\0' )
! {
! send_to_char( "No message specified.\n\r", ch );
! return;
! }
! if ( board->oremovemessg )
! DISPOSE( board->oremovemessg );
! if ( !str_cmp( argument, "none" ) )
! board->oremovemessg = NULL;
! else
! {
! sprintf( buf, "%s", argument );
! board->oremovemessg = str_dup( buf );
! }
! write_boards_txt( );
! send_to_char("Done.\n\r", ch );
! return;
! }
! if ( !str_cmp( arg2, "otake" ) )
! {
! if ( !argument || argument[0] == '\0' )
! {
! send_to_char( "No message specified.\n\r", ch );
! return;
! }
! if ( board->otakemessg )
! DISPOSE( board->otakemessg );
! if ( !str_cmp( argument, "none" ) )
! board->otakemessg = NULL;
! else
! {
! sprintf( buf, "%s", argument );
! board->otakemessg = str_dup( buf );
! }
! write_boards_txt( );
! send_to_char("Done.\n\r", ch );
! return;
! }
! if ( !str_cmp( arg2, "ocopy" ) )
! {
! if ( !argument || argument[0] == '\0' )
! {
! send_to_char( "No message specified.\n\r", ch );
! return;
! }
! if ( board->ocopymessg )
! DISPOSE( board->ocopymessg );
! if ( !str_cmp( argument, "none" ) )
! board->ocopymessg = NULL;
! else
! {
! sprintf( buf, "%s", argument );
! board->ocopymessg = str_dup( buf );
! }
! write_boards_txt( );
! send_to_char("Done.\n\r", ch );
! return;
! }
! if ( !str_cmp( arg2, "oread" ) )
! {
! if ( !argument || argument[0] == '\0' )
! {
! send_to_char( "No message sepcified.\n\r", ch );
! return;
! }
! if ( board->oreadmessg )
! DISPOSE( board->oreadmessg );
! if ( !str_cmp( argument, "none" ) )
! board->oreadmessg = NULL;
! else
! {
! sprintf( buf, "%s", argument );
! board->oreadmessg = str_dup( buf );
! }
! write_boards_txt( );
! send_to_char("Done.\n\r", ch );
! return;
! }
! if ( !str_cmp( arg2, "olist" ) )
! {
! if ( !argument || argument[0] == '\0' )
! {
! send_to_char( "No message specified.\n\r", ch );
! return;
! }
! if ( board->olistmessg )
! DISPOSE( board->olistmessg );
! if ( !str_cmp( argument, "none" ) )
! board->olistmessg = NULL;
! else
! {
! sprintf( buf, "%s", argument );
! board->olistmessg = str_dup( buf );
! }
! write_boards_txt( );
! send_to_char("Done.\n\r", ch );
! return;
! }
if ( !str_cmp( arg2, "extra_removers" ) )
{
if ( !argument || argument[0] == '\0' )
***************
*** 1629,1635 ****
send_to_char( "Done. (extra removers set)\n\r", ch );
return;
}
!
if ( !str_cmp( arg2, "extra_readers" ) )
{
if ( !argument || argument[0] == '\0' )
--- 1818,1824 ----
send_to_char( "Done. (extra removers set)\n\r", ch );
return;
}
!
if ( !str_cmp( arg2, "extra_readers" ) )
{
if ( !argument || argument[0] == '\0' )
***************
*** 1759,1764 ****
--- 1948,1960 ----
ch_printf_color( ch, "&GRead_group: &W%s\n\r&GPost_group: &W%s\n\r&GExtra_readers: &W%s\n\r&GExtra_removers: &W%s\n\r",
board->read_group, board->post_group, board->extra_readers, board->extra_removers );
+ ch_printf_color( ch, "&GPost Message: %s\n\r", board->postmessg?board->postmessg:"Default Message" );
+ ch_printf_color( ch, "&GOPost Message: %s\n\r", board->opostmessg?board->opostmessg:"Default Message" );
+ ch_printf_color( ch, "&GORead Message: %s\n\r", board->oreadmessg?board->oreadmessg:"Default Message" );
+ ch_printf_color( ch, "&GORemove Message: %s\n\r", board->oremovemessg?board->oremovemessg:"Default Message" );
+ ch_printf_color( ch, "&GOTake Message: %s\n\r", board->otakemessg?board->otakemessg:"Default Message" );
+ ch_printf_color( ch, "&GOList Message: %s\n\r", board->olistmessg?board->olistmessg:"Default Message" );
+ ch_printf_color( ch, "&GOCopy Message: %s\n\r", board->ocopymessg?board->ocopymessg:"Default Message" );
return;
}
***************
*** 1784,1798 ****
{
BOARD_DATA *board;
NOTE_DATA *note;
! int cnt = 0;
for ( board = first_board; board; board = board->next )
if ( board->type == BOARD_MAIL && can_read(ch, board) )
for ( note = board->first_note; note; note = note->next )
! if ( is_note_to(ch, note) )
! ++cnt;
! if ( cnt )
! ch_printf(ch, "You have %d mail message%swaiting.\n\r", cnt,
! (cnt > 1) ? "s " : " ");
return;
}
--- 1980,2002 ----
{
BOARD_DATA *board;
NOTE_DATA *note;
! int cnt_to = 0, cnt_from=0;
for ( board = first_board; board; board = board->next )
if ( board->type == BOARD_MAIL && can_read(ch, board) )
for ( note = board->first_note; note; note = note->next )
! {
! if ( is_name(ch->name, note->to_list) )
! ++cnt_to;
! else if ( !str_cmp(ch->name, note->sender ) )
! ++cnt_from;
! }
! if ( cnt_to )
! ch_printf(ch, "You have %d mail message%swaiting for you.\n\r", cnt_to,
! (cnt_to > 1) ? "s " : " ");
!
! if ( cnt_from )
! ch_printf(ch, "You have %d mail message%swritten by you.\n\r", cnt_from,
! (cnt_from > 1) ? "s " : " ");
return;
}
diff -c -r /home/5500/olddist/src/build.c /home/5500/dist/src/build.c
*** /home/5500/olddist/src/build.c Tue Jul 28 02:30:55 1998
--- /home/5500/dist/src/build.c Fri May 28 01:18:59 1999
***************
*** 54,60 ****
"isdoor", "closed", "locked", "secret", "swim", "pickproof", "fly", "climb",
"dig", "eatkey", "nopassdoor", "hidden", "passage", "portal", "r1", "r2",
"can_climb", "can_enter", "can_leave", "auto", "noflee", "searchable",
! "bashed", "bashproof", "nomob", "window", "can_look"
};
char * const r_flags [] =
--- 54,68 ----
"isdoor", "closed", "locked", "secret", "swim", "pickproof", "fly", "climb",
"dig", "eatkey", "nopassdoor", "hidden", "passage", "portal", "r1", "r2",
"can_climb", "can_enter", "can_leave", "auto", "noflee", "searchable",
! "bashed", "bashproof", "nomob", "window", "can_look", "isbolt", "bolted"
! };
!
! char * const sec_flags [] =
! {
! "inside", "city", "field", "forest", "hills", "mountain", "water_swim",
! "water_noswim", "underwater", "air", "desert", "dunno", "oceanfloor",
! "underground", "lava", "swamp", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
! "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16"
};
char * const r_flags [] =
***************
*** 63,69 ****
"nomagic", "tunnel", "private", "safe", "solitary", "petshop", "norecall",
"donation", "nodropall", "silence", "logspeech", "nodrop", "clanstoreroom",
"nosummon", "noastral", "teleport", "teleshowdesc", "nofloor",
! "nosupplicate", "arena", "nomissile", "r4", "r5", "prototype", "r6"
};
char * const o_flags [] =
--- 71,77 ----
"nomagic", "tunnel", "private", "safe", "solitary", "petshop", "norecall",
"donation", "nodropall", "silence", "logspeech", "nodrop", "clanstoreroom",
"nosummon", "noastral", "teleport", "teleshowdesc", "nofloor",
! "nosupplicate", "arena", "nomissile", "r4", "r5", "prototype", "dnd"
};
char * const o_flags [] =
***************
*** 73,79 ****
"antimage", "antithief", "antiwarrior", "anticleric", "organic", "metal",
"donation", "clanobject", "clancorpse", "antivampire", "antidruid",
"hidden", "poisoned", "covering", "deathrot", "buried", "prototype",
! "nolocate", "groundrot" };
char * const mag_flags [] =
{
--- 81,87 ----
"antimage", "antithief", "antiwarrior", "anticleric", "organic", "metal",
"donation", "clanobject", "clancorpse", "antivampire", "antidruid",
"hidden", "poisoned", "covering", "deathrot", "buried", "prototype",
! "nolocate", "groundrot", "lootable" };
char * const mag_flags [] =
{
***************
*** 89,97 ****
"r7","r8","r9","r10","r11","r12","r13"
};
char * const area_flags [] =
{
! "nopkill", "freekill", "noteleport", "r3", "r4", "r5", "r6", "r7", "r8",
"r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17",
"r18", "r19","r20","r21","r22","r23","r24",
"r25","r26","r27","r28","r29","r30","r31"
--- 97,113 ----
"r7","r8","r9","r10","r11","r12","r13"
};
+ char * const item_w_flags [] =
+ {
+ "take", "finger", "neck", "neck", "neck", "body", "head", "legs", "feet",
+ "hands", "arms", "shield", "about", "waist", "wrist", "wrist", "wield",
+ "hold", "dual", "ears", "eyes", "missile", "back", "face", "ankle", "ankle",
+ "r4","r5","r6","r7","r8","r9","r10","r11","r12","r13"
+ };
+
char * const area_flags [] =
{
! "nopkill", "freekill", "noteleport", "spelllimit", "r4", "r5", "r6", "r7", "r8",
"r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17",
"r18", "r19","r20","r21","r22","r23","r24",
"r25","r26","r27","r28","r29","r30","r31"
***************
*** 107,113 ****
"lever", "pullchain", "button", "dial", "rune", "runepouch", "match", "trap",
"map", "portal", "paper", "tinder", "lockpick", "spike", "disease", "oil",
"fuel", "_empty1", "_empty2", "missileweapon", "projectile", "quiver", "shovel",
! "salve", "cook", "keyring", "odor"
};
char * const a_types [] =
--- 123,129 ----
"lever", "pullchain", "button", "dial", "rune", "runepouch", "match", "trap",
"map", "portal", "paper", "tinder", "lockpick", "spike", "disease", "oil",
"fuel", "_empty1", "_empty2", "missileweapon", "projectile", "quiver", "shovel",
! "salve", "cook", "keyring", "odor", "chance"
};
char * const a_types [] =
***************
*** 132,153 ****
"_flaming", "poison", "protect", "_paralysis", "sneak", "hide", "sleep",
"charm", "flying", "pass_door", "floating", "truesight", "detect_traps",
"scrying", "fireshield", "shockshield", "r1", "iceshield", "possess",
! "berserk", "aqua_breath", "recurringspell", "contagious" };
char * const act_flags [] =
{
"npc", "sentinel", "scavenger", "r1", "r2", "aggressive", "stayarea",
"wimpy", "pet", "train", "practice", "immortal", "deadly", "polyself",
"meta_aggr", "guardian", "running", "nowander", "mountable", "mounted",
! "scholar", "secretive", "r10", "mobinvis", "noassist", "autonomous",
! "pacifist", "noattack", "annoying", "r13", "prototype", "r14"
};
char * const pc_flags [] =
{
"r1", "deadly", "unauthed", "norecall", "nointro", "gag", "retired", "guest",
! "nosummon", "pager", "notitled", "groupwho", "diagnose", "highgag", "r8",
! "nstart", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18",
"r19", "r20", "r21", "r22", "r23", "r24", "r25"
};
--- 148,172 ----
"_flaming", "poison", "protect", "_paralysis", "sneak", "hide", "sleep",
"charm", "flying", "pass_door", "floating", "truesight", "detect_traps",
"scrying", "fireshield", "shockshield", "r1", "iceshield", "possess",
! "berserk", "aqua_breath", "recurringspell", "contagious", "acidmist",
! "venomshield"
! };
char * const act_flags [] =
{
"npc", "sentinel", "scavenger", "r1", "r2", "aggressive", "stayarea",
"wimpy", "pet", "train", "practice", "immortal", "deadly", "polyself",
"meta_aggr", "guardian", "running", "nowander", "mountable", "mounted",
! "scholar", "secretive", "hardhat", "mobinvis", "noassist", "autonomous",
! "pacifist", "noattack", "annoying", "statshield", "prototype", "r14"
};
char * const pc_flags [] =
{
"r1", "deadly", "unauthed", "norecall", "nointro", "gag", "retired", "guest",
! /* changed "r8" to "" so players on watch can't see it -- Gorog */
! "nosummon", "pager", "notitled", "groupwho", "diagnose", "highgag", "",
! "nstart", "dnd", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18",
"r19", "r20", "r21", "r22", "r23", "r24", "r25"
};
***************
*** 157,163 ****
"outcast", "brief", "combine", "prompt", "telnet_ga", "holylight",
"wizinvis", "roomvnum","silence", "noemote", "attacker", "notell", "log",
"deny", "freeze", "thief","killer", "litterbug", "ansi", "rip", "nice",
! "flee" ,"autogold", "automap", "afk"
};
char * const trap_flags [] =
--- 176,182 ----
"outcast", "brief", "combine", "prompt", "telnet_ga", "holylight",
"wizinvis", "roomvnum","silence", "noemote", "attacker", "notell", "log",
"deny", "freeze", "thief","killer", "litterbug", "ansi", "rip", "nice",
! "flee" ,"autogold", "automap", "afk", "invisprompt"
};
char * const trap_flags [] =
***************
*** 224,230 ****
"dispelmagic", "dispelevil", "sanctuary", "fireshield", "shockshield",
"shield", "bless", "stoneskin", "teleport", "monsum1", "monsum2", "monsum3",
"monsum4", "disarm", "iceshield", "grip", "truesight", "r4", "r5", "r6", "r7",
! "r8", "r9", "r10", "r11", "r12"
};
/*
--- 243,249 ----
"dispelmagic", "dispelevil", "sanctuary", "fireshield", "shockshield",
"shield", "bless", "stoneskin", "teleport", "monsum1", "monsum2", "monsum3",
"monsum4", "disarm", "iceshield", "grip", "truesight", "r4", "r5", "r6", "r7",
! "r8", "r9", "r10", "r11", "r12", "acidmist", "venomshield"
};
/*
***************
*** 259,265 ****
if ( IS_SET( bitvector, 1 << x ) )
{
strcat( buf, flagarray[x] );
! strcat( buf, " " );
}
if ( (x=strlen( buf )) > 0 )
buf[--x] = '\0';
--- 278,286 ----
if ( IS_SET( bitvector, 1 << x ) )
{
strcat( buf, flagarray[x] );
! /* don't catenate a blank if the last char is blank --Gorog */
! if ( buf[0]!='\0' && ' '!=buf[strlen(buf)-1] )
! strcat( buf, " " );
}
if ( (x=strlen( buf )) > 0 )
buf[--x] = '\0';
***************
*** 487,492 ****
--- 508,523 ----
return -1;
}
+ int get_pc_race( char *type )
+ {
+ int i;
+
+ for ( i = 0; i < MAX_PC_RACE; i++ )
+ if ( !str_cmp(type, race_table[i]->race_name) )
+ return i;
+ return -1;
+ }
+
int get_wearloc( char *type )
{
int x;
***************
*** 497,502 ****
--- 528,543 ----
return -1;
}
+ int get_secflag( char *flag )
+ {
+ int x;
+
+ for ( x = 0; x < (sizeof(sec_flags) / sizeof(sec_flags[0])); x++ )
+ if ( !str_cmp(flag, sec_flags[x]) )
+ return x;
+ return -1;
+ }
+
int get_exflag( char *flag )
{
int x;
***************
*** 838,844 ****
--- 879,888 ----
tmp[len-1] = '\0';
else
strcat( tmp, "\n\r" );
+ /* This is wrong
smush_tilde(tmp);
+ */
+ smash_tilde(tmp);
strcat( buf, tmp );
}
return STRALLOC( buf );
***************
*** 864,873 ****
void do_goto( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
! ROOM_INDEX_DATA *location;
! CHAR_DATA *fch;
! CHAR_DATA *fch_next;
! ROOM_INDEX_DATA *in_room;
AREA_DATA *pArea;
sh_int vnum;
--- 908,915 ----
void do_goto( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
! ROOM_INDEX_DATA *location, *in_room;
! CHAR_DATA *fch, *fch_next, *victim;
AREA_DATA *pArea;
sh_int vnum;
***************
*** 878,883 ****
--- 920,938 ----
return;
}
+ if ( !is_number(arg) && (fch=get_char_world(ch, arg)) )
+ {
+ if ( !IS_NPC(fch) && get_trust(ch) < get_trust(fch)
+ && IS_SET(fch->pcdata->flags, PCFLAG_DND) )
+ {
+ pager_printf( ch,
+ "Sorry. %s does not wish to be disturbed.\n\r", fch->name);
+ pager_printf( fch,
+ "Your DND flag just foiled %s's goto command.\n\r", ch->name);
+ return;
+ }
+ }
+
if ( ( location = find_location( ch, arg ) ) == NULL )
{
vnum = atoi( arg );
***************
*** 917,922 ****
--- 972,985 ----
send_to_char( "Waving your hand, you form order from swirling chaos,\n\rand step into a new reality...\n\r", ch );
}
+ if ( (victim = room_is_dnd( ch, location)) )
+ {
+ pager_printf( ch, "That room is \"do not disturb\" right now.\n\r");
+ pager_printf( victim,
+ "Your DND flag just foiled %s's goto command.\n\r", ch->name );
+ return;
+ }
+
if ( room_is_private( location ) )
{
if ( get_trust( ch ) < sysdata.level_override_private )
***************
*** 1149,1154 ****
--- 1212,1225 ----
ch->dest_buf = NULL;
return;
}
+ if ( get_trust( ch ) < LEVEL_GREATER
+ && IS_NPC( victim )
+ && xIS_SET( victim->act, ACT_STATSHIELD ) )
+ {
+ send_to_char( "You can't do that!\n\r", ch );
+ ch->dest_buf = NULL;
+ return;
+ }
if ( lockvictim )
ch->dest_buf = victim;
***************
*** 1415,1421 ****
{
if ( !can_mmodify( ch, victim ) )
return;
! value = get_npc_race( arg3 );
if ( value < 0 )
value = atoi( arg3 );
if ( !IS_NPC(victim) && (value < 0 || value >= MAX_RACE) )
--- 1486,1496 ----
{
if ( !can_mmodify( ch, victim ) )
return;
! if ( IS_NPC(victim) )
! value = get_npc_race( arg3 );
! else
! value = get_pc_race( arg3 );
!
if ( value < 0 )
value = atoi( arg3 );
if ( !IS_NPC(victim) && (value < 0 || value >= MAX_RACE) )
***************
*** 2270,2276 ****
do_mset( ch, outbuf );
return;
}
-
if ( !str_cmp( arg2, "resistant" ) )
{
if ( !IS_NPC( victim ) && get_trust( ch ) < LEVEL_LESSER )
--- 2345,2350 ----
***************
*** 2355,2360 ****
--- 2429,2435 ----
return;
}
+
if ( !str_cmp( arg2, "part" ) )
{
if ( !IS_NPC( victim ) && get_trust( ch ) < LEVEL_LESSER )
***************
*** 2850,2860 ****
void do_oset( CHAR_DATA *ch, char *argument )
{
! char arg1 [MAX_INPUT_LENGTH];
! char arg2 [MAX_INPUT_LENGTH];
! char arg3 [MAX_INPUT_LENGTH];
! char buf [MAX_STRING_LENGTH];
! char outbuf [MAX_STRING_LENGTH];
OBJ_DATA *obj, *tmpobj;
EXTRA_DESCR_DATA *ed;
bool lockobj;
--- 2925,2935 ----
void do_oset( CHAR_DATA *ch, char *argument )
{
! char arg1[MAX_INPUT_LENGTH];
! char arg2[MAX_INPUT_LENGTH];
! char arg3[MAX_INPUT_LENGTH];
! char buf [MAX_STRING_LENGTH];
! char outbuf[MAX_STRING_LENGTH];
OBJ_DATA *obj, *tmpobj;
EXTRA_DESCR_DATA *ed;
bool lockobj;
***************
*** 3140,3145 ****
--- 3215,3279 ----
return;
}
+ if ( !str_cmp( arg2, "ed" ) )
+ {
+ if ( !arg3 || arg3[0] == '\0' )
+ {
+ send_to_char( "Syntax: oset <object> ed <keywords>\n\r",
+ ch );
+ return;
+ }
+ CHECK_SUBRESTRICTED( ch );
+ if ( obj->timer )
+ {
+ send_to_char("It's not safe to edit an extra description on an object with a timer.\n\rTurn it off first.\n\r", ch );
+ return;
+ }
+ if ( obj->item_type == ITEM_PAPER && get_trust(ch) < LEVEL_IMPLEMENTOR )
+ {
+ send_to_char("You can not add an extra description to a note paper at the moment.\n\r", ch);
+ return;
+ }
+ if ( IS_OBJ_STAT(obj, ITEM_PROTOTYPE) )
+ ed = SetOExtraProto( obj->pIndexData, arg3 );
+ else
+ ed = SetOExtra( obj, arg3 );
+ if ( ch->substate == SUB_REPEATCMD )
+ ch->tempnum = SUB_REPEATCMD;
+ else
+ ch->tempnum = SUB_NONE;
+ if ( lockobj )
+ ch->spare_ptr = obj;
+ else
+ ch->spare_ptr = NULL;
+ ch->substate = SUB_OBJ_EXTRA;
+ ch->dest_buf = ed;
+ start_editing( ch, ed->description );
+ return;
+ }
+
+ if ( !str_cmp( arg2, "rmed" ) )
+ {
+ if ( !arg3 || arg3[0] == '\0' )
+ {
+ send_to_char( "Syntax: oset <object> rmed <keywords>\n\r", ch );
+ return;
+ }
+ if ( IS_OBJ_STAT(obj, ITEM_PROTOTYPE) )
+ {
+ if ( DelOExtraProto( obj->pIndexData, arg3 ) )
+ send_to_char( "Deleted.\n\r", ch );
+ else
+ send_to_char( "Not found.\n\r", ch );
+ return;
+ }
+ if ( DelOExtra( obj, arg3 ) )
+ send_to_char( "Deleted.\n\r", ch );
+ else
+ send_to_char( "Not found.\n\r", ch );
+ return;
+ }
+
if ( get_trust(ch) < LEVEL_DEMI )
{
send_to_char("You can only oset the name, short and long right now.\n\r", ch );
***************
*** 3349,3354 ****
--- 3483,3490 ----
if ( !str_cmp( arg2, "actiondesc" ) )
{
+ if ( !can_omodify( ch, obj ) )
+ return;
if ( strstr( arg3, "%n" )
|| strstr( arg3, "%d" )
|| strstr( arg3, "%l" ) )
***************
*** 3374,3379 ****
--- 3510,3517 ----
sh_int loc;
int bitv;
+ if ( !can_omodify( ch, obj ) )
+ return;
argument = one_argument (argument, arg2);
if (!arg2 || arg2[0] == '\0' || !argument || argument[0] == 0)
{
***************
*** 3443,3448 ****
--- 3581,3588 ----
AFFECT_DATA *paf;
sh_int loc, count;
+ if ( !can_omodify( ch, obj ) )
+ return;
if ( !argument || argument[0] == '\0' )
{
send_to_char( "Usage: oset <object> rmaffect <affect#>\n\r", ch );
***************
*** 3494,3562 ****
}
}
- if ( !str_cmp( arg2, "ed" ) )
- {
- if ( !arg3 || arg3[0] == '\0' )
- {
- send_to_char( "Syntax: oset <object> ed <keywords>\n\r",
- ch );
- return;
- }
- CHECK_SUBRESTRICTED( ch );
- if ( obj->timer )
- {
- send_to_char("It's not safe to edit an extra description on an object with a timer.\n\rTurn it off first.\n\r", ch );
- return;
- }
- if ( obj->item_type == ITEM_PAPER )
- {
- send_to_char("You can not add an extra description to a note paper at the moment.\n\r", ch);
- return;
- }
- if ( IS_OBJ_STAT(obj, ITEM_PROTOTYPE) )
- ed = SetOExtraProto( obj->pIndexData, arg3 );
- else
- ed = SetOExtra( obj, arg3 );
- if ( ch->substate == SUB_REPEATCMD )
- ch->tempnum = SUB_REPEATCMD;
- else
- ch->tempnum = SUB_NONE;
- if ( lockobj )
- ch->spare_ptr = obj;
- else
- ch->spare_ptr = NULL;
- ch->substate = SUB_OBJ_EXTRA;
- ch->dest_buf = ed;
- start_editing( ch, ed->description );
- return;
- }
-
- if ( !str_cmp( arg2, "rmed" ) )
- {
- if ( !arg3 || arg3[0] == '\0' )
- {
- send_to_char( "Syntax: oset <object> rmed <keywords>\n\r", ch );
- return;
- }
- if ( IS_OBJ_STAT(obj, ITEM_PROTOTYPE) )
- {
- if ( DelOExtraProto( obj->pIndexData, arg3 ) )
- send_to_char( "Deleted.\n\r", ch );
- else
- send_to_char( "Not found.\n\r", ch );
- return;
- }
- if ( DelOExtra( obj, arg3 ) )
- send_to_char( "Deleted.\n\r", ch );
- else
- send_to_char( "Not found.\n\r", ch );
- return;
- }
/*
* save some finger-leather
*/
if ( !str_cmp( arg2, "ris" ) )
{
sprintf(outbuf, "%s affect resistant %s", arg1, arg3);
do_oset( ch, outbuf );
sprintf(outbuf, "%s affect immune %s", arg1, arg3);
--- 3634,3646 ----
}
}
/*
* save some finger-leather
*/
if ( !str_cmp( arg2, "ris" ) )
{
+ if ( !can_omodify( ch, obj ) )
+ return;
sprintf(outbuf, "%s affect resistant %s", arg1, arg3);
do_oset( ch, outbuf );
sprintf(outbuf, "%s affect immune %s", arg1, arg3);
***************
*** 3568,3573 ****
--- 3652,3659 ----
if ( !str_cmp( arg2, "r" ) )
{
+ if ( !can_omodify( ch, obj ) )
+ return;
sprintf(outbuf, "%s affect resistant %s", arg1, arg3);
do_oset( ch, outbuf );
return;
***************
*** 3575,3586 ****
--- 3661,3676 ----
if ( !str_cmp( arg2, "i" ) )
{
+ if ( !can_omodify( ch, obj ) )
+ return;
sprintf(outbuf, "%s affect immune %s", arg1, arg3);
do_oset( ch, outbuf );
return;
}
if ( !str_cmp( arg2, "s" ) )
{
+ if ( !can_omodify( ch, obj ) )
+ return;
sprintf(outbuf, "%s affect susceptible %s", arg1, arg3);
do_oset( ch, outbuf );
return;
***************
*** 3588,3593 ****
--- 3678,3685 ----
if ( !str_cmp( arg2, "ri" ) )
{
+ if ( !can_omodify( ch, obj ) )
+ return;
sprintf(outbuf, "%s affect resistant %s", arg1, arg3);
do_oset( ch, outbuf );
sprintf(outbuf, "%s affect immune %s", arg1, arg3);
***************
*** 3597,3602 ****
--- 3689,3696 ----
if ( !str_cmp( arg2, "rs" ) )
{
+ if ( !can_omodify( ch, obj ) )
+ return;
sprintf(outbuf, "%s affect resistant %s", arg1, arg3);
do_oset( ch, outbuf );
sprintf(outbuf, "%s affect susceptible %s", arg1, arg3);
***************
*** 3606,3611 ****
--- 3700,3707 ----
if ( !str_cmp( arg2, "is" ) )
{
+ if ( !can_omodify( ch, obj ) )
+ return;
sprintf(outbuf, "%s affect immune %s", arg1, arg3);
do_oset( ch, outbuf );
sprintf(outbuf, "%s affect susceptible %s", arg1, arg3);
***************
*** 4436,4442 ****
if ( location->sector_type < 0 || location->sector_type >= SECT_MAX )
{
location->sector_type = 1;
! send_to_char( "Out of range\n\r.", ch );
}
else
send_to_char( "Done.\n\r", ch );
--- 4532,4538 ----
if ( location->sector_type < 0 || location->sector_type >= SECT_MAX )
{
location->sector_type = 1;
! send_to_char( "Out of range.\n\r", ch );
}
else
send_to_char( "Done.\n\r", ch );
***************
*** 5809,5814 ****
--- 5905,5912 ----
tarea->low_hard_range,
tarea->hi_hard_range );
fprintf( fpout, "$\n\n");
+ if ( AREA_VERSION_WRITE > 1 )
+ fprintf( fpout, "#SPELLLIMIT %d\n", tarea->spelllimit );
if ( tarea->resetmsg ) /* Rennard */
fprintf( fpout, "#RESETMSG %s~\n\n", tarea->resetmsg );
if ( tarea->reset_frequency )
***************
*** 5962,5971 ****
else val1 = HAS_SPELL_INDEX;
if ( IS_VALID_SN(val2) )
if ( AREA_VERSION_WRITE == 0 ) val2 = skill_table[val2]->slot;
! else val1 = HAS_SPELL_INDEX;
if ( IS_VALID_SN(val3) )
if ( AREA_VERSION_WRITE == 0 ) val3 = skill_table[val3]->slot;
! else val1 = HAS_SPELL_INDEX;
break;
case ITEM_STAFF:
case ITEM_WAND:
--- 6060,6069 ----
else val1 = HAS_SPELL_INDEX;
if ( IS_VALID_SN(val2) )
if ( AREA_VERSION_WRITE == 0 ) val2 = skill_table[val2]->slot;
! else val2 = HAS_SPELL_INDEX;
if ( IS_VALID_SN(val3) )
if ( AREA_VERSION_WRITE == 0 ) val3 = skill_table[val3]->slot;
! else val3 = HAS_SPELL_INDEX;
break;
case ITEM_STAFF:
case ITEM_WAND:
***************
*** 7136,7141 ****
--- 7234,7258 ----
tarea = ch->pcdata->area;
argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );
+
+ if ( arg1[0]!='\0' && !is_number(arg1) )
+ return;
+ if ( arg2[0]!='\0' && !is_number(arg2) )
+ return;
+
+ /* I know the above code could be combined into 3 lines, but we write code
+ once and then read it many times. It is so much easier to read without
+ trying to figure out what opening parenthesis belongs with what closing
+ one. -- Gorog
+ */
+
+ /* Bah! The following code uses atoi(arg1) and atoi(arg2) without even
+ checking they are numeric or even exist. I put a fix for this above.
+ It also uses is_number(arg1) without checking if arg1 may be null.
+ Caused a crash when the command was uses with a single alpha arg.
+ -- Gorog
+ */
+
if ( tarea )
{
if ( arg1[0] == '\0' ) /* cleaned a big scary mess */
***************
*** 7390,7396 ****
send_to_char( "You can't do that!\n\r", ch );
return;
}
!
if ( !can_mmodify( ch, victim ) )
return;
--- 7507,7520 ----
send_to_char( "You can't do that!\n\r", ch );
return;
}
! if ( get_trust( ch ) < LEVEL_GREATER
! && IS_NPC( victim )
! && xIS_SET( victim->act, ACT_STATSHIELD ) )
! {
! set_pager_color( AT_IMMORT, ch );
! send_to_pager( "Their godly glow prevents you from getting close enough.\n\r", ch );
! return;
! }
if ( !can_mmodify( ch, victim ) )
return;
***************
*** 8338,8343 ****
--- 8462,8856 ----
return;
}
+ /*
+ * Mobile and Object Program Copying
+ * Last modified Feb. 24 1999
+ * Mystaric
+ */
+
+ void mpcopy( MPROG_DATA *source, MPROG_DATA *destination)
+ {
+ destination->type=source->type;
+ destination->triggered=source->triggered;
+ destination->resetdelay=source->resetdelay;
+ destination->arglist = STRALLOC( source->arglist);
+ destination->comlist = STRALLOC( source->comlist);
+ destination->next = NULL;
+ }
+
+ void do_opcopy( CHAR_DATA *ch, char *argument )
+ {
+ char sobj [MAX_INPUT_LENGTH];
+ char prog [MAX_INPUT_LENGTH];
+ char num [MAX_INPUT_LENGTH];
+ char dobj [MAX_INPUT_LENGTH];
+ OBJ_DATA *source=NULL, *destination=NULL;
+ MPROG_DATA *source_oprog=NULL, *dest_oprog=NULL, *source_oprg=NULL, *dest_oprg=NULL;
+ int value = -1, optype = -1, cnt=0;
+ bool COPY = FALSE;
+
+ if ( IS_NPC( ch ) )
+ {
+ send_to_char( "Mob's can't opcopyShowing the first 150 KB. Download the file for the full text.