mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-22 10:10:13 +01:00
New house system, ASCII hcontrol file and hsedit house OLC
This commit is contained in:
parent
74c3d208b6
commit
3fa8ebe048
16 changed files with 2647 additions and 681 deletions
11
changelog
11
changelog
|
|
@ -35,12 +35,21 @@ export (QQ's a zone into a tarball)
|
|||
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||
(lots of major bugfixes too)
|
||||
@
|
||||
[Nov 30 2010] - Jamdog
|
||||
Bug-Fix: Fixed incorrect rnum showing on stat room <vnum> (Thanks Kam)
|
||||
Added hsedit House Editor OLC
|
||||
[Nov 28 2010] - Jamdog
|
||||
Converted houses (lib/etc/hcontrol file) to ASCII file format
|
||||
Added hcontrol file converter (hstoascii.c) to src/utils folder
|
||||
Converted houses to work as linked lists, not wasteful fixed-size arrays
|
||||
Added GOD houses and player-owned shops as house types
|
||||
Added 'receptionist' and 'player-shopkeeper' type spec-procs for houses
|
||||
[Nov 26 2010] - Jamdog
|
||||
Bug-Fix: set level now allows GRGOD or higher to set to any mortal level
|
||||
Advance command changed to work for both mortal and admin levels
|
||||
Added increase_gold and increase_bank functions to prevent cash overflows
|
||||
Added dupe check for new characters in char creation (thanks Mirad)
|
||||
Bug-Fix: Since admin update, real mortals didn't show on who list
|
||||
Bug-Fix: Since admin update, real mortals didn't show on who list (thanks Rhade)
|
||||
[Nov 25 2010] - Jamdog
|
||||
Added diagonal directions with cedit toggle (default to 'off')
|
||||
Bug-Fix: admin <player> default now targets the victim player
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mod
|
|||
snprintf(notebuf, sizeof(notebuf), "There is something written on it:\r\n\r\n%s", obj->action_description);
|
||||
page_string(ch->desc, notebuf, TRUE);
|
||||
} else
|
||||
send_to_char(ch, "It's blank.\r\n");
|
||||
send_to_char(ch, "It's blank.\r\n");
|
||||
return;
|
||||
|
||||
case ITEM_DRINKCON:
|
||||
|
|
@ -272,8 +272,8 @@ static void look_at_char(struct char_data *i, struct char_data *ch)
|
|||
act("$n is using:", FALSE, i, 0, ch, TO_VICT);
|
||||
for (j = 0; j < NUM_WEARS; j++)
|
||||
if (GET_EQ(i, j) && CAN_SEE_OBJ(ch, GET_EQ(i, j))) {
|
||||
send_to_char(ch, "%s", wear_where[j]);
|
||||
show_obj_to_char(GET_EQ(i, j), ch, SHOW_OBJ_SHORT);
|
||||
send_to_char(ch, "%s", wear_where[j]);
|
||||
show_obj_to_char(GET_EQ(i, j), ch, SHOW_OBJ_SHORT);
|
||||
}
|
||||
}
|
||||
if (ch != i && (IS_THIEF(ch) || (ADM_FLAGGED(ch, ADM_SEEINV)))) {
|
||||
|
|
@ -349,22 +349,22 @@ static void list_one_char(struct char_data *i, struct char_data *ch)
|
|||
if (GET_POS(i) != POS_FIGHTING) {
|
||||
if (!SITTING(i))
|
||||
send_to_char(ch, "%s", positions[(int) GET_POS(i)]);
|
||||
else {
|
||||
furniture = SITTING(i);
|
||||
send_to_char(ch, " is %s upon %s.", (GET_POS(i) == POS_SLEEPING ?
|
||||
else {
|
||||
furniture = SITTING(i);
|
||||
send_to_char(ch, " is %s upon %s.", (GET_POS(i) == POS_SLEEPING ?
|
||||
"sleeping" : (GET_POS(i) == POS_RESTING ? "resting" : "sitting")),
|
||||
OBJS(furniture, ch));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (FIGHTING(i)) {
|
||||
send_to_char(ch, " is here, fighting ");
|
||||
if (FIGHTING(i) == ch)
|
||||
send_to_char(ch, "YOU!");
|
||||
send_to_char(ch, "YOU!");
|
||||
else {
|
||||
if (IN_ROOM(i) == IN_ROOM(FIGHTING(i)))
|
||||
send_to_char(ch, "%s!", PERS(FIGHTING(i), ch));
|
||||
else
|
||||
send_to_char(ch, "someone who has already left!");
|
||||
if (IN_ROOM(i) == IN_ROOM(FIGHTING(i)))
|
||||
send_to_char(ch, "%s!", PERS(FIGHTING(i), ch));
|
||||
else
|
||||
send_to_char(ch, "someone who has already left!");
|
||||
}
|
||||
} else /* NIL fighting pointer */
|
||||
send_to_char(ch, " is here struggling with thin air.");
|
||||
|
|
@ -507,14 +507,12 @@ void look_at_room(struct char_data *ch, int ignore_brief)
|
|||
if ((!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_BRIEF)) || ignore_brief ||
|
||||
ROOM_FLAGGED(IN_ROOM(ch), ROOM_DEATH))
|
||||
{
|
||||
if(!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOMAP) && can_see_map(ch))
|
||||
{
|
||||
str_and_map(world[target_room].description, ch, target_room);
|
||||
}
|
||||
else
|
||||
{
|
||||
send_to_char(ch, "%s", world[IN_ROOM(ch)].description);
|
||||
}
|
||||
if(!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOMAP) && can_see_map(ch))
|
||||
{
|
||||
str_and_map(world[target_room].description, ch, target_room);
|
||||
} else {
|
||||
send_to_char(ch, "%s", world[IN_ROOM(ch)].description);
|
||||
}
|
||||
}
|
||||
|
||||
/* autoexits */
|
||||
|
|
@ -555,13 +553,13 @@ static void look_in_obj(struct char_data *ch, char *arg)
|
|||
send_to_char(ch, "There doesn't seem to be %s %s here.\r\n", AN(arg), arg);
|
||||
} else if ((GET_OBJ_TYPE(obj) != ITEM_DRINKCON) &&
|
||||
(GET_OBJ_TYPE(obj) != ITEM_FOUNTAIN) &&
|
||||
(GET_OBJ_TYPE(obj) != ITEM_CONTAINER))
|
||||
(GET_OBJ_TYPE(obj) != ITEM_CONTAINER)) {
|
||||
send_to_char(ch, "There's nothing inside that!\r\n");
|
||||
else {
|
||||
} else {
|
||||
if (GET_OBJ_TYPE(obj) == ITEM_CONTAINER) {
|
||||
if (OBJVAL_FLAGGED(obj, CONT_CLOSED) && (!IS_ADMIN(ch, ADMLVL_IMMORT) || !PRF_FLAGGED(ch, PRF_NOHASSLE)))
|
||||
if (OBJVAL_FLAGGED(obj, CONT_CLOSED) && (!IS_ADMIN(ch, ADMLVL_IMMORT) || !PRF_FLAGGED(ch, PRF_NOHASSLE))) {
|
||||
send_to_char(ch, "It is closed.\r\n");
|
||||
else {
|
||||
} else {
|
||||
send_to_char(ch, "%s", fname(obj->name));
|
||||
switch (bits) {
|
||||
case FIND_OBJ_INV:
|
||||
|
|
@ -585,10 +583,9 @@ static void look_in_obj(struct char_data *ch, char *arg)
|
|||
char buf2[MAX_STRING_LENGTH];
|
||||
sprinttype(GET_OBJ_VAL(obj, 2), color_liquid, buf2, sizeof(buf2));
|
||||
send_to_char(ch, "It's full of a %s liquid.\r\n", buf2);
|
||||
}
|
||||
else if (GET_OBJ_VAL(obj,1)>GET_OBJ_VAL(obj,0))
|
||||
} else if (GET_OBJ_VAL(obj,1)>GET_OBJ_VAL(obj,0)) {
|
||||
send_to_char(ch, "Its contents seem somewhat murky.\r\n"); /* BUG */
|
||||
else {
|
||||
} else {
|
||||
char buf2[MAX_STRING_LENGTH];
|
||||
amt = (GET_OBJ_VAL(obj, 1) * 3) / GET_OBJ_VAL(obj, 0);
|
||||
sprinttype(GET_OBJ_VAL(obj, 2), color_liquid, buf2, sizeof(buf2));
|
||||
|
|
@ -656,40 +653,46 @@ static void look_at_target(struct char_data *ch, char *arg)
|
|||
}
|
||||
|
||||
/* Does the argument match an extra desc in the char's equipment? */
|
||||
for (j = 0; j < NUM_WEARS && !found; j++)
|
||||
if (GET_EQ(ch, j) && CAN_SEE_OBJ(ch, GET_EQ(ch, j)))
|
||||
for (j = 0; j < NUM_WEARS && !found; j++) {
|
||||
if (GET_EQ(ch, j) && CAN_SEE_OBJ(ch, GET_EQ(ch, j))) {
|
||||
if ((desc = find_exdesc(arg, GET_EQ(ch, j)->ex_description)) != NULL && ++i == fnum) {
|
||||
send_to_char(ch, "%s", desc);
|
||||
found = TRUE;
|
||||
send_to_char(ch, "%s", desc);
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Does the argument match an extra desc in the char's inventory? */
|
||||
for (obj = ch->carrying; obj && !found; obj = obj->next_content) {
|
||||
if (CAN_SEE_OBJ(ch, obj))
|
||||
if (CAN_SEE_OBJ(ch, obj)) {
|
||||
if ((desc = find_exdesc(arg, obj->ex_description)) != NULL && ++i == fnum) {
|
||||
send_to_char(ch, "%s", desc);
|
||||
found = TRUE;
|
||||
send_to_char(ch, "%s", desc);
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Does the argument match an extra desc of an object in the room? */
|
||||
for (obj = world[IN_ROOM(ch)].contents; obj && !found; obj = obj->next_content)
|
||||
if (CAN_SEE_OBJ(ch, obj))
|
||||
for (obj = world[IN_ROOM(ch)].contents; obj && !found; obj = obj->next_content) {
|
||||
if (CAN_SEE_OBJ(ch, obj)) {
|
||||
if ((desc = find_exdesc(arg, obj->ex_description)) != NULL && ++i == fnum) {
|
||||
send_to_char(ch, "%s", desc);
|
||||
found = TRUE;
|
||||
send_to_char(ch, "%s", desc);
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If an object was found back in generic_find */
|
||||
if (bits) {
|
||||
if (!found)
|
||||
if (!found) {
|
||||
show_obj_to_char(found_obj, ch, SHOW_OBJ_ACTION);
|
||||
else {
|
||||
} else {
|
||||
show_obj_modifiers(found_obj, ch);
|
||||
send_to_char(ch, "\r\n");
|
||||
}
|
||||
} else if (!found)
|
||||
} else if (!found) {
|
||||
send_to_char(ch, "You do not see that here.\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
ACMD(do_look)
|
||||
|
|
@ -971,14 +974,13 @@ ACMD(do_equipment)
|
|||
send_to_char(ch, "You are using:\r\n");
|
||||
for (i = 0; i < NUM_WEARS; i++) {
|
||||
if (GET_EQ(ch, i)) {
|
||||
found = TRUE;
|
||||
if (CAN_SEE_OBJ(ch, GET_EQ(ch, i))) {
|
||||
send_to_char(ch, "%s", wear_where[i]);
|
||||
show_obj_to_char(GET_EQ(ch, i), ch, SHOW_OBJ_SHORT);
|
||||
found = TRUE;
|
||||
send_to_char(ch, "%s", wear_where[i]);
|
||||
show_obj_to_char(GET_EQ(ch, i), ch, SHOW_OBJ_SHORT);
|
||||
} else {
|
||||
send_to_char(ch, "%s", wear_where[i]);
|
||||
send_to_char(ch, "Something.\r\n");
|
||||
found = TRUE;
|
||||
send_to_char(ch, "%s", wear_where[i]);
|
||||
send_to_char(ch, "Something.\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1075,7 +1077,7 @@ int search_help(const char *argument, int level)
|
|||
while (level < help_table[mid].min_level && mid < (bot + top) / 2)
|
||||
mid++;
|
||||
|
||||
// if (strn_cmp(argument, help_table[mid].keywords, minlen) || level < help_table[mid].min_level)
|
||||
// if (strn_cmp(argument, help_table[mid].keywords, minlen) || level < help_table[mid].min_level)
|
||||
if (strn_cmp(argument, help_table[mid].keywords, minlen))
|
||||
break;
|
||||
|
||||
|
|
@ -1303,7 +1305,7 @@ ACMD(do_who)
|
|||
if (showleader && (!tch->followers || !AFF_FLAGGED(tch, AFF_GROUP)))
|
||||
continue;
|
||||
|
||||
sprintf(admlev, "%11s", admin_level_names[(GET_ADMLEVEL(tch))]);
|
||||
sprintf(admlev, "%-11s", admin_level_names[(GET_ADMLEVEL(tch))]);
|
||||
if (short_list) {
|
||||
send_to_char(ch, "%s[%2d %s] %-12.12s%s%s",
|
||||
(IS_ADMIN(tch, ADMLVL_IMMORT) ? CCYEL(ch, C_SPR) : ""),
|
||||
|
|
@ -1475,7 +1477,7 @@ ACMD(do_users)
|
|||
continue;
|
||||
if (IS_PLAYING(d)) {
|
||||
if (d->original)
|
||||
tch = d->original;
|
||||
tch = d->original;
|
||||
else if (!(tch = d->character))
|
||||
continue;
|
||||
|
||||
|
|
@ -1486,7 +1488,7 @@ ACMD(do_users)
|
|||
if (!CAN_SEE(ch, tch) || GET_ADMLEVEL(tch) < low || GET_ADMLEVEL(tch) > high)
|
||||
continue;
|
||||
if (outlaws && !PLR_FLAGGED(tch, PLR_KILLER) &&
|
||||
!PLR_FLAGGED(tch, PLR_THIEF))
|
||||
!PLR_FLAGGED(tch, PLR_THIEF))
|
||||
continue;
|
||||
if (showclass && !(showclass & (1 << GET_CLASS(tch))))
|
||||
continue;
|
||||
|
|
@ -1495,10 +1497,10 @@ ACMD(do_users)
|
|||
|
||||
if (d->original)
|
||||
sprintf(classname, "[%2d %s]", GET_LEVEL(d->original),
|
||||
CLASS_ABBR(d->original));
|
||||
CLASS_ABBR(d->original));
|
||||
else
|
||||
sprintf(classname, "[%2d %s]", GET_LEVEL(d->character),
|
||||
CLASS_ABBR(d->character));
|
||||
CLASS_ABBR(d->character));
|
||||
} else
|
||||
strcpy(classname, " - ");
|
||||
|
||||
|
|
@ -1513,15 +1515,15 @@ ACMD(do_users)
|
|||
|
||||
if (d->character && STATE(d) == CON_PLAYING)
|
||||
sprintf(idletime, "%5d", d->character->char_specials.timer *
|
||||
SECS_PER_MUD_HOUR / SECS_PER_REAL_MIN);
|
||||
SECS_PER_MUD_HOUR / SECS_PER_REAL_MIN);
|
||||
else
|
||||
strcpy(idletime, " ");
|
||||
|
||||
sprintf(line, "%3d %-7s %-12s %-14s %-3s %-8s ", d->desc_num, classname,
|
||||
d->original && d->original->player.name ? d->original->player.name :
|
||||
d->character && d->character->player.name ? d->character->player.name :
|
||||
"UNDEFINED",
|
||||
state, idletime, timeptr);
|
||||
d->original && d->original->player.name ? d->original->player.name :
|
||||
d->character && d->character->player.name ? d->character->player.name :
|
||||
"UNDEFINED",
|
||||
state, idletime, timeptr);
|
||||
|
||||
if (d->host && *d->host)
|
||||
sprintf(line + strlen(line), "[%s]\r\n", d->host);
|
||||
|
|
@ -1533,7 +1535,7 @@ ACMD(do_users)
|
|||
strcpy(line, line2);
|
||||
}
|
||||
if (STATE(d) != CON_PLAYING ||
|
||||
(STATE(d) == CON_PLAYING && CAN_SEE(ch, d->character))) {
|
||||
(STATE(d) == CON_PLAYING && CAN_SEE(ch, d->character))) {
|
||||
send_to_char(ch, "%s", line);
|
||||
num_can_see++;
|
||||
}
|
||||
|
|
@ -1612,23 +1614,23 @@ static void perform_mortal_where(struct char_data *ch, char *arg)
|
|||
send_to_char(ch, "Players in %s@n.\r\n--------------------\r\n", zone_table[j].name);
|
||||
for (d = descriptor_list; d; d = d->next) {
|
||||
if (STATE(d) != CON_PLAYING || d->character == ch)
|
||||
continue;
|
||||
continue;
|
||||
if ((i = (d->original ? d->original : d->character)) == NULL)
|
||||
continue;
|
||||
continue;
|
||||
if (IN_ROOM(i) == NOWHERE || !CAN_SEE(ch, i))
|
||||
continue;
|
||||
continue;
|
||||
if (world[IN_ROOM(ch)].zone != world[IN_ROOM(i)].zone)
|
||||
continue;
|
||||
continue;
|
||||
send_to_char(ch, "%-20s%s - %s%s\r\n", GET_NAME(i), QNRM, world[IN_ROOM(i)].name, QNRM);
|
||||
}
|
||||
} else { /* print only FIRST char, not all. */
|
||||
for (i = character_list; i; i = i->next) {
|
||||
if (IN_ROOM(i) == NOWHERE || i == ch)
|
||||
continue;
|
||||
continue;
|
||||
if (!CAN_SEE(ch, i) || world[IN_ROOM(i)].zone != world[IN_ROOM(ch)].zone)
|
||||
continue;
|
||||
continue;
|
||||
if (!isname(arg, i->player.name))
|
||||
continue;
|
||||
continue;
|
||||
send_to_char(ch, "%-25s%s - %s%s\r\n", GET_NAME(i), QNRM, world[IN_ROOM(i)].name, QNRM);
|
||||
return;
|
||||
}
|
||||
|
|
@ -1771,22 +1773,22 @@ ACMD(do_levels)
|
|||
|
||||
for (i = min_lev; i < max_lev; i++) {
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "[%2d] %8d-%-8d : ", (int)i,
|
||||
level_exp(GET_CLASS(ch), i), level_exp(GET_CLASS(ch), i + 1) - 1);
|
||||
level_exp(GET_CLASS(ch), i), level_exp(GET_CLASS(ch), i + 1) - 1);
|
||||
if (len + nlen >= sizeof(buf))
|
||||
break;
|
||||
len += nlen;
|
||||
|
||||
switch (GET_SEX(ch)) {
|
||||
case SEX_MALE:
|
||||
case SEX_NEUTRAL:
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "%s\r\n", title_male(GET_CLASS(ch), i));
|
||||
break;
|
||||
case SEX_FEMALE:
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "%s\r\n", title_female(GET_CLASS(ch), i));
|
||||
break;
|
||||
default:
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "Oh dear. You seem to be sexless.\r\n");
|
||||
break;
|
||||
case SEX_MALE:
|
||||
case SEX_NEUTRAL:
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "%s\r\n", title_male(GET_CLASS(ch), i));
|
||||
break;
|
||||
case SEX_FEMALE:
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "%s\r\n", title_female(GET_CLASS(ch), i));
|
||||
break;
|
||||
default:
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "Oh dear. You seem to be sexless.\r\n");
|
||||
break;
|
||||
}
|
||||
if (len + nlen >= sizeof(buf))
|
||||
break;
|
||||
|
|
@ -1979,17 +1981,17 @@ ACMD(do_toggle)
|
|||
else
|
||||
sprintf(buf2, "%-3.3d", GET_WIMP_LEV(ch)); /* sprintf: OK */
|
||||
|
||||
if (IS_ADMIN(ch, ADMLVL_IMPL)) {
|
||||
if (IS_ADMIN(ch, ADMLVL_IMPL)) {
|
||||
send_to_char(ch,
|
||||
" SlowNameserver: %-3s "
|
||||
" "
|
||||
" Trackthru Doors: %-3s\r\n",
|
||||
" "
|
||||
" Trackthru Doors: %-3s\r\n",
|
||||
|
||||
ONOFF(CONFIG_NS_IS_SLOW),
|
||||
ONOFF(CONFIG_TRACK_T_DOORS));
|
||||
ONOFF(CONFIG_NS_IS_SLOW),
|
||||
ONOFF(CONFIG_TRACK_T_DOORS));
|
||||
}
|
||||
|
||||
if (IS_ADMIN(ch, ADMLVL_IMMORT)) {
|
||||
if (IS_ADMIN(ch, ADMLVL_IMMORT)) {
|
||||
send_to_char(ch,
|
||||
" Buildwalk: %-3s "
|
||||
" NoWiz: %-3s "
|
||||
|
|
@ -2083,128 +2085,144 @@ ACMD(do_toggle)
|
|||
return;
|
||||
}
|
||||
|
||||
len = strlen(arg);
|
||||
len = strlen(arg);
|
||||
for (toggle = 0; *tog_messages[toggle].command != '\n'; toggle++)
|
||||
if (!strncmp(arg, tog_messages[toggle].command, len))
|
||||
break;
|
||||
|
||||
if (*tog_messages[toggle].command == '\n' || tog_messages[toggle].min_admlevel > GET_ADMLEVEL(ch)) {
|
||||
send_to_char(ch, "You can't toggle that!\r\n");
|
||||
return;
|
||||
}
|
||||
if (*tog_messages[toggle].command == '\n' || tog_messages[toggle].min_admlevel > GET_ADMLEVEL(ch)) {
|
||||
send_to_char(ch, "You can't toggle that!\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (toggle) {
|
||||
case SCMD_COLOR:
|
||||
if (!*arg2) {
|
||||
send_to_char(ch, "Your current color level is %s.\r\n", types[COLOR_LEV(ch)]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (((tp = search_block(arg2, types, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: toggle color { Off | Brief | Normal | On }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_1);
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_2);
|
||||
if (tp & 1) SET_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_1);
|
||||
if (tp & 2) SET_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_2);
|
||||
|
||||
send_to_char(ch, "Your %scolor%s is now %s.\r\n", CCRED(ch, C_SPR), CCNRM(ch, C_OFF), types[tp]);
|
||||
return;
|
||||
case SCMD_SYSLOG:
|
||||
if (!*arg2) {
|
||||
send_to_char(ch, "Your syslog is currently %s.\r\n",
|
||||
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)]);
|
||||
return;
|
||||
}
|
||||
if (((tp = search_block(arg2, types, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: toggle syslog { Off | Brief | Normal | On }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_LOG1);
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_LOG2);
|
||||
if (tp & 1) SET_BIT_AR(PRF_FLAGS(ch), PRF_LOG1);
|
||||
if (tp & 2) SET_BIT_AR(PRF_FLAGS(ch), PRF_LOG2);
|
||||
|
||||
send_to_char(ch, "Your syslog is now %s.\r\n", types[tp]);
|
||||
return;
|
||||
case SCMD_SLOWNS:
|
||||
result = (CONFIG_NS_IS_SLOW = !CONFIG_NS_IS_SLOW);
|
||||
break;
|
||||
case SCMD_TRACK:
|
||||
result = (CONFIG_TRACK_T_DOORS = !CONFIG_TRACK_T_DOORS);
|
||||
break;
|
||||
case SCMD_BUILDWALK:
|
||||
if (!IS_ADMIN(ch, ADMLVL_BUILDER)) {
|
||||
send_to_char(ch, "Builders only, sorry.\r\n");
|
||||
return;
|
||||
}
|
||||
result = PRF_TOG_CHK(ch, PRF_BUILDWALK);
|
||||
if (PRF_FLAGGED(ch, PRF_BUILDWALK))
|
||||
mudlog(CMP, GET_LEVEL(ch), TRUE,
|
||||
"OLC: %s turned buildwalk on. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
|
||||
else
|
||||
mudlog(CMP, GET_ADMLEVEL(ch), TRUE,
|
||||
"OLC: %s turned buildwalk off. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
|
||||
break;
|
||||
case SCMD_AFK:
|
||||
if ((result = PRF_TOG_CHK(ch, PRF_AFK)))
|
||||
act("$n is now away from $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
else {
|
||||
act("$n has returned to $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
if (has_mail(GET_IDNUM(ch)))
|
||||
send_to_char(ch, "You have mail waiting.\r\n");
|
||||
}
|
||||
break;
|
||||
case SCMD_WIMPY:
|
||||
if (!*arg2) {
|
||||
if (GET_WIMP_LEV(ch)) {
|
||||
send_to_char(ch, "Your current wimp level is %d hit points.\r\n", GET_WIMP_LEV(ch));
|
||||
return;
|
||||
} else {
|
||||
send_to_char(ch, "At the moment, you're not a wimp. (sure, sure...)\r\n");
|
||||
case SCMD_COLOR:
|
||||
if (!*arg2) {
|
||||
send_to_char(ch, "Your current color level is %s.\r\n", types[COLOR_LEV(ch)]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (isdigit(*arg2)) {
|
||||
if ((wimp_lev = atoi(arg2)) != 0) {
|
||||
if (wimp_lev < 0)
|
||||
send_to_char(ch, "Heh, heh, heh.. we are jolly funny today, eh?\r\n");
|
||||
else if (wimp_lev > GET_MAX_HIT(ch))
|
||||
send_to_char(ch, "That doesn't make much sense, now does it?\r\n");
|
||||
else if (wimp_lev > (GET_MAX_HIT(ch) / 2))
|
||||
send_to_char(ch, "You can't set your wimp level above half your hit points.\r\n");
|
||||
else {
|
||||
send_to_char(ch, "Okay, you'll wimp out if you drop below %d hit points.", wimp_lev);
|
||||
GET_WIMP_LEV(ch) = wimp_lev;
|
||||
|
||||
if (((tp = search_block(arg2, types, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: toggle color { Off | Brief | Normal | On }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_1);
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_2);
|
||||
if (tp & 1) SET_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_1);
|
||||
if (tp & 2) SET_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_2);
|
||||
|
||||
send_to_char(ch, "Your %scolor%s is now %s.\r\n", CCRED(ch, C_SPR), CCNRM(ch, C_OFF), types[tp]);
|
||||
return;
|
||||
case SCMD_SYSLOG:
|
||||
if (!*arg2) {
|
||||
send_to_char(ch, "Your syslog is currently %s.\r\n",
|
||||
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)]);
|
||||
return;
|
||||
}
|
||||
if (((tp = search_block(arg2, types, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: toggle syslog { Off | Brief | Normal | On }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_LOG1);
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_LOG2);
|
||||
if (tp & 1) SET_BIT_AR(PRF_FLAGS(ch), PRF_LOG1);
|
||||
if (tp & 2) SET_BIT_AR(PRF_FLAGS(ch), PRF_LOG2);
|
||||
|
||||
send_to_char(ch, "Your syslog is now %s.\r\n", types[tp]);
|
||||
return;
|
||||
case SCMD_SLOWNS:
|
||||
result = (CONFIG_NS_IS_SLOW = !CONFIG_NS_IS_SLOW);
|
||||
break;
|
||||
case SCMD_TRACK:
|
||||
result = (CONFIG_TRACK_T_DOORS = !CONFIG_TRACK_T_DOORS);
|
||||
break;
|
||||
case SCMD_BUILDWALK:
|
||||
if (!IS_ADMIN(ch, ADMLVL_BUILDER)) {
|
||||
send_to_char(ch, "Builders only, sorry.\r\n");
|
||||
return;
|
||||
}
|
||||
result = PRF_TOG_CHK(ch, PRF_BUILDWALK);
|
||||
if (PRF_FLAGGED(ch, PRF_BUILDWALK))
|
||||
mudlog(CMP, GET_LEVEL(ch), TRUE,
|
||||
"OLC: %s turned buildwalk on. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
|
||||
else
|
||||
mudlog(CMP, GET_ADMLEVEL(ch), TRUE,
|
||||
"OLC: %s turned buildwalk off. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
|
||||
break;
|
||||
case SCMD_AFK:
|
||||
if ((result = PRF_TOG_CHK(ch, PRF_AFK)))
|
||||
act("$n is now away from $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
else {
|
||||
act("$n has returned to $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
if (has_mail(GET_IDNUM(ch)))
|
||||
send_to_char(ch, "You have mail waiting.\r\n");
|
||||
}
|
||||
break;
|
||||
case SCMD_WIMPY:
|
||||
if (!*arg2) {
|
||||
if (GET_WIMP_LEV(ch)) {
|
||||
send_to_char(ch, "Your current wimp level is %d hit points.\r\n", GET_WIMP_LEV(ch));
|
||||
return;
|
||||
} else {
|
||||
send_to_char(ch, "At the moment, you're not a wimp. (sure, sure...)\r\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
send_to_char(ch, "Okay, you'll now tough out fights to the bitter end.");
|
||||
GET_WIMP_LEV(ch) = 0;
|
||||
}
|
||||
} else
|
||||
send_to_char(ch, "Specify at how many hit points you want to wimp out at. (0 to disable)\r\n");
|
||||
break;
|
||||
case SCMD_PAGELENGTH:
|
||||
if (!*arg2)
|
||||
send_to_char(ch, "You current page length is set to %d lines.", GET_PAGE_LENGTH(ch));
|
||||
else if (is_number(arg2)) {
|
||||
GET_PAGE_LENGTH(ch) = MIN(MAX(atoi(arg2), 5), 255);
|
||||
send_to_char(ch, "Okay, your page length is now set to %d lines.", GET_PAGE_LENGTH(ch));
|
||||
} else
|
||||
send_to_char(ch, "Please specify a number of lines (5 - 255).");
|
||||
if (isdigit(*arg2)) {
|
||||
if ((wimp_lev = atoi(arg2)) != 0) {
|
||||
if (wimp_lev < 0)
|
||||
send_to_char(ch, "Heh, heh, heh.. we are jolly funny today, eh?\r\n");
|
||||
else if (wimp_lev > GET_MAX_HIT(ch))
|
||||
send_to_char(ch, "That doesn't make much sense, now does it?\r\n");
|
||||
else if (wimp_lev > (GET_MAX_HIT(ch) / 2))
|
||||
send_to_char(ch, "You can't set your wimp level above half your hit points.\r\n");
|
||||
else {
|
||||
send_to_char(ch, "Okay, you'll wimp out if you drop below %d hit points.", wimp_lev);
|
||||
GET_WIMP_LEV(ch) = wimp_lev;
|
||||
}
|
||||
} else {
|
||||
send_to_char(ch, "Okay, you'll now tough out fights to the bitter end.");
|
||||
GET_WIMP_LEV(ch) = 0;
|
||||
}
|
||||
} else
|
||||
send_to_char(ch, "Specify at how many hit points you want to wimp out at. (0 to disable)\r\n");
|
||||
break;
|
||||
case SCMD_SCREENWIDTH:
|
||||
if (!*arg2)
|
||||
send_to_char(ch, "Your current screen width is set to %d characters.", GET_SCREEN_WIDTH(ch));
|
||||
else if (is_number(arg2)) {
|
||||
GET_SCREEN_WIDTH(ch) = MIN(MAX(atoi(arg2), 40), 200);
|
||||
send_to_char(ch, "Okay, your screen width is now set to %d characters.", GET_SCREEN_WIDTH(ch));
|
||||
} else
|
||||
send_to_char(ch, "Please specify a number of characters (40 - 200).");
|
||||
break;
|
||||
case SCMD_AUTOMAP:
|
||||
if (can_see_map(ch)) {
|
||||
case SCMD_PAGELENGTH:
|
||||
if (!*arg2)
|
||||
send_to_char(ch, "You current page length is set to %d lines.", GET_PAGE_LENGTH(ch));
|
||||
else if (is_number(arg2)) {
|
||||
GET_PAGE_LENGTH(ch) = MIN(MAX(atoi(arg2), 5), 255);
|
||||
send_to_char(ch, "Okay, your page length is now set to %d lines.", GET_PAGE_LENGTH(ch));
|
||||
} else
|
||||
send_to_char(ch, "Please specify a number of lines (5 - 255).");
|
||||
break;
|
||||
case SCMD_SCREENWIDTH:
|
||||
if (!*arg2)
|
||||
send_to_char(ch, "Your current screen width is set to %d characters.", GET_SCREEN_WIDTH(ch));
|
||||
else if (is_number(arg2)) {
|
||||
GET_SCREEN_WIDTH(ch) = MIN(MAX(atoi(arg2), 40), 200);
|
||||
send_to_char(ch, "Okay, your screen width is now set to %d characters.", GET_SCREEN_WIDTH(ch));
|
||||
} else
|
||||
send_to_char(ch, "Please specify a number of characters (40 - 200).");
|
||||
break;
|
||||
case SCMD_AUTOMAP:
|
||||
if (can_see_map(ch)) {
|
||||
if (!*arg2) {
|
||||
TOGGLE_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
result = (PRF_FLAGGED(ch, tog_messages[toggle].toggle));
|
||||
} else if (!strcmp(arg2, "on")) {
|
||||
SET_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
result = 1;
|
||||
} else if (!strcmp(arg2, "off")) {
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
} else {
|
||||
send_to_char(ch, "Value for %s must either be 'on' or 'off'.\r\n", tog_messages[toggle].command);
|
||||
return;
|
||||
}
|
||||
} else
|
||||
send_to_char(ch, "Sorry, automap is currently disabled.\r\n");
|
||||
break;
|
||||
default:
|
||||
if (!*arg2) {
|
||||
TOGGLE_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
result = (PRF_FLAGGED(ch, tog_messages[toggle].toggle));
|
||||
|
|
@ -2214,25 +2232,9 @@ ACMD(do_toggle)
|
|||
} else if (!strcmp(arg2, "off")) {
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
} else {
|
||||
send_to_char(ch, "Value for %s must either be 'on' or 'off'.\r\n", tog_messages[toggle].command);
|
||||
send_to_char(ch, "Value for %s must either be 'on' or 'off'.\r\n", tog_messages[toggle].command);
|
||||
return;
|
||||
}
|
||||
} else
|
||||
send_to_char(ch, "Sorry, automap is currently disabled.\r\n");
|
||||
break;
|
||||
default:
|
||||
if (!*arg2) {
|
||||
TOGGLE_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
result = (PRF_FLAGGED(ch, tog_messages[toggle].toggle));
|
||||
} else if (!strcmp(arg2, "on")) {
|
||||
SET_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
result = 1;
|
||||
} else if (!strcmp(arg2, "off")) {
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), tog_messages[toggle].toggle);
|
||||
} else {
|
||||
send_to_char(ch, "Value for %s must either be 'on' or 'off'.\r\n", tog_messages[toggle].command);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (result)
|
||||
send_to_char(ch, "%s", tog_messages[toggle].enable_msg);
|
||||
|
|
@ -2404,8 +2406,7 @@ void add_history(struct char_data *ch, char *str, int type)
|
|||
if (!tmp) {
|
||||
CREATE(GET_HISTORY(ch, type), struct txt_block, 1);
|
||||
GET_HISTORY(ch, type)->text = strdup(buf);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
while (tmp->next)
|
||||
tmp = tmp->next;
|
||||
CREATE(tmp->next, struct txt_block, 1);
|
||||
|
|
@ -2477,25 +2478,17 @@ ACMD(do_whois)
|
|||
send_to_char(ch, "Last Logon: They're playing now! (Idle %d Minutes)",
|
||||
victim->char_specials.timer * SECS_PER_MUD_HOUR / SECS_PER_REAL_MIN);
|
||||
|
||||
if (!victim->desc)
|
||||
{
|
||||
if (!victim->desc) {
|
||||
send_to_char(ch, " (Linkless)\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
send_to_char(ch, "\r\n");
|
||||
}
|
||||
if (PRF_FLAGGED(victim, PRF_AFK))
|
||||
{
|
||||
if (PRF_FLAGGED(victim, PRF_AFK)) {
|
||||
send_to_char(ch, "%s%s is afk right now, so %s may not respond to communication.%s\r\n", CBGRN(ch, C_NRM), GET_NAME(victim), GET_SEX(victim) == SEX_NEUTRAL ? "it" : (GET_SEX(victim) == SEX_MALE ? "he" : "she"), CCNRM(ch, C_NRM));
|
||||
}
|
||||
}
|
||||
else if (hours > 0)
|
||||
{
|
||||
} else if (hours > 0) {
|
||||
send_to_char(ch, "Last Logon: %s (%d days & %d hours ago.)\r\n", buf, hours/24, hours%24);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
send_to_char(ch, "Last Logon: %s (0 hours & %d minutes ago.)\r\n",
|
||||
buf, (int)(time(0) - victim->player.time.logon)/60);
|
||||
}
|
||||
|
|
@ -2635,25 +2628,25 @@ distance, int door)
|
|||
int count = 0;
|
||||
*buf = '\0';
|
||||
|
||||
/* this loop is a quick, easy way to help make a grammatical sentence
|
||||
(i.e., "You see x, x, y, and z." with commas, "and", etc.) */
|
||||
/* this loop is a quick, easy way to help make a grammatical sentence
|
||||
(i.e., "You see x, x, y, and z." with commas, "and", etc.) */
|
||||
|
||||
for (i = list; i; i = i->next_in_room)
|
||||
for (i = list; i; i = i->next_in_room) {
|
||||
|
||||
/* put any other conditions for scanning someone in this if statement -
|
||||
i.e., if (CAN_SEE(ch, i) && condition2 && condition3) or whatever */
|
||||
/* put any other conditions for scanning someone in this if statement -
|
||||
i.e., if (CAN_SEE(ch, i) && condition2 && condition3) or whatever */
|
||||
|
||||
if (CAN_SEE(ch, i))
|
||||
count++;
|
||||
|
||||
}
|
||||
if (!count)
|
||||
return;
|
||||
|
||||
for (i = list; i; i = i->next_in_room) {
|
||||
|
||||
/* make sure to add changes to the if statement above to this one also, using
|
||||
or's to join them.. i.e.,
|
||||
if (!CAN_SEE(ch, i) || !condition2 || !condition3) */
|
||||
/* make sure to add changes to the if statement above to this one also, using
|
||||
or's to join them.. i.e.,
|
||||
if (!CAN_SEE(ch, i) || !condition2 || !condition3) */
|
||||
|
||||
if (!CAN_SEE(ch, i))
|
||||
continue;
|
||||
|
|
|
|||
347
src/act.item.c
347
src/act.item.c
|
|
@ -125,35 +125,35 @@ ACMD(do_put)
|
|||
send_to_char(ch, "You'd better open it first!\r\n");
|
||||
else {
|
||||
if (obj_dotmode == FIND_INDIV) { /* put <obj> <container> */
|
||||
if (!(obj = get_obj_in_list_vis(ch, theobj, NULL, ch->carrying)))
|
||||
send_to_char(ch, "You aren't carrying %s %s.\r\n", AN(theobj), theobj);
|
||||
else if (obj == cont && howmany == 1)
|
||||
send_to_char(ch, "You attempt to fold it into itself, but fail.\r\n");
|
||||
else {
|
||||
while (obj && howmany) {
|
||||
next_obj = obj->next_content;
|
||||
if (!(obj = get_obj_in_list_vis(ch, theobj, NULL, ch->carrying)))
|
||||
send_to_char(ch, "You aren't carrying %s %s.\r\n", AN(theobj), theobj);
|
||||
else if (obj == cont && howmany == 1)
|
||||
send_to_char(ch, "You attempt to fold it into itself, but fail.\r\n");
|
||||
else {
|
||||
while (obj && howmany) {
|
||||
next_obj = obj->next_content;
|
||||
if (obj != cont) {
|
||||
howmany--;
|
||||
perform_put(ch, obj, cont);
|
||||
perform_put(ch, obj, cont);
|
||||
}
|
||||
obj = get_obj_in_list_vis(ch, theobj, NULL, next_obj);
|
||||
}
|
||||
}
|
||||
obj = get_obj_in_list_vis(ch, theobj, NULL, next_obj);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (obj = ch->carrying; obj; obj = next_obj) {
|
||||
next_obj = obj->next_content;
|
||||
if (obj != cont && CAN_SEE_OBJ(ch, obj) &&
|
||||
(obj_dotmode == FIND_ALL || isname(theobj, obj->name))) {
|
||||
found = 1;
|
||||
perform_put(ch, obj, cont);
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (obj_dotmode == FIND_ALL)
|
||||
send_to_char(ch, "You don't seem to have anything to put in it.\r\n");
|
||||
else
|
||||
send_to_char(ch, "You don't seem to have any %ss.\r\n", theobj);
|
||||
}
|
||||
for (obj = ch->carrying; obj; obj = next_obj) {
|
||||
next_obj = obj->next_content;
|
||||
if (obj != cont && CAN_SEE_OBJ(ch, obj) &&
|
||||
(obj_dotmode == FIND_ALL || isname(theobj, obj->name))) {
|
||||
found = 1;
|
||||
perform_put(ch, obj, cont);
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (obj_dotmode == FIND_ALL)
|
||||
send_to_char(ch, "You don't seem to have anything to put in it.\r\n");
|
||||
else
|
||||
send_to_char(ch, "You don't seem to have any %ss.\r\n", theobj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -242,19 +242,19 @@ void get_from_container(struct char_data *ch, struct obj_data *cont,
|
|||
for (obj = cont->contains; obj; obj = next_obj) {
|
||||
next_obj = obj->next_content;
|
||||
if (CAN_SEE_OBJ(ch, obj) &&
|
||||
(obj_dotmode == FIND_ALL || isname(arg, obj->name))) {
|
||||
found = 1;
|
||||
perform_get_from_container(ch, obj, cont, mode);
|
||||
(obj_dotmode == FIND_ALL || isname(arg, obj->name))) {
|
||||
found = 1;
|
||||
perform_get_from_container(ch, obj, cont, mode);
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (obj_dotmode == FIND_ALL)
|
||||
act("$p seems to be empty.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
else {
|
||||
if (obj_dotmode == FIND_ALL) {
|
||||
act("$p seems to be empty.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
} else {
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
|
||||
snprintf(buf, sizeof(buf), "You can't seem to find any %ss in $p.", arg);
|
||||
act(buf, FALSE, ch, cont, 0, TO_CHAR);
|
||||
snprintf(buf, sizeof(buf), "You can't seem to find any %ss in $p.", arg);
|
||||
act(buf, FALSE, ch, cont, 0, TO_CHAR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ static void get_from_room(struct char_data *ch, char *arg, int howmany)
|
|||
else {
|
||||
struct obj_data *obj_next;
|
||||
while(obj && howmany--) {
|
||||
obj_next = obj->next_content;
|
||||
obj_next = obj->next_content;
|
||||
perform_get_from_room(ch, obj);
|
||||
obj = get_obj_in_list_vis(ch, arg, NULL, obj_next);
|
||||
}
|
||||
|
|
@ -300,15 +300,15 @@ static void get_from_room(struct char_data *ch, char *arg, int howmany)
|
|||
next_obj = obj->next_content;
|
||||
if (CAN_SEE_OBJ(ch, obj) &&
|
||||
(dotmode == FIND_ALL || isname(arg, obj->name))) {
|
||||
found = 1;
|
||||
perform_get_from_room(ch, obj);
|
||||
found = 1;
|
||||
perform_get_from_room(ch, obj);
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (dotmode == FIND_ALL)
|
||||
send_to_char(ch, "There doesn't seem to be anything here.\r\n");
|
||||
send_to_char(ch, "There doesn't seem to be anything here.\r\n");
|
||||
else
|
||||
send_to_char(ch, "You don't see any %ss here.\r\n", arg);
|
||||
send_to_char(ch, "You don't see any %ss here.\r\n", arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -342,43 +342,45 @@ ACMD(do_get)
|
|||
if (cont_dotmode == FIND_INDIV) {
|
||||
mode = generic_find(arg2, FIND_OBJ_INV | FIND_OBJ_ROOM, ch, &tmp_char, &cont);
|
||||
if (!cont)
|
||||
send_to_char(ch, "You don't have %s %s.\r\n", AN(arg2), arg2);
|
||||
send_to_char(ch, "You don't have %s %s.\r\n", AN(arg2), arg2);
|
||||
else if (GET_OBJ_TYPE(cont) != ITEM_CONTAINER)
|
||||
act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
else
|
||||
get_from_container(ch, cont, arg1, mode, amount);
|
||||
get_from_container(ch, cont, arg1, mode, amount);
|
||||
} else {
|
||||
if (cont_dotmode == FIND_ALLDOT && !*arg2) {
|
||||
send_to_char(ch, "Get from all of what?\r\n");
|
||||
return;
|
||||
send_to_char(ch, "Get from all of what?\r\n");
|
||||
return;
|
||||
}
|
||||
for (cont = ch->carrying; cont; cont = cont->next_content) {
|
||||
if (CAN_SEE_OBJ(ch, cont) &&
|
||||
(cont_dotmode == FIND_ALL || isname(arg2, cont->name))) {
|
||||
if (GET_OBJ_TYPE(cont) == ITEM_CONTAINER) {
|
||||
found = 1;
|
||||
get_from_container(ch, cont, arg1, FIND_OBJ_INV, amount);
|
||||
} else if (cont_dotmode == FIND_ALLDOT) {
|
||||
found = 1;
|
||||
act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (cont = world[IN_ROOM(ch)].contents; cont; cont = cont->next_content) {
|
||||
if (CAN_SEE_OBJ(ch, cont) &&
|
||||
(cont_dotmode == FIND_ALL || isname(arg2, cont->name))) {
|
||||
if (GET_OBJ_TYPE(cont) == ITEM_CONTAINER) {
|
||||
get_from_container(ch, cont, arg1, FIND_OBJ_ROOM, amount);
|
||||
found = 1;
|
||||
} else if (cont_dotmode == FIND_ALLDOT) {
|
||||
act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (cont = ch->carrying; cont; cont = cont->next_content)
|
||||
if (CAN_SEE_OBJ(ch, cont) &&
|
||||
(cont_dotmode == FIND_ALL || isname(arg2, cont->name))) {
|
||||
if (GET_OBJ_TYPE(cont) == ITEM_CONTAINER) {
|
||||
found = 1;
|
||||
get_from_container(ch, cont, arg1, FIND_OBJ_INV, amount);
|
||||
} else if (cont_dotmode == FIND_ALLDOT) {
|
||||
found = 1;
|
||||
act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
}
|
||||
}
|
||||
for (cont = world[IN_ROOM(ch)].contents; cont; cont = cont->next_content)
|
||||
if (CAN_SEE_OBJ(ch, cont) &&
|
||||
(cont_dotmode == FIND_ALL || isname(arg2, cont->name))) {
|
||||
if (GET_OBJ_TYPE(cont) == ITEM_CONTAINER) {
|
||||
get_from_container(ch, cont, arg1, FIND_OBJ_ROOM, amount);
|
||||
found = 1;
|
||||
} else if (cont_dotmode == FIND_ALLDOT) {
|
||||
act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (cont_dotmode == FIND_ALL)
|
||||
send_to_char(ch, "You can't seem to find any containers.\r\n");
|
||||
else
|
||||
send_to_char(ch, "You can't seem to find any %ss here.\r\n", arg2);
|
||||
if (cont_dotmode == FIND_ALL)
|
||||
send_to_char(ch, "You can't seem to find any containers.\r\n");
|
||||
else
|
||||
send_to_char(ch, "You can't seem to find any %ss here.\r\n", arg2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -397,11 +399,11 @@ static void perform_drop_gold(struct char_data *ch, int amount, byte mode, room_
|
|||
WAIT_STATE(ch, PULSE_VIOLENCE); /* to prevent coin-bombing */
|
||||
obj = create_money(amount);
|
||||
if (mode == SCMD_DONATE) {
|
||||
send_to_char(ch, "You throw some gold into the air where it disappears in a puff of smoke!\r\n");
|
||||
act("$n throws some gold into the air where it disappears in a puff of smoke!",
|
||||
FALSE, ch, 0, 0, TO_ROOM);
|
||||
obj_to_room(obj, RDR);
|
||||
act("$p suddenly appears in a puff of orange smoke!", 0, 0, obj, 0, TO_ROOM);
|
||||
send_to_char(ch, "You throw some gold into the air where it disappears in a puff of smoke!\r\n");
|
||||
act("$n throws some gold into the air where it disappears in a puff of smoke!",
|
||||
FALSE, ch, 0, 0, TO_ROOM);
|
||||
obj_to_room(obj, RDR);
|
||||
act("$p suddenly appears in a puff of orange smoke!", 0, 0, obj, 0, TO_ROOM);
|
||||
} else {
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
|
||||
|
|
@ -410,11 +412,11 @@ static void perform_drop_gold(struct char_data *ch, int amount, byte mode, room_
|
|||
return;
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "$n drops %s.", money_desc(amount));
|
||||
act(buf, TRUE, ch, 0, 0, TO_ROOM);
|
||||
snprintf(buf, sizeof(buf), "$n drops %s.", money_desc(amount));
|
||||
act(buf, TRUE, ch, 0, 0, TO_ROOM);
|
||||
|
||||
send_to_char(ch, "You drop some gold.\r\n");
|
||||
obj_to_room(obj, IN_ROOM(ch));
|
||||
send_to_char(ch, "You drop some gold.\r\n");
|
||||
obj_to_room(obj, IN_ROOM(ch));
|
||||
}
|
||||
} else {
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
|
|
@ -553,37 +555,38 @@ ACMD(do_drop)
|
|||
/* Can't junk or donate all */
|
||||
if ((dotmode == FIND_ALL) && (subcmd == SCMD_JUNK || subcmd == SCMD_DONATE)) {
|
||||
if (subcmd == SCMD_JUNK)
|
||||
send_to_char(ch, "Go to the dump if you want to junk EVERYTHING!\r\n");
|
||||
send_to_char(ch, "Go to the dump if you want to junk EVERYTHING!\r\n");
|
||||
else
|
||||
send_to_char(ch, "Go do the donation room if you want to donate EVERYTHING!\r\n");
|
||||
send_to_char(ch, "Go do the donation room if you want to donate EVERYTHING!\r\n");
|
||||
return;
|
||||
}
|
||||
if (dotmode == FIND_ALL) {
|
||||
if (!ch->carrying)
|
||||
send_to_char(ch, "You don't seem to be carrying anything.\r\n");
|
||||
else
|
||||
for (obj = ch->carrying; obj; obj = next_obj) {
|
||||
next_obj = obj->next_content;
|
||||
amount += perform_drop(ch, obj, mode, sname, RDR);
|
||||
}
|
||||
if (!ch->carrying) {
|
||||
send_to_char(ch, "You don't seem to be carrying anything.\r\n");
|
||||
} else {
|
||||
for (obj = ch->carrying; obj; obj = next_obj) {
|
||||
next_obj = obj->next_content;
|
||||
amount += perform_drop(ch, obj, mode, sname, RDR);
|
||||
}
|
||||
}
|
||||
} else if (dotmode == FIND_ALLDOT) {
|
||||
if (!*arg) {
|
||||
send_to_char(ch, "What do you want to %s all of?\r\n", sname);
|
||||
return;
|
||||
send_to_char(ch, "What do you want to %s all of?\r\n", sname);
|
||||
return;
|
||||
}
|
||||
if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying)))
|
||||
send_to_char(ch, "You don't seem to have any %ss.\r\n", arg);
|
||||
send_to_char(ch, "You don't seem to have any %ss.\r\n", arg);
|
||||
|
||||
while (obj) {
|
||||
next_obj = get_obj_in_list_vis(ch, arg, NULL, obj->next_content);
|
||||
amount += perform_drop(ch, obj, mode, sname, RDR);
|
||||
obj = next_obj;
|
||||
next_obj = get_obj_in_list_vis(ch, arg, NULL, obj->next_content);
|
||||
amount += perform_drop(ch, obj, mode, sname, RDR);
|
||||
obj = next_obj;
|
||||
}
|
||||
} else {
|
||||
if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying)))
|
||||
send_to_char(ch, "You don't seem to have %s %s.\r\n", AN(arg), arg);
|
||||
send_to_char(ch, "You don't seem to have %s %s.\r\n", AN(arg), arg);
|
||||
else
|
||||
amount += perform_drop(ch, obj, mode, sname, RDR);
|
||||
amount += perform_drop(ch, obj, mode, sname, RDR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -686,7 +689,7 @@ ACMD(do_give)
|
|||
if (!str_cmp("coins", arg) || !str_cmp("coin", arg)) {
|
||||
one_argument(argument, arg);
|
||||
if ((vict = give_find_vict(ch, arg)) != NULL)
|
||||
perform_give_gold(ch, vict, amount);
|
||||
perform_give_gold(ch, vict, amount);
|
||||
return;
|
||||
} else if (!*arg) /* Give multiple code. */
|
||||
send_to_char(ch, "What do you want to give %d of?\r\n", amount);
|
||||
|
|
@ -696,9 +699,9 @@ ACMD(do_give)
|
|||
send_to_char(ch, "You don't seem to have any %ss.\r\n", arg);
|
||||
else {
|
||||
while (obj && amount--) {
|
||||
next_obj = get_obj_in_list_vis(ch, arg, NULL, obj->next_content);
|
||||
perform_give(ch, vict, obj);
|
||||
obj = next_obj;
|
||||
next_obj = get_obj_in_list_vis(ch, arg, NULL, obj->next_content);
|
||||
perform_give(ch, vict, obj);
|
||||
obj = next_obj;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -710,23 +713,24 @@ ACMD(do_give)
|
|||
dotmode = find_all_dots(arg);
|
||||
if (dotmode == FIND_INDIV) {
|
||||
if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying)))
|
||||
send_to_char(ch, "You don't seem to have %s %s.\r\n", AN(arg), arg);
|
||||
send_to_char(ch, "You don't seem to have %s %s.\r\n", AN(arg), arg);
|
||||
else
|
||||
perform_give(ch, vict, obj);
|
||||
perform_give(ch, vict, obj);
|
||||
} else {
|
||||
if (dotmode == FIND_ALLDOT && !*arg) {
|
||||
send_to_char(ch, "All of what?\r\n");
|
||||
return;
|
||||
send_to_char(ch, "All of what?\r\n");
|
||||
return;
|
||||
}
|
||||
if (!ch->carrying) {
|
||||
send_to_char(ch, "You don't seem to be holding anything.\r\n");
|
||||
} else {
|
||||
for (obj = ch->carrying; obj; obj = next_obj) {
|
||||
next_obj = obj->next_content;
|
||||
if (CAN_SEE_OBJ(ch, obj) &&
|
||||
((dotmode == FIND_ALL || isname(arg, obj->name))))
|
||||
perform_give(ch, vict, obj);
|
||||
}
|
||||
}
|
||||
if (!ch->carrying)
|
||||
send_to_char(ch, "You don't seem to be holding anything.\r\n");
|
||||
else
|
||||
for (obj = ch->carrying; obj; obj = next_obj) {
|
||||
next_obj = obj->next_content;
|
||||
if (CAN_SEE_OBJ(ch, obj) &&
|
||||
((dotmode == FIND_ALL || isname(arg, obj->name))))
|
||||
perform_give(ch, vict, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -843,16 +847,17 @@ ACMD(do_drink)
|
|||
send_to_char(ch, "You don't feel thirsty any more.\r\n");
|
||||
return;
|
||||
default:
|
||||
send_to_char(ch, "Drink from what?\r\n");
|
||||
return;
|
||||
send_to_char(ch, "Drink from what?\r\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!(temp = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) {
|
||||
if (!(temp = get_obj_in_list_vis(ch, arg, NULL, world[IN_ROOM(ch)].contents))) {
|
||||
send_to_char(ch, "You can't find it!\r\n");
|
||||
return;
|
||||
} else
|
||||
} else {
|
||||
on_ground = 1;
|
||||
}
|
||||
}
|
||||
if ((GET_OBJ_TYPE(temp) != ITEM_DRINKCON) &&
|
||||
(GET_OBJ_TYPE(temp) != ITEM_FOUNTAIN)) {
|
||||
|
|
@ -1148,8 +1153,7 @@ ACMD(do_pour)
|
|||
amount = GET_OBJ_VAL(to_obj, 0);
|
||||
}
|
||||
/* Poisoned? */
|
||||
GET_OBJ_VAL(to_obj, 3) = (GET_OBJ_VAL(to_obj, 3) || GET_OBJ_VAL(from_obj, 3))
|
||||
;
|
||||
GET_OBJ_VAL(to_obj, 3) = (GET_OBJ_VAL(to_obj, 3) || GET_OBJ_VAL(from_obj, 3));
|
||||
/* Weight change, except for unlimited. */
|
||||
if (GET_OBJ_VAL(from_obj, 0) > 0) {
|
||||
weight_change_object(from_obj, -amount);
|
||||
|
|
@ -1352,8 +1356,8 @@ ACMD(do_wear)
|
|||
send_to_char(ch, "You are not experienced enough to use that.\r\n");
|
||||
else {
|
||||
items_worn++;
|
||||
perform_wear(ch, obj, where);
|
||||
}
|
||||
perform_wear(ch, obj, where);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!items_worn)
|
||||
|
|
@ -1367,15 +1371,16 @@ ACMD(do_wear)
|
|||
send_to_char(ch, "You don't seem to have any %ss.\r\n", arg1);
|
||||
else if (GET_LEVEL(ch) < GET_OBJ_LEVEL(obj))
|
||||
send_to_char(ch, "You are not experienced enough to use that.\r\n");
|
||||
else
|
||||
else {
|
||||
while (obj) {
|
||||
next_obj = get_obj_in_list_vis(ch, arg1, NULL, obj->next_content);
|
||||
if ((where = find_eq_pos(ch, obj, 0)) >= 0)
|
||||
perform_wear(ch, obj, where);
|
||||
else
|
||||
act("You can't wear $p.", FALSE, ch, obj, 0, TO_CHAR);
|
||||
obj = next_obj;
|
||||
next_obj = get_obj_in_list_vis(ch, arg1, NULL, obj->next_content);
|
||||
if ((where = find_eq_pos(ch, obj, 0)) >= 0)
|
||||
perform_wear(ch, obj, where);
|
||||
else
|
||||
act("You can't wear $p.", FALSE, ch, obj, 0, TO_CHAR);
|
||||
obj = next_obj;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!(obj = get_obj_in_list_vis(ch, arg1, NULL, ch->carrying)))
|
||||
send_to_char(ch, "You don't seem to have %s %s.\r\n", AN(arg1), arg1);
|
||||
|
|
@ -1383,9 +1388,9 @@ ACMD(do_wear)
|
|||
send_to_char(ch, "You are not experienced enough to use that.\r\n");
|
||||
else {
|
||||
if ((where = find_eq_pos(ch, obj, arg2)) >= 0)
|
||||
perform_wear(ch, obj, where);
|
||||
perform_wear(ch, obj, where);
|
||||
else if (!*arg2)
|
||||
act("You can't wear $p.", FALSE, ch, obj, 0, TO_CHAR);
|
||||
act("You can't wear $p.", FALSE, ch, obj, 0, TO_CHAR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1433,9 +1438,9 @@ ACMD(do_grab)
|
|||
if (!CAN_WEAR(obj, ITEM_WEAR_HOLD) && GET_OBJ_TYPE(obj) != ITEM_WAND &&
|
||||
GET_OBJ_TYPE(obj) != ITEM_STAFF && GET_OBJ_TYPE(obj) != ITEM_SCROLL &&
|
||||
GET_OBJ_TYPE(obj) != ITEM_POTION)
|
||||
send_to_char(ch, "You can't hold that.\r\n");
|
||||
send_to_char(ch, "You can't hold that.\r\n");
|
||||
else
|
||||
perform_wear(ch, obj, WEAR_HOLD);
|
||||
perform_wear(ch, obj, WEAR_HOLD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1477,11 +1482,12 @@ ACMD(do_remove)
|
|||
|
||||
if (dotmode == FIND_ALL) {
|
||||
found = 0;
|
||||
for (i = 0; i < NUM_WEARS; i++)
|
||||
for (i = 0; i < NUM_WEARS; i++) {
|
||||
if (GET_EQ(ch, i)) {
|
||||
perform_remove(ch, i);
|
||||
found = 1;
|
||||
perform_remove(ch, i);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
send_to_char(ch, "You're not using anything.\r\n");
|
||||
} else if (dotmode == FIND_ALLDOT) {
|
||||
|
|
@ -1489,14 +1495,15 @@ ACMD(do_remove)
|
|||
send_to_char(ch, "Remove all of what?\r\n");
|
||||
else {
|
||||
found = 0;
|
||||
for (i = 0; i < NUM_WEARS; i++)
|
||||
if (GET_EQ(ch, i) && CAN_SEE_OBJ(ch, GET_EQ(ch, i)) &&
|
||||
isname(arg, GET_EQ(ch, i)->name)) {
|
||||
perform_remove(ch, i);
|
||||
found = 1;
|
||||
}
|
||||
for (i = 0; i < NUM_WEARS; i++) {
|
||||
if (GET_EQ(ch, i) && CAN_SEE_OBJ(ch, GET_EQ(ch, i)) &&
|
||||
isname(arg, GET_EQ(ch, i)->name)) {
|
||||
perform_remove(ch, i);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
send_to_char(ch, "You don't seem to be using any %ss.\r\n", arg);
|
||||
send_to_char(ch, "You don't seem to be using any %ss.\r\n", arg);
|
||||
}
|
||||
} else {
|
||||
if ((i = get_obj_pos_in_equip_vis(ch, arg, NULL, ch->equipment)) < 0)
|
||||
|
|
@ -1514,50 +1521,50 @@ ACMD(do_sac)
|
|||
one_argument(argument, arg);
|
||||
|
||||
if (!*arg) {
|
||||
send_to_char(ch, "Sacrifice what?\n\r");
|
||||
return;
|
||||
}
|
||||
send_to_char(ch, "Sacrifice what?\n\r");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(j = get_obj_in_list_vis(ch, arg, NULL, world[IN_ROOM(ch)].contents)) && (!(j = get_obj_in_list_vis(ch, arg, NULL, ch->carrying)))) {
|
||||
send_to_char(ch, "It doesn't seem to be here.\n\r");
|
||||
return;
|
||||
}
|
||||
send_to_char(ch, "It doesn't seem to be here.\n\r");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CAN_WEAR(j, ITEM_WEAR_TAKE)) {
|
||||
send_to_char(ch, "You can't sacrifice that!\n\r");
|
||||
return;
|
||||
}
|
||||
send_to_char(ch, "You can't sacrifice that!\n\r");
|
||||
return;
|
||||
}
|
||||
|
||||
act("$n sacrifices $p.", FALSE, ch, j, 0, TO_ROOM);
|
||||
act("$n sacrifices $p.", FALSE, ch, j, 0, TO_ROOM);
|
||||
|
||||
switch (rand_number(0, 5)) {
|
||||
case 0:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
|
||||
increase_gold(ch, 1);
|
||||
case 0:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
|
||||
increase_gold(ch, 1);
|
||||
break;
|
||||
case 1:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe Gods ignore your sacrifice.\r\n", GET_OBJ_SHORT(j));
|
||||
case 1:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe Gods ignore your sacrifice.\r\n", GET_OBJ_SHORT(j));
|
||||
break;
|
||||
case 2:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe gods give you %d experience points.\r\n", GET_OBJ_SHORT(j), (2*GET_OBJ_COST(j)));
|
||||
GET_EXP(ch) += (2*GET_OBJ_COST(j));
|
||||
case 2:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe gods give you %d experience points.\r\n", GET_OBJ_SHORT(j), (2*GET_OBJ_COST(j)));
|
||||
GET_EXP(ch) += (2*GET_OBJ_COST(j));
|
||||
break;
|
||||
case 3:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive %d experience points.\r\n", GET_OBJ_SHORT(j), GET_OBJ_COST(j));
|
||||
GET_EXP(ch) += GET_OBJ_COST(j);
|
||||
case 3:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive %d experience points.\r\n", GET_OBJ_SHORT(j), GET_OBJ_COST(j));
|
||||
GET_EXP(ch) += GET_OBJ_COST(j);
|
||||
break;
|
||||
case 4:
|
||||
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins.\r\n", GET_OBJ_COST(j));
|
||||
increase_gold(ch, GET_OBJ_COST(j));
|
||||
case 4:
|
||||
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins.\r\n", GET_OBJ_COST(j));
|
||||
increase_gold(ch, GET_OBJ_COST(j));
|
||||
break;
|
||||
case 5:
|
||||
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins\r\n", (2*GET_OBJ_COST(j)));
|
||||
increase_gold(ch, (2*GET_OBJ_COST(j)));
|
||||
case 5:
|
||||
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins\r\n", (2*GET_OBJ_COST(j)));
|
||||
increase_gold(ch, (2*GET_OBJ_COST(j)));
|
||||
break;
|
||||
default:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
|
||||
increase_gold(ch, 1);
|
||||
break;
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
|
||||
increase_gold(ch, 1);
|
||||
break;
|
||||
}
|
||||
for (jj = j->contains; jj; jj = next_thing2) {
|
||||
next_thing2 = jj->next_content; /* Next in inventory */
|
||||
|
|
|
|||
|
|
@ -365,8 +365,8 @@ int perform_move(struct char_data *ch, int dir, int need_specials_check)
|
|||
next = k->next;
|
||||
if ((IN_ROOM(k->follower) == was_in) &&
|
||||
(GET_POS(k->follower) >= POS_STANDING)) {
|
||||
act("You follow $N.\r\n", FALSE, k->follower, 0, ch, TO_CHAR);
|
||||
perform_move(k->follower, dir, 1);
|
||||
act("You follow $N.\r\n", FALSE, k->follower, 0, ch, TO_CHAR);
|
||||
perform_move(k->follower, dir, 1);
|
||||
}
|
||||
}
|
||||
return (1);
|
||||
|
|
@ -393,14 +393,14 @@ static int find_door(struct char_data *ch, const char *type, char *dir, const ch
|
|||
}
|
||||
if (EXIT(ch, door)) { /* Braces added according to indent. -gg */
|
||||
if (EXIT(ch, door)->keyword) {
|
||||
if (is_name(type, EXIT(ch, door)->keyword))
|
||||
return (door);
|
||||
else {
|
||||
send_to_char(ch, "I see no %s there.\r\n", type);
|
||||
return (-1);
|
||||
if (is_name(type, EXIT(ch, door)->keyword))
|
||||
return (door);
|
||||
else {
|
||||
send_to_char(ch, "I see no %s there.\r\n", type);
|
||||
return (-1);
|
||||
}
|
||||
} else
|
||||
return (door);
|
||||
return (door);
|
||||
} else {
|
||||
send_to_char(ch, "I really don't see how you can %s anything there.\r\n", cmdname);
|
||||
return (-1);
|
||||
|
|
@ -475,10 +475,10 @@ int has_key(struct char_data *ch, obj_vnum key)
|
|||
return (0);
|
||||
}
|
||||
|
||||
#define NEED_OPEN (1 << 0)
|
||||
#define NEED_CLOSED (1 << 1)
|
||||
#define NEED_UNLOCKED (1 << 2)
|
||||
#define NEED_LOCKED (1 << 3)
|
||||
#define NEED_OPEN (1 << 0)
|
||||
#define NEED_CLOSED (1 << 1)
|
||||
#define NEED_UNLOCKED (1 << 2)
|
||||
#define NEED_LOCKED (1 << 3)
|
||||
|
||||
/* cmd_door is required external from act.movement.c */
|
||||
const char *cmd_door[] =
|
||||
|
|
@ -533,7 +533,7 @@ static void do_doorcmd(struct char_data *ch, struct obj_data *obj, int door, int
|
|||
if (!obj && ((other_room = EXIT(ch, door)->to_room) != NOWHERE))
|
||||
if ((back = world[other_room].dir_option[rev_dir[door]]) != NULL)
|
||||
if (back->to_room != IN_ROOM(ch))
|
||||
back = NULL;
|
||||
back = NULL;
|
||||
|
||||
switch (scmd) {
|
||||
case SCMD_OPEN:
|
||||
|
|
@ -690,24 +690,24 @@ ACMD(do_enter)
|
|||
* keyword */
|
||||
for (door = 0; door < DIR_COUNT; door++)
|
||||
if (EXIT(ch, door))
|
||||
if (EXIT(ch, door)->keyword)
|
||||
if (!str_cmp(EXIT(ch, door)->keyword, buf)) {
|
||||
perform_move(ch, door, 1);
|
||||
return;
|
||||
}
|
||||
if (EXIT(ch, door)->keyword)
|
||||
if (!str_cmp(EXIT(ch, door)->keyword, buf)) {
|
||||
perform_move(ch, door, 1);
|
||||
return;
|
||||
}
|
||||
send_to_char(ch, "There is no %s here.\r\n", buf);
|
||||
} else if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_INDOORS))
|
||||
} else if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_INDOORS)) {
|
||||
send_to_char(ch, "You are already indoors.\r\n");
|
||||
else {
|
||||
} else {
|
||||
/* try to locate an entrance */
|
||||
for (door = 0; door < DIR_COUNT; door++)
|
||||
if (EXIT(ch, door))
|
||||
if (EXIT(ch, door)->to_room != NOWHERE)
|
||||
if (!EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) &&
|
||||
ROOM_FLAGGED(EXIT(ch, door)->to_room, ROOM_INDOORS)) {
|
||||
perform_move(ch, door, 1);
|
||||
return;
|
||||
}
|
||||
if (EXIT(ch, door)->to_room != NOWHERE)
|
||||
if (!EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) &&
|
||||
ROOM_FLAGGED(EXIT(ch, door)->to_room, ROOM_INDOORS)) {
|
||||
perform_move(ch, door, 1);
|
||||
return;
|
||||
}
|
||||
send_to_char(ch, "You can't seem to find anything to enter.\r\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -721,12 +721,12 @@ ACMD(do_leave)
|
|||
else {
|
||||
for (door = 0; door < DIR_COUNT; door++)
|
||||
if (EXIT(ch, door))
|
||||
if (EXIT(ch, door)->to_room != NOWHERE)
|
||||
if (!EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) &&
|
||||
!ROOM_FLAGGED(EXIT(ch, door)->to_room, ROOM_INDOORS)) {
|
||||
perform_move(ch, door, 1);
|
||||
return;
|
||||
}
|
||||
if (EXIT(ch, door)->to_room != NOWHERE)
|
||||
if (!EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) &&
|
||||
!ROOM_FLAGGED(EXIT(ch, door)->to_room, ROOM_INDOORS)) {
|
||||
perform_move(ch, door, 1);
|
||||
return;
|
||||
}
|
||||
send_to_char(ch, "I see no obvious exits to the outside.\r\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -960,17 +960,17 @@ ACMD(do_follow)
|
|||
} else { /* Not Charmed follow person */
|
||||
if (leader == ch) {
|
||||
if (!ch->master) {
|
||||
send_to_char(ch, "You are already following yourself.\r\n");
|
||||
return;
|
||||
send_to_char(ch, "You are already following yourself.\r\n");
|
||||
return;
|
||||
}
|
||||
stop_follower(ch);
|
||||
} else {
|
||||
if (circle_follow(ch, leader)) {
|
||||
send_to_char(ch, "Sorry, but following in loops is not allowed.\r\n");
|
||||
return;
|
||||
send_to_char(ch, "Sorry, but following in loops is not allowed.\r\n");
|
||||
return;
|
||||
}
|
||||
if (ch->master)
|
||||
stop_follower(ch);
|
||||
stop_follower(ch);
|
||||
REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_GROUP);
|
||||
add_follower(ch, leader);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ static void do_stat_room(struct char_data *ch, struct room_data *rm)
|
|||
sprinttype(rm->sector_type, sector_types, buf2, sizeof(buf2));
|
||||
send_to_char(ch, "Zone: [%3d], VNum: [%s%5d%s], RNum: [%5d], IDNum: [%5ld], Type: %s\r\n",
|
||||
zone_table[rm->zone].number, CCGRN(ch, C_NRM), rm->number,
|
||||
CCNRM(ch, C_NRM), IN_ROOM(ch), (long) rm->number + ROOM_ID_BASE, buf2);
|
||||
CCNRM(ch, C_NRM), real_room(rm->number), (long) rm->number + ROOM_ID_BASE, buf2);
|
||||
|
||||
sprintbitarray(rm->room_flags, room_bits, RF_ARRAY_MAX, buf2);
|
||||
send_to_char(ch, "SpecProc: %s, Flags: %s\r\n", rm->func == NULL ? "None" : get_spec_func_name(rm->func), buf2);
|
||||
|
|
@ -1785,7 +1785,7 @@ ACMD(do_advance)
|
|||
}
|
||||
oldlevel = GET_LEVEL(victim);
|
||||
if (newlevel < GET_LEVEL(victim)) {
|
||||
do_start(victim);
|
||||
do_start(victim); /* Send 'em back to level 1, then advance */
|
||||
GET_LEVEL(victim) = newlevel;
|
||||
send_to_char(victim, "You are momentarily enveloped by darkness!\r\nYou feel somewhat diminished.\r\n");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -715,7 +715,7 @@ static void cedit_disp_admin_levels(struct descriptor_data *d)
|
|||
|
||||
write_to_output(d, "\r\n\r\n");
|
||||
for (i=ADMLVL_IMMORT; i<=ADMLVL_IMPL; i++) {
|
||||
write_to_output(d, "%sd%s) %s%s%s\r\n", grn, nrm, cyn, admin_level_names[i], nrm);
|
||||
write_to_output(d, "%s%d%s) %s%s%s\r\n", grn, i, nrm, cyn, admin_level_names[i], nrm);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1440,6 +1440,7 @@ void roll_real_abils(struct char_data *ch)
|
|||
void do_start(struct char_data *ch)
|
||||
{
|
||||
GET_LEVEL(ch) = 1;
|
||||
GET_ADMLEVEL(ch) = ADMLVL_MORTAL;
|
||||
GET_EXP(ch) = 1;
|
||||
|
||||
set_title(ch, NULL);
|
||||
|
|
|
|||
|
|
@ -569,6 +569,31 @@ const char *container_bits[] = {
|
|||
"\n",
|
||||
};
|
||||
|
||||
/** Flag descriptions for HOUSE_ flags
|
||||
* @pre Must be in the same order as the defines.
|
||||
* Must end array with a single newline. */
|
||||
const char *house_bits[] = {
|
||||
"NO_GUEST",
|
||||
"FREE",
|
||||
"NO_IMM",
|
||||
"IMP_ONLY",
|
||||
"RENTFREE",
|
||||
"SAVE_!RENT",
|
||||
"NO_SAVE",
|
||||
"NO_SPEC",
|
||||
"\n"
|
||||
};
|
||||
|
||||
/** House mode types for HOUSE_ mode values
|
||||
* @pre Must be in the same order as the defines.
|
||||
* Must end array with a single newline. */
|
||||
const char *house_types[] = {
|
||||
"PLAYER_OWNED",
|
||||
"IMM_OWNED",
|
||||
"CLAN_OWNED",
|
||||
"\n"
|
||||
};
|
||||
|
||||
/** Describes the liquid description.
|
||||
* @pre Must be in the same order as the defines.
|
||||
* Must end array with a single newline. */
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ extern const char *wear_bits[];
|
|||
extern const char *extra_bits[];
|
||||
extern const char *apply_types[];
|
||||
extern const char *container_bits[];
|
||||
extern const char *house_bits[];
|
||||
extern const char *house_types[];
|
||||
extern const char *drinks[];
|
||||
extern const char *drinknames[];
|
||||
extern const char *color_liquid[];
|
||||
|
|
|
|||
1004
src/house.c
1004
src/house.c
File diff suppressed because it is too large
Load diff
106
src/house.h
106
src/house.h
|
|
@ -12,29 +12,61 @@
|
|||
#ifndef _HOUSE_H_
|
||||
#define _HOUSE_H_
|
||||
|
||||
#define MAX_HOUSES 100
|
||||
#define MAX_GUESTS 10
|
||||
#define MAX_HOUSES 100 /* Maximum number of houses in the MUD */
|
||||
#define MAX_GUESTS 10 /* Maximum number of guests per house */
|
||||
|
||||
#define HOUSE_PRIVATE 0
|
||||
/* House modes/types */
|
||||
#define HOUSE_PRIVATE 0 /* A Normal Player-Owned House */
|
||||
#define HOUSE_GOD 1 /* Imm owned house */
|
||||
#define HOUSE_SHOP 2 /* Player-Owned Shop */
|
||||
|
||||
struct house_control_rec {
|
||||
room_vnum vnum; /* vnum of this house */
|
||||
room_vnum atrium; /* vnum of atrium */
|
||||
sh_int exit_num; /* direction of house's exit */
|
||||
time_t built_on; /* date this house was built */
|
||||
int mode; /* mode of ownership */
|
||||
long owner; /* idnum of house's owner */
|
||||
int num_of_guests; /* how many guests for house */
|
||||
long guests[MAX_GUESTS]; /* idnums of house's guests */
|
||||
time_t last_payment; /* date of last house payment */
|
||||
long spare0;
|
||||
long spare1;
|
||||
long spare2;
|
||||
long spare3;
|
||||
long spare4;
|
||||
long spare5;
|
||||
long spare6;
|
||||
long spare7;
|
||||
#define NUM_HOUSE_TYPES 3
|
||||
|
||||
/* House Flags - also see string constants, in constants.c */
|
||||
#define HOUSE_NOGUESTS 0 /* Owner cannot add guests */
|
||||
#define HOUSE_FREE 1 /* House does not require payments */
|
||||
#define HOUSE_NOIMMS 2 /* Imms below level 2 cannot enter */
|
||||
#define HOUSE_IMPONLY 3 /* Imms below level 4 cannot enter */
|
||||
#define HOUSE_RENTFREE 4 /* No rent is charged on items left here */
|
||||
#define HOUSE_SAVENORENT 5 /* NORENT items are crashsaved too */
|
||||
#define HOUSE_NOSAVE 6 /* Do not crash save this room - private only */
|
||||
#define HOUSE_NOSPEC 7 /* Don't use 'standard' spec proc for house type */
|
||||
|
||||
#define HOUSE_NUM_FLAGS 8
|
||||
|
||||
/** House flags.
|
||||
* @param loc The house_control_data structure. */
|
||||
#define HOUSE_FLAGS(loc) ((loc)->house_flags)
|
||||
|
||||
/** House flagged.
|
||||
* @param loc The house_control_data structure. *
|
||||
* flag The house flag (see above) */
|
||||
#define HOUSE_FLAGGED(loc, flag) ((loc) && IS_SET_AR(HOUSE_FLAGS(loc), (flag)))
|
||||
|
||||
|
||||
#define TOROOM(room, dir) (world[room].dir_option[dir] ? \
|
||||
world[room].dir_option[dir]->to_room : NOWHERE)
|
||||
|
||||
/* List structure for house guests */
|
||||
struct guest_data {
|
||||
long id; /**< The ID number of this guest */
|
||||
struct guest_data *next; /**< pointer to next guest in list */
|
||||
};
|
||||
|
||||
/* List structure for houses */
|
||||
struct house_control_data {
|
||||
room_vnum vnum; /**< vnum of this house */
|
||||
room_vnum atrium; /**< vnum of atrium */
|
||||
sh_int exit_num; /**< direction of house's exit */
|
||||
time_t built_on; /**< date this house was built */
|
||||
long built_by; /**< The ID of the builder (hsedit) */
|
||||
long owner; /**< idnum of house's owner */
|
||||
int mode; /**< mode of ownership */
|
||||
struct guest_data *guests; /**< idnums of house's guests */
|
||||
time_t last_payment; /**< date of last house payment */
|
||||
int house_flags[HS_ARRAY_MAX]; /**< House Flags (hsedit) */
|
||||
mob_vnum receptionist; /**< The Receptionist/Shopkeeper */
|
||||
struct house_control_data *next; /**< pointer to next house in list */
|
||||
};
|
||||
|
||||
#define TOROOM(room, dir) (world[room].dir_option[dir] ? \
|
||||
|
|
@ -42,16 +74,36 @@ struct house_control_rec {
|
|||
|
||||
/* Functions in house.c made externally available */
|
||||
/* Utility Functions */
|
||||
void House_boot(void);
|
||||
void House_save_all(void);
|
||||
int House_can_enter(struct char_data *ch, room_vnum house);
|
||||
void House_crashsave(room_vnum vnum);
|
||||
void House_list_guests(struct char_data *ch, int i, int quiet);
|
||||
int House_save(struct obj_data *obj, FILE *fp);
|
||||
void House_boot(void);
|
||||
void House_save_all(void);
|
||||
int House_can_enter(struct char_data *ch, room_vnum house);
|
||||
void House_crashsave(room_vnum vnum);
|
||||
void House_list_guests(struct char_data *ch, struct house_control_data *h, int quiet);
|
||||
int House_save(struct obj_data *obj, FILE *fp);
|
||||
void House_save_control(void);
|
||||
void House_delete_file(room_vnum vnum);
|
||||
void hcontrol_list_houses(struct char_data *ch, char *arg);
|
||||
void set_house(struct house_control_data *h);
|
||||
void free_house_guests(struct house_control_data *h);
|
||||
void clear_house_control_data(struct house_control_data *h);
|
||||
void add_house_guest(struct house_control_data *h_data, long guest_id);
|
||||
int count_house_guests(struct house_control_data *h);
|
||||
bool is_house_guest(struct house_control_data *h, long id_num);
|
||||
bool remove_house_guest(struct house_control_data *h, long id_num);
|
||||
int count_houses(void);
|
||||
void free_house(struct house_control_data *h);
|
||||
void free_house_list(void);
|
||||
bool delete_house_control(struct house_control_data *to_del);
|
||||
struct house_control_data *new_house(void);
|
||||
struct house_control_data *add_house(struct house_control_data *h_data);
|
||||
struct house_control_data *find_house(room_vnum vnum);
|
||||
|
||||
/* In game Commands */
|
||||
ACMD(do_hcontrol);
|
||||
ACMD(do_house);
|
||||
|
||||
/* Spec-procs in house.c */
|
||||
SPECIAL(house_shopkeeper);
|
||||
SPECIAL(house_receptionist);
|
||||
|
||||
#endif /* _HOUSE_H_ */
|
||||
|
|
|
|||
1134
src/hsedit.c
Executable file
1134
src/hsedit.c
Executable file
File diff suppressed because it is too large
Load diff
|
|
@ -195,6 +195,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "holler" , "holler" , POS_RESTING , do_gen_comm , 1, ADMLVL_MORTAL, ADM_NONE, SCMD_HOLLER },
|
||||
{ "holylight", "holy" , POS_DEAD , do_gen_tog , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_HOLYLIGHT },
|
||||
{ "house" , "house" , POS_RESTING , do_house , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
|
||||
{ "hsedit" , "hsedit" , POS_DEAD , do_oasis_hsedit,0,ADMLVL_GOD, ADM_ADVBUILD, 0 },
|
||||
|
||||
{ "inventory", "i" , POS_DEAD , do_inventory , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
|
||||
{ "identify" , "id" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
|
||||
|
|
@ -1320,6 +1321,7 @@ void nanny(struct descriptor_data *d, char *arg)
|
|||
{ CON_QEDIT, qedit_parse },
|
||||
{ CON_PREFEDIT, prefedit_parse },
|
||||
{ CON_IBTEDIT, ibtedit_parse },
|
||||
{ CON_HSEDIT, hsedit_parse },
|
||||
{ -1, NULL }
|
||||
};
|
||||
|
||||
|
|
|
|||
66
src/oasis.h
66
src/oasis.h
|
|
@ -80,23 +80,24 @@ void send_cannot_edit(struct char_data *ch, zone_vnum zone);
|
|||
/* NO and YES are defined in utils.h. Removed from here. */
|
||||
|
||||
struct oasis_olc_data {
|
||||
int mode; /* how to parse input */
|
||||
zone_rnum zone_num; /* current zone */
|
||||
room_vnum number; /* vnum of subject */
|
||||
int value; /* mostly 'has changed' flag*/
|
||||
char *storage; /* used for 'tedit' */
|
||||
struct char_data *mob; /* used for 'medit' */
|
||||
struct room_data *room; /* used for 'redit' */
|
||||
struct obj_data *obj; /* used for 'oedit' */
|
||||
struct zone_data *zone; /* used for 'zedit' */
|
||||
struct shop_data *shop; /* used for 'sedit' */
|
||||
struct config_data *config; /* used for 'cedit' */
|
||||
struct aq_data *quest; /* used for 'qedit' */
|
||||
struct extra_descr_data *desc; /* used in '[r|o|m]edit' */
|
||||
struct social_messg *action; /* Aedit uses this one */
|
||||
int mode; /* how to parse input */
|
||||
zone_rnum zone_num; /* current zone */
|
||||
room_vnum number; /* vnum of subject */
|
||||
int value; /* mostly 'has changed' flag*/
|
||||
char *storage; /* used for 'tedit' */
|
||||
struct char_data *mob; /* used for 'medit' */
|
||||
struct room_data *room; /* used for 'redit' */
|
||||
struct obj_data *obj; /* used for 'oedit' */
|
||||
struct zone_data *zone; /* used for 'zedit' */
|
||||
struct shop_data *shop; /* used for 'sedit' */
|
||||
struct config_data *config; /* used for 'cedit' */
|
||||
struct aq_data *quest; /* used for 'qedit' */
|
||||
struct extra_descr_data *desc; /* used in '[r|o|m]edit' */
|
||||
struct social_messg *action; /* Aedit uses this one */
|
||||
struct trig_data *trig;
|
||||
struct prefs_data *prefs; /* used for 'prefedit' */
|
||||
struct ibt_data *ibt; /* used for 'ibtedit' */
|
||||
struct prefs_data *prefs; /* used for 'prefedit' */
|
||||
struct ibt_data *ibt; /* used for 'ibtedit' */
|
||||
struct house_control_data *house; /* used for 'hsedit' */
|
||||
int script_mode;
|
||||
int trigger_position;
|
||||
int item_type;
|
||||
|
|
@ -129,6 +130,7 @@ extern const char *nrm, *grn, *cyn, *yel;
|
|||
#define OLC_HELP(d) (OLC(d)->help) /**< Hedit structure */
|
||||
#define OLC_PREFS(d) (OLC(d)->prefs) /**< Preferences structure */
|
||||
#define OLC_IBT(d) (OLC(d)->ibt) /**< IBT (idea/bug/typo) structure */
|
||||
#define OLC_HOUSE(d) (OLC(d)->house) /**< Player-Owned House/Shop structure */
|
||||
/* Other macros. */
|
||||
#define OLC_EXIT(d) (OLC_ROOM(d)->dir_option[OLC_VAL(d)])
|
||||
|
||||
|
|
@ -381,6 +383,32 @@ extern const char *nrm, *grn, *cyn, *yel;
|
|||
#define HEDIT_KEYWORDS 5
|
||||
#define HEDIT_MIN_LEVEL 6
|
||||
|
||||
/*. House editor - Submodes of HSEDIT connectedness. */
|
||||
#define HSEDIT_MAIN_MENU 0
|
||||
#define HSEDIT_CONFIRM_SAVESTRING 1
|
||||
#define HSEDIT_OWNER_MENU 2
|
||||
#define HSEDIT_OWNER_NAME 3
|
||||
#define HSEDIT_OWNER_ID 4
|
||||
#define HSEDIT_ROOM 5
|
||||
#define HSEDIT_ATRIUM 6
|
||||
#define HSEDIT_DIR_MENU 7
|
||||
#define HSEDIT_GUEST_MENU 8
|
||||
#define HSEDIT_GUEST_ADD 9
|
||||
#define HSEDIT_GUEST_DELETE 10
|
||||
#define HSEDIT_GUEST_CLEAR 11
|
||||
#define HSEDIT_FLAGS 12
|
||||
#define HSEDIT_BUILD_DATE 13
|
||||
#define HSEDIT_PAYMENT 14
|
||||
#define HSEDIT_TYPE 15
|
||||
#define HSEDIT_DELETE 16
|
||||
#define HSEDIT_VALUE_0 17
|
||||
#define HSEDIT_VALUE_1 18
|
||||
#define HSEDIT_VALUE_2 19
|
||||
#define HSEDIT_VALUE_3 20
|
||||
#define HSEDIT_NOVNUM 21
|
||||
#define HSEDIT_BUILDER 22
|
||||
#define HSEDIT_RECEP 23
|
||||
|
||||
int save_config( IDXTYPE nowhere );
|
||||
|
||||
/* Prototypes to keep. */
|
||||
|
|
@ -450,6 +478,12 @@ ACMD(do_tedit);
|
|||
/* public functions from qedit.c */
|
||||
ACMD(do_oasis_qedit);
|
||||
|
||||
/* public functions from hsedit.c */
|
||||
void hsedit_parse(struct descriptor_data * d, char *arg);
|
||||
void hsedit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||
ACMD(do_oasis_hsedit);
|
||||
|
||||
|
||||
/* public functions from oasis_copy.c */
|
||||
int buildwalk(struct char_data *ch, int dir);
|
||||
ACMD(do_dig);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include "ban.h" /* for SPECIAL(gen_board) */
|
||||
#include "boards.h"
|
||||
#include "mail.h"
|
||||
#include "house.h"
|
||||
|
||||
SPECIAL(questmaster);
|
||||
SPECIAL(shop_keeper);
|
||||
|
|
@ -172,25 +173,27 @@ struct spec_func_data {
|
|||
};
|
||||
|
||||
struct spec_func_data spec_func_list[] = {
|
||||
{"Mayor", mayor },
|
||||
{"Snake", snake },
|
||||
{"Thief", thief },
|
||||
{"Magic User", magic_user },
|
||||
{"Puff", puff },
|
||||
{"Fido", fido },
|
||||
{"Janitor", janitor },
|
||||
{"Cityguard", cityguard },
|
||||
{"Postmaster", postmaster },
|
||||
{"Receptionist", receptionist },
|
||||
{"Cryogenicist", cryogenicist},
|
||||
{"Bulletin Board", gen_board },
|
||||
{"Bank", bank },
|
||||
{"Pet Shop", pet_shops },
|
||||
{"Dump", dump },
|
||||
{"Guildmaster", guild },
|
||||
{"Guild Guard", guild_guard },
|
||||
{"Questmaster", questmaster },
|
||||
{"Shopkeeper", shop_keeper },
|
||||
{"Mayor", mayor },
|
||||
{"Snake", snake },
|
||||
{"Thief", thief },
|
||||
{"Magic User", magic_user },
|
||||
{"Puff", puff },
|
||||
{"Fido", fido },
|
||||
{"Janitor", janitor },
|
||||
{"Cityguard", cityguard },
|
||||
{"Postmaster", postmaster },
|
||||
{"Receptionist", receptionist },
|
||||
{"Cryogenicist", cryogenicist},
|
||||
{"Bulletin Board", gen_board },
|
||||
{"Bank", bank },
|
||||
{"Pet Shop", pet_shops },
|
||||
{"Dump", dump },
|
||||
{"Guildmaster", guild },
|
||||
{"Guild Guard", guild_guard },
|
||||
{"Questmaster", questmaster },
|
||||
{"Shopkeeper", shop_keeper },
|
||||
{"House-Receptionist", house_receptionist },
|
||||
{"House-Shopkeeper", house_shopkeeper },
|
||||
{"\n", NULL}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -357,10 +357,11 @@
|
|||
#define CON_QEDIT 28 /**< OLC mode - quest edit */
|
||||
#define CON_PREFEDIT 29 /**< OLC mode - preference edit */
|
||||
#define CON_IBTEDIT 30 /**< OLC mode - idea/bug/typo edit */
|
||||
#define CON_HSEDIT 31 /**< OLC mode - house editor */
|
||||
|
||||
/* OLC States range - used by IS_IN_OLC and IS_PLAYING */
|
||||
#define FIRST_OLC_STATE CON_OEDIT /**< The first CON_ state that is an OLC */
|
||||
#define LAST_OLC_STATE CON_IBTEDIT /**< The last CON_ state that is an OLC */
|
||||
#define LAST_OLC_STATE CON_HSEDIT /**< The last CON_ state that is an OLC */
|
||||
|
||||
/* Character equipment positions: used as index for char_data.equipment[] */
|
||||
/* NOTE: Don't confuse these constants with the ITEM_ bitvectors
|
||||
|
|
@ -551,6 +552,7 @@
|
|||
#define EF_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Extra Flags */
|
||||
#define ZN_ARRAY_MAX 4 /**< # Bytes in Bit vector - Zone Flags */
|
||||
#define AD_ARRAY_MAX 4 /**< # Bytes in Bit vector - Admin Priv Flags */
|
||||
#define HS_ARRAY_MAX 4 /**< # Bytes in Bit vector - House Flags */
|
||||
|
||||
/* other #defined constants */
|
||||
/* **DO**NOT** blindly change the number of levels in your MUD merely by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue