mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-22 10:10:13 +01:00
Several bug-fixes, and new medit stats submenu (with cedit option for advanced options)
This commit is contained in:
parent
5ab5838acc
commit
ac7b71c4ca
16 changed files with 1064 additions and 617 deletions
10
changelog
10
changelog
|
|
@ -35,6 +35,16 @@ export (QQ's a zone into a tarball)t
|
||||||
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||||
(lots of major bugfixes too)
|
(lots of major bugfixes too)
|
||||||
tbaMUD 3.59
|
tbaMUD 3.59
|
||||||
|
[Feb 24 2009] - Jamdog
|
||||||
|
Bug-Fix: Fixed levels command, so it only shows immortal level if it's in the specified range
|
||||||
|
Bug-Fix: write_mobile_espec now saves CON and CHA values for mobiles in world files
|
||||||
|
Bug-Fix: stat zone <num> now shows the same as vstat zone <num> (instead of show zone (num)
|
||||||
|
Bug-Fix: zone 'stat' info (print_zone, oasis_list.c) now shows the number of shops and triggers
|
||||||
|
Bug-Fix: zone 'show' info (print_zone_to_buf, act.wizard.c) now shows number of quests.
|
||||||
|
Added saving throws to write_mobile_espec (genmob.c) and interpret_espec (db.c)
|
||||||
|
Added 'whois' command for all players
|
||||||
|
medit: All numerical stats moved to new sub-menu, with 'autoroll' option
|
||||||
|
medit: Advanced or Standard stats sub-menu with cedit toggle (in Game Operations)
|
||||||
[Feb 17 2009] - Jamdog
|
[Feb 17 2009] - Jamdog
|
||||||
Fixed a bug with %obj.extra% so that it now returns the list of extra flags
|
Fixed a bug with %obj.extra% so that it now returns the list of extra flags
|
||||||
[Feb 11 2009] - Jamdog
|
[Feb 11 2009] - Jamdog
|
||||||
|
|
|
||||||
|
|
@ -215,8 +215,19 @@ the test mob~
|
||||||
Test mobs can be whatever you want them to be.
|
Test mobs can be whatever you want them to be.
|
||||||
~
|
~
|
||||||
8 0 0 0 0 0 0 0 0 E
|
8 0 0 0 0 0 0 0 0 E
|
||||||
3 19 8 0d0+30 1d2+0
|
22 13 -3 4d4+220 3d3+3
|
||||||
30 900
|
220 48400
|
||||||
8 8 0
|
8 8 0
|
||||||
|
Str: 14
|
||||||
|
Dex: 14
|
||||||
|
Int: 14
|
||||||
|
Wis: 14
|
||||||
|
Con: 14
|
||||||
|
Cha: 14
|
||||||
|
SavingPara: 5
|
||||||
|
SavingRod: 5
|
||||||
|
SavingPetri: 5
|
||||||
|
SavingBreath: 5
|
||||||
|
SavingSpell: 5
|
||||||
E
|
E
|
||||||
$
|
$
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ ACMD(do_users);
|
||||||
ACMD(do_weather);
|
ACMD(do_weather);
|
||||||
ACMD(do_where);
|
ACMD(do_where);
|
||||||
ACMD(do_who);
|
ACMD(do_who);
|
||||||
|
ACMD(do_whois);
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Begin Functions and defines for act.item.c
|
* Begin Functions and defines for act.item.c
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "dg_scripts.h"
|
#include "dg_scripts.h"
|
||||||
#include "mail.h" /**< For the has_mail function */
|
#include "mail.h" /**< For the has_mail function */
|
||||||
#include "act.h"
|
#include "act.h"
|
||||||
#include "class.h"
|
#include "class.h"
|
||||||
#include "fight.h"
|
#include "fight.h"
|
||||||
|
|
@ -56,13 +56,13 @@ static void print_object_location(int num, struct obj_data *obj, struct char_dat
|
||||||
|
|
||||||
static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode)
|
static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode)
|
||||||
{
|
{
|
||||||
int found = 0;
|
int found = 0;
|
||||||
struct char_data *temp;
|
struct char_data *temp;
|
||||||
|
|
||||||
if (!obj || !ch) {
|
if (!obj || !ch) {
|
||||||
log("SYSERR: NULL pointer in show_obj_to_char(): obj=%p ch=%p", obj, ch);
|
log("SYSERR: NULL pointer in show_obj_to_char(): obj=%p ch=%p", obj, ch);
|
||||||
/* SYSERR_DESC: Somehow a NULL pointer was sent to show_obj_to_char() in
|
/* SYSERR_DESC: Somehow a NULL pointer was sent to show_obj_to_char() in
|
||||||
* either the 'obj' or the 'ch' variable. The error will indicate which
|
* either the 'obj' or the 'ch' variable. The error will indicate which
|
||||||
* was NULL by listing both of the pointers passed to it. This is often a
|
* was NULL by listing both of the pointers passed to it. This is often a
|
||||||
* difficult one to trace, and may require stepping through a debugger. */
|
* difficult one to trace, and may require stepping through a debugger. */
|
||||||
return;
|
return;
|
||||||
|
|
@ -91,10 +91,10 @@ static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mod
|
||||||
|
|
||||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) {
|
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) {
|
||||||
send_to_char(ch, "[%d] ", GET_OBJ_VNUM(obj));
|
send_to_char(ch, "[%d] ", GET_OBJ_VNUM(obj));
|
||||||
if (SCRIPT(obj)) {
|
if (SCRIPT(obj)) {
|
||||||
if (!TRIGGERS(SCRIPT(obj))->next)
|
if (!TRIGGERS(SCRIPT(obj))->next)
|
||||||
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(obj))));
|
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(obj))));
|
||||||
else
|
else
|
||||||
send_to_char(ch, "[TRIGS] ");
|
send_to_char(ch, "[TRIGS] ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -105,11 +105,11 @@ static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mod
|
||||||
case SHOW_OBJ_SHORT:
|
case SHOW_OBJ_SHORT:
|
||||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) {
|
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) {
|
||||||
send_to_char(ch, "[%d] ", GET_OBJ_VNUM(obj));
|
send_to_char(ch, "[%d] ", GET_OBJ_VNUM(obj));
|
||||||
if (SCRIPT(obj)) {
|
if (SCRIPT(obj)) {
|
||||||
if (!TRIGGERS(SCRIPT(obj))->next)
|
if (!TRIGGERS(SCRIPT(obj))->next)
|
||||||
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(obj))));
|
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(obj))));
|
||||||
else
|
else
|
||||||
send_to_char(ch, "[TRIGS] ");
|
send_to_char(ch, "[TRIGS] ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
send_to_char(ch, "%s", obj->short_description);
|
send_to_char(ch, "%s", obj->short_description);
|
||||||
|
|
@ -139,9 +139,9 @@ static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mod
|
||||||
|
|
||||||
default:
|
default:
|
||||||
log("SYSERR: Bad display mode (%d) in show_obj_to_char().", mode);
|
log("SYSERR: Bad display mode (%d) in show_obj_to_char().", mode);
|
||||||
/* SYSERR_DESC: show_obj_to_char() has some predefined 'mode's (argument
|
/* SYSERR_DESC: show_obj_to_char() has some predefined 'mode's (argument
|
||||||
* #3) to tell it what to display to the character when it is called. If
|
* #3) to tell it what to display to the character when it is called. If
|
||||||
* the mode is not one of these, it will output this error, and indicate
|
* the mode is not one of these, it will output this error, and indicate
|
||||||
* what mode was passed to it. To correct it, you will need to find the
|
* what mode was passed to it. To correct it, you will need to find the
|
||||||
* call with the incorrect mode and change it to an acceptable mode. */
|
* call with the incorrect mode and change it to an acceptable mode. */
|
||||||
return;
|
return;
|
||||||
|
|
@ -170,53 +170,53 @@ static void show_obj_modifiers(struct obj_data *obj, struct char_data *ch)
|
||||||
send_to_char(ch, " ..It emits a faint humming sound!");
|
send_to_char(ch, " ..It emits a faint humming sound!");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mode, int show)
|
static void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mode, int show)
|
||||||
{
|
{
|
||||||
struct obj_data *i, *j, *display;
|
struct obj_data *i, *j, *display;
|
||||||
bool found;
|
bool found;
|
||||||
int num;
|
int num;
|
||||||
|
|
||||||
found = FALSE;
|
found = FALSE;
|
||||||
|
|
||||||
/* Loop through the list of objects */
|
/* Loop through the list of objects */
|
||||||
for (i = list; i; i = i->next_content) {
|
for (i = list; i; i = i->next_content) {
|
||||||
num = 0;
|
num = 0;
|
||||||
|
|
||||||
/* Check the list to see if we've already counted this object */
|
/* Check the list to see if we've already counted this object */
|
||||||
for (j = list; j != i; j = j->next_content)
|
for (j = list; j != i; j = j->next_content)
|
||||||
if ((j->short_description == i->short_description && j->name == i->name) ||
|
if ((j->short_description == i->short_description && j->name == i->name) ||
|
||||||
(!strcmp(j->short_description, i->short_description) && !strcmp(j->name, i->name)))
|
(!strcmp(j->short_description, i->short_description) && !strcmp(j->name, i->name)))
|
||||||
break; /* found a matching object */
|
break; /* found a matching object */
|
||||||
if (j != i)
|
if (j != i)
|
||||||
continue; /* we counted object i earlier in the list */
|
continue; /* we counted object i earlier in the list */
|
||||||
|
|
||||||
/* Count matching objects, including this one */
|
/* Count matching objects, including this one */
|
||||||
for (display = j = i; j; j = j->next_content)
|
for (display = j = i; j; j = j->next_content)
|
||||||
/* This if-clause should be exactly the same as the one in the loop above */
|
/* This if-clause should be exactly the same as the one in the loop above */
|
||||||
if ((j->short_description == i->short_description && j->name == i->name) ||
|
if ((j->short_description == i->short_description && j->name == i->name) ||
|
||||||
(!strcmp(j->short_description, i->short_description) && !strcmp(j->name, i->name)))
|
(!strcmp(j->short_description, i->short_description) && !strcmp(j->name, i->name)))
|
||||||
if (CAN_SEE_OBJ(ch, j)) {
|
if (CAN_SEE_OBJ(ch, j)) {
|
||||||
++num;
|
++num;
|
||||||
/* If the original item can't be seen, switch it for this one */
|
/* If the original item can't be seen, switch it for this one */
|
||||||
if (display == i && !CAN_SEE_OBJ(ch, display))
|
if (display == i && !CAN_SEE_OBJ(ch, display))
|
||||||
display = j;
|
display = j;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When looking in room, hide objects starting with '.', except for holylight */
|
/* When looking in room, hide objects starting with '.', except for holylight */
|
||||||
if (num > 0 && (mode != SHOW_OBJ_LONG || *display->description != '.' ||
|
if (num > 0 && (mode != SHOW_OBJ_LONG || *display->description != '.' ||
|
||||||
(!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_HOLYLIGHT)))) {
|
(!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_HOLYLIGHT)))) {
|
||||||
if (mode == SHOW_OBJ_LONG)
|
if (mode == SHOW_OBJ_LONG)
|
||||||
send_to_char(ch, "%s", CCGRN(ch, C_NRM));
|
send_to_char(ch, "%s", CCGRN(ch, C_NRM));
|
||||||
if (num != 1)
|
if (num != 1)
|
||||||
send_to_char(ch, "(%2i) ", num);
|
send_to_char(ch, "(%2i) ", num);
|
||||||
show_obj_to_char(display, ch, mode);
|
show_obj_to_char(display, ch, mode);
|
||||||
send_to_char(ch, "%s", CCNRM(ch, C_NRM));
|
send_to_char(ch, "%s", CCNRM(ch, C_NRM));
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found && show)
|
if (!found && show)
|
||||||
send_to_char(ch, " Nothing.\r\n");
|
send_to_char(ch, " Nothing.\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void diag_char_to_char(struct char_data *i, struct char_data *ch)
|
static void diag_char_to_char(struct char_data *i, struct char_data *ch)
|
||||||
{
|
{
|
||||||
|
|
@ -276,9 +276,9 @@ static void look_at_char(struct char_data *i, struct char_data *ch)
|
||||||
show_obj_to_char(GET_EQ(i, j), ch, SHOW_OBJ_SHORT);
|
show_obj_to_char(GET_EQ(i, j), ch, SHOW_OBJ_SHORT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ch != i && (IS_THIEF(ch) || GET_LEVEL(ch) >= LVL_IMMORT)) {
|
if (ch != i && (IS_THIEF(ch) || GET_LEVEL(ch) >= LVL_IMMORT)) {
|
||||||
act("\r\nYou attempt to peek at $s inventory:", FALSE, i, 0, ch, TO_VICT);
|
act("\r\nYou attempt to peek at $s inventory:", FALSE, i, 0, ch, TO_VICT);
|
||||||
list_obj_to_char(i->carrying, ch, SHOW_OBJ_SHORT, TRUE);
|
list_obj_to_char(i->carrying, ch, SHOW_OBJ_SHORT, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -297,15 +297,15 @@ static void list_one_char(struct char_data *i, struct char_data *ch)
|
||||||
" is standing here."
|
" is standing here."
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) {
|
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) {
|
||||||
if (IS_NPC(i))
|
if (IS_NPC(i))
|
||||||
send_to_char(ch, "[%d] ", GET_MOB_VNUM(i));
|
send_to_char(ch, "[%d] ", GET_MOB_VNUM(i));
|
||||||
if (SCRIPT(i) && TRIGGERS(SCRIPT(i))) {
|
if (SCRIPT(i) && TRIGGERS(SCRIPT(i))) {
|
||||||
if (!TRIGGERS(SCRIPT(i))->next)
|
if (!TRIGGERS(SCRIPT(i))->next)
|
||||||
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(i))));
|
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(i))));
|
||||||
else
|
else
|
||||||
send_to_char(ch, "[TRIGS] ");
|
send_to_char(ch, "[TRIGS] ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_NPC(i) && i->player.long_descr && GET_POS(i) == GET_DEFAULT_POS(i)) {
|
if (IS_NPC(i) && i->player.long_descr && GET_POS(i) == GET_DEFAULT_POS(i)) {
|
||||||
|
|
@ -322,14 +322,14 @@ static void list_one_char(struct char_data *i, struct char_data *ch)
|
||||||
|
|
||||||
if (AFF_FLAGGED(i, AFF_SANCTUARY))
|
if (AFF_FLAGGED(i, AFF_SANCTUARY))
|
||||||
act("...$e glows with a bright light!", FALSE, i, 0, ch, TO_VICT);
|
act("...$e glows with a bright light!", FALSE, i, 0, ch, TO_VICT);
|
||||||
if (AFF_FLAGGED(i, AFF_BLIND) && GET_LEVEL(i) < LVL_IMMORT)
|
if (AFF_FLAGGED(i, AFF_BLIND) && GET_LEVEL(i) < LVL_IMMORT)
|
||||||
act("...$e is groping around blindly!", FALSE, i, 0, ch, TO_VICT);
|
act("...$e is groping around blindly!", FALSE, i, 0, ch, TO_VICT);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_NPC(i))
|
if (IS_NPC(i))
|
||||||
send_to_char(ch, "%c%s", UPPER(*i->player.short_descr), i->player.short_descr + 1);
|
send_to_char(ch, "%c%s", UPPER(*i->player.short_descr), i->player.short_descr + 1);
|
||||||
else
|
else
|
||||||
send_to_char(ch, "%s%s%s", i->player.name, *GET_TITLE(i) ? " " : "", GET_TITLE(i));
|
send_to_char(ch, "%s%s%s", i->player.name, *GET_TITLE(i) ? " " : "", GET_TITLE(i));
|
||||||
|
|
||||||
|
|
@ -351,8 +351,8 @@ static void list_one_char(struct char_data *i, struct char_data *ch)
|
||||||
send_to_char(ch, "%s", positions[(int) GET_POS(i)]);
|
send_to_char(ch, "%s", positions[(int) GET_POS(i)]);
|
||||||
else {
|
else {
|
||||||
furniture = SITTING(i);
|
furniture = SITTING(i);
|
||||||
send_to_char(ch, " is %s upon %s.", (GET_POS(i) == POS_SLEEPING ?
|
send_to_char(ch, " is %s upon %s.", (GET_POS(i) == POS_SLEEPING ?
|
||||||
"sleeping" : (GET_POS(i) == POS_RESTING ? "resting" : "sitting")),
|
"sleeping" : (GET_POS(i) == POS_RESTING ? "resting" : "sitting")),
|
||||||
OBJS(furniture, ch));
|
OBJS(furniture, ch));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -392,13 +392,13 @@ static void list_char_to_char(struct char_data *list, struct char_data *ch)
|
||||||
if (!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_HOLYLIGHT) &&
|
if (!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_HOLYLIGHT) &&
|
||||||
IS_NPC(i) && i->player.long_descr && *i->player.long_descr == '.')
|
IS_NPC(i) && i->player.long_descr && *i->player.long_descr == '.')
|
||||||
continue;
|
continue;
|
||||||
send_to_char(ch, "%s", CCYEL(ch, C_NRM));
|
send_to_char(ch, "%s", CCYEL(ch, C_NRM));
|
||||||
if (CAN_SEE(ch, i))
|
if (CAN_SEE(ch, i))
|
||||||
list_one_char(i, ch);
|
list_one_char(i, ch);
|
||||||
else if (IS_DARK(IN_ROOM(ch)) && !CAN_SEE_IN_DARK(ch) &&
|
else if (IS_DARK(IN_ROOM(ch)) && !CAN_SEE_IN_DARK(ch) &&
|
||||||
AFF_FLAGGED(i, AFF_INFRAVISION))
|
AFF_FLAGGED(i, AFF_INFRAVISION))
|
||||||
send_to_char(ch, "You see a pair of glowing red eyes looking your way.\r\n");
|
send_to_char(ch, "You see a pair of glowing red eyes looking your way.\r\n");
|
||||||
send_to_char(ch, "%s", CCNRM(ch, C_NRM));
|
send_to_char(ch, "%s", CCNRM(ch, C_NRM));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -442,7 +442,7 @@ ACMD(do_exits)
|
||||||
|
|
||||||
len++;
|
len++;
|
||||||
|
|
||||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS) && !EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED))
|
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS) && !EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED))
|
||||||
send_to_char(ch, "%-5s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room), world[EXIT(ch, door)->to_room].name);
|
send_to_char(ch, "%-5s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room), world[EXIT(ch, door)->to_room].name);
|
||||||
else if (CONFIG_DISP_CLOSED_DOORS && EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED)) {
|
else if (CONFIG_DISP_CLOSED_DOORS && EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED)) {
|
||||||
/* But we tell them the door is closed */
|
/* But we tell them the door is closed */
|
||||||
|
|
@ -465,7 +465,7 @@ void look_at_room(struct char_data *ch, int ignore_brief)
|
||||||
room_vnum target_room;
|
room_vnum target_room;
|
||||||
|
|
||||||
target_room = IN_ROOM(ch);
|
target_room = IN_ROOM(ch);
|
||||||
|
|
||||||
if (!ch->desc)
|
if (!ch->desc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -483,14 +483,14 @@ void look_at_room(struct char_data *ch, int ignore_brief)
|
||||||
sprintbitarray(ROOM_FLAGS(IN_ROOM(ch)), room_bits, RF_ARRAY_MAX, buf);
|
sprintbitarray(ROOM_FLAGS(IN_ROOM(ch)), room_bits, RF_ARRAY_MAX, buf);
|
||||||
send_to_char(ch, "[%5d] ", GET_ROOM_VNUM(IN_ROOM(ch)));
|
send_to_char(ch, "[%5d] ", GET_ROOM_VNUM(IN_ROOM(ch)));
|
||||||
send_to_char(ch, "%s [ %s] ", world[IN_ROOM(ch)].name, buf);
|
send_to_char(ch, "%s [ %s] ", world[IN_ROOM(ch)].name, buf);
|
||||||
|
|
||||||
if (SCRIPT(rm)) {
|
if (SCRIPT(rm)) {
|
||||||
send_to_char(ch, "[T");
|
send_to_char(ch, "[T");
|
||||||
for (t = TRIGGERS(SCRIPT(rm)); t; t = t->next)
|
for (t = TRIGGERS(SCRIPT(rm)); t; t = t->next)
|
||||||
send_to_char(ch, " %d", GET_TRIG_VNUM(t));
|
send_to_char(ch, " %d", GET_TRIG_VNUM(t));
|
||||||
send_to_char(ch, "]");
|
send_to_char(ch, "]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
send_to_char(ch, "%s", world[IN_ROOM(ch)].name);
|
send_to_char(ch, "%s", world[IN_ROOM(ch)].name);
|
||||||
send_to_char(ch, "%s\r\n", CCNRM(ch, C_NRM));
|
send_to_char(ch, "%s\r\n", CCNRM(ch, C_NRM));
|
||||||
|
|
@ -578,7 +578,7 @@ static void look_in_obj(struct char_data *ch, char *arg)
|
||||||
sprinttype(GET_OBJ_VAL(obj, 2), color_liquid, buf2, sizeof(buf2));
|
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);
|
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 */
|
send_to_char(ch, "Its contents seem somewhat murky.\r\n"); /* BUG */
|
||||||
else {
|
else {
|
||||||
char buf2[MAX_STRING_LENGTH];
|
char buf2[MAX_STRING_LENGTH];
|
||||||
|
|
@ -604,7 +604,7 @@ char *find_exdesc(char *word, struct extra_descr_data *list)
|
||||||
|
|
||||||
/* Given the argument "look at <target>", figure out what object or char
|
/* Given the argument "look at <target>", figure out what object or char
|
||||||
* matches the target. First, see if there is another char in the room with
|
* matches the target. First, see if there is another char in the room with
|
||||||
* the name. Then check local objs for exdescs. Thanks to Angus Mezick for
|
* the name. Then check local objs for exdescs. Thanks to Angus Mezick for
|
||||||
* the suggested fix to this problem. */
|
* the suggested fix to this problem. */
|
||||||
static void look_at_target(struct char_data *ch, char *arg)
|
static void look_at_target(struct char_data *ch, char *arg)
|
||||||
{
|
{
|
||||||
|
|
@ -813,7 +813,7 @@ ACMD(do_score)
|
||||||
else
|
else
|
||||||
send_to_char(ch, "and your current quest is %d.\r\n",
|
send_to_char(ch, "and your current quest is %d.\r\n",
|
||||||
GET_QUEST(ch) == NOTHING ? -1 : GET_QUEST(ch));
|
GET_QUEST(ch) == NOTHING ? -1 : GET_QUEST(ch));
|
||||||
|
|
||||||
playing_time = *real_time_passed((time(0) - ch->player.time.logon) +
|
playing_time = *real_time_passed((time(0) - ch->player.time.logon) +
|
||||||
ch->player.time.played, 0);
|
ch->player.time.played, 0);
|
||||||
send_to_char(ch, "You have been playing for %d day%s and %d hour%s.\r\n",
|
send_to_char(ch, "You have been playing for %d day%s and %d hour%s.\r\n",
|
||||||
|
|
@ -953,9 +953,9 @@ ACMD(do_time)
|
||||||
(time_info.hours % 12 == 0) ? 12 : (time_info.hours % 12),
|
(time_info.hours % 12 == 0) ? 12 : (time_info.hours % 12),
|
||||||
time_info.hours >= 12 ? "pm" : "am", weekdays[weekday]);
|
time_info.hours >= 12 ? "pm" : "am", weekdays[weekday]);
|
||||||
|
|
||||||
/* Peter Ajamian supplied the following as a fix for a bug introduced in the
|
/* Peter Ajamian supplied the following as a fix for a bug introduced in the
|
||||||
* ordinal display that caused 11, 12, and 13 to be incorrectly displayed as
|
* ordinal display that caused 11, 12, and 13 to be incorrectly displayed as
|
||||||
* 11st, 12nd, and 13rd. Nate Winters had already submitted a fix, but it
|
* 11st, 12nd, and 13rd. Nate Winters had already submitted a fix, but it
|
||||||
* hard-coded a limit on ordinal display which I want to avoid. -dak */
|
* hard-coded a limit on ordinal display which I want to avoid. -dak */
|
||||||
suf = "th";
|
suf = "th";
|
||||||
|
|
||||||
|
|
@ -1009,43 +1009,43 @@ void space_to_minus(char *str)
|
||||||
*str = '-';
|
*str = '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
int search_help(const char *argument, int level)
|
int search_help(const char *argument, int level)
|
||||||
{
|
{
|
||||||
int chk, bot, top, mid, minlen;
|
int chk, bot, top, mid, minlen;
|
||||||
|
|
||||||
bot = 0;
|
bot = 0;
|
||||||
top = top_of_helpt;
|
top = top_of_helpt;
|
||||||
minlen = strlen(argument);
|
minlen = strlen(argument);
|
||||||
|
|
||||||
while (bot <= top) {
|
while (bot <= top) {
|
||||||
mid = (bot + top) / 2;
|
mid = (bot + top) / 2;
|
||||||
|
|
||||||
if (!(chk = strn_cmp(argument, help_table[mid].keywords, minlen))) {
|
if (!(chk = strn_cmp(argument, help_table[mid].keywords, minlen))) {
|
||||||
while ((mid > 0) && !strn_cmp(argument, help_table[mid - 1].keywords, minlen))
|
while ((mid > 0) && !strn_cmp(argument, help_table[mid - 1].keywords, minlen))
|
||||||
mid--;
|
mid--;
|
||||||
|
|
||||||
while (level < help_table[mid].min_level && mid < (bot + top) / 2)
|
while (level < help_table[mid].min_level && mid < (bot + top) / 2)
|
||||||
mid++;
|
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))
|
if (strn_cmp(argument, help_table[mid].keywords, minlen))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
return mid;
|
return mid;
|
||||||
}
|
}
|
||||||
else if (chk > 0)
|
else if (chk > 0)
|
||||||
bot = mid + 1;
|
bot = mid + 1;
|
||||||
else
|
else
|
||||||
top = mid - 1;
|
top = mid - 1;
|
||||||
}
|
}
|
||||||
return NOWHERE;
|
return NOWHERE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ACMD(do_help)
|
ACMD(do_help)
|
||||||
{
|
{
|
||||||
int mid = 0;
|
int mid = 0;
|
||||||
int i, found = 0;
|
int i, found = 0;
|
||||||
|
|
||||||
if (!ch->desc)
|
if (!ch->desc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -1294,7 +1294,7 @@ ACMD(do_who)
|
||||||
if (d->connected == CON_HEDIT)
|
if (d->connected == CON_HEDIT)
|
||||||
send_to_char(ch, " (Help edit)");
|
send_to_char(ch, " (Help edit)");
|
||||||
if (d->connected == CON_QEDIT)
|
if (d->connected == CON_QEDIT)
|
||||||
send_to_char(ch, " (Quest Edit)");
|
send_to_char(ch, " (Quest Edit)");
|
||||||
if (PRF_FLAGGED(tch, PRF_BUILDWALK))
|
if (PRF_FLAGGED(tch, PRF_BUILDWALK))
|
||||||
send_to_char(ch, " (Buildwalking)");
|
send_to_char(ch, " (Buildwalking)");
|
||||||
if (PRF_FLAGGED(tch, PRF_AFK))
|
if (PRF_FLAGGED(tch, PRF_AFK))
|
||||||
|
|
@ -1484,7 +1484,7 @@ ACMD(do_gen_ps)
|
||||||
page_string(ch->desc, credits, 0);
|
page_string(ch->desc, credits, 0);
|
||||||
break;
|
break;
|
||||||
case SCMD_NEWS:
|
case SCMD_NEWS:
|
||||||
GET_LAST_NEWS(ch) = time(0);
|
GET_LAST_NEWS(ch) = time(0);
|
||||||
page_string(ch->desc, news, 0);
|
page_string(ch->desc, news, 0);
|
||||||
break;
|
break;
|
||||||
case SCMD_INFO:
|
case SCMD_INFO:
|
||||||
|
|
@ -1503,7 +1503,7 @@ ACMD(do_gen_ps)
|
||||||
page_string(ch->desc, policies, 0);
|
page_string(ch->desc, policies, 0);
|
||||||
break;
|
break;
|
||||||
case SCMD_MOTD:
|
case SCMD_MOTD:
|
||||||
GET_LAST_MOTD(ch) = time(0);
|
GET_LAST_MOTD(ch) = time(0);
|
||||||
page_string(ch->desc, motd, 0);
|
page_string(ch->desc, motd, 0);
|
||||||
break;
|
break;
|
||||||
case SCMD_IMOTD:
|
case SCMD_IMOTD:
|
||||||
|
|
@ -1521,10 +1521,10 @@ ACMD(do_gen_ps)
|
||||||
default:
|
default:
|
||||||
log("SYSERR: Unhandled case in do_gen_ps. (%d)", subcmd);
|
log("SYSERR: Unhandled case in do_gen_ps. (%d)", subcmd);
|
||||||
/* SYSERR_DESC: General page string function for such things as 'credits',
|
/* SYSERR_DESC: General page string function for such things as 'credits',
|
||||||
* 'news', 'wizlist', 'clear', 'version'. This occurs when a call is made
|
* 'news', 'wizlist', 'clear', 'version'. This occurs when a call is made
|
||||||
* to this routine that is not one of the predefined calls. To correct it,
|
* to this routine that is not one of the predefined calls. To correct it,
|
||||||
* either a case needs to be added into the function to account for the
|
* either a case needs to be added into the function to account for the
|
||||||
* subcmd that is being passed to it, or the call to the function needs to
|
* subcmd that is being passed to it, or the call to the function needs to
|
||||||
* have the correct subcmd put into place. */
|
* have the correct subcmd put into place. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1537,8 +1537,8 @@ static void perform_mortal_where(struct char_data *ch, char *arg)
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
if (!*arg) {
|
if (!*arg) {
|
||||||
j = world[(IN_ROOM(ch))].zone;
|
j = world[(IN_ROOM(ch))].zone;
|
||||||
send_to_char(ch, "Players in %s@n.\r\n--------------------\r\n", zone_table[j].name);
|
send_to_char(ch, "Players in %s@n.\r\n--------------------\r\n", zone_table[j].name);
|
||||||
for (d = descriptor_list; d; d = d->next) {
|
for (d = descriptor_list; d; d = d->next) {
|
||||||
if (STATE(d) != CON_PLAYING || d->character == ch)
|
if (STATE(d) != CON_PLAYING || d->character == ch)
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -1573,12 +1573,12 @@ static void print_object_location(int num, struct obj_data *obj, struct char_dat
|
||||||
else
|
else
|
||||||
send_to_char(ch, "%33s", " - ");
|
send_to_char(ch, "%33s", " - ");
|
||||||
|
|
||||||
if (SCRIPT(obj)) {
|
if (SCRIPT(obj)) {
|
||||||
if (!TRIGGERS(SCRIPT(obj))->next)
|
if (!TRIGGERS(SCRIPT(obj))->next)
|
||||||
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(obj))));
|
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(obj))));
|
||||||
else
|
else
|
||||||
send_to_char(ch, "[TRIGS] ");
|
send_to_char(ch, "[TRIGS] ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IN_ROOM(obj) != NOWHERE)
|
if (IN_ROOM(obj) != NOWHERE)
|
||||||
send_to_char(ch, "[%5d] %s%s\r\n", GET_ROOM_VNUM(IN_ROOM(obj)), world[IN_ROOM(obj)].name, QNRM);
|
send_to_char(ch, "[%5d] %s%s\r\n", GET_ROOM_VNUM(IN_ROOM(obj)), world[IN_ROOM(obj)].name, QNRM);
|
||||||
|
|
@ -1602,8 +1602,8 @@ static void perform_immort_where(struct char_data *ch, char *arg)
|
||||||
int num = 0, found = 0;
|
int num = 0, found = 0;
|
||||||
|
|
||||||
if (!*arg) {
|
if (!*arg) {
|
||||||
send_to_char(ch, "Players Room Location Zone\r\n");
|
send_to_char(ch, "Players Room Location Zone\r\n");
|
||||||
send_to_char(ch, "-------- ------- ------------------------------ -------------------\r\n");
|
send_to_char(ch, "-------- ------- ------------------------------ -------------------\r\n");
|
||||||
for (d = descriptor_list; d; d = d->next)
|
for (d = descriptor_list; d; d = d->next)
|
||||||
if (IS_PLAYING(d)) {
|
if (IS_PLAYING(d)) {
|
||||||
i = (d->original ? d->original : d->character);
|
i = (d->original ? d->original : d->character);
|
||||||
|
|
@ -1614,9 +1614,9 @@ static void perform_immort_where(struct char_data *ch, char *arg)
|
||||||
world[IN_ROOM(d->character)].name, QNRM, GET_NAME(d->character), QNRM);
|
world[IN_ROOM(d->character)].name, QNRM, GET_NAME(d->character), QNRM);
|
||||||
else
|
else
|
||||||
send_to_char(ch, "%-8s%s %s[%s%5d%s]%s %-*s%s %s%s\r\n", GET_NAME(i), QNRM,
|
send_to_char(ch, "%-8s%s %s[%s%5d%s]%s %-*s%s %s%s\r\n", GET_NAME(i), QNRM,
|
||||||
QCYN, QYEL, GET_ROOM_VNUM(IN_ROOM(i)), QCYN, QNRM,
|
QCYN, QYEL, GET_ROOM_VNUM(IN_ROOM(i)), QCYN, QNRM,
|
||||||
30+count_color_chars(world[IN_ROOM(i)].name), world[IN_ROOM(i)].name, QNRM,
|
30+count_color_chars(world[IN_ROOM(i)].name), world[IN_ROOM(i)].name, QNRM,
|
||||||
zone_table[(world[IN_ROOM(i)].zone)].name, QNRM);
|
zone_table[(world[IN_ROOM(i)].zone)].name, QNRM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1625,12 +1625,12 @@ static void perform_immort_where(struct char_data *ch, char *arg)
|
||||||
found = 1;
|
found = 1;
|
||||||
send_to_char(ch, "M%3d. %-25s%s - [%5d] %-25s%s", ++num, GET_NAME(i), QNRM,
|
send_to_char(ch, "M%3d. %-25s%s - [%5d] %-25s%s", ++num, GET_NAME(i), QNRM,
|
||||||
GET_ROOM_VNUM(IN_ROOM(i)), world[IN_ROOM(i)].name, QNRM);
|
GET_ROOM_VNUM(IN_ROOM(i)), world[IN_ROOM(i)].name, QNRM);
|
||||||
if (SCRIPT(i) && TRIGGERS(SCRIPT(i))) {
|
if (SCRIPT(i) && TRIGGERS(SCRIPT(i))) {
|
||||||
if (!TRIGGERS(SCRIPT(i))->next)
|
if (!TRIGGERS(SCRIPT(i))->next)
|
||||||
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(i))));
|
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(i))));
|
||||||
else
|
else
|
||||||
send_to_char(ch, "[TRIGS] ");
|
send_to_char(ch, "[TRIGS] ");
|
||||||
}
|
}
|
||||||
send_to_char(ch, "%s\r\n", QNRM);
|
send_to_char(ch, "%s\r\n", QNRM);
|
||||||
}
|
}
|
||||||
for (num = 0, k = object_list; k; k = k->next)
|
for (num = 0, k = object_list; k; k = k->next)
|
||||||
|
|
@ -1657,47 +1657,47 @@ ACMD(do_where)
|
||||||
|
|
||||||
ACMD(do_levels)
|
ACMD(do_levels)
|
||||||
{
|
{
|
||||||
char buf[MAX_STRING_LENGTH], arg[MAX_STRING_LENGTH];
|
char buf[MAX_STRING_LENGTH], arg[MAX_STRING_LENGTH];
|
||||||
size_t len = 0, nlen;
|
size_t len = 0, nlen;
|
||||||
int i, ret, min_lev=1, max_lev=LVL_IMMORT, val;
|
int i, ret, min_lev=1, max_lev=LVL_IMMORT, val;
|
||||||
|
|
||||||
if (IS_NPC(ch)) {
|
if (IS_NPC(ch)) {
|
||||||
send_to_char(ch, "You ain't nothin' but a hound-dog.\r\n");
|
send_to_char(ch, "You ain't nothin' but a hound-dog.\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
one_argument(argument, arg);
|
one_argument(argument, arg);
|
||||||
|
|
||||||
if (arg != NULL && *arg) {
|
if (arg != NULL && *arg) {
|
||||||
if (isdigit(*arg)) {
|
if (isdigit(*arg)) {
|
||||||
ret = sscanf(arg, "%d-%d", &min_lev, &max_lev);
|
ret = sscanf(arg, "%d-%d", &min_lev, &max_lev);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/* No valid args found */
|
/* No valid args found */
|
||||||
min_lev = 1;
|
min_lev = 1;
|
||||||
max_lev = LVL_IMMORT;
|
max_lev = LVL_IMMORT;
|
||||||
}
|
}
|
||||||
else if (ret == 1) {
|
else if (ret == 1) {
|
||||||
/* One arg = range is (num) either side of current level */
|
/* One arg = range is (num) either side of current level */
|
||||||
val = min_lev;
|
val = min_lev;
|
||||||
max_lev = MIN(GET_LEVEL(ch) + val, LVL_IMMORT);
|
max_lev = MIN(GET_LEVEL(ch) + val, LVL_IMMORT);
|
||||||
min_lev = MAX(GET_LEVEL(ch) - val, 1);
|
min_lev = MAX(GET_LEVEL(ch) - val, 1);
|
||||||
}
|
}
|
||||||
else if (ret == 2) {
|
else if (ret == 2) {
|
||||||
/* Two args = min-max range limit - just do sanity checks */
|
/* Two args = min-max range limit - just do sanity checks */
|
||||||
min_lev = MAX(min_lev, 1);
|
min_lev = MAX(min_lev, 1);
|
||||||
max_lev = MIN(max_lev + 1, LVL_IMMORT);
|
max_lev = MIN(max_lev + 1, LVL_IMMORT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
send_to_char(ch, "Usage: %slevels [<min>-<max> | <range>]%s\r\n\r\n", QYEL, QNRM);
|
send_to_char(ch, "Usage: %slevels [<min>-<max> | <range>]%s\r\n\r\n", QYEL, QNRM);
|
||||||
send_to_char(ch, "Displays exp required for levels.\r\n");
|
send_to_char(ch, "Displays exp required for levels.\r\n");
|
||||||
send_to_char(ch, "%slevels %s- shows all levels (1-%d)\r\n", QCYN, QNRM, (LVL_IMMORT-1));
|
send_to_char(ch, "%slevels %s- shows all levels (1-%d)\r\n", QCYN, QNRM, (LVL_IMMORT-1));
|
||||||
send_to_char(ch, "%slevels 5 %s- shows 5 levels either side of your current level\r\n", QCYN, QNRM);
|
send_to_char(ch, "%slevels 5 %s- shows 5 levels either side of your current level\r\n", QCYN, QNRM);
|
||||||
send_to_char(ch, "%slevels 10-40 %s- shows level 10 to level 40\r\n",QCYN, QNRM);
|
send_to_char(ch, "%slevels 10-40 %s- shows level 10 to level 40\r\n",QCYN, QNRM);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = min_lev; i < max_lev; i++) {
|
for (i = min_lev; i < max_lev; i++) {
|
||||||
nlen = snprintf(buf + len, sizeof(buf) - len, "[%2d] %8d-%-8d : ", (int)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);
|
||||||
|
|
@ -1722,7 +1722,7 @@ ACMD(do_levels)
|
||||||
len += nlen;
|
len += nlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len < sizeof(buf))
|
if (len < sizeof(buf) && max_lev == LVL_IMMORT)
|
||||||
snprintf(buf + len, sizeof(buf) - len, "[%2d] %8d : Immortality\r\n",
|
snprintf(buf + len, sizeof(buf) - len, "[%2d] %8d : Immortality\r\n",
|
||||||
LVL_IMMORT, level_exp(GET_CLASS(ch), LVL_IMMORT));
|
LVL_IMMORT, level_exp(GET_CLASS(ch), LVL_IMMORT));
|
||||||
page_string(ch->desc, buf, TRUE);
|
page_string(ch->desc, buf, TRUE);
|
||||||
|
|
@ -1966,7 +1966,7 @@ ACMD(do_toggle)
|
||||||
" Pagelength: %-3d "
|
" Pagelength: %-3d "
|
||||||
" Screenwidth: %-3d "
|
" Screenwidth: %-3d "
|
||||||
" AFK: %-3s\r\n"
|
" AFK: %-3s\r\n"
|
||||||
|
|
||||||
" Color: %s \r\n ",
|
" Color: %s \r\n ",
|
||||||
|
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_DISPHP)),
|
ONOFF(PRF_FLAGGED(ch, PRF_DISPHP)),
|
||||||
|
|
@ -2000,7 +2000,7 @@ ACMD(do_toggle)
|
||||||
GET_PAGE_LENGTH(ch),
|
GET_PAGE_LENGTH(ch),
|
||||||
GET_SCREEN_WIDTH(ch),
|
GET_SCREEN_WIDTH(ch),
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_AFK)),
|
ONOFF(PRF_FLAGGED(ch, PRF_AFK)),
|
||||||
|
|
||||||
types[COLOR_LEV(ch)]);
|
types[COLOR_LEV(ch)]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2074,9 +2074,9 @@ ACMD(do_toggle)
|
||||||
act("$n is now away from $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
act("$n is now away from $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
||||||
else {
|
else {
|
||||||
act("$n has returned to $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
act("$n has returned to $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
||||||
if (has_mail(GET_IDNUM(ch)))
|
if (has_mail(GET_IDNUM(ch)))
|
||||||
send_to_char(ch, "You have mail waiting.\r\n");
|
send_to_char(ch, "You have mail waiting.\r\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCMD_WIMPY:
|
case SCMD_WIMPY:
|
||||||
if (!*arg2) {
|
if (!*arg2) {
|
||||||
|
|
@ -2196,8 +2196,8 @@ ACMD(do_commands)
|
||||||
vict == ch ? "you" : GET_NAME(vict));
|
vict == ch ? "you" : GET_NAME(vict));
|
||||||
|
|
||||||
/* cmd_num starts at 1, not 0, to remove 'RESERVED' */
|
/* cmd_num starts at 1, not 0, to remove 'RESERVED' */
|
||||||
for (no = 0, cmd_num = 1;
|
for (no = 0, cmd_num = 1;
|
||||||
complete_cmd_info[cmd_sort_info[cmd_num]].command[0] != '\n';
|
complete_cmd_info[cmd_sort_info[cmd_num]].command[0] != '\n';
|
||||||
++cmd_num) {
|
++cmd_num) {
|
||||||
|
|
||||||
i = cmd_sort_info[cmd_num];
|
i = cmd_sort_info[cmd_num];
|
||||||
|
|
@ -2211,7 +2211,7 @@ ACMD(do_commands)
|
||||||
if (!wizhelp && socials != (complete_cmd_info[i].command_pointer == do_action))
|
if (!wizhelp && socials != (complete_cmd_info[i].command_pointer == do_action))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (wizhelp && complete_cmd_info[i].command_pointer == do_action)
|
if (wizhelp && complete_cmd_info[i].command_pointer == do_action)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (--overflow < 0)
|
if (--overflow < 0)
|
||||||
|
|
@ -2227,15 +2227,15 @@ ACMD(do_commands)
|
||||||
|
|
||||||
void free_history(struct char_data *ch, int type)
|
void free_history(struct char_data *ch, int type)
|
||||||
{
|
{
|
||||||
struct txt_block *tmp = GET_HISTORY(ch, type), *ftmp;
|
struct txt_block *tmp = GET_HISTORY(ch, type), *ftmp;
|
||||||
|
|
||||||
while ((ftmp = tmp)) {
|
while ((ftmp = tmp)) {
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
if (ftmp->text)
|
if (ftmp->text)
|
||||||
free(ftmp->text);
|
free(ftmp->text);
|
||||||
free(ftmp);
|
free(ftmp);
|
||||||
}
|
}
|
||||||
GET_HISTORY(ch, type) = NULL;
|
GET_HISTORY(ch, type) = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ACMD(do_history)
|
ACMD(do_history)
|
||||||
|
|
@ -2272,7 +2272,7 @@ ACMD(do_history)
|
||||||
send_to_char(ch, "You have no history in that channel.\r\n");
|
send_to_char(ch, "You have no history in that channel.\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HIST_LENGTH 100
|
#define HIST_LENGTH 100
|
||||||
void add_history(struct char_data *ch, char *str, int type)
|
void add_history(struct char_data *ch, char *str, int type)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
@ -2280,7 +2280,7 @@ void add_history(struct char_data *ch, char *str, int type)
|
||||||
struct txt_block *tmp;
|
struct txt_block *tmp;
|
||||||
time_t ct;
|
time_t ct;
|
||||||
|
|
||||||
if (IS_NPC(ch))
|
if (IS_NPC(ch))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tmp = GET_HISTORY(ch, type);
|
tmp = GET_HISTORY(ch, type);
|
||||||
|
|
@ -2292,8 +2292,8 @@ void add_history(struct char_data *ch, char *str, int type)
|
||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
CREATE(GET_HISTORY(ch, type), struct txt_block, 1);
|
CREATE(GET_HISTORY(ch, type), struct txt_block, 1);
|
||||||
GET_HISTORY(ch, type)->text = strdup(buf);
|
GET_HISTORY(ch, type)->text = strdup(buf);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
while (tmp->next)
|
while (tmp->next)
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
CREATE(tmp->next, struct txt_block, 1);
|
CREATE(tmp->next, struct txt_block, 1);
|
||||||
|
|
@ -2313,3 +2313,90 @@ void add_history(struct char_data *ch, char *str, int type)
|
||||||
if (type != HIST_ALL)
|
if (type != HIST_ALL)
|
||||||
add_history(ch, str, HIST_ALL);
|
add_history(ch, str, HIST_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ACMD(do_whois)
|
||||||
|
{
|
||||||
|
struct char_data *victim = 0;
|
||||||
|
int hours;
|
||||||
|
int got_from_file = 0;
|
||||||
|
char buf[MAX_STRING_LENGTH];
|
||||||
|
|
||||||
|
one_argument(argument, buf);
|
||||||
|
|
||||||
|
if (!*buf) {
|
||||||
|
send_to_char(ch, "Whois who?\r\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(victim=get_player_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
|
||||||
|
{
|
||||||
|
CREATE(victim, struct char_data, 1);
|
||||||
|
clear_char(victim);
|
||||||
|
CREATE(victim->player_specials, struct player_special_data, 1);
|
||||||
|
|
||||||
|
if (load_char(buf, victim) > -1)
|
||||||
|
got_from_file = 1;
|
||||||
|
else {
|
||||||
|
send_to_char (ch, "There is no such player.\r\n");
|
||||||
|
free_char (victim);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We either have our victim from file or he's playing or function has returned. */
|
||||||
|
sprinttype(GET_SEX(victim), genders, buf, sizeof(buf));
|
||||||
|
send_to_char(ch, "Name: %s %s\r\nSex: %s\r\n", GET_NAME(victim),
|
||||||
|
(victim->player.title ? victim->player.title : ""), buf);
|
||||||
|
|
||||||
|
sprinttype (victim->player.chclass, pc_class_types, buf, sizeof(buf));
|
||||||
|
send_to_char(ch, "Class: %s\r\n", buf);
|
||||||
|
|
||||||
|
send_to_char(ch, "Level: %d\r\n", GET_LEVEL(victim));
|
||||||
|
|
||||||
|
if (!(GET_LEVEL(victim) < LVL_IMMORT) || (GET_LEVEL(ch) >= GET_LEVEL(victim)))
|
||||||
|
{
|
||||||
|
strcpy (buf, (char *) asctime(localtime(&(victim->player.time.logon))));
|
||||||
|
buf[10] = '\0';
|
||||||
|
|
||||||
|
hours = (time(0) - victim->player.time.logon) / 3600;
|
||||||
|
|
||||||
|
if (!got_from_file)
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
send_to_char(ch, " (Linkless)\r\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
send_to_char(ch, "\r\n");
|
||||||
|
}
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
send_to_char(ch, "Last Logon: %s (%d days & %d hours ago.)\r\n", buf, hours/24, hours%24);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
send_to_char(ch, "Last Logon: %s (0 hours & %d minutes ago.)\r\n",
|
||||||
|
buf, (int)(time(0) - victim->player.time.logon)/60);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (has_mail(GET_IDNUM(victim)))
|
||||||
|
send_to_char (ch, "They have mail waiting.\r\n");
|
||||||
|
else
|
||||||
|
send_to_char (ch, "They have no mail waiting.\r\n");
|
||||||
|
|
||||||
|
if (PLR_FLAGGED(victim, PLR_DELETED))
|
||||||
|
send_to_char (ch, "***DELETED***\r\n");
|
||||||
|
|
||||||
|
if (got_from_file)
|
||||||
|
free_char (victim);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1367,7 +1367,7 @@ ACMD(do_vstat)
|
||||||
break;
|
break;
|
||||||
case 'z':
|
case 'z':
|
||||||
sprintf(buf2, "zone %d", atoi(buf2));
|
sprintf(buf2, "zone %d", atoi(buf2));
|
||||||
do_show(ch, buf2, 0, 0);
|
do_stat(ch, buf2, 0, 0);
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
sprintf(buf2, "%d", atoi(buf2));
|
sprintf(buf2, "%d", atoi(buf2));
|
||||||
|
|
@ -2353,7 +2353,7 @@ static size_t print_zone_to_buf(char *bufptr, size_t left, zone_rnum zone, int l
|
||||||
size_t tmp;
|
size_t tmp;
|
||||||
|
|
||||||
if (listall) {
|
if (listall) {
|
||||||
int i, j, k, l, m, n;
|
int i, j, k, l, m, n, o;
|
||||||
|
|
||||||
tmp = snprintf(bufptr, left,
|
tmp = snprintf(bufptr, left,
|
||||||
"%3d %-30.30s%s By: %-10.10s%s Age: %3d; Reset: %3d (%1d); Range: %5d-%5d\r\n",
|
"%3d %-30.30s%s By: %-10.10s%s Age: %3d; Reset: %3d (%1d); Range: %5d-%5d\r\n",
|
||||||
|
|
@ -2361,7 +2361,7 @@ static size_t print_zone_to_buf(char *bufptr, size_t left, zone_rnum zone, int l
|
||||||
zone_table[zone].age, zone_table[zone].lifespan,
|
zone_table[zone].age, zone_table[zone].lifespan,
|
||||||
zone_table[zone].reset_mode,
|
zone_table[zone].reset_mode,
|
||||||
zone_table[zone].bot, zone_table[zone].top);
|
zone_table[zone].bot, zone_table[zone].top);
|
||||||
i = j = k = l = m = n = 0;
|
i = j = k = l = m = n = o = 0;
|
||||||
|
|
||||||
for (i = 0; i < top_of_world; i++)
|
for (i = 0; i < top_of_world; i++)
|
||||||
if (world[i].number >= zone_table[zone].bot && world[i].number <= zone_table[zone].top)
|
if (world[i].number >= zone_table[zone].bot && world[i].number <= zone_table[zone].top)
|
||||||
|
|
@ -2383,6 +2383,8 @@ static size_t print_zone_to_buf(char *bufptr, size_t left, zone_rnum zone, int l
|
||||||
if (trig_index[i]->vnum >= zone_table[zone].bot && trig_index[i]->vnum <= zone_table[zone].top)
|
if (trig_index[i]->vnum >= zone_table[zone].bot && trig_index[i]->vnum <= zone_table[zone].top)
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
|
o = count_quests(zone_table[zone].bot, zone_table[zone].top);
|
||||||
|
|
||||||
tmp += snprintf(bufptr + tmp, left - tmp,
|
tmp += snprintf(bufptr + tmp, left - tmp,
|
||||||
" Zone stats:\r\n"
|
" Zone stats:\r\n"
|
||||||
" ---------------\r\n"
|
" ---------------\r\n"
|
||||||
|
|
@ -2390,8 +2392,9 @@ static size_t print_zone_to_buf(char *bufptr, size_t left, zone_rnum zone, int l
|
||||||
" Objects: %2d\r\n"
|
" Objects: %2d\r\n"
|
||||||
" Mobiles: %2d\r\n"
|
" Mobiles: %2d\r\n"
|
||||||
" Shops: %2d\r\n"
|
" Shops: %2d\r\n"
|
||||||
" Triggers: %2d\r\n",
|
" Triggers: %2d\r\n"
|
||||||
j, k, l, m, n);
|
" Quests: %2d\r\n",
|
||||||
|
j, k, l, m, n, o);
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
25
src/cedit.c
25
src/cedit.c
|
|
@ -131,6 +131,7 @@ static void cedit_setup(struct descriptor_data *d)
|
||||||
OLC_CONFIG(d)->operation.use_new_socials = CONFIG_NEW_SOCIALS;
|
OLC_CONFIG(d)->operation.use_new_socials = CONFIG_NEW_SOCIALS;
|
||||||
OLC_CONFIG(d)->operation.auto_save_olc = CONFIG_OLC_SAVE;
|
OLC_CONFIG(d)->operation.auto_save_olc = CONFIG_OLC_SAVE;
|
||||||
OLC_CONFIG(d)->operation.nameserver_is_slow = CONFIG_NS_IS_SLOW;
|
OLC_CONFIG(d)->operation.nameserver_is_slow = CONFIG_NS_IS_SLOW;
|
||||||
|
OLC_CONFIG(d)->operation.medit_advanced = CONFIG_MEDIT_ADVANCED;
|
||||||
|
|
||||||
/* Autowiz */
|
/* Autowiz */
|
||||||
OLC_CONFIG(d)->autowiz.use_autowiz = CONFIG_USE_AUTOWIZ;
|
OLC_CONFIG(d)->autowiz.use_autowiz = CONFIG_USE_AUTOWIZ;
|
||||||
|
|
@ -228,6 +229,7 @@ static void cedit_save_internally(struct descriptor_data *d)
|
||||||
CONFIG_NEW_SOCIALS = OLC_CONFIG(d)->operation.use_new_socials;
|
CONFIG_NEW_SOCIALS = OLC_CONFIG(d)->operation.use_new_socials;
|
||||||
CONFIG_NS_IS_SLOW = OLC_CONFIG(d)->operation.nameserver_is_slow;
|
CONFIG_NS_IS_SLOW = OLC_CONFIG(d)->operation.nameserver_is_slow;
|
||||||
CONFIG_OLC_SAVE = OLC_CONFIG(d)->operation.auto_save_olc;
|
CONFIG_OLC_SAVE = OLC_CONFIG(d)->operation.auto_save_olc;
|
||||||
|
CONFIG_MEDIT_ADVANCED = OLC_CONFIG(d)->operation.medit_advanced;
|
||||||
|
|
||||||
/* Autowiz */
|
/* Autowiz */
|
||||||
CONFIG_USE_AUTOWIZ = OLC_CONFIG(d)->autowiz.use_autowiz;
|
CONFIG_USE_AUTOWIZ = OLC_CONFIG(d)->autowiz.use_autowiz;
|
||||||
|
|
@ -365,10 +367,10 @@ int save_config( IDXTYPE nowhere )
|
||||||
"default_map_size = %d\n\n", CONFIG_MAP_SIZE);
|
"default_map_size = %d\n\n", CONFIG_MAP_SIZE);
|
||||||
fprintf(fl, "* Default minimap size shown to the right of room descriptions\n"
|
fprintf(fl, "* Default minimap size shown to the right of room descriptions\n"
|
||||||
"default_minimap_size = %d\n\n", CONFIG_MINIMAP_SIZE);
|
"default_minimap_size = %d\n\n", CONFIG_MINIMAP_SIZE);
|
||||||
fprintf(fl, "* Do you want scripts to be attachable to players?\n"
|
fprintf(fl, "* Do you want scripts to be attachable to players?\n"
|
||||||
"script_players = %d\n\n", CONFIG_SCRIPT_PLAYERS);
|
"script_players = %d\n\n", CONFIG_SCRIPT_PLAYERS);
|
||||||
|
|
||||||
|
|
||||||
strcpy(buf, CONFIG_OK);
|
strcpy(buf, CONFIG_OK);
|
||||||
strip_cr(buf);
|
strip_cr(buf);
|
||||||
|
|
||||||
|
|
@ -517,6 +519,10 @@ int save_config( IDXTYPE nowhere )
|
||||||
"START_MESSG = \n%s~\n\n", buf);
|
"START_MESSG = \n%s~\n\n", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fprintf(fl, "* Should the medit OLC show the advanced stats menu (1) or not (0).\n"
|
||||||
|
"medit_advanced_stats = %d\n\n",
|
||||||
|
CONFIG_MEDIT_ADVANCED);
|
||||||
|
|
||||||
fprintf(fl, "\n\n\n* [ Autowiz Options ]\n");
|
fprintf(fl, "\n\n\n* [ Autowiz Options ]\n");
|
||||||
|
|
||||||
fprintf(fl, "* Should the game automatically create a new wizlist/immlist every time\n"
|
fprintf(fl, "* Should the game automatically create a new wizlist/immlist every time\n"
|
||||||
|
|
@ -574,7 +580,7 @@ static void cedit_disp_game_play_options(struct descriptor_data *d)
|
||||||
clear_screen(d);
|
clear_screen(d);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
write_to_output(d, "\r\n\r\n"
|
write_to_output(d, "\r\n\r\n"
|
||||||
"%sA%s) Player Killing Allowed : %s%s\r\n"
|
"%sA%s) Player Killing Allowed : %s%s\r\n"
|
||||||
"%sB%s) Player Thieving Allowed : %s%s\r\n"
|
"%sB%s) Player Thieving Allowed : %s%s\r\n"
|
||||||
|
|
@ -709,6 +715,7 @@ static void cedit_disp_operation_options(struct descriptor_data *d)
|
||||||
"%sL%s) Main Menu : \r\n%s%s\r\n"
|
"%sL%s) Main Menu : \r\n%s%s\r\n"
|
||||||
"%sM%s) Welcome Message : \r\n%s%s\r\n"
|
"%sM%s) Welcome Message : \r\n%s%s\r\n"
|
||||||
"%sN%s) Start Message : \r\n%s%s\r\n"
|
"%sN%s) Start Message : \r\n%s%s\r\n"
|
||||||
|
"%sO%s) Medit Stats Menu : %s%s\r\n"
|
||||||
"%sQ%s) Exit To The Main Menu\r\n"
|
"%sQ%s) Exit To The Main Menu\r\n"
|
||||||
"Enter your choice : ",
|
"Enter your choice : ",
|
||||||
grn, nrm, cyn, OLC_CONFIG(d)->operation.DFLT_PORT,
|
grn, nrm, cyn, OLC_CONFIG(d)->operation.DFLT_PORT,
|
||||||
|
|
@ -725,6 +732,7 @@ static void cedit_disp_operation_options(struct descriptor_data *d)
|
||||||
grn, nrm, cyn, OLC_CONFIG(d)->operation.MENU ? OLC_CONFIG(d)->operation.MENU : "<None>",
|
grn, nrm, cyn, OLC_CONFIG(d)->operation.MENU ? OLC_CONFIG(d)->operation.MENU : "<None>",
|
||||||
grn, nrm, cyn, OLC_CONFIG(d)->operation.WELC_MESSG ? OLC_CONFIG(d)->operation.WELC_MESSG : "<None>",
|
grn, nrm, cyn, OLC_CONFIG(d)->operation.WELC_MESSG ? OLC_CONFIG(d)->operation.WELC_MESSG : "<None>",
|
||||||
grn, nrm, cyn, OLC_CONFIG(d)->operation.START_MESSG ? OLC_CONFIG(d)->operation.START_MESSG : "<None>",
|
grn, nrm, cyn, OLC_CONFIG(d)->operation.START_MESSG ? OLC_CONFIG(d)->operation.START_MESSG : "<None>",
|
||||||
|
grn, nrm, cyn, OLC_CONFIG(d)->operation.medit_advanced ? "Advanced" : "Standard",
|
||||||
grn, nrm
|
grn, nrm
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -954,8 +962,8 @@ void cedit_parse(struct descriptor_data *d, char *arg)
|
||||||
write_to_output(d, "Enter default mini-map size (1-12) : ");
|
write_to_output(d, "Enter default mini-map size (1-12) : ");
|
||||||
OLC_MODE(d) = CEDIT_MINIMAP_SIZE;
|
OLC_MODE(d) = CEDIT_MINIMAP_SIZE;
|
||||||
return;
|
return;
|
||||||
case '7':
|
case '7':
|
||||||
TOGGLE_VAR(OLC_CONFIG(d)->play.script_players);
|
TOGGLE_VAR(OLC_CONFIG(d)->play.script_players);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'q':
|
case 'q':
|
||||||
|
|
@ -1183,6 +1191,11 @@ void cedit_parse(struct descriptor_data *d, char *arg)
|
||||||
string_write(d, &OLC_CONFIG(d)->operation.START_MESSG, MAX_INPUT_LENGTH, 0, oldtext);
|
string_write(d, &OLC_CONFIG(d)->operation.START_MESSG, MAX_INPUT_LENGTH, 0, oldtext);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case 'o':
|
||||||
|
case 'O':
|
||||||
|
TOGGLE_VAR(OLC_CONFIG(d)->operation.medit_advanced);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'q':
|
case 'q':
|
||||||
case 'Q':
|
case 'Q':
|
||||||
cedit_disp_menu(d);
|
cedit_disp_menu(d);
|
||||||
|
|
@ -1600,7 +1613,7 @@ void cedit_parse(struct descriptor_data *d, char *arg)
|
||||||
cedit_disp_game_play_options(d);
|
cedit_disp_game_play_options(d);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* We should never get here, but just in case... */
|
default: /* We should never get here, but just in case... */
|
||||||
cleanup_olc(d, CLEANUP_CONFIG);
|
cleanup_olc(d, CLEANUP_CONFIG);
|
||||||
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: cedit_parse(): Reached default case!");
|
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: cedit_parse(): Reached default case!");
|
||||||
|
|
|
||||||
99
src/config.c
99
src/config.c
|
|
@ -28,23 +28,23 @@
|
||||||
* to change one of the constants (assuming you keep your object files around)
|
* to change one of the constants (assuming you keep your object files around)
|
||||||
* is change the constant in this file and type 'make'. Make will recompile
|
* is change the constant in this file and type 'make'. Make will recompile
|
||||||
* this file and relink; you don't have to wait for the whole thing to recompile
|
* this file and relink; you don't have to wait for the whole thing to recompile
|
||||||
* as you do if you change a header file. I realize that it would be slightly
|
* as you do if you change a header file. I realize that it would be slightly
|
||||||
* more efficient to have lots of #defines strewn about, so that, for example,
|
* more efficient to have lots of #defines strewn about, so that, for example,
|
||||||
* the autowiz code isn't compiled at all if you don't want to use autowiz.
|
* the autowiz code isn't compiled at all if you don't want to use autowiz.
|
||||||
* However, the actual code for the various options is quite small, as is the
|
* However, the actual code for the various options is quite small, as is the
|
||||||
* computational time in checking the option you've selected at run-time, so
|
* computational time in checking the option you've selected at run-time, so
|
||||||
* I've decided the convenience of having all your options in this one file
|
* I've decided the convenience of having all your options in this one file
|
||||||
* outweighs the efficency of doing it the other way. */
|
* outweighs the efficency of doing it the other way. */
|
||||||
|
|
||||||
/* YES / NO; TRUE / FALSE are all defined in utils.h */
|
/* YES / NO; TRUE / FALSE are all defined in utils.h */
|
||||||
|
|
||||||
/* Can Scripts be attached to players? */
|
/* Can Scripts be attached to players? */
|
||||||
int script_players = NO;
|
int script_players = NO;
|
||||||
|
|
||||||
/* pk_allowed sets the tone of the entire game. If pk_allowed is set to NO,
|
/* pk_allowed sets the tone of the entire game. If pk_allowed is set to NO,
|
||||||
* then players will not be allowed to kill, summon, charm, or sleep other
|
* then players will not be allowed to kill, summon, charm, or sleep other
|
||||||
* players, as well as a variety of other "asshole player" protections. However,
|
* players, as well as a variety of other "asshole player" protections. However,
|
||||||
* if you decide you want to have an all-out knock-down drag-out PK Mud, just
|
* if you decide you want to have an all-out knock-down drag-out PK Mud, just
|
||||||
* set pk_allowed to YES - and anything goes. */
|
* set pk_allowed to YES - and anything goes. */
|
||||||
int pk_allowed = NO;
|
int pk_allowed = NO;
|
||||||
|
|
||||||
|
|
@ -57,7 +57,7 @@ int level_can_shout = 1;
|
||||||
/* Number of movement points it costs to holler. */
|
/* Number of movement points it costs to holler. */
|
||||||
int holler_move_cost = 20;
|
int holler_move_cost = 20;
|
||||||
|
|
||||||
/* How many people can get into a tunnel? The default is two, but there is
|
/* How many people can get into a tunnel? The default is two, but there is
|
||||||
* also an alternate message in the case of one person being allowed. */
|
* also an alternate message in the case of one person being allowed. */
|
||||||
int tunnel_size = 2;
|
int tunnel_size = 2;
|
||||||
|
|
||||||
|
|
@ -91,18 +91,18 @@ const char *NOPERSON = "No one by that name here.\r\n";
|
||||||
const char *NOEFFECT = "Nothing seems to happen.\r\n";
|
const char *NOEFFECT = "Nothing seems to happen.\r\n";
|
||||||
|
|
||||||
/* You can define or not define TRACK_THOUGH_DOORS, depending on whether or not
|
/* You can define or not define TRACK_THOUGH_DOORS, depending on whether or not
|
||||||
* you want track to find paths which lead through closed or hidden doors. A
|
* you want track to find paths which lead through closed or hidden doors. A
|
||||||
* setting of 'NO' means to not go through the doors while 'YES' will pass
|
* setting of 'NO' means to not go through the doors while 'YES' will pass
|
||||||
* through doors to find the target. */
|
* through doors to find the target. */
|
||||||
int track_through_doors = YES;
|
int track_through_doors = YES;
|
||||||
|
|
||||||
/* If you do not want mortals to level up to immortal once they have enough
|
/* If you do not want mortals to level up to immortal once they have enough
|
||||||
* experience, then set this to YES. Subtracting this from LVL_IMMORT gives
|
* experience, then set this to YES. Subtracting this from LVL_IMMORT gives
|
||||||
* the top level that people can advance to in gain_exp() in limits.c */
|
* the top level that people can advance to in gain_exp() in limits.c */
|
||||||
int no_mort_to_immort = YES;
|
int no_mort_to_immort = YES;
|
||||||
|
|
||||||
/* RENT/CRASHSAVE OPTIONS */
|
/* RENT/CRASHSAVE OPTIONS */
|
||||||
/* Should the MUD allow you to 'rent' for free? (i.e. if you just quit, your
|
/* Should the MUD allow you to 'rent' for free? (i.e. if you just quit, your
|
||||||
* objects are saved at no cost). */
|
* objects are saved at no cost). */
|
||||||
int free_rent = YES;
|
int free_rent = YES;
|
||||||
|
|
||||||
|
|
@ -112,8 +112,8 @@ int max_obj_save = 30;
|
||||||
/* Receptionist's surcharge on top of item costs. */
|
/* Receptionist's surcharge on top of item costs. */
|
||||||
int min_rent_cost = 100;
|
int min_rent_cost = 100;
|
||||||
|
|
||||||
/* Should the game automatically save people? (i.e., save player data every 4
|
/* Should the game automatically save people? (i.e., save player data every 4
|
||||||
* kills (on average), and Crash-save as defined below. If auto_save is YES,
|
* kills (on average), and Crash-save as defined below. If auto_save is YES,
|
||||||
* then the 'save' command will be disabled to prevent item duplication via
|
* then the 'save' command will be disabled to prevent item duplication via
|
||||||
* game crashes. */
|
* game crashes. */
|
||||||
int auto_save = YES;
|
int auto_save = YES;
|
||||||
|
|
@ -132,15 +132,15 @@ int rent_file_timeout = 30;
|
||||||
/* Do you want to automatically wipe players who've been gone too long? */
|
/* Do you want to automatically wipe players who've been gone too long? */
|
||||||
int auto_pwipe = NO;
|
int auto_pwipe = NO;
|
||||||
|
|
||||||
/* Autowipe deletion criteria. This struct holds information used to determine
|
/* Autowipe deletion criteria. This struct holds information used to determine
|
||||||
* which players to wipe when the mud boots. The levels must be in ascending
|
* which players to wipe when the mud boots. The levels must be in ascending
|
||||||
* order, with a descending level marking the end of the array. A level -1
|
* order, with a descending level marking the end of the array. A level -1
|
||||||
* entry in the beginning is the case for players with the PLR_DELETED flag.
|
* entry in the beginning is the case for players with the PLR_DELETED flag.
|
||||||
* The values below match the stock purgeplay.c criteria.
|
* The values below match the stock purgeplay.c criteria.
|
||||||
|
|
||||||
Detailed explanation by array element:
|
Detailed explanation by array element:
|
||||||
* Element 0, level -1, days 0: Players with PLR_DELETED flag are always wiped
|
* Element 0, level -1, days 0: Players with PLR_DELETED flag are always wiped
|
||||||
* Element 1, level 0, days 0: Players at level 0 have created a character,
|
* Element 1, level 0, days 0: Players at level 0 have created a character,
|
||||||
but have never actually entered the game, so always wipe them.
|
but have never actually entered the game, so always wipe them.
|
||||||
* Element 2, level 1, days 4: Players at level 1 are wiped if they haven't
|
* Element 2, level 1, days 4: Players at level 1 are wiped if they haven't
|
||||||
logged on in the past 4 days.
|
logged on in the past 4 days.
|
||||||
|
|
@ -149,7 +149,7 @@ int auto_pwipe = NO;
|
||||||
* Element 4, level 10, days 30: Players level 5-10 get 30 days.
|
* Element 4, level 10, days 30: Players level 5-10 get 30 days.
|
||||||
* Element 5, level LVL_IMMORT - 1, days 60: All other mortals get 60 days.
|
* Element 5, level LVL_IMMORT - 1, days 60: All other mortals get 60 days.
|
||||||
* Element 6, level LVL_IMPL, days 90: Immortals get 90 days.
|
* Element 6, level LVL_IMPL, days 90: Immortals get 90 days.
|
||||||
* Element 7: Because -2 is less than LVL_IMPL, this is assumed to be the end
|
* Element 7: Because -2 is less than LVL_IMPL, this is assumed to be the end
|
||||||
of the criteria. The days entry is not used in this case. */
|
of the criteria. The days entry is not used in this case. */
|
||||||
struct pclean_criteria_data pclean_criteria[] = {
|
struct pclean_criteria_data pclean_criteria[] = {
|
||||||
/* LEVEL DAYS */
|
/* LEVEL DAYS */
|
||||||
|
|
@ -175,7 +175,7 @@ room_vnum immort_start_room = 1204;
|
||||||
/* Virtual number of room that frozen players should enter at. */
|
/* Virtual number of room that frozen players should enter at. */
|
||||||
room_vnum frozen_start_room = 1202;
|
room_vnum frozen_start_room = 1202;
|
||||||
|
|
||||||
/* Virtual numbers of donation rooms. note: you must change code in do_drop of
|
/* Virtual numbers of donation rooms. note: you must change code in do_drop of
|
||||||
* act.item.c if you change the number of non-NOWHERE donation rooms. */
|
* act.item.c if you change the number of non-NOWHERE donation rooms. */
|
||||||
room_vnum donation_room_1 = 3063;
|
room_vnum donation_room_1 = 3063;
|
||||||
room_vnum donation_room_2 = 5510;
|
room_vnum donation_room_2 = 5510;
|
||||||
|
|
@ -187,23 +187,23 @@ room_vnum donation_room_3 = 235;
|
||||||
* exit with a warning when encountering stock world files. */
|
* exit with a warning when encountering stock world files. */
|
||||||
int bitwarning = FALSE;
|
int bitwarning = FALSE;
|
||||||
|
|
||||||
/* If you want to look at normal world files but DO NOT want to save to 128bit
|
/* If you want to look at normal world files but DO NOT want to save to 128bit
|
||||||
* format, turn this to false. However, do not save through olc, or your
|
* format, turn this to false. However, do not save through olc, or your
|
||||||
* world files will be 128bit anyway. */
|
* world files will be 128bit anyway. */
|
||||||
int bitsavetodisk = TRUE;
|
int bitsavetodisk = TRUE;
|
||||||
|
|
||||||
/* This is the default port on which the game should run if no port is given on
|
/* This is the default port on which the game should run if no port is given on
|
||||||
* the command-line. NOTE WELL: If you're using the 'autorun' script, the port
|
* the command-line. NOTE WELL: If you're using the 'autorun' script, the port
|
||||||
* number there will override this setting. Change the PORT= line in autorun
|
* number there will override this setting. Change the PORT= line in autorun
|
||||||
* instead of (or in addition to) changing this. */
|
* instead of (or in addition to) changing this. */
|
||||||
ush_int DFLT_PORT = 4000;
|
ush_int DFLT_PORT = 4000;
|
||||||
|
|
||||||
/* IP address to which the MUD should bind. This is only useful if you're
|
/* IP address to which the MUD should bind. This is only useful if you're
|
||||||
* running Circle on a host that host more than one IP interface, and you only
|
* running Circle on a host that host more than one IP interface, and you only
|
||||||
* want to bind to *one* of them instead of all of them. Setting this to NULL
|
* want to bind to *one* of them instead of all of them. Setting this to NULL
|
||||||
* (the default) causes Circle to bind to all interfaces on the host.
|
* (the default) causes Circle to bind to all interfaces on the host.
|
||||||
* Otherwise, specify a numeric IP address in dotted quad format, and Circle
|
* Otherwise, specify a numeric IP address in dotted quad format, and Circle
|
||||||
* will only bind to that IP address. (Of course, that IP address must be one
|
* will only bind to that IP address. (Of course, that IP address must be one
|
||||||
* of your host's interfaces, or it won't work.) */
|
* of your host's interfaces, or it won't work.) */
|
||||||
const char *DFLT_IP = NULL; /* bind to all interfaces */
|
const char *DFLT_IP = NULL; /* bind to all interfaces */
|
||||||
/* const char *DFLT_IP = "192.168.1.1"; -- bind only to one interface */
|
/* const char *DFLT_IP = "192.168.1.1"; -- bind only to one interface */
|
||||||
|
|
@ -211,9 +211,9 @@ const char *DFLT_IP = NULL; /* bind to all interfaces */
|
||||||
/* Default directory to use as data directory. */
|
/* Default directory to use as data directory. */
|
||||||
const char *DFLT_DIR = "lib";
|
const char *DFLT_DIR = "lib";
|
||||||
|
|
||||||
/* What file to log messages to (ex: "log/syslog"). Setting this to NULL means
|
/* What file to log messages to (ex: "log/syslog"). Setting this to NULL means
|
||||||
* you want to log to stderr, which was the default in earlier versions of
|
* you want to log to stderr, which was the default in earlier versions of
|
||||||
* Circle. If you specify a file, you don't get messages to the screen. (Hint:
|
* Circle. If you specify a file, you don't get messages to the screen. (Hint:
|
||||||
* Try 'tail -f' if you have a UNIX machine.) */
|
* Try 'tail -f' if you have a UNIX machine.) */
|
||||||
const char *LOGNAME = NULL;
|
const char *LOGNAME = NULL;
|
||||||
/* const char *LOGNAME = "log/syslog"; -- useful for Windows users */
|
/* const char *LOGNAME = "log/syslog"; -- useful for Windows users */
|
||||||
|
|
@ -237,23 +237,23 @@ int max_bad_pws = 3;
|
||||||
* rather than what is currently done? */
|
* rather than what is currently done? */
|
||||||
int siteok_everyone = TRUE;
|
int siteok_everyone = TRUE;
|
||||||
|
|
||||||
/* Some nameservers are very slow and cause the game to lag terribly every time
|
/* Some nameservers are very slow and cause the game to lag terribly every time
|
||||||
* someone logs in. The lag is caused by the gethostbyaddr() function which is
|
* someone logs in. The lag is caused by the gethostbyaddr() function which is
|
||||||
* responsible for resolving numeric IP addresses to alphabetic names.
|
* responsible for resolving numeric IP addresses to alphabetic names.
|
||||||
* Sometimes, nameservers can be so slow that the incredible lag caused by
|
* Sometimes, nameservers can be so slow that the incredible lag caused by
|
||||||
* gethostbyaddr() isn't worth the luxury of having names instead of numbers
|
* gethostbyaddr() isn't worth the luxury of having names instead of numbers
|
||||||
* for players' sitenames. If your nameserver is fast, set the variable below
|
* for players' sitenames. If your nameserver is fast, set the variable below
|
||||||
* to NO. If your nameserver is slow, of it you would simply prefer to have
|
* to NO. If your nameserver is slow, of it you would simply prefer to have
|
||||||
* numbers instead of names for some other reason, set the variable to YES.
|
* numbers instead of names for some other reason, set the variable to YES.
|
||||||
* You can experiment with the setting of nameserver_is_slow on-line using the
|
* You can experiment with the setting of nameserver_is_slow on-line using the
|
||||||
* SLOWNS command from within the MUD. */
|
* SLOWNS command from within the MUD. */
|
||||||
int nameserver_is_slow = NO;
|
int nameserver_is_slow = NO;
|
||||||
|
|
||||||
/* Will changes save automaticaly in OLC? */
|
/* Will changes save automaticaly in OLC? */
|
||||||
int auto_save_olc = YES;
|
int auto_save_olc = YES;
|
||||||
|
|
||||||
/* if you wish to enable Aedit, set this to YES. This will make the mud look
|
/* if you wish to enable Aedit, set this to YES. This will make the mud look
|
||||||
* for a file called socials.new, which is in a different format than the
|
* for a file called socials.new, which is in a different format than the
|
||||||
* stock socials file. */
|
* stock socials file. */
|
||||||
int use_new_socials = YES;
|
int use_new_socials = YES;
|
||||||
|
|
||||||
|
|
@ -280,8 +280,8 @@ const char *START_MESSG =
|
||||||
"meeting people from around the world!\r\n";
|
"meeting people from around the world!\r\n";
|
||||||
|
|
||||||
/* AUTOWIZ OPTIONS */
|
/* AUTOWIZ OPTIONS */
|
||||||
/* Should the game automatically create a new wizlist/immlist every time someone
|
/* Should the game automatically create a new wizlist/immlist every time someone
|
||||||
* immorts, or is promoted to a higher (or lower) god level? NOTE: this only
|
* immorts, or is promoted to a higher (or lower) god level? NOTE: this only
|
||||||
* works under UNIX systems. */
|
* works under UNIX systems. */
|
||||||
int use_autowiz = YES;
|
int use_autowiz = YES;
|
||||||
|
|
||||||
|
|
@ -299,3 +299,6 @@ int display_closed_doors = YES;
|
||||||
int map_option = MAP_IMM_ONLY;
|
int map_option = MAP_IMM_ONLY;
|
||||||
int default_map_size = 6;
|
int default_map_size = 6;
|
||||||
int default_minimap_size = 2;
|
int default_minimap_size = 2;
|
||||||
|
|
||||||
|
/* Medit Stats menu - show 'advanced' options? */
|
||||||
|
int medit_advanced_stats = YES;
|
||||||
|
|
|
||||||
16
src/config.h
16
src/config.h
|
|
@ -1,13 +1,13 @@
|
||||||
/**
|
/**
|
||||||
* @file comm.h
|
* @file comm.h
|
||||||
* Configuration of various aspects of tbaMUD operation.
|
* Configuration of various aspects of tbaMUD operation.
|
||||||
*
|
*
|
||||||
* Part of the core tbaMUD source code distribution, which is a derivative
|
* Part of the core tbaMUD source code distribution, which is a derivative
|
||||||
* of, and continuation of, CircleMUD.
|
* of, and continuation of, CircleMUD.
|
||||||
*
|
*
|
||||||
* All rights reserved. See license for complete information.
|
* All rights reserved. See license for complete information.
|
||||||
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
|
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
|
||||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
|
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifndef _CONFIG_H_
|
#ifndef _CONFIG_H_
|
||||||
|
|
@ -71,8 +71,10 @@ extern int display_closed_doors;
|
||||||
extern int map_option;
|
extern int map_option;
|
||||||
extern int default_map_size;
|
extern int default_map_size;
|
||||||
extern int default_minimap_size;
|
extern int default_minimap_size;
|
||||||
/*
|
|
||||||
* Variables not controlled by cedit
|
extern int medit_advanced_stats;
|
||||||
|
/*
|
||||||
|
* Variables not controlled by cedit
|
||||||
*/
|
*/
|
||||||
/* Game operation settings. */
|
/* Game operation settings. */
|
||||||
extern int bitwarning;
|
extern int bitwarning;
|
||||||
|
|
|
||||||
224
src/db.c
224
src/db.c
|
|
@ -108,7 +108,7 @@ struct help_index_element *help_table = NULL;
|
||||||
struct social_messg *soc_mess_list = NULL; /* list of socials */
|
struct social_messg *soc_mess_list = NULL; /* list of socials */
|
||||||
int top_of_socialt = -1; /* number of socials */
|
int top_of_socialt = -1; /* number of socials */
|
||||||
|
|
||||||
time_t newsmod; /* Time news file was last modified. */
|
time_t newsmod; /* Time news file was last modified. */
|
||||||
time_t motdmod; /* Time motd file was last modified. */
|
time_t motdmod; /* Time motd file was last modified. */
|
||||||
|
|
||||||
struct time_info_data time_info; /* the infomation about the time */
|
struct time_info_data time_info; /* the infomation about the time */
|
||||||
|
|
@ -156,7 +156,7 @@ char *fread_action(FILE *fl, int nr)
|
||||||
buf1 = fgets(buf, MAX_STRING_LENGTH, fl);
|
buf1 = fgets(buf, MAX_STRING_LENGTH, fl);
|
||||||
if (feof(fl)) {
|
if (feof(fl)) {
|
||||||
log("SYSERR: fread_action: unexpected EOF near action #%d", nr);
|
log("SYSERR: fread_action: unexpected EOF near action #%d", nr);
|
||||||
/* SYSERR_DESC: fread_action() will fail if it discovers an end of file
|
/* SYSERR_DESC: fread_action() will fail if it discovers an end of file
|
||||||
* marker before it is able to read in the expected string. This can be
|
* marker before it is able to read in the expected string. This can be
|
||||||
* caused by a truncated socials file. */
|
* caused by a truncated socials file. */
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
@ -179,7 +179,7 @@ void boot_social_messages(void)
|
||||||
if (!(fl = fopen(SOCMESS_FILE_NEW, "r"))) {
|
if (!(fl = fopen(SOCMESS_FILE_NEW, "r"))) {
|
||||||
log("SYSERR: can't open socials file '%s': %s", SOCMESS_FILE_NEW, strerror(errno));
|
log("SYSERR: can't open socials file '%s': %s", SOCMESS_FILE_NEW, strerror(errno));
|
||||||
/* SYSERR_DESC: This error, from boot_social_messages(), occurs when the
|
/* SYSERR_DESC: This error, from boot_social_messages(), occurs when the
|
||||||
* server fails to open the file containing the social messages. The
|
* server fails to open the file containing the social messages. The
|
||||||
* error at the end will indicate the reason why. */
|
* error at the end will indicate the reason why. */
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
@ -195,7 +195,7 @@ void boot_social_messages(void)
|
||||||
if (!(fl = fopen(SOCMESS_FILE, "r"))) {
|
if (!(fl = fopen(SOCMESS_FILE, "r"))) {
|
||||||
log("SYSERR: can't open socials file '%s': %s", SOCMESS_FILE, strerror(errno));
|
log("SYSERR: can't open socials file '%s': %s", SOCMESS_FILE, strerror(errno));
|
||||||
/* SYSERR_DESC: This error, from boot_social_messages(), occurs when the
|
/* SYSERR_DESC: This error, from boot_social_messages(), occurs when the
|
||||||
* server fails to open the file containing the social messages. The
|
* server fails to open the file containing the social messages. The
|
||||||
* error at the end will indicate the reason why. */
|
* error at the end will indicate the reason why. */
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
@ -220,10 +220,10 @@ void boot_social_messages(void)
|
||||||
if (fscanf(fl, " %s %d %d %d %d \n",
|
if (fscanf(fl, " %s %d %d %d %d \n",
|
||||||
sorted, &hide, &min_char_pos, &min_pos, &min_lvl) != 5) {
|
sorted, &hide, &min_char_pos, &min_pos, &min_lvl) != 5) {
|
||||||
log("SYSERR: format error in social file near social '%s'", next_soc);
|
log("SYSERR: format error in social file near social '%s'", next_soc);
|
||||||
/* SYSERR_DESC: From boot_social_messages(), this error is output when
|
/* SYSERR_DESC: From boot_social_messages(), this error is output when
|
||||||
* the server is expecting to find the remainder of the first line of the
|
* the server is expecting to find the remainder of the first line of the
|
||||||
* social ('hide' and 'minimum position'). These must follow the name of
|
* social ('hide' and 'minimum position'). These must follow the name of
|
||||||
* the social with a single space such as: 'accuse 0 5\n'. This error
|
* the social with a single space such as: 'accuse 0 5\n'. This error
|
||||||
* often occurs when one of the numbers is missing or the social name has
|
* often occurs when one of the numbers is missing or the social name has
|
||||||
* a space in it (i.e., 'bend over'). */
|
* a space in it (i.e., 'bend over'). */
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
@ -241,7 +241,7 @@ void boot_social_messages(void)
|
||||||
/* SYSERR_DESC: From boot_social_messages(), this error is output when the
|
/* SYSERR_DESC: From boot_social_messages(), this error is output when the
|
||||||
* server is expecting to find the remainder of the first line of the
|
* server is expecting to find the remainder of the first line of the
|
||||||
* social ('hide' and 'minimum position'). These must follow the name of
|
* social ('hide' and 'minimum position'). These must follow the name of
|
||||||
* the social with a single space such as: 'accuse 0 5\n'. This error
|
* the social with a single space such as: 'accuse 0 5\n'. This error
|
||||||
* often occurs when one of the numbers is missing or the social name has
|
* often occurs when one of the numbers is missing or the social name has
|
||||||
* a space in it (i.e., 'bend over'). */
|
* a space in it (i.e., 'bend over'). */
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
@ -318,8 +318,8 @@ void free_text_files(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Too bad it doesn't check the return values to let the user know about -1
|
/* Too bad it doesn't check the return values to let the user know about -1
|
||||||
* values. This will result in an 'Okay.' to a 'reload' command even when the
|
* values. This will result in an 'Okay.' to a 'reload' command even when the
|
||||||
* string was not replaced. To fix later. */
|
* string was not replaced. To fix later. */
|
||||||
ACMD(do_reboot)
|
ACMD(do_reboot)
|
||||||
{
|
{
|
||||||
|
|
@ -442,15 +442,15 @@ void boot_world(void)
|
||||||
log("Saving 128bit world files to disk.");
|
log("Saving 128bit world files to disk.");
|
||||||
save_all();
|
save_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!no_specials) {
|
if (!no_specials) {
|
||||||
log("Loading shops.");
|
log("Loading shops.");
|
||||||
index_boot(DB_BOOT_SHP);
|
index_boot(DB_BOOT_SHP);
|
||||||
}
|
}
|
||||||
|
|
||||||
log("Loading quests.");
|
log("Loading quests.");
|
||||||
index_boot(DB_BOOT_QST);
|
index_boot(DB_BOOT_QST);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_extra_descriptions(struct extra_descr_data *edesc)
|
static void free_extra_descriptions(struct extra_descr_data *edesc)
|
||||||
|
|
@ -562,7 +562,7 @@ void destroy_db(void)
|
||||||
|
|
||||||
/* Quests */
|
/* Quests */
|
||||||
destroy_quests();
|
destroy_quests();
|
||||||
|
|
||||||
/* Zones */
|
/* Zones */
|
||||||
#define THIS_CMD zone_table[cnt].cmd[itr]
|
#define THIS_CMD zone_table[cnt].cmd[itr]
|
||||||
|
|
||||||
|
|
@ -813,7 +813,7 @@ void save_mud_time(struct time_info_data *when)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Thanks to Andrey (andrey@alex-ua.com) for this bit of code, although I did
|
/* Thanks to Andrey (andrey@alex-ua.com) for this bit of code, although I did
|
||||||
* add the 'goto' and changed some "while()" into "do { } while()". -gg */
|
* add the 'goto' and changed some "while()" into "do { } while()". -gg */
|
||||||
static int count_alias_records(FILE *fl)
|
static int count_alias_records(FILE *fl)
|
||||||
{
|
{
|
||||||
|
|
@ -1148,7 +1148,7 @@ void parse_room(FILE *fl, int virtual_nr)
|
||||||
{
|
{
|
||||||
static int room_nr = 0, zone = 0;
|
static int room_nr = 0, zone = 0;
|
||||||
int t[10], i, retval;
|
int t[10], i, retval;
|
||||||
char line[READ_SIZE], flags[128], flags2[128], flags3[128];
|
char line[READ_SIZE], flags[128], flags2[128], flags3[128];
|
||||||
char flags4[128], buf2[MAX_STRING_LENGTH], buf[128];
|
char flags4[128], buf2[MAX_STRING_LENGTH], buf[128];
|
||||||
struct extra_descr_data *new_descr;
|
struct extra_descr_data *new_descr;
|
||||||
char letter;
|
char letter;
|
||||||
|
|
@ -1157,7 +1157,7 @@ void parse_room(FILE *fl, int virtual_nr)
|
||||||
snprintf(buf2, sizeof(buf2), "room #%d", virtual_nr);
|
snprintf(buf2, sizeof(buf2), "room #%d", virtual_nr);
|
||||||
|
|
||||||
if (virtual_nr < zone_table[zone].bot) {
|
if (virtual_nr < zone_table[zone].bot) {
|
||||||
log("SYSERR: Room #%d is below zone %d (bot=%d, top=%d).", virtual_nr, zone_table[zone].number, zone_table[zone].bot, zone_table[zone].top);
|
log("SYSERR: Room #%d is below zone %d (bot=%d, top=%d).", virtual_nr, zone_table[zone].number, zone_table[zone].bot, zone_table[zone].top);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
while (virtual_nr > zone_table[zone].top)
|
while (virtual_nr > zone_table[zone].top)
|
||||||
|
|
@ -1180,7 +1180,7 @@ void parse_room(FILE *fl, int virtual_nr)
|
||||||
log("WARNING: Conventional world files detected. See config.c.");
|
log("WARNING: Conventional world files detected. See config.c.");
|
||||||
exit(1);
|
exit(1);
|
||||||
} else if ((retval == 3) && (bitwarning == FALSE)) {
|
} else if ((retval == 3) && (bitwarning == FALSE)) {
|
||||||
/* Looks like the implementor is ready, so let's load the world files. We
|
/* Looks like the implementor is ready, so let's load the world files. We
|
||||||
* load the extra three flags as 0, since they won't be anything anyway. We
|
* load the extra three flags as 0, since they won't be anything anyway. We
|
||||||
* will save the entire world later on, when every room, mobile, and object
|
* will save the entire world later on, when every room, mobile, and object
|
||||||
* is converted. */
|
* is converted. */
|
||||||
|
|
@ -1190,13 +1190,13 @@ void parse_room(FILE *fl, int virtual_nr)
|
||||||
world[room_nr].room_flags[2] = 0;
|
world[room_nr].room_flags[2] = 0;
|
||||||
world[room_nr].room_flags[3] = 0;
|
world[room_nr].room_flags[3] = 0;
|
||||||
|
|
||||||
/* In the old-style files, the 3rd item was the sector-type */
|
/* In the old-style files, the 3rd item was the sector-type */
|
||||||
world[room_nr].sector_type = atoi(flags2);
|
world[room_nr].sector_type = atoi(flags2);
|
||||||
|
|
||||||
sprintf(flags, "room #%d", virtual_nr); /* sprintf: OK (until 399-bit integers) */
|
sprintf(flags, "room #%d", virtual_nr); /* sprintf: OK (until 399-bit integers) */
|
||||||
|
|
||||||
/* No need to scan the other three sections; they're 0 anyway. */
|
/* No need to scan the other three sections; they're 0 anyway. */
|
||||||
check_bitvector_names(world[room_nr].room_flags[0], room_bits_count, flags, "room");
|
check_bitvector_names(world[room_nr].room_flags[0], room_bits_count, flags, "room");
|
||||||
|
|
||||||
if(bitsavetodisk) { /* Maybe the implementor just wants to look at the 128bit files */
|
if(bitsavetodisk) { /* Maybe the implementor just wants to look at the 128bit files */
|
||||||
add_to_save_list(zone_table[real_zone_by_thing(virtual_nr)].number, 3);
|
add_to_save_list(zone_table[real_zone_by_thing(virtual_nr)].number, 3);
|
||||||
|
|
@ -1213,11 +1213,11 @@ void parse_room(FILE *fl, int virtual_nr)
|
||||||
world[room_nr].room_flags[3] = asciiflag_conv(flags4);
|
world[room_nr].room_flags[3] = asciiflag_conv(flags4);
|
||||||
|
|
||||||
sprintf(flags, "object #%d", virtual_nr); /* sprintf: OK (until 399-bit integers) */
|
sprintf(flags, "object #%d", virtual_nr); /* sprintf: OK (until 399-bit integers) */
|
||||||
for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
|
for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
|
||||||
check_bitvector_names(world[room_nr].room_flags[taeller], room_bits_count, flags, "room");
|
check_bitvector_names(world[room_nr].room_flags[taeller], room_bits_count, flags, "room");
|
||||||
|
|
||||||
/* Added Sanity check */
|
/* Added Sanity check */
|
||||||
if (t[2] > NUM_ROOM_SECTORS) t[2] = SECT_INSIDE;
|
if (t[2] > NUM_ROOM_SECTORS) t[2] = SECT_INSIDE;
|
||||||
|
|
||||||
world[room_nr].sector_type = t[2];
|
world[room_nr].sector_type = t[2];
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1250,7 +1250,7 @@ void parse_room(FILE *fl, int virtual_nr)
|
||||||
CREATE(new_descr, struct extra_descr_data, 1);
|
CREATE(new_descr, struct extra_descr_data, 1);
|
||||||
new_descr->keyword = fread_string(fl, buf2);
|
new_descr->keyword = fread_string(fl, buf2);
|
||||||
new_descr->description = fread_string(fl, buf2);
|
new_descr->description = fread_string(fl, buf2);
|
||||||
/* Fix for crashes in the editor when formatting. E-descs are assumed to
|
/* Fix for crashes in the editor when formatting. E-descs are assumed to
|
||||||
* end with a \r\n. -Welcor */
|
* end with a \r\n. -Welcor */
|
||||||
{
|
{
|
||||||
char *end = strchr(new_descr->description, '\0');
|
char *end = strchr(new_descr->description, '\0');
|
||||||
|
|
@ -1352,8 +1352,8 @@ void renum_world(void)
|
||||||
#endif
|
#endif
|
||||||
#define ZCMD zone_table[zone].cmd[cmd_no]
|
#define ZCMD zone_table[zone].cmd[cmd_no]
|
||||||
|
|
||||||
/* Resolve vnums into rnums in the zone reset tables. In English: Once all of
|
/* Resolve vnums into rnums in the zone reset tables. In English: Once all of
|
||||||
* the zone reset tables have been loaded, we resolve the virtual numbers into
|
* the zone reset tables have been loaded, we resolve the virtual numbers into
|
||||||
* real numbers all at once so we don't have to do it repeatedly while the game
|
* real numbers all at once so we don't have to do it repeatedly while the game
|
||||||
* is running. This does make adding any room, mobile, or object a little more
|
* is running. This does make adding any room, mobile, or object a little more
|
||||||
* difficult while the game is running. Assumes NOWHERE == NOBODY == NOTHING.
|
* difficult while the game is running. Assumes NOWHERE == NOBODY == NOTHING.
|
||||||
|
|
@ -1493,15 +1493,15 @@ static void parse_simple_mob(FILE *mob_f, int i, int nr)
|
||||||
GET_WEIGHT(mob_proto + i) = 200;
|
GET_WEIGHT(mob_proto + i) = 200;
|
||||||
GET_HEIGHT(mob_proto + i) = 198;
|
GET_HEIGHT(mob_proto + i) = 198;
|
||||||
|
|
||||||
/* These are now save applies; base save numbers for MOBs are now from the
|
/* These are now save applies; base save numbers for MOBs are now from the
|
||||||
* warrior save table. */
|
* warrior save table. */
|
||||||
for (j = 0; j < NUM_OF_SAVING_THROWS; j++)
|
for (j = 0; j < NUM_OF_SAVING_THROWS; j++)
|
||||||
GET_SAVE(mob_proto + i, j) = 0;
|
GET_SAVE(mob_proto + i, j) = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* interpret_espec is the function that takes espec keywords and values and
|
/* interpret_espec is the function that takes espec keywords and values and
|
||||||
* assigns the correct value to the mob as appropriate. Adding new e-specs is
|
* assigns the correct value to the mob as appropriate. Adding new e-specs is
|
||||||
* absurdly easy -- just add a new CASE statement to this function! No other
|
* absurdly easy -- just add a new CASE statement to this function! No other
|
||||||
* changes need to be made anywhere in the code.
|
* changes need to be made anywhere in the code.
|
||||||
* CASE : Requires a parameter through 'value'.
|
* CASE : Requires a parameter through 'value'.
|
||||||
* BOOL_CASE : Being specified at all is its value. */
|
* BOOL_CASE : Being specified at all is its value. */
|
||||||
|
|
@ -1561,6 +1561,31 @@ static void interpret_espec(const char *keyword, const char *value, int i, int n
|
||||||
mob_proto[i].real_abils.cha = num_arg;
|
mob_proto[i].real_abils.cha = num_arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CASE("SavingPara") {
|
||||||
|
RANGE(0, 100);
|
||||||
|
mob_proto[i].char_specials.saved.apply_saving_throw[SAVING_PARA] = num_arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
CASE("SavingRod") {
|
||||||
|
RANGE(0, 100);
|
||||||
|
mob_proto[i].char_specials.saved.apply_saving_throw[SAVING_ROD] = num_arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
CASE("SavingPetri") {
|
||||||
|
RANGE(0, 100);
|
||||||
|
mob_proto[i].char_specials.saved.apply_saving_throw[SAVING_PETRI] = num_arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
CASE("SavingBreath") {
|
||||||
|
RANGE(0, 100);
|
||||||
|
mob_proto[i].char_specials.saved.apply_saving_throw[SAVING_BREATH] = num_arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
CASE("SavingSpell") {
|
||||||
|
RANGE(0, 100);
|
||||||
|
mob_proto[i].char_specials.saved.apply_saving_throw[SAVING_SPELL] = num_arg;
|
||||||
|
}
|
||||||
|
|
||||||
if (!matched) {
|
if (!matched) {
|
||||||
log("SYSERR: Warning: unrecognized espec keyword %s in mob #%d",
|
log("SYSERR: Warning: unrecognized espec keyword %s in mob #%d",
|
||||||
keyword, nr);
|
keyword, nr);
|
||||||
|
|
@ -1640,7 +1665,7 @@ void parse_mobile(FILE *mob_f, int nr)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((retval = sscanf(line, "%s %s %s %s %s %s %s %s %d %c", f1, f2, f3, f4, f5, f6, f7, f8, t + 2, &letter)) != 10) && (bitwarning == TRUE)) {
|
if (((retval = sscanf(line, "%s %s %s %s %s %s %s %s %d %c", f1, f2, f3, f4, f5, f6, f7, f8, t + 2, &letter)) != 10) && (bitwarning == TRUE)) {
|
||||||
/* Let's make the implementor read some, before converting his world files. */
|
/* Let's make the implementor read some, before converting his world files. */
|
||||||
log("WARNING: Conventional mobile files detected. See config.c.");
|
log("WARNING: Conventional mobile files detected. See config.c.");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
@ -1651,7 +1676,7 @@ void parse_mobile(FILE *mob_f, int nr)
|
||||||
MOB_FLAGS(mob_proto + i)[2] = 0;
|
MOB_FLAGS(mob_proto + i)[2] = 0;
|
||||||
MOB_FLAGS(mob_proto + i)[3] = 0;
|
MOB_FLAGS(mob_proto + i)[3] = 0;
|
||||||
check_bitvector_names(MOB_FLAGS(mob_proto + i)[0], action_bits_count, buf2, "mobile");
|
check_bitvector_names(MOB_FLAGS(mob_proto + i)[0], action_bits_count, buf2, "mobile");
|
||||||
|
|
||||||
AFF_FLAGS(mob_proto + i)[0] = asciiflag_conv_aff(f2);
|
AFF_FLAGS(mob_proto + i)[0] = asciiflag_conv_aff(f2);
|
||||||
AFF_FLAGS(mob_proto + i)[1] = 0;
|
AFF_FLAGS(mob_proto + i)[1] = 0;
|
||||||
AFF_FLAGS(mob_proto + i)[2] = 0;
|
AFF_FLAGS(mob_proto + i)[2] = 0;
|
||||||
|
|
@ -1660,11 +1685,11 @@ void parse_mobile(FILE *mob_f, int nr)
|
||||||
GET_ALIGNMENT(mob_proto + i) = atoi(f3);
|
GET_ALIGNMENT(mob_proto + i) = atoi(f3);
|
||||||
|
|
||||||
/* Make some basic checks. */
|
/* Make some basic checks. */
|
||||||
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_CHARM);
|
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_CHARM);
|
||||||
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_POISON);
|
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_POISON);
|
||||||
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_GROUP);
|
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_GROUP);
|
||||||
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_SLEEP);
|
REMOVE_BIT_AR(AFF_FLAGS(mob_proto + i), AFF_SLEEP);
|
||||||
if (MOB_FLAGGED(mob_proto + i, MOB_AGGRESSIVE) && MOB_FLAGGED(mob_proto + i, MOB_AGGR_GOOD))
|
if (MOB_FLAGGED(mob_proto + i, MOB_AGGRESSIVE) && MOB_FLAGGED(mob_proto + i, MOB_AGGR_GOOD))
|
||||||
REMOVE_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_AGGR_GOOD);
|
REMOVE_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_AGGR_GOOD);
|
||||||
if (MOB_FLAGGED(mob_proto + i, MOB_AGGRESSIVE) && MOB_FLAGGED(mob_proto + i, MOB_AGGR_NEUTRAL))
|
if (MOB_FLAGGED(mob_proto + i, MOB_AGGRESSIVE) && MOB_FLAGGED(mob_proto + i, MOB_AGGR_NEUTRAL))
|
||||||
REMOVE_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_AGGR_NEUTRAL);
|
REMOVE_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_AGGR_NEUTRAL);
|
||||||
|
|
@ -1673,9 +1698,9 @@ void parse_mobile(FILE *mob_f, int nr)
|
||||||
|
|
||||||
check_bitvector_names(AFF_FLAGS(mob_proto + i)[0], affected_bits_count, buf2, "mobile affect");
|
check_bitvector_names(AFF_FLAGS(mob_proto + i)[0], affected_bits_count, buf2, "mobile affect");
|
||||||
|
|
||||||
/* This is necessary, since if we have conventional world files, &letter is
|
/* This is necessary, since if we have conventional world files, &letter is
|
||||||
* loaded into f4 instead of the letter characters. So what we do, is copy
|
* loaded into f4 instead of the letter characters. So what we do, is copy
|
||||||
* f4 into letter. Disadvantage is that &letter cannot be longer then 128
|
* f4 into letter. Disadvantage is that &letter cannot be longer then 128
|
||||||
* characters, but this shouldn't occur anyway. */
|
* characters, but this shouldn't occur anyway. */
|
||||||
letter = *f4;
|
letter = *f4;
|
||||||
|
|
||||||
|
|
@ -1692,17 +1717,17 @@ void parse_mobile(FILE *mob_f, int nr)
|
||||||
MOB_FLAGS(mob_proto + i)[1] = asciiflag_conv(f2);
|
MOB_FLAGS(mob_proto + i)[1] = asciiflag_conv(f2);
|
||||||
MOB_FLAGS(mob_proto + i)[2] = asciiflag_conv(f3);
|
MOB_FLAGS(mob_proto + i)[2] = asciiflag_conv(f3);
|
||||||
MOB_FLAGS(mob_proto + i)[3] = asciiflag_conv(f4);
|
MOB_FLAGS(mob_proto + i)[3] = asciiflag_conv(f4);
|
||||||
for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
|
for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
|
||||||
check_bitvector_names(MOB_FLAGS(mob_proto + i)[taeller], action_bits_count, buf2, "mobile");
|
check_bitvector_names(MOB_FLAGS(mob_proto + i)[taeller], action_bits_count, buf2, "mobile");
|
||||||
|
|
||||||
AFF_FLAGS(mob_proto + i)[0] = asciiflag_conv(f5);
|
AFF_FLAGS(mob_proto + i)[0] = asciiflag_conv(f5);
|
||||||
AFF_FLAGS(mob_proto + i)[1] = asciiflag_conv(f6);
|
AFF_FLAGS(mob_proto + i)[1] = asciiflag_conv(f6);
|
||||||
AFF_FLAGS(mob_proto + i)[2] = asciiflag_conv(f7);
|
AFF_FLAGS(mob_proto + i)[2] = asciiflag_conv(f7);
|
||||||
AFF_FLAGS(mob_proto + i)[3] = asciiflag_conv(f8);
|
AFF_FLAGS(mob_proto + i)[3] = asciiflag_conv(f8);
|
||||||
|
|
||||||
GET_ALIGNMENT(mob_proto + i) = t[2];
|
GET_ALIGNMENT(mob_proto + i) = t[2];
|
||||||
|
|
||||||
for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
|
for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
|
||||||
check_bitvector_names(AFF_FLAGS(mob_proto + i)[taeller], affected_bits_count, buf2, "mobile affect");
|
check_bitvector_names(AFF_FLAGS(mob_proto + i)[taeller], affected_bits_count, buf2, "mobile affect");
|
||||||
} else {
|
} else {
|
||||||
log("SYSERR: Format error after string section of mob #%d\n ...expecting line of form '# # # {S | E}'", nr);
|
log("SYSERR: Format error after string section of mob #%d\n ...expecting line of form '# # # {S | E}'", nr);
|
||||||
|
|
@ -1791,18 +1816,18 @@ char *parse_object(FILE *obj_f, int nr)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((retval = sscanf(line, " %d %s %s %s %s %s %s %s %s %s %s %s %s", t, f1, f2, f3,
|
if (((retval = sscanf(line, " %d %s %s %s %s %s %s %s %s %s %s %s %s", t, f1, f2, f3,
|
||||||
f4, f5, f6, f7, f8, f9, f10, f11, f12)) == 4) && (bitwarning == TRUE)) {
|
f4, f5, f6, f7, f8, f9, f10, f11, f12)) == 4) && (bitwarning == TRUE)) {
|
||||||
/* Let's make the implementor read some, before converting his world files. */
|
/* Let's make the implementor read some, before converting his world files. */
|
||||||
log("WARNING: Conventional object files detected. Please see config.c.");
|
log("WARNING: Conventional object files detected. Please see config.c.");
|
||||||
exit(1);
|
exit(1);
|
||||||
} else if (((retval == 4) || (retval == 3)) && (bitwarning == FALSE)) {
|
} else if (((retval == 4) || (retval == 3)) && (bitwarning == FALSE)) {
|
||||||
|
|
||||||
if (retval == 3)
|
if (retval == 3)
|
||||||
t[3] = 0;
|
t[3] = 0;
|
||||||
else if (retval == 4)
|
else if (retval == 4)
|
||||||
t[3] = asciiflag_conv_aff(f3);
|
t[3] = asciiflag_conv_aff(f3);
|
||||||
|
|
||||||
log("Converting object #%d to 128bits..", nr);
|
log("Converting object #%d to 128bits..", nr);
|
||||||
GET_OBJ_EXTRA(obj_proto + i)[0] = asciiflag_conv(f1);
|
GET_OBJ_EXTRA(obj_proto + i)[0] = asciiflag_conv(f1);
|
||||||
GET_OBJ_EXTRA(obj_proto + i)[1] = 0;
|
GET_OBJ_EXTRA(obj_proto + i)[1] = 0;
|
||||||
|
|
@ -1816,15 +1841,15 @@ char *parse_object(FILE *obj_f, int nr)
|
||||||
GET_OBJ_PERM(obj_proto + i)[1] = 0;
|
GET_OBJ_PERM(obj_proto + i)[1] = 0;
|
||||||
GET_OBJ_PERM(obj_proto + i)[2] = 0;
|
GET_OBJ_PERM(obj_proto + i)[2] = 0;
|
||||||
GET_OBJ_PERM(obj_proto + i)[3] = 0;
|
GET_OBJ_PERM(obj_proto + i)[3] = 0;
|
||||||
|
|
||||||
if(bitsavetodisk) {
|
if(bitsavetodisk) {
|
||||||
add_to_save_list(zone_table[real_zone_by_thing(nr)].number, 1);
|
add_to_save_list(zone_table[real_zone_by_thing(nr)].number, 1);
|
||||||
converting = TRUE;
|
converting = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
log(" done.");
|
log(" done.");
|
||||||
} else if (retval == 13) {
|
} else if (retval == 13) {
|
||||||
|
|
||||||
GET_OBJ_EXTRA(obj_proto + i)[0] = asciiflag_conv(f1);
|
GET_OBJ_EXTRA(obj_proto + i)[0] = asciiflag_conv(f1);
|
||||||
GET_OBJ_EXTRA(obj_proto + i)[1] = asciiflag_conv(f2);
|
GET_OBJ_EXTRA(obj_proto + i)[1] = asciiflag_conv(f2);
|
||||||
GET_OBJ_EXTRA(obj_proto + i)[2] = asciiflag_conv(f3);
|
GET_OBJ_EXTRA(obj_proto + i)[2] = asciiflag_conv(f3);
|
||||||
|
|
@ -1866,11 +1891,11 @@ char *parse_object(FILE *obj_f, int nr)
|
||||||
if ((retval = sscanf(line, "%d %d %d %d %d", t, t + 1, t + 2, t + 3, t + 4)) != 5) {
|
if ((retval = sscanf(line, "%d %d %d %d %d", t, t + 1, t + 2, t + 3, t + 4)) != 5) {
|
||||||
if (retval == 3) {
|
if (retval == 3) {
|
||||||
t[3] = 0;
|
t[3] = 0;
|
||||||
t[4] = 0;
|
t[4] = 0;
|
||||||
} else if (retval == 4)
|
} else if (retval == 4)
|
||||||
t[4] = 0;
|
t[4] = 0;
|
||||||
else {
|
else {
|
||||||
log("SYSERR: Format error in third numeric line (expecting 5 args, got %d), %s", retval, buf2);
|
log("SYSERR: Format error in third numeric line (expecting 5 args, got %d), %s", retval, buf2);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1967,7 +1992,7 @@ static void load_zones(FILE *fl, char *zonename)
|
||||||
get_line(fl, buf);
|
get_line(fl, buf);
|
||||||
|
|
||||||
/* More accurate count. Previous was always 4 or 5 too high. -gg Note that if
|
/* More accurate count. Previous was always 4 or 5 too high. -gg Note that if
|
||||||
* a new zone command is added to reset_zone(), this string will need to be
|
* a new zone command is added to reset_zone(), this string will need to be
|
||||||
* updated to suit. - ae. */
|
* updated to suit. - ae. */
|
||||||
while (get_line(fl, buf))
|
while (get_line(fl, buf))
|
||||||
if ((strchr("MOPGERDTV", buf[0]) && buf[1] == ' ') || (buf[0] == 'S' && buf[1] == '\0'))
|
if ((strchr("MOPGERDTV", buf[0]) && buf[1] == ' ') || (buf[0] == 'S' && buf[1] == '\0'))
|
||||||
|
|
@ -2001,8 +2026,8 @@ static void load_zones(FILE *fl, char *zonename)
|
||||||
|
|
||||||
line_num += get_line(fl, buf);
|
line_num += get_line(fl, buf);
|
||||||
if (sscanf(buf, " %hd %hd %d %d ", &Z.bot, &Z.top, &Z.lifespan, &Z.reset_mode) != 4) {
|
if (sscanf(buf, " %hd %hd %d %d ", &Z.bot, &Z.top, &Z.lifespan, &Z.reset_mode) != 4) {
|
||||||
/* This may be due to the fact that the zone has no builder. So, we just
|
/* This may be due to the fact that the zone has no builder. So, we just
|
||||||
* attempt to fix this by copying the previous 2 last reads into this
|
* attempt to fix this by copying the previous 2 last reads into this
|
||||||
* variable and the last one. */
|
* variable and the last one. */
|
||||||
log("SYSERR: Format error in numeric constant line of %s, attempting to fix.", zname);
|
log("SYSERR: Format error in numeric constant line of %s, attempting to fix.", zname);
|
||||||
if (sscanf(Z.name, " %hd %hd %d %d ", &Z.bot, &Z.top, &Z.lifespan, &Z.reset_mode) != 4) {
|
if (sscanf(Z.name, " %hd %hd %d %d ", &Z.bot, &Z.top, &Z.lifespan, &Z.reset_mode) != 4) {
|
||||||
|
|
@ -2093,7 +2118,7 @@ static void get_one_line(FILE *fl, char *buf)
|
||||||
buf[strlen(buf) - 1] = '\0'; /* take off the trailing \n */
|
buf[strlen(buf) - 1] = '\0'; /* take off the trailing \n */
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_help(struct help_index_element *hentry)
|
void free_help(struct help_index_element *hentry)
|
||||||
{
|
{
|
||||||
if (hentry->keywords)
|
if (hentry->keywords)
|
||||||
free(hentry->keywords);
|
free(hentry->keywords);
|
||||||
|
|
@ -2180,14 +2205,14 @@ void load_help(FILE * fl, char *name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hsort(const void *a, const void *b)
|
static int hsort(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
const struct help_index_element *a1, *b1;
|
const struct help_index_element *a1, *b1;
|
||||||
|
|
||||||
a1 = (const struct help_index_element *) a;
|
a1 = (const struct help_index_element *) a;
|
||||||
b1 = (const struct help_index_element *) b;
|
b1 = (const struct help_index_element *) b;
|
||||||
|
|
||||||
return (str_cmp(a1->keywords, b1->keywords));
|
return (str_cmp(a1->keywords, b1->keywords));
|
||||||
}
|
}
|
||||||
|
|
||||||
int vnum_mobile(char *searchname, struct char_data *ch)
|
int vnum_mobile(char *searchname, struct char_data *ch)
|
||||||
|
|
@ -2357,7 +2382,7 @@ void zone_update(void)
|
||||||
|
|
||||||
/* jelson 10/22/92 */
|
/* jelson 10/22/92 */
|
||||||
if (((++timer * PULSE_ZONE) / PASSES_PER_SEC) >= 60) {
|
if (((++timer * PULSE_ZONE) / PASSES_PER_SEC) >= 60) {
|
||||||
/* one minute has passed NOT accurate unless PULSE_ZONE is a multiple of
|
/* one minute has passed NOT accurate unless PULSE_ZONE is a multiple of
|
||||||
* PASSES_PER_SEC or a factor of 60 */
|
* PASSES_PER_SEC or a factor of 60 */
|
||||||
|
|
||||||
timer = 0;
|
timer = 0;
|
||||||
|
|
@ -2389,7 +2414,7 @@ void zone_update(void)
|
||||||
}
|
}
|
||||||
} /* end - one minute has passed */
|
} /* end - one minute has passed */
|
||||||
|
|
||||||
/* Dequeue zones (if possible) and reset. This code is executed every 10
|
/* Dequeue zones (if possible) and reset. This code is executed every 10
|
||||||
* seconds (i.e. PULSE_ZONE). */
|
* seconds (i.e. PULSE_ZONE). */
|
||||||
for (update_u = reset_q.head; update_u; update_u = update_u->next)
|
for (update_u = reset_q.head; update_u; update_u = update_u->next)
|
||||||
if (zone_table[update_u->zone_to_reset].reset_mode == 2 ||
|
if (zone_table[update_u->zone_to_reset].reset_mode == 2 ||
|
||||||
|
|
@ -2441,7 +2466,7 @@ void reset_zone(zone_rnum zone)
|
||||||
if (ZCMD.if_flag && !last_cmd)
|
if (ZCMD.if_flag && !last_cmd)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* This is the list of actual zone commands. If any new zone commands are
|
/* This is the list of actual zone commands. If any new zone commands are
|
||||||
* added to the game, be certain to update the list of commands in load_zone
|
* added to the game, be certain to update the list of commands in load_zone
|
||||||
* () so that the counting will still be correct. - ae. */
|
* () so that the counting will still be correct. - ae. */
|
||||||
switch (ZCMD.command) {
|
switch (ZCMD.command) {
|
||||||
|
|
@ -2670,7 +2695,7 @@ int is_empty(zone_rnum zone_nr)
|
||||||
continue;
|
continue;
|
||||||
if (world[IN_ROOM(i->character)].zone != zone_nr)
|
if (world[IN_ROOM(i->character)].zone != zone_nr)
|
||||||
continue;
|
continue;
|
||||||
/* If an immortal has nohassle off, he counts as present. Added for testing
|
/* If an immortal has nohassle off, he counts as present. Added for testing
|
||||||
* zone reset triggers -Welcor */
|
* zone reset triggers -Welcor */
|
||||||
if ((!IS_NPC(i->character)) && (GET_LEVEL(i->character) >= LVL_IMMORT) && (PRF_FLAGGED(i->character, PRF_NOHASSLE)))
|
if ((!IS_NPC(i->character)) && (GET_LEVEL(i->character) >= LVL_IMMORT) && (PRF_FLAGGED(i->character, PRF_NOHASSLE)))
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -2775,8 +2800,8 @@ void free_char(struct char_data *ch)
|
||||||
for (i = 0; i < NUM_HIST; i++)
|
for (i = 0; i < NUM_HIST; i++)
|
||||||
if (GET_HISTORY(ch, i))
|
if (GET_HISTORY(ch, i))
|
||||||
free(GET_HISTORY(ch, i));
|
free(GET_HISTORY(ch, i));
|
||||||
|
|
||||||
if (ch->player_specials)
|
if (ch->player_specials)
|
||||||
free(ch->player_specials);
|
free(ch->player_specials);
|
||||||
|
|
||||||
/* free script proto list */
|
/* free script proto list */
|
||||||
|
|
@ -2811,7 +2836,7 @@ void free_char(struct char_data *ch)
|
||||||
if (ch->desc)
|
if (ch->desc)
|
||||||
ch->desc->character = NULL;
|
ch->desc->character = NULL;
|
||||||
|
|
||||||
/* find_char helper, when free_char is called with a blank character struct,
|
/* find_char helper, when free_char is called with a blank character struct,
|
||||||
* ID is set to 0, and has not yet been added to the lookup table. */
|
* ID is set to 0, and has not yet been added to the lookup table. */
|
||||||
if (GET_ID(ch) != 0)
|
if (GET_ID(ch) != 0)
|
||||||
remove_from_lookup_table(GET_ID(ch));
|
remove_from_lookup_table(GET_ID(ch));
|
||||||
|
|
@ -2842,14 +2867,14 @@ void free_obj(struct obj_data *obj)
|
||||||
free(obj);
|
free(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Steps: 1: Read contents of a text file. 2: Make sure no one is using the
|
/* Steps: 1: Read contents of a text file. 2: Make sure no one is using the
|
||||||
* pointer in paging. 3: Allocate space. 4: Point 'buf' to it.
|
* pointer in paging. 3: Allocate space. 4: Point 'buf' to it.
|
||||||
* We don't want to free() the string that someone may be viewing in the pager.
|
* We don't want to free() the string that someone may be viewing in the pager.
|
||||||
* page_string() keeps the internal strdup()'d copy on ->showstr_head and it
|
* page_string() keeps the internal strdup()'d copy on ->showstr_head and it
|
||||||
* won't care if we delete the original. Otherwise, strings are kept on
|
* won't care if we delete the original. Otherwise, strings are kept on
|
||||||
* ->showstr_vector but we'll only match if the pointer is to the string we're
|
* ->showstr_vector but we'll only match if the pointer is to the string we're
|
||||||
* interested in and not a copy. If someone is reading a global copy we're
|
* interested in and not a copy. If someone is reading a global copy we're
|
||||||
* trying to replace, give everybody using it a different copy so as to avoid
|
* trying to replace, give everybody using it a different copy so as to avoid
|
||||||
* special cases. */
|
* special cases. */
|
||||||
static int file_to_string_alloc(const char *name, char **buf)
|
static int file_to_string_alloc(const char *name, char **buf)
|
||||||
{
|
{
|
||||||
|
|
@ -2897,16 +2922,16 @@ static int file_to_string(const char *name, char *buf)
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Grab the date/time the file was last edited */
|
/* Grab the date/time the file was last edited */
|
||||||
if (!strcmp(name, NEWS_FILE))
|
if (!strcmp(name, NEWS_FILE))
|
||||||
{
|
{
|
||||||
fstat(fileno(fl), &statbuf);
|
fstat(fileno(fl), &statbuf);
|
||||||
newsmod = statbuf.st_mtime;
|
newsmod = statbuf.st_mtime;
|
||||||
}
|
}
|
||||||
if (!strcmp(name, MOTD_FILE))
|
if (!strcmp(name, MOTD_FILE))
|
||||||
{
|
{
|
||||||
fstat(fileno(fl), &statbuf);
|
fstat(fileno(fl), &statbuf);
|
||||||
motdmod = statbuf.st_mtime;
|
motdmod = statbuf.st_mtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
@ -2988,7 +3013,7 @@ void clear_object(struct obj_data *obj)
|
||||||
obj->worn_on = NOWHERE;
|
obj->worn_on = NOWHERE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called during character creation after picking character class (and then
|
/* Called during character creation after picking character class (and then
|
||||||
* never again for that character). */
|
* never again for that character). */
|
||||||
void init_char(struct char_data *ch)
|
void init_char(struct char_data *ch)
|
||||||
{
|
{
|
||||||
|
|
@ -3020,16 +3045,16 @@ void init_char(struct char_data *ch)
|
||||||
GET_NUM_QUESTS(ch) = 0;
|
GET_NUM_QUESTS(ch) = 0;
|
||||||
ch->player_specials->saved.completed_quests = NULL;
|
ch->player_specials->saved.completed_quests = NULL;
|
||||||
GET_QUEST(ch) = -1;
|
GET_QUEST(ch) = -1;
|
||||||
|
|
||||||
ch->player.time.birth = time(0);
|
ch->player.time.birth = time(0);
|
||||||
ch->player.time.logon = time(0);
|
ch->player.time.logon = time(0);
|
||||||
ch->player.time.played = 0;
|
ch->player.time.played = 0;
|
||||||
|
|
||||||
GET_AC(ch) = 100;
|
GET_AC(ch) = 100;
|
||||||
|
|
||||||
/* Bias the height and weight of the character depending on what gender
|
/* Bias the height and weight of the character depending on what gender
|
||||||
* they have chosen. While it is possible to have a tall, heavy female it's
|
* they have chosen. While it is possible to have a tall, heavy female it's
|
||||||
* not as likely as a male. Height is in centimeters. Weight is in pounds.
|
* not as likely as a male. Height is in centimeters. Weight is in pounds.
|
||||||
* The only place they're ever printed (in stock code) is SPELL_IDENTIFY. */
|
* The only place they're ever printed (in stock code) is SPELL_IDENTIFY. */
|
||||||
if (GET_SEX(ch) == SEX_MALE) {
|
if (GET_SEX(ch) == SEX_MALE) {
|
||||||
GET_WEIGHT(ch) = rand_number(120, 180);
|
GET_WEIGHT(ch) = rand_number(120, 180);
|
||||||
|
|
@ -3105,10 +3130,10 @@ mob_rnum real_mobile(mob_vnum vnum)
|
||||||
bot = 0;
|
bot = 0;
|
||||||
top = top_of_mobt;
|
top = top_of_mobt;
|
||||||
|
|
||||||
/* quickly reject out-of-range vnums */
|
/* quickly reject out-of-range vnums */
|
||||||
if (mob_index[bot].vnum > vnum || mob_index[top].vnum < vnum)
|
if (mob_index[bot].vnum > vnum || mob_index[top].vnum < vnum)
|
||||||
return (NOBODY);
|
return (NOBODY);
|
||||||
|
|
||||||
/* perform binary search on mob-table */
|
/* perform binary search on mob-table */
|
||||||
while (bot <= top) {
|
while (bot <= top) {
|
||||||
mid = (bot + top) / 2;
|
mid = (bot + top) / 2;
|
||||||
|
|
@ -3131,9 +3156,9 @@ obj_rnum real_object(obj_vnum vnum)
|
||||||
bot = 0;
|
bot = 0;
|
||||||
top = top_of_objt;
|
top = top_of_objt;
|
||||||
|
|
||||||
/* quickly reject out-of-range vnums */
|
/* quickly reject out-of-range vnums */
|
||||||
if (obj_index[bot].vnum > vnum || obj_index[top].vnum < vnum)
|
if (obj_index[bot].vnum > vnum || obj_index[top].vnum < vnum)
|
||||||
return (NOTHING);
|
return (NOTHING);
|
||||||
|
|
||||||
/* perform binary search on obj-table */
|
/* perform binary search on obj-table */
|
||||||
while (bot <= top) {
|
while (bot <= top) {
|
||||||
|
|
@ -3159,7 +3184,7 @@ zone_rnum real_zone(zone_vnum vnum)
|
||||||
|
|
||||||
if (zone_table[bot].number > vnum || zone_table[top].number < vnum)
|
if (zone_table[bot].number > vnum || zone_table[top].number < vnum)
|
||||||
return (NOWHERE);
|
return (NOWHERE);
|
||||||
|
|
||||||
/* perform binary search on zone-table */
|
/* perform binary search on zone-table */
|
||||||
while (bot <= top) {
|
while (bot <= top) {
|
||||||
mid = (bot + top) / 2;
|
mid = (bot + top) / 2;
|
||||||
|
|
@ -3207,7 +3232,7 @@ static int check_object(struct obj_data *obj)
|
||||||
}
|
}
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
case ITEM_FOUNTAIN:
|
case ITEM_FOUNTAIN:
|
||||||
if ((GET_OBJ_VAL(obj,0) > 0) && (GET_OBJ_VAL(obj, 1) > GET_OBJ_VAL(obj, 0)
|
if ((GET_OBJ_VAL(obj,0) > 0) && (GET_OBJ_VAL(obj, 1) > GET_OBJ_VAL(obj, 0)
|
||||||
&& (error = TRUE)))
|
&& (error = TRUE)))
|
||||||
log("SYSERR: Object #%d (%s) contains (%d) more than maximum (%d).",
|
log("SYSERR: Object #%d (%s) contains (%d) more than maximum (%d).",
|
||||||
GET_OBJ_VNUM(obj), obj->short_description,
|
GET_OBJ_VNUM(obj), obj->short_description,
|
||||||
|
|
@ -3245,7 +3270,7 @@ static int check_object(struct obj_data *obj)
|
||||||
case ITEM_FURNITURE:
|
case ITEM_FURNITURE:
|
||||||
if (GET_OBJ_VAL(obj, 1) > GET_OBJ_VAL(obj, 0) && (error = TRUE))
|
if (GET_OBJ_VAL(obj, 1) > GET_OBJ_VAL(obj, 0) && (error = TRUE))
|
||||||
log("SYSERR: Object #%d (%s) contains (%d) more than maximum (%d).",
|
log("SYSERR: Object #%d (%s) contains (%d) more than maximum (%d).",
|
||||||
GET_OBJ_VNUM(obj), obj->short_description, GET_OBJ_VAL(obj, 1),
|
GET_OBJ_VNUM(obj), obj->short_description, GET_OBJ_VAL(obj, 1),
|
||||||
GET_OBJ_VAL(obj, 0));
|
GET_OBJ_VAL(obj, 0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -3261,7 +3286,7 @@ static int check_object_spell_number(struct obj_data *obj, int val)
|
||||||
if (GET_OBJ_VAL(obj, val) == -1 || GET_OBJ_VAL(obj, val) == 0) /* no spell */
|
if (GET_OBJ_VAL(obj, val) == -1 || GET_OBJ_VAL(obj, val) == 0) /* no spell */
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
/* Check for negative spells, spells beyond the top define, and any spell
|
/* Check for negative spells, spells beyond the top define, and any spell
|
||||||
* which is actually a skill. */
|
* which is actually a skill. */
|
||||||
if (GET_OBJ_VAL(obj, val) < 0)
|
if (GET_OBJ_VAL(obj, val) < 0)
|
||||||
error = TRUE;
|
error = TRUE;
|
||||||
|
|
@ -3318,7 +3343,7 @@ static int check_bitvector_names(bitvector_t bits, size_t namecount, const char
|
||||||
|
|
||||||
static void load_default_config( void )
|
static void load_default_config( void )
|
||||||
{
|
{
|
||||||
/* This function is called only once, at boot-time. We assume config_info is
|
/* This function is called only once, at boot-time. We assume config_info is
|
||||||
* empty. -Welcor */
|
* empty. -Welcor */
|
||||||
/* Game play options. */
|
/* Game play options. */
|
||||||
CONFIG_PK_ALLOWED = pk_allowed;
|
CONFIG_PK_ALLOWED = pk_allowed;
|
||||||
|
|
@ -3388,6 +3413,7 @@ static void load_default_config( void )
|
||||||
CONFIG_MENU = strdup(MENU);
|
CONFIG_MENU = strdup(MENU);
|
||||||
CONFIG_WELC_MESSG = strdup(WELC_MESSG);
|
CONFIG_WELC_MESSG = strdup(WELC_MESSG);
|
||||||
CONFIG_START_MESSG = strdup(START_MESSG);
|
CONFIG_START_MESSG = strdup(START_MESSG);
|
||||||
|
CONFIG_MEDIT_ADVANCED = medit_advanced_stats;
|
||||||
|
|
||||||
/* Autowiz options. */
|
/* Autowiz options. */
|
||||||
CONFIG_USE_AUTOWIZ = use_autowiz;
|
CONFIG_USE_AUTOWIZ = use_autowiz;
|
||||||
|
|
@ -3543,6 +3569,8 @@ void load_config( void )
|
||||||
CONFIG_MORTAL_START = num;
|
CONFIG_MORTAL_START = num;
|
||||||
else if (!str_cmp(tag, "map_option"))
|
else if (!str_cmp(tag, "map_option"))
|
||||||
CONFIG_MAP = num;
|
CONFIG_MAP = num;
|
||||||
|
else if (!str_cmp(tag, "medit_advanced_stats"))
|
||||||
|
CONFIG_MEDIT_ADVANCED = num;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'n':
|
case 'n':
|
||||||
|
|
@ -3588,7 +3616,7 @@ void load_config( void )
|
||||||
case 's':
|
case 's':
|
||||||
if (!str_cmp(tag, "siteok_everyone"))
|
if (!str_cmp(tag, "siteok_everyone"))
|
||||||
CONFIG_SITEOK_ALL = num;
|
CONFIG_SITEOK_ALL = num;
|
||||||
else if (!str_cmp(tag, "script_players"))
|
else if (!str_cmp(tag, "script_players"))
|
||||||
CONFIG_SCRIPT_PLAYERS = num;
|
CONFIG_SCRIPT_PLAYERS = num;
|
||||||
else if (!str_cmp(tag, "start_messg")) {
|
else if (!str_cmp(tag, "start_messg")) {
|
||||||
strncpy(buf, "Reading start message in load_config()", sizeof(buf));
|
strncpy(buf, "Reading start message in load_config()", sizeof(buf));
|
||||||
|
|
|
||||||
17
src/genmob.c
17
src/genmob.c
|
|
@ -16,6 +16,7 @@
|
||||||
#include "genmob.h"
|
#include "genmob.h"
|
||||||
#include "genzon.h"
|
#include "genzon.h"
|
||||||
#include "dg_olc.h"
|
#include "dg_olc.h"
|
||||||
|
#include "spells.h"
|
||||||
|
|
||||||
/* local functions */
|
/* local functions */
|
||||||
static void extract_mobile_all(mob_vnum vnum);
|
static void extract_mobile_all(mob_vnum vnum);
|
||||||
|
|
@ -203,7 +204,7 @@ int free_mobile_strings(struct char_data *mob)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free a mobile structure that has been edited. Take care of existing mobiles
|
/* Free a mobile structure that has been edited. Take care of existing mobiles
|
||||||
* and their mob_proto! */
|
* and their mob_proto! */
|
||||||
int free_mobile(struct char_data *mob)
|
int free_mobile(struct char_data *mob)
|
||||||
{
|
{
|
||||||
|
|
@ -302,6 +303,20 @@ int write_mobile_espec(mob_vnum mvnum, struct char_data *mob, FILE *fd)
|
||||||
fprintf(fd, "Int: %d\n", GET_INT(mob));
|
fprintf(fd, "Int: %d\n", GET_INT(mob));
|
||||||
if (GET_WIS(mob) != 11)
|
if (GET_WIS(mob) != 11)
|
||||||
fprintf(fd, "Wis: %d\n", GET_WIS(mob));
|
fprintf(fd, "Wis: %d\n", GET_WIS(mob));
|
||||||
|
if (GET_CON(mob) != 11)
|
||||||
|
fprintf(fd, "Con: %d\n", GET_CON(mob));
|
||||||
|
if (GET_CHA(mob) != 11)
|
||||||
|
fprintf(fd, "Cha: %d\n", GET_CHA(mob));
|
||||||
|
if (GET_SAVE(mob, SAVING_PARA) != 0)
|
||||||
|
fprintf(fd, "SavingPara: %d\n", GET_SAVE(mob, SAVING_PARA));
|
||||||
|
if (GET_SAVE(mob, SAVING_ROD) != 0)
|
||||||
|
fprintf(fd, "SavingRod: %d\n", GET_SAVE(mob, SAVING_ROD));
|
||||||
|
if (GET_SAVE(mob, SAVING_PETRI) != 0)
|
||||||
|
fprintf(fd, "SavingPetri: %d\n", GET_SAVE(mob, SAVING_PETRI));
|
||||||
|
if (GET_SAVE(mob, SAVING_BREATH) != 0)
|
||||||
|
fprintf(fd, "SavingBreath: %d\n", GET_SAVE(mob, SAVING_BREATH));
|
||||||
|
if (GET_SAVE(mob, SAVING_SPELL) != 0)
|
||||||
|
fprintf(fd, "SavingSpell: %d\n", GET_SAVE(mob, SAVING_SPELL));
|
||||||
fputs("E\n", fd);
|
fputs("E\n", fd);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -313,6 +313,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
||||||
{ "wear" , "wea" , POS_RESTING , do_wear , 0, 0 },
|
{ "wear" , "wea" , POS_RESTING , do_wear , 0, 0 },
|
||||||
{ "weather" , "weather" , POS_RESTING , do_weather , 0, 0 },
|
{ "weather" , "weather" , POS_RESTING , do_weather , 0, 0 },
|
||||||
{ "who" , "wh" , POS_DEAD , do_who , 0, 0 },
|
{ "who" , "wh" , POS_DEAD , do_who , 0, 0 },
|
||||||
|
{ "whois" , "whoi" , POS_DEAD , do_whois , 0, 0 },
|
||||||
{ "whoami" , "whoami" , POS_DEAD , do_gen_ps , 0, SCMD_WHOAMI },
|
{ "whoami" , "whoami" , POS_DEAD , do_gen_ps , 0, SCMD_WHOAMI },
|
||||||
{ "where" , "where" , POS_RESTING , do_where , 1, 0 },
|
{ "where" , "where" , POS_RESTING , do_where , 1, 0 },
|
||||||
{ "whisper" , "whisper" , POS_RESTING , do_spec_comm, 0, SCMD_WHISPER },
|
{ "whisper" , "whisper" , POS_RESTING , do_spec_comm, 0, SCMD_WHISPER },
|
||||||
|
|
|
||||||
491
src/medit.c
491
src/medit.c
|
|
@ -50,7 +50,7 @@ ACMD(do_oasis_medit)
|
||||||
/* No building as a mob or while being forced. */
|
/* No building as a mob or while being forced. */
|
||||||
if (IS_NPC(ch) || !ch->desc || STATE(ch->desc) != CON_PLAYING)
|
if (IS_NPC(ch) || !ch->desc || STATE(ch->desc) != CON_PLAYING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Parse any arguments */
|
/* Parse any arguments */
|
||||||
buf3 = two_arguments(argument, buf1, buf2);
|
buf3 = two_arguments(argument, buf1, buf2);
|
||||||
|
|
||||||
|
|
@ -228,6 +228,12 @@ static void init_mobile(struct char_data *mob)
|
||||||
mob->real_abils.dex = mob->real_abils.con = mob->real_abils.cha = 11;
|
mob->real_abils.dex = mob->real_abils.con = mob->real_abils.cha = 11;
|
||||||
mob->aff_abils = mob->real_abils;
|
mob->aff_abils = mob->real_abils;
|
||||||
|
|
||||||
|
GET_SAVE(mob, SAVING_PARA) = 0;
|
||||||
|
GET_SAVE(mob, SAVING_ROD) = 0;
|
||||||
|
GET_SAVE(mob, SAVING_PETRI) = 0;
|
||||||
|
GET_SAVE(mob, SAVING_BREATH) = 0;
|
||||||
|
GET_SAVE(mob, SAVING_SPELL) = 0;
|
||||||
|
|
||||||
SET_BIT_AR(MOB_FLAGS(mob), MOB_ISNPC);
|
SET_BIT_AR(MOB_FLAGS(mob), MOB_ISNPC);
|
||||||
mob->player_specials = &dummy_mob;
|
mob->player_specials = &dummy_mob;
|
||||||
}
|
}
|
||||||
|
|
@ -289,7 +295,7 @@ void medit_save_internally(struct descriptor_data *d)
|
||||||
OLC_ZONE(dsc)->cmd[i].arg1++;
|
OLC_ZONE(dsc)->cmd[i].arg1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Menu functions
|
/* Menu functions
|
||||||
Display positions. (sitting, standing, etc) */
|
Display positions. (sitting, standing, etc) */
|
||||||
static void medit_disp_positions(struct descriptor_data *d)
|
static void medit_disp_positions(struct descriptor_data *d)
|
||||||
{
|
{
|
||||||
|
|
@ -354,7 +360,7 @@ static void medit_disp_aff_flags(struct descriptor_data *d)
|
||||||
|
|
||||||
get_char_colors(d->character);
|
get_char_colors(d->character);
|
||||||
clear_screen(d);
|
clear_screen(d);
|
||||||
|
|
||||||
/* +1 since AFF_FLAGS don't start at 0. */
|
/* +1 since AFF_FLAGS don't start at 0. */
|
||||||
column_list(d->character, 2, affected_bits + 1, NUM_AFF_FLAGS, TRUE);
|
column_list(d->character, 2, affected_bits + 1, NUM_AFF_FLAGS, TRUE);
|
||||||
|
|
||||||
|
|
@ -378,41 +384,25 @@ static void medit_disp_menu(struct descriptor_data *d)
|
||||||
"%s1%s) Sex: %s%-7.7s%s %s2%s) Keywords: %s%s\r\n"
|
"%s1%s) Sex: %s%-7.7s%s %s2%s) Keywords: %s%s\r\n"
|
||||||
"%s3%s) S-Desc: %s%s\r\n"
|
"%s3%s) S-Desc: %s%s\r\n"
|
||||||
"%s4%s) L-Desc:-\r\n%s%s"
|
"%s4%s) L-Desc:-\r\n%s%s"
|
||||||
"%s5%s) D-Desc:-\r\n%s%s"
|
"%s5%s) D-Desc:-\r\n%s%s",
|
||||||
"%s6%s) Level: [%s%4d%s], %s7%s) Alignment: [%s%4d%s]\r\n"
|
|
||||||
"%s8%s) Hitroll: [%s%4d%s], %s9%s) Damroll: [%s%4d%s]\r\n"
|
|
||||||
"%sA%s) NumDamDice: [%s%4d%s], %sB%s) SizeDamDice: [%s%4d%s]\r\n"
|
|
||||||
"%sC%s) Num HP Dice: [%s%4d%s], %sD%s) Size HP Dice: [%s%4d%s], %sE%s) HP Bonus: [%s%5d%s]\r\n"
|
|
||||||
"%sF%s) Armor Class: [%s%4d%s], %sG%s) Exp: [%s%9d%s], %sH%s) Gold: [%s%8d%s]\r\n",
|
|
||||||
|
|
||||||
cyn, OLC_NUM(d), nrm,
|
cyn, OLC_NUM(d), nrm,
|
||||||
grn, nrm, yel, genders[(int)GET_SEX(mob)], nrm,
|
grn, nrm, yel, genders[(int)GET_SEX(mob)], nrm,
|
||||||
grn, nrm, yel, GET_ALIAS(mob),
|
grn, nrm, yel, GET_ALIAS(mob),
|
||||||
grn, nrm, yel, GET_SDESC(mob),
|
grn, nrm, yel, GET_SDESC(mob),
|
||||||
grn, nrm, yel, GET_LDESC(mob),
|
grn, nrm, yel, GET_LDESC(mob),
|
||||||
grn, nrm, yel, GET_DDESC(mob),
|
grn, nrm, yel, GET_DDESC(mob)
|
||||||
grn, nrm, cyn, GET_LEVEL(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_ALIGNMENT(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_HITROLL(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_DAMROLL(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_NDD(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_SDD(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_HIT(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_MANA(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_MOVE(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_AC(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_EXP(mob), nrm,
|
|
||||||
grn, nrm, cyn, GET_GOLD(mob), nrm
|
|
||||||
);
|
);
|
||||||
|
|
||||||
sprintbitarray(MOB_FLAGS(mob), action_bits, AF_ARRAY_MAX, flags);
|
sprintbitarray(MOB_FLAGS(mob), action_bits, AF_ARRAY_MAX, flags);
|
||||||
sprintbitarray(AFF_FLAGS(mob), affected_bits, AF_ARRAY_MAX, flag2);
|
sprintbitarray(AFF_FLAGS(mob), affected_bits, AF_ARRAY_MAX, flag2);
|
||||||
write_to_output(d,
|
write_to_output(d,
|
||||||
"%sI%s) Position : %s%s\r\n"
|
"%s6%s) Position : %s%s\r\n"
|
||||||
"%sJ%s) Default : %s%s\r\n"
|
"%s7%s) Default : %s%s\r\n"
|
||||||
"%sK%s) Attack : %s%s\r\n"
|
"%s8%s) Attack : %s%s\r\n"
|
||||||
"%sL%s) NPC Flags : %s%s\r\n"
|
"%s9%s) Stats Menu...\r\n"
|
||||||
"%sM%s) AFF Flags : %s%s\r\n"
|
"%sA%s) NPC Flags : %s%s\r\n"
|
||||||
|
"%sB%s) AFF Flags : %s%s\r\n"
|
||||||
"%sS%s) Script : %s%s\r\n"
|
"%sS%s) Script : %s%s\r\n"
|
||||||
"%sW%s) Copy mob\r\n"
|
"%sW%s) Copy mob\r\n"
|
||||||
"%sX%s) Delete mob\r\n"
|
"%sX%s) Delete mob\r\n"
|
||||||
|
|
@ -422,6 +412,7 @@ static void medit_disp_menu(struct descriptor_data *d)
|
||||||
grn, nrm, yel, position_types[(int)GET_POS(mob)],
|
grn, nrm, yel, position_types[(int)GET_POS(mob)],
|
||||||
grn, nrm, yel, position_types[(int)GET_DEFAULT_POS(mob)],
|
grn, nrm, yel, position_types[(int)GET_DEFAULT_POS(mob)],
|
||||||
grn, nrm, yel, attack_hit_text[(int)GET_ATTACK(mob)].singular,
|
grn, nrm, yel, attack_hit_text[(int)GET_ATTACK(mob)].singular,
|
||||||
|
grn, nrm,
|
||||||
grn, nrm, cyn, flags,
|
grn, nrm, cyn, flags,
|
||||||
grn, nrm, cyn, flag2,
|
grn, nrm, cyn, flag2,
|
||||||
grn, nrm, cyn, OLC_SCRIPT(d) ?"Set.":"Not Set.",
|
grn, nrm, cyn, OLC_SCRIPT(d) ?"Set.":"Not Set.",
|
||||||
|
|
@ -433,6 +424,71 @@ static void medit_disp_menu(struct descriptor_data *d)
|
||||||
OLC_MODE(d) = MEDIT_MAIN_MENU;
|
OLC_MODE(d) = MEDIT_MAIN_MENU;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Display main menu. */
|
||||||
|
static void medit_disp_stats_menu(struct descriptor_data *d)
|
||||||
|
{
|
||||||
|
struct char_data *mob;
|
||||||
|
char buf[MAX_STRING_LENGTH];
|
||||||
|
|
||||||
|
mob = OLC_MOB(d);
|
||||||
|
get_char_colors(d->character);
|
||||||
|
clear_screen(d);
|
||||||
|
|
||||||
|
/* Color codes have to be used here, for count_color_codes to work */
|
||||||
|
sprintf(buf, "(range @y%d@n to @y%d@n)", GET_HIT(mob) + GET_MOVE(mob), (GET_HIT(mob) * GET_MANA(mob)) + GET_MOVE(mob));
|
||||||
|
|
||||||
|
/* Top section - standard stats */
|
||||||
|
write_to_output(d,
|
||||||
|
"-- Mob Number: %s[%s%d%s]%s\r\n"
|
||||||
|
"(%s1%s) Level: %s[%s%4d%s]%s\r\n"
|
||||||
|
"(%s2%s) %sAuto Set Stats (based on level)%s\r\n\r\n"
|
||||||
|
"Hit Points (xdy+z): Bare Hand Damage (xdy+z): \r\n"
|
||||||
|
"(%s3%s) HP NumDice: %s[%s%5d%s]%s (%s6%s) BHD NumDice: %s[%s%5d%s]%s\r\n"
|
||||||
|
"(%s4%s) HP SizeDice: %s[%s%5d%s]%s (%s7%s) BHD SizeDice: %s[%s%5d%s]%s\r\n"
|
||||||
|
"(%s5%s) HP Addition: %s[%s%5d%s]%s (%s8%s) DamRoll: %s[%s%5d%s]%s\r\n"
|
||||||
|
"%-*s(range %s%d%s to %s%d%s)\r\n\r\n"
|
||||||
|
|
||||||
|
"(%sA%s) Armor Class: %s[%s%4d%s]%s (%sD%s) Hitroll: %s[%s%5d%s]%s\r\n"
|
||||||
|
"(%sB%s) Exp Points: %s[%s%10d%s]%s (%sE%s) Alignment: %s[%s%5d%s]%s\r\n"
|
||||||
|
"(%sC%s) Gold: %s[%s%10d%s]%s\r\n\r\n",
|
||||||
|
cyn, yel, OLC_NUM(d), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_LEVEL(mob), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_HIT(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_NDD(mob), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_MANA(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SDD(mob), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_MOVE(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_DAMROLL(mob), cyn, nrm,
|
||||||
|
|
||||||
|
count_color_chars(buf)+28, buf,
|
||||||
|
yel, GET_NDD(mob) + GET_DAMROLL(mob), nrm,
|
||||||
|
yel, (GET_NDD(mob) * GET_SDD(mob)) + GET_DAMROLL(mob), nrm,
|
||||||
|
|
||||||
|
cyn, nrm, cyn, yel, GET_AC(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_HITROLL(mob), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_EXP(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_ALIGNMENT(mob), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_GOLD(mob), cyn, nrm
|
||||||
|
);
|
||||||
|
|
||||||
|
/* Bottom section - non-standard stats, togglable in cedit */
|
||||||
|
write_to_output(d,
|
||||||
|
"(%sF%s) Str: %s[%s%2d/%3d%s]%s Saving Throws\r\n"
|
||||||
|
"(%sG%s) Int: %s[%s%3d%s]%s (%sL%s) Paralysis %s[%s%3d%s]%s\r\n"
|
||||||
|
"(%sH%s) Wis: %s[%s%3d%s]%s (%sM%s) Rods/Staves %s[%s%3d%s]%s\r\n"
|
||||||
|
"(%sI%s) Dex: %s[%s%3d%s]%s (%sN%s) Petrification %s[%s%3d%s]%s\r\n"
|
||||||
|
"(%sJ%s) Con: %s[%s%3d%s]%s (%sO%s) Breath %s[%s%3d%s]%s\r\n"
|
||||||
|
"(%sK%s) Cha: %s[%s%3d%s]%s (%sP%s) Spells %s[%s%3d%s]%s\r\n\r\n",
|
||||||
|
cyn, nrm, cyn, yel, GET_STR(mob), GET_ADD(mob), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_INT(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_PARA), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_WIS(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_ROD), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_DEX(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_PETRI), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_CON(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_BREATH), cyn, nrm,
|
||||||
|
cyn, nrm, cyn, yel, GET_CHA(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_SPELL), cyn, nrm
|
||||||
|
);
|
||||||
|
|
||||||
|
/* Quit to previous menu option */
|
||||||
|
write_to_output(d, "(%sQ%s) Quit to main menu\r\nEnter choice : ", cyn, nrm);
|
||||||
|
|
||||||
|
OLC_MODE(d) = MEDIT_STATS_MENU;
|
||||||
|
}
|
||||||
|
|
||||||
void medit_parse(struct descriptor_data *d, char *arg)
|
void medit_parse(struct descriptor_data *d, char *arg)
|
||||||
{
|
{
|
||||||
int i = -1;
|
int i = -1;
|
||||||
|
|
@ -467,8 +523,8 @@ void medit_parse(struct descriptor_data *d, char *arg)
|
||||||
return;
|
return;
|
||||||
case 'n':
|
case 'n':
|
||||||
case 'N':
|
case 'N':
|
||||||
/* If not saving, we must free the script_proto list. We do so by
|
/* If not saving, we must free the script_proto list. We do so by
|
||||||
* assigning it to the edited mob and letting free_mobile in
|
* assigning it to the edited mob and letting free_mobile in
|
||||||
* cleanup_olc handle it. */
|
* cleanup_olc handle it. */
|
||||||
OLC_MOB(d)->proto_script = OLC_SCRIPT(d);
|
OLC_MOB(d)->proto_script = OLC_SCRIPT(d);
|
||||||
cleanup_olc(d, CLEANUP_ALL);
|
cleanup_olc(d, CLEANUP_ALL);
|
||||||
|
|
@ -519,83 +575,28 @@ void medit_parse(struct descriptor_data *d, char *arg)
|
||||||
OLC_VAL(d) = 1;
|
OLC_VAL(d) = 1;
|
||||||
return;
|
return;
|
||||||
case '6':
|
case '6':
|
||||||
OLC_MODE(d) = MEDIT_LEVEL;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case '7':
|
|
||||||
OLC_MODE(d) = MEDIT_ALIGNMENT;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case '8':
|
|
||||||
OLC_MODE(d) = MEDIT_HITROLL;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case '9':
|
|
||||||
OLC_MODE(d) = MEDIT_DAMROLL;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'a':
|
|
||||||
case 'A':
|
|
||||||
OLC_MODE(d) = MEDIT_NDD;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'b':
|
|
||||||
case 'B':
|
|
||||||
OLC_MODE(d) = MEDIT_SDD;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
case 'C':
|
|
||||||
OLC_MODE(d) = MEDIT_NUM_HP_DICE;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'd':
|
|
||||||
case 'D':
|
|
||||||
OLC_MODE(d) = MEDIT_SIZE_HP_DICE;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'e':
|
|
||||||
case 'E':
|
|
||||||
OLC_MODE(d) = MEDIT_ADD_HP;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'f':
|
|
||||||
case 'F':
|
|
||||||
OLC_MODE(d) = MEDIT_AC;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'g':
|
|
||||||
case 'G':
|
|
||||||
OLC_MODE(d) = MEDIT_EXP;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'h':
|
|
||||||
case 'H':
|
|
||||||
OLC_MODE(d) = MEDIT_GOLD;
|
|
||||||
i++;
|
|
||||||
break;
|
|
||||||
case 'i':
|
|
||||||
case 'I':
|
|
||||||
OLC_MODE(d) = MEDIT_POS;
|
OLC_MODE(d) = MEDIT_POS;
|
||||||
medit_disp_positions(d);
|
medit_disp_positions(d);
|
||||||
return;
|
return;
|
||||||
case 'j':
|
case '7':
|
||||||
case 'J':
|
|
||||||
OLC_MODE(d) = MEDIT_DEFAULT_POS;
|
OLC_MODE(d) = MEDIT_DEFAULT_POS;
|
||||||
medit_disp_positions(d);
|
medit_disp_positions(d);
|
||||||
return;
|
return;
|
||||||
case 'k':
|
case '8':
|
||||||
case 'K':
|
|
||||||
OLC_MODE(d) = MEDIT_ATTACK;
|
OLC_MODE(d) = MEDIT_ATTACK;
|
||||||
medit_disp_attack_types(d);
|
medit_disp_attack_types(d);
|
||||||
return;
|
return;
|
||||||
case 'l':
|
case '9':
|
||||||
case 'L':
|
OLC_MODE(d) = MEDIT_STATS_MENU;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
case 'a':
|
||||||
|
case 'A':
|
||||||
OLC_MODE(d) = MEDIT_NPC_FLAGS;
|
OLC_MODE(d) = MEDIT_NPC_FLAGS;
|
||||||
medit_disp_mob_flags(d);
|
medit_disp_mob_flags(d);
|
||||||
return;
|
return;
|
||||||
case 'm':
|
case 'b':
|
||||||
case 'M':
|
case 'B':
|
||||||
OLC_MODE(d) = MEDIT_AFF_FLAGS;
|
OLC_MODE(d) = MEDIT_AFF_FLAGS;
|
||||||
medit_disp_aff_flags(d);
|
medit_disp_aff_flags(d);
|
||||||
return;
|
return;
|
||||||
|
|
@ -628,6 +629,139 @@ void medit_parse(struct descriptor_data *d, char *arg)
|
||||||
write_to_output(d, "Oops...\r\n");
|
write_to_output(d, "Oops...\r\n");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case MEDIT_STATS_MENU:
|
||||||
|
i=0;
|
||||||
|
switch(*arg) {
|
||||||
|
case 'q':
|
||||||
|
case 'Q':
|
||||||
|
medit_disp_menu(d);
|
||||||
|
return;
|
||||||
|
case '1': /* Edit level */
|
||||||
|
OLC_MODE(d) = MEDIT_LEVEL;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case '2': /* Autoroll stats */
|
||||||
|
medit_autoroll_stats(d);
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
case '3':
|
||||||
|
OLC_MODE(d) = MEDIT_NUM_HP_DICE;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
OLC_MODE(d) = MEDIT_SIZE_HP_DICE;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
OLC_MODE(d) = MEDIT_ADD_HP;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
OLC_MODE(d) = MEDIT_NDD;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case '7':
|
||||||
|
OLC_MODE(d) = MEDIT_SDD;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case '8':
|
||||||
|
OLC_MODE(d) = MEDIT_DAMROLL;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'a':
|
||||||
|
case 'A':
|
||||||
|
OLC_MODE(d) = MEDIT_AC;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'b':
|
||||||
|
case 'B':
|
||||||
|
OLC_MODE(d) = MEDIT_EXP;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'c':
|
||||||
|
case 'C':
|
||||||
|
OLC_MODE(d) = MEDIT_GOLD;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'd':
|
||||||
|
case 'D':
|
||||||
|
OLC_MODE(d) = MEDIT_HITROLL;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'e':
|
||||||
|
case 'E':
|
||||||
|
OLC_MODE(d) = MEDIT_ALIGNMENT;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
case 'F':
|
||||||
|
OLC_MODE(d) = MEDIT_STR;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'g':
|
||||||
|
case 'G':
|
||||||
|
OLC_MODE(d) = MEDIT_INT;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'h':
|
||||||
|
case 'H':
|
||||||
|
OLC_MODE(d) = MEDIT_WIS;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'i':
|
||||||
|
case 'I':
|
||||||
|
OLC_MODE(d) = MEDIT_DEX;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'j':
|
||||||
|
case 'J':
|
||||||
|
OLC_MODE(d) = MEDIT_CON;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'k':
|
||||||
|
case 'K':
|
||||||
|
OLC_MODE(d) = MEDIT_CHA;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'l':
|
||||||
|
case 'L':
|
||||||
|
OLC_MODE(d) = MEDIT_PARA;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'm':
|
||||||
|
case 'M':
|
||||||
|
OLC_MODE(d) = MEDIT_ROD;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'n':
|
||||||
|
case 'N':
|
||||||
|
OLC_MODE(d) = MEDIT_PETRI;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'o':
|
||||||
|
case 'O':
|
||||||
|
OLC_MODE(d) = MEDIT_BREATH;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
case 'P':
|
||||||
|
OLC_MODE(d) = MEDIT_SPELL;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (i == 0)
|
||||||
|
break;
|
||||||
|
else if (i == 1)
|
||||||
|
write_to_output(d, "\r\nEnter new value : ");
|
||||||
|
else if (i == -1)
|
||||||
|
write_to_output(d, "\r\nEnter new text :\r\n] ");
|
||||||
|
else
|
||||||
|
write_to_output(d, "Oops...\r\n");
|
||||||
|
return;
|
||||||
|
|
||||||
case OLC_SCRIPT_EDIT:
|
case OLC_SCRIPT_EDIT:
|
||||||
if (dg_script_edit_parse(d, arg)) return;
|
if (dg_script_edit_parse(d, arg)) return;
|
||||||
break;
|
break;
|
||||||
|
|
@ -694,47 +828,134 @@ void medit_parse(struct descriptor_data *d, char *arg)
|
||||||
|
|
||||||
case MEDIT_SEX:
|
case MEDIT_SEX:
|
||||||
GET_SEX(OLC_MOB(d)) = LIMIT(i, 0, NUM_GENDERS - 1);
|
GET_SEX(OLC_MOB(d)) = LIMIT(i, 0, NUM_GENDERS - 1);
|
||||||
break;
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_HITROLL:
|
case MEDIT_HITROLL:
|
||||||
GET_HITROLL(OLC_MOB(d)) = LIMIT(i, 0, 50);
|
GET_HITROLL(OLC_MOB(d)) = LIMIT(i, 0, 50);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_DAMROLL:
|
case MEDIT_DAMROLL:
|
||||||
GET_DAMROLL(OLC_MOB(d)) = LIMIT(i, 0, 50);
|
GET_DAMROLL(OLC_MOB(d)) = LIMIT(i, 0, 50);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_NDD:
|
case MEDIT_NDD:
|
||||||
GET_NDD(OLC_MOB(d)) = LIMIT(i, 0, 30);
|
GET_NDD(OLC_MOB(d)) = LIMIT(i, 0, 30);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_SDD:
|
case MEDIT_SDD:
|
||||||
GET_SDD(OLC_MOB(d)) = LIMIT(i, 0, 127);
|
GET_SDD(OLC_MOB(d)) = LIMIT(i, 0, 127);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_NUM_HP_DICE:
|
case MEDIT_NUM_HP_DICE:
|
||||||
GET_HIT(OLC_MOB(d)) = LIMIT(i, 0, 30);
|
GET_HIT(OLC_MOB(d)) = LIMIT(i, 0, 30);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_SIZE_HP_DICE:
|
case MEDIT_SIZE_HP_DICE:
|
||||||
GET_MANA(OLC_MOB(d)) = LIMIT(i, 0, 1000);
|
GET_MANA(OLC_MOB(d)) = LIMIT(i, 0, 1000);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_ADD_HP:
|
case MEDIT_ADD_HP:
|
||||||
GET_MOVE(OLC_MOB(d)) = LIMIT(i, 0, 30000);
|
GET_MOVE(OLC_MOB(d)) = LIMIT(i, 0, 30000);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_AC:
|
case MEDIT_AC:
|
||||||
GET_AC(OLC_MOB(d)) = LIMIT(i, -200, 200);
|
GET_AC(OLC_MOB(d)) = LIMIT(i, -200, 200);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_EXP:
|
case MEDIT_EXP:
|
||||||
GET_EXP(OLC_MOB(d)) = LIMIT(i, 0, MAX_MOB_EXP);
|
GET_EXP(OLC_MOB(d)) = LIMIT(i, 0, MAX_MOB_EXP);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_GOLD:
|
case MEDIT_GOLD:
|
||||||
GET_GOLD(OLC_MOB(d)) = LIMIT(i, 0, MAX_MOB_GOLD);
|
GET_GOLD(OLC_MOB(d)) = LIMIT(i, 0, MAX_MOB_GOLD);
|
||||||
break;
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_STR:
|
||||||
|
GET_STR(OLC_MOB(d)) = LIMIT(i, 11, 25);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_INT:
|
||||||
|
GET_INT(OLC_MOB(d)) = LIMIT(i, 11, 25);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_WIS:
|
||||||
|
GET_WIS(OLC_MOB(d)) = LIMIT(i, 11, 25);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_DEX:
|
||||||
|
GET_DEX(OLC_MOB(d)) = LIMIT(i, 11, 25);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_CON:
|
||||||
|
GET_CON(OLC_MOB(d)) = LIMIT(i, 11, 25);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_CHA:
|
||||||
|
GET_CHA(OLC_MOB(d)) = LIMIT(i, 11, 25);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_PARA:
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_PARA) = LIMIT(i, 0, 100);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_ROD:
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_ROD) = LIMIT(i, 0, 100);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_PETRI:
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_PETRI) = LIMIT(i, 0, 100);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_BREATH:
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_BREATH) = LIMIT(i, 0, 100);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case MEDIT_SPELL:
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_SPELL) = LIMIT(i, 0, 100);
|
||||||
|
OLC_VAL(d) = TRUE;
|
||||||
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
|
|
||||||
case MEDIT_POS:
|
case MEDIT_POS:
|
||||||
GET_POS(OLC_MOB(d)) = LIMIT(i, 0, NUM_POSITIONS - 1);
|
GET_POS(OLC_MOB(d)) = LIMIT(i, 0, NUM_POSITIONS - 1);
|
||||||
|
|
@ -749,22 +970,10 @@ void medit_parse(struct descriptor_data *d, char *arg)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MEDIT_LEVEL:
|
case MEDIT_LEVEL:
|
||||||
GET_LEVEL(OLC_MOB(d)) = LIMIT(i, 1, 34);
|
GET_LEVEL(OLC_MOB(d)) = LIMIT(i, 1, LVL_IMPL);
|
||||||
{
|
OLC_VAL(d) = TRUE;
|
||||||
int mob_lev = GET_LEVEL(OLC_MOB(d));
|
medit_disp_stats_menu(d);
|
||||||
|
return;
|
||||||
GET_MOVE(OLC_MOB(d)) = mob_lev*10; /* hit point bonus */
|
|
||||||
GET_HIT(OLC_MOB(d)) = mob_lev/5; /* number of hitpoint dice */
|
|
||||||
GET_MANA(OLC_MOB(d)) = mob_lev/5; /* size of hitpoint dice */
|
|
||||||
GET_HITROLL(OLC_MOB(d)) = mob_lev/3; /* hitroll 0-10 */
|
|
||||||
GET_DAMROLL(OLC_MOB(d)) = mob_lev/6; /* damroll 0-5 */
|
|
||||||
GET_AC(OLC_MOB(d)) = (100-(mob_lev*6)); /* AC 94 to -80 */
|
|
||||||
GET_NDD(OLC_MOB(d)) = MAX(1, mob_lev/6); /* number damage dice 1-5 */
|
|
||||||
GET_SDD(OLC_MOB(d)) = MAX(2, mob_lev/6); /* size of damage dice 2-5 */
|
|
||||||
GET_EXP(OLC_MOB(d)) = (mob_lev*mob_lev*100);
|
|
||||||
GET_GOLD(OLC_MOB(d)) = (mob_lev*10);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MEDIT_ALIGNMENT:
|
case MEDIT_ALIGNMENT:
|
||||||
GET_ALIGNMENT(OLC_MOB(d)) = LIMIT(i, -1000, 1000);
|
GET_ALIGNMENT(OLC_MOB(d)) = LIMIT(i, -1000, 1000);
|
||||||
|
|
@ -776,10 +985,10 @@ void medit_parse(struct descriptor_data *d, char *arg)
|
||||||
} else
|
} else
|
||||||
write_to_output(d, "That mob does not exist.\r\n");
|
write_to_output(d, "That mob does not exist.\r\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MEDIT_DELETE:
|
case MEDIT_DELETE:
|
||||||
if (*arg == 'y' || *arg == 'Y') {
|
if (*arg == 'y' || *arg == 'Y') {
|
||||||
if (delete_mobile(GET_MOB_RNUM(OLC_MOB(d))) != NOBODY)
|
if (delete_mobile(GET_MOB_RNUM(OLC_MOB(d))) != NOBODY)
|
||||||
write_to_output(d, "Mobile deleted.\r\n");
|
write_to_output(d, "Mobile deleted.\r\n");
|
||||||
else
|
else
|
||||||
write_to_output(d, "Couldn't delete the mobile!\r\n");
|
write_to_output(d, "Couldn't delete the mobile!\r\n");
|
||||||
|
|
@ -793,7 +1002,7 @@ void medit_parse(struct descriptor_data *d, char *arg)
|
||||||
} else
|
} else
|
||||||
write_to_output(d, "Please answer 'Y' or 'N': ");
|
write_to_output(d, "Please answer 'Y' or 'N': ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* We should never get here. */
|
/* We should never get here. */
|
||||||
cleanup_olc(d, CLEANUP_ALL);
|
cleanup_olc(d, CLEANUP_ALL);
|
||||||
|
|
@ -819,3 +1028,37 @@ void medit_string_cleanup(struct descriptor_data *d, int terminator)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void medit_autoroll_stats(struct descriptor_data *d)
|
||||||
|
{
|
||||||
|
int mob_lev;
|
||||||
|
|
||||||
|
mob_lev = GET_LEVEL(OLC_MOB(d));
|
||||||
|
mob_lev = GET_LEVEL(OLC_MOB(d)) = LIMIT(mob_lev, 1, LVL_IMPL);
|
||||||
|
|
||||||
|
GET_MOVE(OLC_MOB(d)) = mob_lev*10; /* hit point bonus */
|
||||||
|
GET_HIT(OLC_MOB(d)) = mob_lev/5; /* number of hitpoint dice */
|
||||||
|
GET_MANA(OLC_MOB(d)) = mob_lev/5; /* size of hitpoint dice */
|
||||||
|
|
||||||
|
GET_NDD(OLC_MOB(d)) = MAX(1, mob_lev/6); /* number damage dice 1-5 */
|
||||||
|
GET_SDD(OLC_MOB(d)) = MAX(2, mob_lev/6); /* size of damage dice 2-5 */
|
||||||
|
GET_DAMROLL(OLC_MOB(d)) = mob_lev/6; /* damroll (dam bonus) 0-5 */
|
||||||
|
|
||||||
|
GET_HITROLL(OLC_MOB(d)) = mob_lev/3; /* hitroll 0-10 */
|
||||||
|
GET_EXP(OLC_MOB(d)) = (mob_lev*mob_lev*100);
|
||||||
|
GET_GOLD(OLC_MOB(d)) = (mob_lev*10);
|
||||||
|
GET_AC(OLC_MOB(d)) = (100-(mob_lev*6)); /* AC 94 to -80 */
|
||||||
|
|
||||||
|
GET_STR(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18); /* 2/3 level in range 11 to 18 */
|
||||||
|
GET_INT(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18);
|
||||||
|
GET_WIS(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18);
|
||||||
|
GET_DEX(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18);
|
||||||
|
GET_CON(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18);
|
||||||
|
GET_CHA(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18);
|
||||||
|
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_PARA) = mob_lev / 4; /* All Saving throws */
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_ROD) = mob_lev / 4; /* set to a quarter */
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_PETRI) = mob_lev / 4; /* of the mobs level */
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_BREATH) = mob_lev / 4;
|
||||||
|
GET_SAVE(OLC_MOB(d), SAVING_SPELL) = mob_lev / 4;
|
||||||
|
}
|
||||||
|
|
|
||||||
37
src/oasis.h
37
src/oasis.h
|
|
@ -1,10 +1,10 @@
|
||||||
/**
|
/**
|
||||||
* @file oasis.h
|
* @file oasis.h
|
||||||
* Oasis online creation general defines.
|
* Oasis online creation general defines.
|
||||||
*
|
*
|
||||||
* Part of the core tbaMUD source code distribution, which is a derivative
|
* Part of the core tbaMUD source code distribution, which is a derivative
|
||||||
* of, and continuation of, CircleMUD.
|
* of, and continuation of, CircleMUD.
|
||||||
*
|
*
|
||||||
* This source code, which was not part of the CircleMUD legacy code,
|
* This source code, which was not part of the CircleMUD legacy code,
|
||||||
* is attributed to:
|
* is attributed to:
|
||||||
* By Levork. Copyright 1996 by Harvey Gilpin, 1997-2001 by George Greer.
|
* By Levork. Copyright 1996 by Harvey Gilpin, 1997-2001 by George Greer.
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
#define MAX_OBJ_TIMER 1071000
|
#define MAX_OBJ_TIMER 1071000
|
||||||
|
|
||||||
|
|
||||||
/* this defines how much memory is alloacted for 'bit strings' when saving in
|
/* this defines how much memory is alloacted for 'bit strings' when saving in
|
||||||
* OLC. Remember to change it if you go for longer bitvectors. */
|
* OLC. Remember to change it if you go for longer bitvectors. */
|
||||||
#define BIT_STRING_LENGTH 33
|
#define BIT_STRING_LENGTH 33
|
||||||
|
|
||||||
|
|
@ -230,14 +230,15 @@ extern const char *nrm, *grn, *cyn, *yel;
|
||||||
#define ZEDIT_SARG2 21
|
#define ZEDIT_SARG2 21
|
||||||
|
|
||||||
/* Submodes of MEDIT connectedness. */
|
/* Submodes of MEDIT connectedness. */
|
||||||
#define MEDIT_MAIN_MENU 0
|
#define MEDIT_MAIN_MENU 0
|
||||||
#define MEDIT_KEYWORD 1
|
#define MEDIT_KEYWORD 1
|
||||||
#define MEDIT_S_DESC 2
|
#define MEDIT_S_DESC 2
|
||||||
#define MEDIT_L_DESC 3
|
#define MEDIT_L_DESC 3
|
||||||
#define MEDIT_D_DESC 4
|
#define MEDIT_D_DESC 4
|
||||||
#define MEDIT_NPC_FLAGS 5
|
#define MEDIT_NPC_FLAGS 5
|
||||||
#define MEDIT_AFF_FLAGS 6
|
#define MEDIT_AFF_FLAGS 6
|
||||||
#define MEDIT_CONFIRM_SAVESTRING 7
|
#define MEDIT_CONFIRM_SAVESTRING 7
|
||||||
|
#define MEDIT_STATS_MENU 8
|
||||||
|
|
||||||
/* Numerical responses. */
|
/* Numerical responses. */
|
||||||
#define MEDIT_NUMERICAL_RESPONSE 10
|
#define MEDIT_NUMERICAL_RESPONSE 10
|
||||||
|
|
@ -259,6 +260,17 @@ extern const char *nrm, *grn, *cyn, *yel;
|
||||||
#define MEDIT_ALIGNMENT 26
|
#define MEDIT_ALIGNMENT 26
|
||||||
#define MEDIT_DELETE 27
|
#define MEDIT_DELETE 27
|
||||||
#define MEDIT_COPY 28
|
#define MEDIT_COPY 28
|
||||||
|
#define MEDIT_STR 29
|
||||||
|
#define MEDIT_INT 30
|
||||||
|
#define MEDIT_WIS 31
|
||||||
|
#define MEDIT_DEX 32
|
||||||
|
#define MEDIT_CON 33
|
||||||
|
#define MEDIT_CHA 34
|
||||||
|
#define MEDIT_PARA 35
|
||||||
|
#define MEDIT_ROD 36
|
||||||
|
#define MEDIT_PETRI 37
|
||||||
|
#define MEDIT_BREATH 38
|
||||||
|
#define MEDIT_SPELL 39
|
||||||
|
|
||||||
/* Submodes of SEDIT connectedness. */
|
/* Submodes of SEDIT connectedness. */
|
||||||
#define SEDIT_MAIN_MENU 0
|
#define SEDIT_MAIN_MENU 0
|
||||||
|
|
@ -356,7 +368,7 @@ extern const char *nrm, *grn, *cyn, *yel;
|
||||||
#define HEDIT_CONFIRM_EDIT 1
|
#define HEDIT_CONFIRM_EDIT 1
|
||||||
#define HEDIT_CONFIRM_ADD 2
|
#define HEDIT_CONFIRM_ADD 2
|
||||||
#define HEDIT_MAIN_MENU 3
|
#define HEDIT_MAIN_MENU 3
|
||||||
#define HEDIT_ENTRY 4
|
#define HEDIT_ENTRY 4
|
||||||
#define HEDIT_KEYWORDS 5
|
#define HEDIT_KEYWORDS 5
|
||||||
#define HEDIT_MIN_LEVEL 6
|
#define HEDIT_MIN_LEVEL 6
|
||||||
|
|
||||||
|
|
@ -373,6 +385,7 @@ void medit_save_internally(struct descriptor_data *d);
|
||||||
void medit_parse(struct descriptor_data *d, char *arg);
|
void medit_parse(struct descriptor_data *d, char *arg);
|
||||||
void medit_string_cleanup(struct descriptor_data *d, int terminator);
|
void medit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||||
ACMD(do_oasis_medit);
|
ACMD(do_oasis_medit);
|
||||||
|
void medit_autoroll_stats(struct descriptor_data *d);
|
||||||
|
|
||||||
/* public functions from oedit.c */
|
/* public functions from oedit.c */
|
||||||
void oedit_setup_existing(struct descriptor_data *d, int rnum);
|
void oedit_setup_existing(struct descriptor_data *d, int rnum);
|
||||||
|
|
|
||||||
|
|
@ -127,13 +127,13 @@ ACMD(do_oasis_list)
|
||||||
|
|
||||||
switch (subcmd) {
|
switch (subcmd) {
|
||||||
case SCMD_OASIS_MLIST:
|
case SCMD_OASIS_MLIST:
|
||||||
|
|
||||||
two_arguments(argument, arg, arg2);
|
two_arguments(argument, arg, arg2);
|
||||||
|
|
||||||
if (is_abbrev(arg, "level") || is_abbrev(arg, "flags")) {
|
if (is_abbrev(arg, "level") || is_abbrev(arg, "flags")) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!*arg2) {
|
if (!*arg2) {
|
||||||
send_to_char(ch, "Which mobile flag or level do you want to list?\r\n");
|
send_to_char(ch, "Which mobile flag or level do you want to list?\r\n");
|
||||||
for (i=0; i<NUM_MOB_FLAGS; i++)
|
for (i=0; i<NUM_MOB_FLAGS; i++)
|
||||||
|
|
@ -147,12 +147,12 @@ ACMD(do_oasis_list)
|
||||||
send_to_char(ch, "Displays mobs with the selected flag, or at the selected level\r\n\r\n");
|
send_to_char(ch, "Displays mobs with the selected flag, or at the selected level\r\n\r\n");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (is_abbrev(arg, "level"))
|
if (is_abbrev(arg, "level"))
|
||||||
perform_mob_level_list(ch, arg2);
|
perform_mob_level_list(ch, arg2);
|
||||||
else
|
else
|
||||||
perform_mob_flag_list(ch, arg2);
|
perform_mob_flag_list(ch, arg2);
|
||||||
} else
|
} else
|
||||||
list_mobiles(ch, rzone, vmin, vmax); break;
|
list_mobiles(ch, rzone, vmin, vmax); break;
|
||||||
case SCMD_OASIS_OLIST: list_objects(ch, rzone, vmin, vmax); break;
|
case SCMD_OASIS_OLIST: list_objects(ch, rzone, vmin, vmax); break;
|
||||||
case SCMD_OASIS_RLIST: list_rooms(ch, rzone, vmin, vmax); break;
|
case SCMD_OASIS_RLIST: list_rooms(ch, rzone, vmin, vmax); break;
|
||||||
|
|
@ -244,9 +244,9 @@ static void list_rooms(struct char_data *ch, zone_rnum rnum, room_vnum vmin, roo
|
||||||
"Index VNum Room Name Exits\r\n"
|
"Index VNum Room Name Exits\r\n"
|
||||||
"----- ------- ---------------------------------------- -----\r\n");
|
"----- ------- ---------------------------------------- -----\r\n");
|
||||||
|
|
||||||
if (!top_of_world)
|
if (!top_of_world)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i <= top_of_world; i++) {
|
for (i = 0; i <= top_of_world; i++) {
|
||||||
|
|
||||||
/** Check to see if this room is one of the ones needed to be listed. **/
|
/** Check to see if this room is one of the ones needed to be listed. **/
|
||||||
|
|
@ -297,9 +297,9 @@ static void list_mobiles(struct char_data *ch, zone_rnum rnum, mob_vnum vmin, mo
|
||||||
"Index VNum Mobile Name Level\r\n"
|
"Index VNum Mobile Name Level\r\n"
|
||||||
"----- ------- --------------------------------------------- -----\r\n");
|
"----- ------- --------------------------------------------- -----\r\n");
|
||||||
|
|
||||||
if (!top_of_mobt)
|
if (!top_of_mobt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i <= top_of_mobt; i++) {
|
for (i = 0; i <= top_of_mobt; i++) {
|
||||||
if (mob_index[i].vnum >= bottom && mob_index[i].vnum <= top) {
|
if (mob_index[i].vnum >= bottom && mob_index[i].vnum <= top) {
|
||||||
counter++;
|
counter++;
|
||||||
|
|
@ -336,9 +336,9 @@ static void list_objects(struct char_data *ch, zone_rnum rnum, room_vnum vmin, r
|
||||||
"Index VNum Object Name Object Type\r\n"
|
"Index VNum Object Name Object Type\r\n"
|
||||||
"----- ------- -------------------------------------------- ----------------\r\n");
|
"----- ------- -------------------------------------------- ----------------\r\n");
|
||||||
|
|
||||||
if (!top_of_objt)
|
if (!top_of_objt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i <= top_of_objt; i++) {
|
for (i = 0; i <= top_of_objt; i++) {
|
||||||
if (obj_index[i].vnum >= bottom && obj_index[i].vnum <= top) {
|
if (obj_index[i].vnum >= bottom && obj_index[i].vnum <= top) {
|
||||||
counter++;
|
counter++;
|
||||||
|
|
@ -421,9 +421,9 @@ static void list_zones(struct char_data *ch, zone_rnum rnum, zone_vnum vmin, zon
|
||||||
"VNum Zone Name Builder(s)\r\n"
|
"VNum Zone Name Builder(s)\r\n"
|
||||||
"----- ------------------------------ --------------------------------------\r\n");
|
"----- ------------------------------ --------------------------------------\r\n");
|
||||||
|
|
||||||
if (!top_of_zone_table)
|
if (!top_of_zone_table)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i <= top_of_zone_table; i++) {
|
for (i = 0; i <= top_of_zone_table; i++) {
|
||||||
if (zone_table[i].number >= bottom && zone_table[i].number <= top) {
|
if (zone_table[i].number >= bottom && zone_table[i].number <= top) {
|
||||||
send_to_char(ch, "[%s%3d%s] %s%-*s %s%-1s%s\r\n",
|
send_to_char(ch, "[%s%3d%s] %s%-*s %s%-1s%s\r\n",
|
||||||
|
|
@ -441,7 +441,7 @@ static void list_zones(struct char_data *ch, zone_rnum rnum, zone_vnum vmin, zon
|
||||||
void print_zone(struct char_data *ch, zone_vnum vnum)
|
void print_zone(struct char_data *ch, zone_vnum vnum)
|
||||||
{
|
{
|
||||||
zone_rnum rnum;
|
zone_rnum rnum;
|
||||||
int size_rooms, size_objects, size_mobiles, size_quests, i;
|
int size_rooms, size_objects, size_mobiles, size_quests, size_shops, size_trigs, i;
|
||||||
room_vnum top, bottom;
|
room_vnum top, bottom;
|
||||||
int largest_table;
|
int largest_table;
|
||||||
|
|
||||||
|
|
@ -462,6 +462,8 @@ void print_zone(struct char_data *ch, zone_vnum vnum)
|
||||||
size_rooms = 0;
|
size_rooms = 0;
|
||||||
size_objects = 0;
|
size_objects = 0;
|
||||||
size_mobiles = 0;
|
size_mobiles = 0;
|
||||||
|
size_shops = 0;
|
||||||
|
size_trigs = 0;
|
||||||
size_quests = 0;
|
size_quests = 0;
|
||||||
top = zone_table[rnum].top;
|
top = zone_table[rnum].top;
|
||||||
bottom = zone_table[rnum].bot;
|
bottom = zone_table[rnum].bot;
|
||||||
|
|
@ -479,8 +481,16 @@ void print_zone(struct char_data *ch, zone_vnum vnum)
|
||||||
if (mob_index[i].vnum >= bottom && mob_index[i].vnum <= top)
|
if (mob_index[i].vnum >= bottom && mob_index[i].vnum <= top)
|
||||||
size_mobiles++;
|
size_mobiles++;
|
||||||
}
|
}
|
||||||
|
for (i = 0; i<= top_shop; i++)
|
||||||
|
if (SHOP_NUM(i) >= bottom && SHOP_NUM(i) <= top)
|
||||||
|
size_shops++;
|
||||||
|
|
||||||
|
for (i = 0; i < top_of_trigt; i++)
|
||||||
|
if (trig_index[i]->vnum >= bottom && trig_index[i]->vnum <= top)
|
||||||
|
size_trigs++;
|
||||||
|
|
||||||
size_quests = count_quests(bottom, top);
|
size_quests = count_quests(bottom, top);
|
||||||
|
|
||||||
/* Display all of the zone information at once. */
|
/* Display all of the zone information at once. */
|
||||||
send_to_char(ch,
|
send_to_char(ch,
|
||||||
"%sVirtual Number = %s%d\r\n"
|
"%sVirtual Number = %s%d\r\n"
|
||||||
|
|
@ -495,6 +505,8 @@ void print_zone(struct char_data *ch, zone_vnum vnum)
|
||||||
"%s Rooms = %s%d\r\n"
|
"%s Rooms = %s%d\r\n"
|
||||||
"%s Objects = %s%d\r\n"
|
"%s Objects = %s%d\r\n"
|
||||||
"%s Mobiles = %s%d\r\n"
|
"%s Mobiles = %s%d\r\n"
|
||||||
|
"%s Shops = %s%d\r\n"
|
||||||
|
"%s Triggers = %s%d\r\n"
|
||||||
"%s Quests = %s%d%s\r\n",
|
"%s Quests = %s%d%s\r\n",
|
||||||
QGRN, QCYN, zone_table[rnum].number,
|
QGRN, QCYN, zone_table[rnum].number,
|
||||||
QGRN, QCYN, zone_table[rnum].name,
|
QGRN, QCYN, zone_table[rnum].name,
|
||||||
|
|
@ -509,6 +521,8 @@ void print_zone(struct char_data *ch, zone_vnum vnum)
|
||||||
QGRN, QCYN, size_rooms,
|
QGRN, QCYN, size_rooms,
|
||||||
QGRN, QCYN, size_objects,
|
QGRN, QCYN, size_objects,
|
||||||
QGRN, QCYN, size_mobiles,
|
QGRN, QCYN, size_mobiles,
|
||||||
|
QGRN, QCYN, size_shops,
|
||||||
|
QGRN, QCYN, size_trigs,
|
||||||
QGRN, QCYN, size_quests, QNRM);
|
QGRN, QCYN, size_quests, QNRM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -556,10 +570,10 @@ static void list_triggers(struct char_data *ch, zone_rnum rnum, trig_vnum vmin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (counter == 0) {
|
if (counter == 0) {
|
||||||
if (rnum == NOWHERE)
|
if (rnum == NOWHERE)
|
||||||
send_to_char(ch, "No triggers found from %d to %d\r\n", vmin, vmax);
|
send_to_char(ch, "No triggers found from %d to %d\r\n", vmin, vmax);
|
||||||
else
|
else
|
||||||
send_to_char(ch, "No triggers found for zone #%d\r\n", zone_table[rnum].number);
|
send_to_char(ch, "No triggers found for zone #%d\r\n", zone_table[rnum].number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
119
src/structs.h
119
src/structs.h
|
|
@ -1,36 +1,36 @@
|
||||||
/**
|
/**
|
||||||
* @file structs.h
|
* @file structs.h
|
||||||
* Core structures used within the core mud code.
|
* Core structures used within the core mud code.
|
||||||
*
|
*
|
||||||
* Part of the core tbaMUD source code distribution, which is a derivative
|
* Part of the core tbaMUD source code distribution, which is a derivative
|
||||||
* of, and continuation of, CircleMUD.
|
* of, and continuation of, CircleMUD.
|
||||||
*
|
*
|
||||||
* All rights reserved. See license for complete information.
|
* All rights reserved. See license for complete information.
|
||||||
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
|
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
|
||||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
|
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
|
||||||
*/
|
*/
|
||||||
#ifndef _STRUCTS_H_
|
#ifndef _STRUCTS_H_
|
||||||
#define _STRUCTS_H_
|
#define _STRUCTS_H_
|
||||||
|
|
||||||
/** Intended use of this macro is to allow external packages to work with a
|
/** Intended use of this macro is to allow external packages to work with a
|
||||||
* variety of versions without modifications. For instance, an IS_CORPSE()
|
* variety of versions without modifications. For instance, an IS_CORPSE()
|
||||||
* macro was introduced in pl13. Any future code add-ons could take into
|
* macro was introduced in pl13. Any future code add-ons could take into
|
||||||
* account the version and supply their own definition for the macro if used
|
* account the version and supply their own definition for the macro if used
|
||||||
* on an older version. You are supposed to compare this with the macro
|
* on an older version. You are supposed to compare this with the macro
|
||||||
* TBAMUD_VERSION() in utils.h.
|
* TBAMUD_VERSION() in utils.h.
|
||||||
* It is read as Major/Minor/Patchlevel - MMmmPP */
|
* It is read as Major/Minor/Patchlevel - MMmmPP */
|
||||||
#define _TBAMUD 0x030580
|
#define _TBAMUD 0x030580
|
||||||
|
|
||||||
/** If you want equipment to be automatically equipped to the same place
|
/** If you want equipment to be automatically equipped to the same place
|
||||||
* it was when players rented, set the define below to 1 because
|
* it was when players rented, set the define below to 1 because
|
||||||
* TRUE/FALSE aren't defined yet. */
|
* TRUE/FALSE aren't defined yet. */
|
||||||
#define USE_AUTOEQ 1
|
#define USE_AUTOEQ 1
|
||||||
|
|
||||||
/* preamble */
|
/* preamble */
|
||||||
/** As of bpl20, it should be safe to use unsigned data types for the various
|
/** As of bpl20, it should be safe to use unsigned data types for the various
|
||||||
* virtual and real number data types. There really isn't a reason to use
|
* virtual and real number data types. There really isn't a reason to use
|
||||||
* signed anymore so use the unsigned types and get 65,535 objects instead of
|
* signed anymore so use the unsigned types and get 65,535 objects instead of
|
||||||
* 32,768. NOTE: This will likely be unconditionally unsigned later.
|
* 32,768. NOTE: This will likely be unconditionally unsigned later.
|
||||||
* 0 = use signed indexes; 1 = use unsigned indexes */
|
* 0 = use signed indexes; 1 = use unsigned indexes */
|
||||||
#define CIRCLE_UNSIGNED_INDEX 1
|
#define CIRCLE_UNSIGNED_INDEX 1
|
||||||
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
# define NOWHERE ((IDXTYPE)-1) /**< nil reference for rooms */
|
# define NOWHERE ((IDXTYPE)-1) /**< nil reference for rooms */
|
||||||
# define NOTHING ((IDXTYPE)-1) /**< nil reference for objects */
|
# define NOTHING ((IDXTYPE)-1) /**< nil reference for objects */
|
||||||
# define NOBODY ((IDXTYPE)-1) /**< nil reference for mobiles */
|
# define NOBODY ((IDXTYPE)-1) /**< nil reference for mobiles */
|
||||||
# define NOFLAG ((IDXTYPE)-1) /**< nil reference for flags */
|
# define NOFLAG ((IDXTYPE)-1) /**< nil reference for flags */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Function macro for the mob, obj and room special functions */
|
/** Function macro for the mob, obj and room special functions */
|
||||||
|
|
@ -64,10 +64,10 @@
|
||||||
#define WEST 3 /**< The direction west */
|
#define WEST 3 /**< The direction west */
|
||||||
#define UP 4 /**< The direction up */
|
#define UP 4 /**< The direction up */
|
||||||
#define DOWN 5 /**< The direction down */
|
#define DOWN 5 /**< The direction down */
|
||||||
/** Total number of directions available to move in. BEFORE CHANGING THIS, make
|
/** Total number of directions available to move in. BEFORE CHANGING THIS, make
|
||||||
* sure you change every other direction and movement based item that this will
|
* sure you change every other direction and movement based item that this will
|
||||||
* impact. */
|
* impact. */
|
||||||
#define NUM_OF_DIRS 6
|
#define NUM_OF_DIRS 6
|
||||||
|
|
||||||
/* Room flags: used in room_data.room_flags */
|
/* Room flags: used in room_data.room_flags */
|
||||||
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
||||||
|
|
@ -135,7 +135,7 @@
|
||||||
#define CLASS_THIEF 2 /**< PC Class Thief */
|
#define CLASS_THIEF 2 /**< PC Class Thief */
|
||||||
#define CLASS_WARRIOR 3 /**< PC Class Warrior */
|
#define CLASS_WARRIOR 3 /**< PC Class Warrior */
|
||||||
/** Total number of available PC Classes */
|
/** Total number of available PC Classes */
|
||||||
#define NUM_CLASSES 4
|
#define NUM_CLASSES 4
|
||||||
|
|
||||||
/* NPC classes (currently unused - feel free to implement!) */
|
/* NPC classes (currently unused - feel free to implement!) */
|
||||||
#define CLASS_OTHER 0 /**< NPC Class Other (or undefined) */
|
#define CLASS_OTHER 0 /**< NPC Class Other (or undefined) */
|
||||||
|
|
@ -241,7 +241,7 @@
|
||||||
#define PRF_AUTOASSIST 30 /**< Auto-assist toggle */
|
#define PRF_AUTOASSIST 30 /**< Auto-assist toggle */
|
||||||
#define PRF_AUTOMAP 31 /**< Show map at the side of room descs */
|
#define PRF_AUTOMAP 31 /**< Show map at the side of room descs */
|
||||||
/** Total number of available PRF flags */
|
/** Total number of available PRF flags */
|
||||||
#define NUM_PRF_FLAGS 32
|
#define NUM_PRF_FLAGS 32
|
||||||
|
|
||||||
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
||||||
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
||||||
|
|
@ -326,7 +326,7 @@
|
||||||
#define WEAR_WIELD 16 /**< Equipment Location Weapon */
|
#define WEAR_WIELD 16 /**< Equipment Location Weapon */
|
||||||
#define WEAR_HOLD 17 /**< Equipment Location held in offhand */
|
#define WEAR_HOLD 17 /**< Equipment Location held in offhand */
|
||||||
/** Total number of available equipment lcoations */
|
/** Total number of available equipment lcoations */
|
||||||
#define NUM_WEARS 18
|
#define NUM_WEARS 18
|
||||||
|
|
||||||
/* object-related defines */
|
/* object-related defines */
|
||||||
/* Item types: used by obj_data.obj_flags.type_flag */
|
/* Item types: used by obj_data.obj_flags.type_flag */
|
||||||
|
|
@ -469,7 +469,7 @@
|
||||||
#define SUN_SET 3 /**< Dusk */
|
#define SUN_SET 3 /**< Dusk */
|
||||||
|
|
||||||
/* Sky conditions for weather_data */
|
/* Sky conditions for weather_data */
|
||||||
#define SKY_CLOUDLESS 0 /**< Weather = No clouds */
|
#define SKY_CLOUDLESS 0 /**< Weather = No clouds */
|
||||||
#define SKY_CLOUDY 1 /**< Weather = Cloudy */
|
#define SKY_CLOUDY 1 /**< Weather = Cloudy */
|
||||||
#define SKY_RAINING 2 /**< Weather = Rain */
|
#define SKY_RAINING 2 /**< Weather = Rain */
|
||||||
#define SKY_LIGHTNING 3 /**< Weather = Lightning storm */
|
#define SKY_LIGHTNING 3 /**< Weather = Lightning storm */
|
||||||
|
|
@ -487,7 +487,7 @@
|
||||||
#define PM_ARRAY_MAX 4 /**< # Bytes in Bit vector - Act and Player flags */
|
#define PM_ARRAY_MAX 4 /**< # Bytes in Bit vector - Act and Player flags */
|
||||||
#define PR_ARRAY_MAX 4 /**< # Bytes in Bit vector - Player Pref Flags */
|
#define PR_ARRAY_MAX 4 /**< # Bytes in Bit vector - Player Pref Flags */
|
||||||
#define AF_ARRAY_MAX 4 /**< # Bytes in Bit vector - Affect flags */
|
#define AF_ARRAY_MAX 4 /**< # Bytes in Bit vector - Affect flags */
|
||||||
#define TW_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Wear Locations */
|
#define TW_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Wear Locations */
|
||||||
#define EF_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Extra Flags */
|
#define EF_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Extra Flags */
|
||||||
|
|
||||||
/* other #defined constants */
|
/* other #defined constants */
|
||||||
|
|
@ -507,7 +507,7 @@
|
||||||
#define LVL_BUILDER LVL_IMMORT
|
#define LVL_BUILDER LVL_IMMORT
|
||||||
|
|
||||||
/** Arbitrary number that won't be in a string */
|
/** Arbitrary number that won't be in a string */
|
||||||
#define MAGIC_NUMBER (0x06)
|
#define MAGIC_NUMBER (0x06)
|
||||||
|
|
||||||
/** OPT_USEC determines how many commands will be processed by the MUD per
|
/** OPT_USEC determines how many commands will be processed by the MUD per
|
||||||
* second and how frequently it does socket I/O. A low setting will cause
|
* second and how frequently it does socket I/O. A low setting will cause
|
||||||
|
|
@ -515,7 +515,7 @@
|
||||||
* more cycling to check. A high setting (e.g. 1 Hz) may upset your players
|
* more cycling to check. A high setting (e.g. 1 Hz) may upset your players
|
||||||
* as actions (such as large speedwalking chains) take longer to be executed.
|
* as actions (such as large speedwalking chains) take longer to be executed.
|
||||||
* You shouldn't need to adjust this.
|
* You shouldn't need to adjust this.
|
||||||
* This will equate to 10 passes per second.
|
* This will equate to 10 passes per second.
|
||||||
* @see PASSES_PER_SEC
|
* @see PASSES_PER_SEC
|
||||||
* @see RL_SEC
|
* @see RL_SEC
|
||||||
*/
|
*/
|
||||||
|
|
@ -525,7 +525,7 @@
|
||||||
* @see RL_SEC
|
* @see RL_SEC
|
||||||
*/
|
*/
|
||||||
#define PASSES_PER_SEC (1000000 / OPT_USEC)
|
#define PASSES_PER_SEC (1000000 / OPT_USEC)
|
||||||
/** Used with other macros to define at how many heartbeats a control loop
|
/** Used with other macros to define at how many heartbeats a control loop
|
||||||
* gets executed. Helps to translate pulse counts to real seconds for
|
* gets executed. Helps to translate pulse counts to real seconds for
|
||||||
* human comprehension.
|
* human comprehension.
|
||||||
* @see PASSES_PER_SEC
|
* @see PASSES_PER_SEC
|
||||||
|
|
@ -546,11 +546,11 @@
|
||||||
#define PULSE_IDLEPWD (15 RL_SEC)
|
#define PULSE_IDLEPWD (15 RL_SEC)
|
||||||
/** Currently unused. */
|
/** Currently unused. */
|
||||||
#define PULSE_SANITY (30 RL_SEC)
|
#define PULSE_SANITY (30 RL_SEC)
|
||||||
/** How often to log # connected sockets and # active players.
|
/** How often to log # connected sockets and # active players.
|
||||||
* Currently set for 5 minutes.
|
* Currently set for 5 minutes.
|
||||||
*/
|
*/
|
||||||
#define PULSE_USAGE (5 * 60 RL_SEC)
|
#define PULSE_USAGE (5 * 60 RL_SEC)
|
||||||
/** Controls when to save the current ingame MUD time to disk.
|
/** Controls when to save the current ingame MUD time to disk.
|
||||||
* This should be set >= SECS_PER_MUD_HOUR */
|
* This should be set >= SECS_PER_MUD_HOUR */
|
||||||
#define PULSE_TIMESAVE (30 * 60 RL_SEC)
|
#define PULSE_TIMESAVE (30 * 60 RL_SEC)
|
||||||
|
|
||||||
|
|
@ -572,7 +572,7 @@
|
||||||
#define HOST_LENGTH 40 /**< Max hostname resolution length */
|
#define HOST_LENGTH 40 /**< Max hostname resolution length */
|
||||||
#define PLR_DESC_LENGTH 4096 /**< Max length for PC description */
|
#define PLR_DESC_LENGTH 4096 /**< Max length for PC description */
|
||||||
#define MAX_SKILLS 200 /**< Max number of skills/spells */
|
#define MAX_SKILLS 200 /**< Max number of skills/spells */
|
||||||
#define MAX_AFFECT 32 /**< Max number of player affections */
|
#define MAX_AFFECT 32 /**< Max number of player affections */
|
||||||
#define MAX_OBJ_AFFECT 6 /**< Max object affects */
|
#define MAX_OBJ_AFFECT 6 /**< Max object affects */
|
||||||
#define MAX_NOTE_LENGTH 4000 /**< Max length of text on a note obj */
|
#define MAX_NOTE_LENGTH 4000 /**< Max length of text on a note obj */
|
||||||
#define MAX_LAST_ENTRIES 6000 /**< Max log entries?? */
|
#define MAX_LAST_ENTRIES 6000 /**< Max log entries?? */
|
||||||
|
|
@ -580,7 +580,7 @@
|
||||||
#define MAX_HELP_ENTRY MAX_STRING_LENGTH /**< Max size of help entry */
|
#define MAX_HELP_ENTRY MAX_STRING_LENGTH /**< Max size of help entry */
|
||||||
#define MAX_COMPLETED_QUESTS 1024 /**< Maximum number of completed quests allowed */
|
#define MAX_COMPLETED_QUESTS 1024 /**< Maximum number of completed quests allowed */
|
||||||
|
|
||||||
/** Define the largest set of commands for a trigger.
|
/** Define the largest set of commands for a trigger.
|
||||||
* 16k should be plenty and then some. */
|
* 16k should be plenty and then some. */
|
||||||
#define MAX_CMD_LENGTH 16384
|
#define MAX_CMD_LENGTH 16384
|
||||||
|
|
||||||
|
|
@ -601,7 +601,7 @@ typedef signed char byte; /**< Technically 1 signed byte; vals should only = TRU
|
||||||
typedef IDXTYPE room_vnum; /**< vnum specifically for room */
|
typedef IDXTYPE room_vnum; /**< vnum specifically for room */
|
||||||
typedef IDXTYPE obj_vnum; /**< vnum specifically for object */
|
typedef IDXTYPE obj_vnum; /**< vnum specifically for object */
|
||||||
typedef IDXTYPE mob_vnum; /**< vnum specifically for mob (NPC) */
|
typedef IDXTYPE mob_vnum; /**< vnum specifically for mob (NPC) */
|
||||||
typedef IDXTYPE zone_vnum; /**< vnum specifically for zone */
|
typedef IDXTYPE zone_vnum; /**< vnum specifically for zone */
|
||||||
typedef IDXTYPE shop_vnum; /**< vnum specifically for shop */
|
typedef IDXTYPE shop_vnum; /**< vnum specifically for shop */
|
||||||
typedef IDXTYPE trig_vnum; /**< vnum specifically for triggers */
|
typedef IDXTYPE trig_vnum; /**< vnum specifically for triggers */
|
||||||
typedef IDXTYPE qst_vnum; /**< vnum specifically for quests */
|
typedef IDXTYPE qst_vnum; /**< vnum specifically for quests */
|
||||||
|
|
@ -615,15 +615,15 @@ typedef IDXTYPE shop_rnum; /**< references an instance of a shop */
|
||||||
typedef IDXTYPE trig_rnum; /**< references an instance of a trigger */
|
typedef IDXTYPE trig_rnum; /**< references an instance of a trigger */
|
||||||
typedef IDXTYPE qst_rnum; /**< references an instance of a quest */
|
typedef IDXTYPE qst_rnum; /**< references an instance of a quest */
|
||||||
|
|
||||||
/** Bitvector type for 32 bit unsigned long bitvectors. 'unsigned long long'
|
/** Bitvector type for 32 bit unsigned long bitvectors. 'unsigned long long'
|
||||||
* will give you at least 64 bits if you have GCC. You'll have to search
|
* will give you at least 64 bits if you have GCC. You'll have to search
|
||||||
* throughout the code for "bitvector_t" and change them yourself if you'd
|
* throughout the code for "bitvector_t" and change them yourself if you'd
|
||||||
* like this extra flexibility. */
|
* like this extra flexibility. */
|
||||||
typedef unsigned long int bitvector_t;
|
typedef unsigned long int bitvector_t;
|
||||||
|
|
||||||
/** Extra description: used in objects, mobiles, and rooms. For example,
|
/** Extra description: used in objects, mobiles, and rooms. For example,
|
||||||
* a 'look hair' might pull up an extra description (if available) for
|
* a 'look hair' might pull up an extra description (if available) for
|
||||||
* the mob, object or room.
|
* the mob, object or room.
|
||||||
* Multiple extra descriptions on the same object are implemented as a
|
* Multiple extra descriptions on the same object are implemented as a
|
||||||
* linked list. */
|
* linked list. */
|
||||||
struct extra_descr_data
|
struct extra_descr_data
|
||||||
|
|
@ -635,9 +635,9 @@ struct extra_descr_data
|
||||||
|
|
||||||
/* object-related structures */
|
/* object-related structures */
|
||||||
/**< Number of elements in the object value array. Raising this will provide
|
/**< Number of elements in the object value array. Raising this will provide
|
||||||
* more configurability per object type, and shouldn't break anything.
|
* more configurability per object type, and shouldn't break anything.
|
||||||
* DO NOT LOWER from the default value of 4. */
|
* DO NOT LOWER from the default value of 4. */
|
||||||
#define NUM_OBJ_VAL_POSITIONS 4
|
#define NUM_OBJ_VAL_POSITIONS 4
|
||||||
|
|
||||||
/** object flags used in obj_data. These represent the instance values for
|
/** object flags used in obj_data. These represent the instance values for
|
||||||
* a real object, values that can change during gameplay. */
|
* a real object, values that can change during gameplay. */
|
||||||
|
|
@ -693,7 +693,7 @@ struct obj_data
|
||||||
struct char_data *sitting_here; /**< For furniture, who is sitting in it */
|
struct char_data *sitting_here; /**< For furniture, who is sitting in it */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Instance info for an object that gets saved to disk.
|
/** Instance info for an object that gets saved to disk.
|
||||||
* DO NOT CHANGE if you are using binary object files
|
* DO NOT CHANGE if you are using binary object files
|
||||||
* and already have a player base and don't want to do a player wipe. */
|
* and already have a player base and don't want to do a player wipe. */
|
||||||
struct obj_file_elem
|
struct obj_file_elem
|
||||||
|
|
@ -708,20 +708,20 @@ struct obj_file_elem
|
||||||
int weight; /**< Object weight */
|
int weight; /**< Object weight */
|
||||||
int timer; /**< Current object timer setting */
|
int timer; /**< Current object timer setting */
|
||||||
int bitvector[AF_ARRAY_MAX]; /**< Object affects */
|
int bitvector[AF_ARRAY_MAX]; /**< Object affects */
|
||||||
struct obj_affected_type affected[MAX_OBJ_AFFECT]; /**< Affects to mobs */
|
struct obj_affected_type affected[MAX_OBJ_AFFECT]; /**< Affects to mobs */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Header block for rent files.
|
/** Header block for rent files.
|
||||||
* DO NOT CHANGE the structure if you are using binary object files
|
* DO NOT CHANGE the structure if you are using binary object files
|
||||||
* and already have a player base and don't want to do a player wipe.
|
* and already have a player base and don't want to do a player wipe.
|
||||||
* If you are using binary player files, feel free to turn the spare
|
* If you are using binary player files, feel free to turn the spare
|
||||||
* variables into something more meaningful, as long as you keep the
|
* variables into something more meaningful, as long as you keep the
|
||||||
* int datatype.
|
* int datatype.
|
||||||
* NOTE: This is *not* used with the ascii playerfiles.
|
* NOTE: This is *not* used with the ascii playerfiles.
|
||||||
* NOTE 2: This structure appears to be unused in this codebase? */
|
* NOTE 2: This structure appears to be unused in this codebase? */
|
||||||
struct rent_info
|
struct rent_info
|
||||||
{
|
{
|
||||||
int time;
|
int time;
|
||||||
int rentcode; /**< How this character rented */
|
int rentcode; /**< How this character rented */
|
||||||
int net_cost_per_diem; /**< ? Appears to be unused ? */
|
int net_cost_per_diem; /**< ? Appears to be unused ? */
|
||||||
int gold; /**< ? Appears to be unused ? */
|
int gold; /**< ? Appears to be unused ? */
|
||||||
|
|
@ -781,7 +781,7 @@ struct memory_rec_struct
|
||||||
/** memory_rec_struct typedef */
|
/** memory_rec_struct typedef */
|
||||||
typedef struct memory_rec_struct memory_rec;
|
typedef struct memory_rec_struct memory_rec;
|
||||||
|
|
||||||
/** This structure is purely intended to be an easy way to transfer and return
|
/** This structure is purely intended to be an easy way to transfer and return
|
||||||
* information about time (real or mudwise). */
|
* information about time (real or mudwise). */
|
||||||
struct time_info_data
|
struct time_info_data
|
||||||
{
|
{
|
||||||
|
|
@ -800,7 +800,7 @@ struct time_data
|
||||||
};
|
};
|
||||||
|
|
||||||
/** The pclean_criteria_data is set up in config.c and used in db.c to determine
|
/** The pclean_criteria_data is set up in config.c and used in db.c to determine
|
||||||
* the conditions which will cause a player character to be deleted from disk
|
* the conditions which will cause a player character to be deleted from disk
|
||||||
* if the automagic pwipe system is enabled (see config.c). */
|
* if the automagic pwipe system is enabled (see config.c). */
|
||||||
struct pclean_criteria_data
|
struct pclean_criteria_data
|
||||||
{
|
{
|
||||||
|
|
@ -825,8 +825,8 @@ struct char_player_data
|
||||||
ubyte height; /**< PC / NPC height */
|
ubyte height; /**< PC / NPC height */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Character abilities. Different instances of this structure are used for
|
/** Character abilities. Different instances of this structure are used for
|
||||||
* both inherent and current ability scores (like when poison affects the
|
* both inherent and current ability scores (like when poison affects the
|
||||||
* player strength). */
|
* player strength). */
|
||||||
struct char_ability_data
|
struct char_ability_data
|
||||||
{
|
{
|
||||||
|
|
@ -852,9 +852,9 @@ struct char_point_data
|
||||||
/** Current armor class. Internal use goes from -100 (totally armored) to
|
/** Current armor class. Internal use goes from -100 (totally armored) to
|
||||||
* 100 (totally naked). Externally expressed as -10 (totally armored) to
|
* 100 (totally naked). Externally expressed as -10 (totally armored) to
|
||||||
* 10 (totally naked). Currently follows the old and decrepit Advanced
|
* 10 (totally naked). Currently follows the old and decrepit Advanced
|
||||||
* Dungeons and Dragons method of dealing with character defense, or
|
* Dungeons and Dragons method of dealing with character defense, or
|
||||||
* Armor class. */
|
* Armor class. */
|
||||||
sh_int armor;
|
sh_int armor;
|
||||||
int gold; /**< Current gold carried on character */
|
int gold; /**< Current gold carried on character */
|
||||||
int bank_gold; /**< Gold the char has in a bank account */
|
int bank_gold; /**< Gold the char has in a bank account */
|
||||||
int exp; /**< The experience points, or value, of the character. */
|
int exp; /**< The experience points, or value, of the character. */
|
||||||
|
|
@ -960,7 +960,7 @@ struct affected_type
|
||||||
struct follow_type
|
struct follow_type
|
||||||
{
|
{
|
||||||
struct char_data *follower; /**< Character directly following. */
|
struct char_data *follower; /**< Character directly following. */
|
||||||
struct follow_type *next; /**< Next character following. */
|
struct follow_type *next; /**< Next character following. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Master structure for PCs and NPCs. */
|
/** Master structure for PCs and NPCs. */
|
||||||
|
|
@ -1009,7 +1009,7 @@ struct txt_block
|
||||||
struct txt_block *next; /**< ? */
|
struct txt_block *next; /**< ? */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** ? */
|
/** ? */
|
||||||
struct txt_q
|
struct txt_q
|
||||||
{
|
{
|
||||||
struct txt_block *head; /**< ? */
|
struct txt_block *head; /**< ? */
|
||||||
|
|
@ -1213,7 +1213,7 @@ struct guild_info_type
|
||||||
|
|
||||||
/* Config structs */
|
/* Config structs */
|
||||||
|
|
||||||
/** The game configuration structure used for configurating the game play
|
/** The game configuration structure used for configurating the game play
|
||||||
* variables. */
|
* variables. */
|
||||||
struct game_data
|
struct game_data
|
||||||
{
|
{
|
||||||
|
|
@ -1237,8 +1237,8 @@ struct game_data
|
||||||
int map_option; /**< MAP_ON, MAP_OFF or MAP_IMM_ONLY */
|
int map_option; /**< MAP_ON, MAP_OFF or MAP_IMM_ONLY */
|
||||||
int map_size; /**< Default size for map command */
|
int map_size; /**< Default size for map command */
|
||||||
int minimap_size; /**< Default size for mini-map (automap) */
|
int minimap_size; /**< Default size for mini-map (automap) */
|
||||||
int script_players; /**< Is attaching scripts to players allowed? */
|
int script_players; /**< Is attaching scripts to players allowed? */
|
||||||
|
|
||||||
char *OK; /**< When player receives 'Okay.' text. */
|
char *OK; /**< When player receives 'Okay.' text. */
|
||||||
char *NOPERSON; /**< 'No one by that name here.' */
|
char *NOPERSON; /**< 'No one by that name here.' */
|
||||||
char *NOEFFECT; /**< 'Nothing seems to happen.' */
|
char *NOEFFECT; /**< 'Nothing seems to happen.' */
|
||||||
|
|
@ -1256,7 +1256,7 @@ struct crash_save_data
|
||||||
int rent_file_timeout; /**< Lifetime of normal rent files in days */
|
int rent_file_timeout; /**< Lifetime of normal rent files in days */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Important room numbers. This structure stores vnums, not real array
|
/** Important room numbers. This structure stores vnums, not real array
|
||||||
* numbers. */
|
* numbers. */
|
||||||
struct room_numbers
|
struct room_numbers
|
||||||
{
|
{
|
||||||
|
|
@ -1285,6 +1285,7 @@ struct game_operation
|
||||||
char *MENU; /**< The MAIN MENU. */
|
char *MENU; /**< The MAIN MENU. */
|
||||||
char *WELC_MESSG; /**< The welcome message. */
|
char *WELC_MESSG; /**< The welcome message. */
|
||||||
char *START_MESSG; /**< The start msg for new characters. */
|
char *START_MESSG; /**< The start msg for new characters. */
|
||||||
|
int medit_advanced; /**< Does the medit OLC show the advanced stats menu ? */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** The Autowizard options. */
|
/** The Autowizard options. */
|
||||||
|
|
@ -1294,9 +1295,9 @@ struct autowiz_data
|
||||||
int min_wizlist_lev; /**< Minimun level to show on wizlist. */
|
int min_wizlist_lev; /**< Minimun level to show on wizlist. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Main Game Configuration Structure.
|
Main Game Configuration Structure.
|
||||||
Global variables that can be changed within the game are held within this
|
Global variables that can be changed within the game are held within this
|
||||||
structure. During gameplay, elements within this structure can be altered,
|
structure. During gameplay, elements within this structure can be altered,
|
||||||
thus affecting the gameplay immediately, and avoiding the need to recompile
|
thus affecting the gameplay immediately, and avoiding the need to recompile
|
||||||
the code.
|
the code.
|
||||||
|
|
|
||||||
98
src/utils.h
98
src/utils.h
|
|
@ -1,26 +1,26 @@
|
||||||
/**
|
/**
|
||||||
* @file utils.h
|
* @file utils.h
|
||||||
* Utility macros and prototypes of utility functions.
|
* Utility macros and prototypes of utility functions.
|
||||||
*
|
*
|
||||||
* Part of the core tbaMUD source code distribution, which is a derivative
|
* Part of the core tbaMUD source code distribution, which is a derivative
|
||||||
* of, and continuation of, CircleMUD.
|
* of, and continuation of, CircleMUD.
|
||||||
*
|
*
|
||||||
* All rights reserved. See license for complete information.
|
* All rights reserved. See license for complete information.
|
||||||
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
|
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
|
||||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
|
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
|
||||||
*
|
*
|
||||||
* @todo Merge structs, random and other very generic functions and macros into
|
* @todo Merge structs, random and other very generic functions and macros into
|
||||||
* the utils module.
|
* the utils module.
|
||||||
* @todo Take more mud specific functions and function prototypes (follower
|
* @todo Take more mud specific functions and function prototypes (follower
|
||||||
* functions, move functions, char_from_furniture) out of utils and declare /
|
* functions, move functions, char_from_furniture) out of utils and declare /
|
||||||
* define elsewhere.
|
* define elsewhere.
|
||||||
*/
|
*/
|
||||||
#ifndef _UTILS_H_ /* Begin header file protection */
|
#ifndef _UTILS_H_ /* Begin header file protection */
|
||||||
#define _UTILS_H_
|
#define _UTILS_H_
|
||||||
|
|
||||||
/** Definition of the action command, for the do_ series of in game functions.
|
/** Definition of the action command, for the do_ series of in game functions.
|
||||||
* This macro is placed here (for now) because it's too general of a macro
|
* This macro is placed here (for now) because it's too general of a macro
|
||||||
* to be first defined in interpreter.h. The reason for using a macro is
|
* to be first defined in interpreter.h. The reason for using a macro is
|
||||||
* to allow for easier addition of parameters to the otherwise generic and
|
* to allow for easier addition of parameters to the otherwise generic and
|
||||||
* static function structure. */
|
* static function structure. */
|
||||||
#define ACMD(name) \
|
#define ACMD(name) \
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
/* external declarations and prototypes */
|
/* external declarations and prototypes */
|
||||||
|
|
||||||
/** direct all log() references to basic_mud_log() function. */
|
/** direct all log() references to basic_mud_log() function. */
|
||||||
#define log basic_mud_log
|
#define log basic_mud_log
|
||||||
|
|
||||||
/** Standard line size, used for many string limits. */
|
/** Standard line size, used for many string limits. */
|
||||||
#define READ_SIZE 256
|
#define READ_SIZE 256
|
||||||
|
|
@ -148,7 +148,7 @@ void char_from_furniture(struct char_data *ch);
|
||||||
|
|
||||||
/* get_filename() types of files to open */
|
/* get_filename() types of files to open */
|
||||||
#define CRASH_FILE 0 /**< Open up a player crash save file */
|
#define CRASH_FILE 0 /**< Open up a player crash save file */
|
||||||
#define ETEXT_FILE 1 /**< ???? */
|
#define ETEXT_FILE 1 /**< ???? */
|
||||||
#define SCRIPT_VARS_FILE 2 /**< Reference to a global variable file. */
|
#define SCRIPT_VARS_FILE 2 /**< Reference to a global variable file. */
|
||||||
#define PLR_FILE 3 /**< The standard player file */
|
#define PLR_FILE 3 /**< The standard player file */
|
||||||
|
|
||||||
|
|
@ -160,16 +160,16 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define BFS_NO_PATH (-3) /**< No path through here. */
|
#define BFS_NO_PATH (-3) /**< No path through here. */
|
||||||
|
|
||||||
/** Number of real life seconds per mud hour.
|
/** Number of real life seconds per mud hour.
|
||||||
* @todo The definitions based on SECS_PER_MUD_HOUR should be configurable.
|
* @todo The definitions based on SECS_PER_MUD_HOUR should be configurable.
|
||||||
* See act.informative.c and utils.c for other places to change. */
|
* See act.informative.c and utils.c for other places to change. */
|
||||||
#define SECS_PER_MUD_HOUR 75
|
#define SECS_PER_MUD_HOUR 75
|
||||||
/** Real life seconds in one mud day.
|
/** Real life seconds in one mud day.
|
||||||
* Current calculation = 30 real life minutes. */
|
* Current calculation = 30 real life minutes. */
|
||||||
#define SECS_PER_MUD_DAY (24*SECS_PER_MUD_HOUR)
|
#define SECS_PER_MUD_DAY (24*SECS_PER_MUD_HOUR)
|
||||||
/** Real life seconds per mud month.
|
/** Real life seconds per mud month.
|
||||||
* Current calculation = 17.5 real life hours */
|
* Current calculation = 17.5 real life hours */
|
||||||
#define SECS_PER_MUD_MONTH (35*SECS_PER_MUD_DAY)
|
#define SECS_PER_MUD_MONTH (35*SECS_PER_MUD_DAY)
|
||||||
/** Real life seconds per mud month.
|
/** Real life seconds per mud month.
|
||||||
* Current calculation ~= 12.4 real life days */
|
* Current calculation ~= 12.4 real life days */
|
||||||
#define SECS_PER_MUD_YEAR (17*SECS_PER_MUD_MONTH)
|
#define SECS_PER_MUD_YEAR (17*SECS_PER_MUD_MONTH)
|
||||||
|
|
||||||
|
|
@ -198,15 +198,15 @@ void char_from_furniture(struct char_data *ch);
|
||||||
|
|
||||||
/** If ch is equal to either a newline or a carriage return, return 1,
|
/** If ch is equal to either a newline or a carriage return, return 1,
|
||||||
* else 0.
|
* else 0.
|
||||||
* @todo Recommend using the ? operator for clarity. */
|
* @todo Recommend using the ? operator for clarity. */
|
||||||
#define ISNEWL(ch) ((ch) == '\n' || (ch) == '\r')
|
#define ISNEWL(ch) ((ch) == '\n' || (ch) == '\r')
|
||||||
|
|
||||||
/** If string begins a vowel (upper or lower case), return "an"; else return
|
/** If string begins a vowel (upper or lower case), return "an"; else return
|
||||||
* "a". */
|
* "a". */
|
||||||
#define AN(string) (strchr("aeiouAEIOU", *string) ? "an" : "a")
|
#define AN(string) (strchr("aeiouAEIOU", *string) ? "an" : "a")
|
||||||
|
|
||||||
/** A calloc based memory allocation macro.
|
/** A calloc based memory allocation macro.
|
||||||
* @param result Pointer to created memory.
|
* @param result Pointer to created memory.
|
||||||
* @param type The type of memory (int, struct char_data, etc.).
|
* @param type The type of memory (int, struct char_data, etc.).
|
||||||
* @param number How many of type to make. */
|
* @param number How many of type to make. */
|
||||||
#define CREATE(result, type, number) do {\
|
#define CREATE(result, type, number) do {\
|
||||||
|
|
@ -217,19 +217,19 @@ void char_from_furniture(struct char_data *ch);
|
||||||
|
|
||||||
/** A realloc based memory reallocation macro. Reminder: realloc can reduce
|
/** A realloc based memory reallocation macro. Reminder: realloc can reduce
|
||||||
* the size of an array as well as increase it.
|
* the size of an array as well as increase it.
|
||||||
* @param result Pointer to created memory.
|
* @param result Pointer to created memory.
|
||||||
* @param type The type of memory (int, struct char_data, etc.).
|
* @param type The type of memory (int, struct char_data, etc.).
|
||||||
* @param number How many of type to make. */
|
* @param number How many of type to make. */
|
||||||
#define RECREATE(result, type, number) do {\
|
#define RECREATE(result, type, number) do {\
|
||||||
if (!((result) = (type *) realloc ((result), sizeof(type) * (number))))\
|
if (!((result) = (type *) realloc ((result), sizeof(type) * (number))))\
|
||||||
{ perror("SYSERR: realloc failure"); abort(); } } while(0)
|
{ perror("SYSERR: realloc failure"); abort(); } } while(0)
|
||||||
|
|
||||||
/** Remove an item from a linked list and reset the links.
|
/** Remove an item from a linked list and reset the links.
|
||||||
* If item is at the list head, change the head, else traverse the
|
* If item is at the list head, change the head, else traverse the
|
||||||
* list looking for the item before the one to be removed.
|
* list looking for the item before the one to be removed.
|
||||||
* @pre Requires that a variable 'temp' be declared as the same type as the
|
* @pre Requires that a variable 'temp' be declared as the same type as the
|
||||||
* list to be manipulated.
|
* list to be manipulated.
|
||||||
* @post List pointers are correctly reset and item is no longer in the list.
|
* @post List pointers are correctly reset and item is no longer in the list.
|
||||||
* item can now be changed, removed, etc independently from the list it was in.
|
* item can now be changed, removed, etc independently from the list it was in.
|
||||||
* @param item Pointer to item to remove from the list.
|
* @param item Pointer to item to remove from the list.
|
||||||
* @param head Pointer to the head of the linked list.
|
* @param head Pointer to the head of the linked list.
|
||||||
|
|
@ -276,7 +276,7 @@ void char_from_furniture(struct char_data *ch);
|
||||||
* for it, 'wimpy' would be an extremely bad thing for a mob to do, as an
|
* for it, 'wimpy' would be an extremely bad thing for a mob to do, as an
|
||||||
* example. If you really couldn't care less, change this to a '#if 0'. */
|
* example. If you really couldn't care less, change this to a '#if 0'. */
|
||||||
#if 1
|
#if 1
|
||||||
/** Warn if accessing player_specials on a mob.
|
/** Warn if accessing player_specials on a mob.
|
||||||
* @todo Subtle bug in the var reporting, but works well for now. */
|
* @todo Subtle bug in the var reporting, but works well for now. */
|
||||||
#define CHECK_PLAYER_SPECIAL(ch, var) \
|
#define CHECK_PLAYER_SPECIAL(ch, var) \
|
||||||
(*(((ch)->player_specials == &dummy_mob) ? (log("SYSERR: Mob using '"#var"' at %s:%d.", __FILE__, __LINE__), &(var)) : &(var)))
|
(*(((ch)->player_specials == &dummy_mob) ? (log("SYSERR: Mob using '"#var"' at %s:%d.", __FILE__, __LINE__), &(var)) : &(var)))
|
||||||
|
|
@ -300,11 +300,11 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define SPELL_ROUTINES(spl) (spell_info[spl].routines)
|
#define SPELL_ROUTINES(spl) (spell_info[spl].routines)
|
||||||
|
|
||||||
/* IS_MOB() acts as a VALID_MOB_RNUM()-like function.*/
|
/* IS_MOB() acts as a VALID_MOB_RNUM()-like function.*/
|
||||||
/** 1 if the character has the NPC bit set, 0 if the character does not.
|
/** 1 if the character has the NPC bit set, 0 if the character does not.
|
||||||
* Used to prevents NPCs and mobs from doing things they shouldn't, even
|
* Used to prevents NPCs and mobs from doing things they shouldn't, even
|
||||||
* when mobs are possessed or charmed by a player. */
|
* when mobs are possessed or charmed by a player. */
|
||||||
#define IS_NPC(ch) (IS_SET_AR(MOB_FLAGS(ch), MOB_ISNPC))
|
#define IS_NPC(ch) (IS_SET_AR(MOB_FLAGS(ch), MOB_ISNPC))
|
||||||
/** 1 if the character is a real NPC, 0 if the character is not. */
|
/** 1 if the character is a real NPC, 0 if the character is not. */
|
||||||
#define IS_MOB(ch) (IS_NPC(ch) && GET_MOB_RNUM(ch) <= top_of_mobt && \
|
#define IS_MOB(ch) (IS_NPC(ch) && GET_MOB_RNUM(ch) <= top_of_mobt && \
|
||||||
GET_MOB_RNUM(ch) != NOBODY)
|
GET_MOB_RNUM(ch) != NOBODY)
|
||||||
|
|
||||||
|
|
@ -461,7 +461,7 @@ void char_from_furniture(struct char_data *ch);
|
||||||
/** Alignment value for ch. */
|
/** Alignment value for ch. */
|
||||||
#define GET_ALIGNMENT(ch) ((ch)->char_specials.saved.alignment)
|
#define GET_ALIGNMENT(ch) ((ch)->char_specials.saved.alignment)
|
||||||
|
|
||||||
/** Return condition i (DRUNK, HUNGER, THIRST) of ch. */
|
/** Return condition i (DRUNK, HUNGER, THIRST) of ch. */
|
||||||
#define GET_COND(ch, i) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.conditions[(i)]))
|
#define GET_COND(ch, i) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.conditions[(i)]))
|
||||||
/** The room to load player ch into. */
|
/** The room to load player ch into. */
|
||||||
#define GET_LOADROOM(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.load_room))
|
#define GET_LOADROOM(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.load_room))
|
||||||
|
|
@ -482,8 +482,8 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define POOFIN(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->poofin))
|
#define POOFIN(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->poofin))
|
||||||
/** The poofout string for the ch. */
|
/** The poofout string for the ch. */
|
||||||
#define POOFOUT(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->poofout))
|
#define POOFOUT(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->poofout))
|
||||||
/** The OLC zoon permission for ch.
|
/** The OLC zoon permission for ch.
|
||||||
* @deprecated Currently unused? */
|
* @deprecated Currently unused? */
|
||||||
#define GET_OLC_ZONE(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.olc_zone))
|
#define GET_OLC_ZONE(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.olc_zone))
|
||||||
/** Currently unused?
|
/** Currently unused?
|
||||||
* @deprecated Currently unused? */
|
* @deprecated Currently unused? */
|
||||||
|
|
@ -499,9 +499,9 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define GET_PREF(ch) ((ch)->pref)
|
#define GET_PREF(ch) ((ch)->pref)
|
||||||
/** Get host name or ip of ch. */
|
/** Get host name or ip of ch. */
|
||||||
#define GET_HOST(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->host))
|
#define GET_HOST(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->host))
|
||||||
#define GET_LAST_MOTD(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.lastmotd))
|
#define GET_LAST_MOTD(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.lastmotd))
|
||||||
#define GET_LAST_NEWS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.lastnews))
|
#define GET_LAST_NEWS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.lastnews))
|
||||||
/** Get channel history i for ch. */
|
/** Get channel history i for ch. */
|
||||||
#define GET_HISTORY(ch, i) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.comm_hist[i]))
|
#define GET_HISTORY(ch, i) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.comm_hist[i]))
|
||||||
/** Return the page length (height) for ch. */
|
/** Return the page length (height) for ch. */
|
||||||
#define GET_PAGE_LENGTH(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.page_length))
|
#define GET_PAGE_LENGTH(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.page_length))
|
||||||
|
|
@ -518,7 +518,7 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define GET_QUEST_TIME(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.quest_time))
|
#define GET_QUEST_TIME(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.quest_time))
|
||||||
/** The number of quests completed by ch. */
|
/** The number of quests completed by ch. */
|
||||||
#define GET_NUM_QUESTS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.num_completed_quests))
|
#define GET_NUM_QUESTS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.num_completed_quests))
|
||||||
/** The type of quest ch is currently participating in. */
|
/** The type of quest ch is currently participating in. */
|
||||||
#define GET_QUEST_TYPE(ch) (real_quest(GET_QUEST((ch))) != NOTHING ? aquest_table[real_quest(GET_QUEST((ch)))].type : AQ_UNDEFINED )
|
#define GET_QUEST_TYPE(ch) (real_quest(GET_QUEST((ch))) != NOTHING ? aquest_table[real_quest(GET_QUEST((ch)))].type : AQ_UNDEFINED )
|
||||||
|
|
||||||
/** The current skill level of ch for skill i. */
|
/** The current skill level of ch for skill i. */
|
||||||
|
|
@ -557,7 +557,7 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define CAN_CARRY_N(ch) (5 + (GET_DEX(ch) >> 1) + (GET_LEVEL(ch) >> 1))
|
#define CAN_CARRY_N(ch) (5 + (GET_DEX(ch) >> 1) + (GET_LEVEL(ch) >> 1))
|
||||||
/** Return whether or not ch is awake. */
|
/** Return whether or not ch is awake. */
|
||||||
#define AWAKE(ch) (GET_POS(ch) > POS_SLEEPING)
|
#define AWAKE(ch) (GET_POS(ch) > POS_SLEEPING)
|
||||||
/** Defines if ch can see in general in the dark. */
|
/** Defines if ch can see in general in the dark. */
|
||||||
#define CAN_SEE_IN_DARK(ch) \
|
#define CAN_SEE_IN_DARK(ch) \
|
||||||
(AFF_FLAGGED(ch, AFF_INFRAVISION) || (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_HOLYLIGHT)))
|
(AFF_FLAGGED(ch, AFF_INFRAVISION) || (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_HOLYLIGHT)))
|
||||||
|
|
||||||
|
|
@ -590,7 +590,7 @@ void char_from_furniture(struct char_data *ch);
|
||||||
STATE(d) == CON_ZEDIT || STATE(d) == CON_SEDIT || \
|
STATE(d) == CON_ZEDIT || STATE(d) == CON_SEDIT || \
|
||||||
STATE(d) == CON_CEDIT || STATE(d) == CON_PLAYING || \
|
STATE(d) == CON_CEDIT || STATE(d) == CON_PLAYING || \
|
||||||
STATE(d) == CON_TRIGEDIT || STATE(d) == CON_AEDIT || \
|
STATE(d) == CON_TRIGEDIT || STATE(d) == CON_AEDIT || \
|
||||||
STATE(d) == CON_HEDIT || STATE(d) == CON_QEDIT)
|
STATE(d) == CON_HEDIT || STATE(d) == CON_QEDIT)
|
||||||
|
|
||||||
/** Defines if it is ok to send a message to ch. */
|
/** Defines if it is ok to send a message to ch. */
|
||||||
#define SENDOK(ch) (((ch)->desc || SCRIPT_CHECK((ch), MTRIG_ACT)) && \
|
#define SENDOK(ch) (((ch)->desc || SCRIPT_CHECK((ch), MTRIG_ACT)) && \
|
||||||
|
|
@ -598,8 +598,8 @@ void char_from_furniture(struct char_data *ch);
|
||||||
!PLR_FLAGGED((ch), PLR_WRITING))
|
!PLR_FLAGGED((ch), PLR_WRITING))
|
||||||
|
|
||||||
/* object utils */
|
/* object utils */
|
||||||
/** Check for NOWHERE or the top array index? If using unsigned types, the top
|
/** Check for NOWHERE or the top array index? If using unsigned types, the top
|
||||||
* array index will catch everything. If using signed types, NOTHING will
|
* array index will catch everything. If using signed types, NOTHING will
|
||||||
* catch the majority of bad accesses. */
|
* catch the majority of bad accesses. */
|
||||||
#define VALID_OBJ_RNUM(obj) (GET_OBJ_RNUM(obj) <= top_of_objt && \
|
#define VALID_OBJ_RNUM(obj) (GET_OBJ_RNUM(obj) <= top_of_objt && \
|
||||||
GET_OBJ_RNUM(obj) != NOTHING)
|
GET_OBJ_RNUM(obj) != NOTHING)
|
||||||
|
|
@ -647,7 +647,7 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define GET_OBJ_SHORT(obj) ((obj)->short_description)
|
#define GET_OBJ_SHORT(obj) ((obj)->short_description)
|
||||||
|
|
||||||
/* Compound utilities and other macros. */
|
/* Compound utilities and other macros. */
|
||||||
/** Used to compute version. To see if the code running is newer than 3.0pl13,
|
/** Used to compute version. To see if the code running is newer than 3.0pl13,
|
||||||
* you would use: if _CIRCLEMUD > CIRCLEMUD_VERSION(3,0,13) */
|
* you would use: if _CIRCLEMUD > CIRCLEMUD_VERSION(3,0,13) */
|
||||||
#define CIRCLEMUD_VERSION(major, minor, patchlevel) \
|
#define CIRCLEMUD_VERSION(major, minor, patchlevel) \
|
||||||
(((major) << 16) + ((minor) << 8) + (patchlevel))
|
(((major) << 16) + ((minor) << 8) + (patchlevel))
|
||||||
|
|
@ -676,11 +676,11 @@ void char_from_furniture(struct char_data *ch);
|
||||||
((!AFF_FLAGGED((obj),AFF_INVISIBLE) || AFF_FLAGGED(sub,AFF_DETECT_INVIS)) && \
|
((!AFF_FLAGGED((obj),AFF_INVISIBLE) || AFF_FLAGGED(sub,AFF_DETECT_INVIS)) && \
|
||||||
(!AFF_FLAGGED((obj), AFF_HIDE) || AFF_FLAGGED(sub, AFF_SENSE_LIFE)))
|
(!AFF_FLAGGED((obj), AFF_HIDE) || AFF_FLAGGED(sub, AFF_SENSE_LIFE)))
|
||||||
|
|
||||||
/** Defines if sub character can see obj character, assuming mortal only
|
/** Defines if sub character can see obj character, assuming mortal only
|
||||||
* settings. */
|
* settings. */
|
||||||
#define MORT_CAN_SEE(sub, obj) (LIGHT_OK(sub) && INVIS_OK(sub, obj))
|
#define MORT_CAN_SEE(sub, obj) (LIGHT_OK(sub) && INVIS_OK(sub, obj))
|
||||||
|
|
||||||
/** Defines if sub character can see obj character, assuming immortal
|
/** Defines if sub character can see obj character, assuming immortal
|
||||||
* and mortal settings. */
|
* and mortal settings. */
|
||||||
#define IMM_CAN_SEE(sub, obj) \
|
#define IMM_CAN_SEE(sub, obj) \
|
||||||
(MORT_CAN_SEE(sub, obj) || (!IS_NPC(sub) && PRF_FLAGGED(sub, PRF_HOLYLIGHT)))
|
(MORT_CAN_SEE(sub, obj) || (!IS_NPC(sub) && PRF_FLAGGED(sub, PRF_HOLYLIGHT)))
|
||||||
|
|
@ -722,7 +722,7 @@ void char_from_furniture(struct char_data *ch);
|
||||||
CAN_SEE_OBJ((ch),(obj)))
|
CAN_SEE_OBJ((ch),(obj)))
|
||||||
|
|
||||||
/** If vict can see ch, return ch name, else return "someone". */
|
/** If vict can see ch, return ch name, else return "someone". */
|
||||||
#define PERS(ch, vict) (CAN_SEE(vict, ch) ? GET_NAME(ch) : (GET_LEVEL(ch) > LVL_IMMORT ? "an immortal" : "someone"))
|
#define PERS(ch, vict) (CAN_SEE(vict, ch) ? GET_NAME(ch) : (GET_LEVEL(ch) > LVL_IMMORT ? "an immortal" : "someone"))
|
||||||
|
|
||||||
/** If vict can see obj, return obj short description, else return
|
/** If vict can see obj, return obj short description, else return
|
||||||
* "something". */
|
* "something". */
|
||||||
|
|
@ -800,8 +800,8 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define SEEK_END 2
|
#define SEEK_END 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* NOCRYPT can be defined by an implementor manually in sysdep.h. CIRCLE_CRYPT
|
/* NOCRYPT can be defined by an implementor manually in sysdep.h. CIRCLE_CRYPT
|
||||||
* is a variable that the 'configure' script automatically sets when it
|
* is a variable that the 'configure' script automatically sets when it
|
||||||
* determines whether or not the system is capable of encrypting. */
|
* determines whether or not the system is capable of encrypting. */
|
||||||
#if defined(NOCRYPT) || !defined(CIRCLE_CRYPT)
|
#if defined(NOCRYPT) || !defined(CIRCLE_CRYPT)
|
||||||
/** When crypt is not defined. (NOTE: Player passwords will be plain text.) */
|
/** When crypt is not defined. (NOTE: Player passwords will be plain text.) */
|
||||||
|
|
@ -863,8 +863,8 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define CONFIG_MAP_SIZE config_info.play.map_size
|
#define CONFIG_MAP_SIZE config_info.play.map_size
|
||||||
#define CONFIG_MINIMAP_SIZE config_info.play.minimap_size
|
#define CONFIG_MINIMAP_SIZE config_info.play.minimap_size
|
||||||
|
|
||||||
/* DG Script Options */
|
/* DG Script Options */
|
||||||
#define CONFIG_SCRIPT_PLAYERS config_info.play.script_players
|
#define CONFIG_SCRIPT_PLAYERS config_info.play.script_players
|
||||||
|
|
||||||
/* Crash Saves */
|
/* Crash Saves */
|
||||||
/** Get free rent setting. */
|
/** Get free rent setting. */
|
||||||
|
|
@ -925,6 +925,8 @@ void char_from_furniture(struct char_data *ch);
|
||||||
#define CONFIG_WELC_MESSG config_info.operation.WELC_MESSG
|
#define CONFIG_WELC_MESSG config_info.operation.WELC_MESSG
|
||||||
/** Get the standard new character message. */
|
/** Get the standard new character message. */
|
||||||
#define CONFIG_START_MESSG config_info.operation.START_MESSG
|
#define CONFIG_START_MESSG config_info.operation.START_MESSG
|
||||||
|
/** Should medit show the advnaced stats menu? */
|
||||||
|
#define CONFIG_MEDIT_ADVANCED config_info.operation.medit_advanced
|
||||||
|
|
||||||
/* Autowiz */
|
/* Autowiz */
|
||||||
/** Use autowiz or not? */
|
/** Use autowiz or not? */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue