- Removed MOBprograms, fixed trg/index a few typos and some bleeding, added ALL_PERMISSIONS, --Rumble

This commit is contained in:
Rumble 2007-02-24 00:12:44 +00:00
parent 8508dc476a
commit 916281ecb0
14 changed files with 37 additions and 600 deletions

View file

@ -1,69 +1,41 @@
0.trg 0.trg
1.trg 1.trg
1.trg
2.trg
2.trg 2.trg
3.trg 3.trg
3.trg
4.trg
4.trg 4.trg
5.trg 5.trg
5.trg
6.trg 6.trg
6.trg
7.trg
7.trg 7.trg
9.trg 9.trg
12.trg 12.trg
13.trg 13.trg
13.trg
14.trg
14.trg 14.trg
15.trg 15.trg
16.trg 16.trg
16.trg
17.trg
17.trg 17.trg
18.trg 18.trg
18.trg
19.trg
19.trg 19.trg
20.trg 20.trg
20.trg
22.trg
22.trg 22.trg
25.trg 25.trg
26.trg 26.trg
26.trg
27.trg 27.trg
27.trg
28.trg
28.trg 28.trg
30.trg 30.trg
31.trg 31.trg
32.trg 32.trg
32.trg
33.trg 33.trg
35.trg 35.trg
36.trg 36.trg
37.trg 37.trg
37.trg
38.trg 38.trg
38.trg
39.trg
39.trg 39.trg
40.trg 40.trg
41.trg 41.trg
41.trg
42.trg
42.trg 42.trg
43.trg 43.trg
43.trg
44.trg
44.trg 44.trg
45.trg 45.trg
45.trg
46.trg
46.trg 46.trg
50.trg 50.trg
51.trg 51.trg
@ -71,10 +43,7 @@
53.trg 53.trg
54.trg 54.trg
55.trg 55.trg
55.trg
56.trg 56.trg
56.trg
57.trg
57.trg 57.trg
60.trg 60.trg
61.trg 61.trg
@ -85,245 +54,129 @@
70.trg 70.trg
71.trg 71.trg
72.trg 72.trg
73.trg
74.trg
74.trg 74.trg
75.trg 75.trg
75.trg
78.trg
78.trg 78.trg
79.trg 79.trg
83.trg 83.trg
83.trg
86.trg
86.trg 86.trg
90.trg 90.trg
90.trg
96.trg
96.trg 96.trg
100.trg 100.trg
100.trg
101.trg
101.trg 101.trg
103.trg 103.trg
103.trg
104.trg
104.trg 104.trg
106.trg 106.trg
106.trg
107.trg 107.trg
107.trg
115.trg
115.trg 115.trg
117.trg 117.trg
118.trg 118.trg
120.trg 120.trg
125.trg 125.trg
125.trg
130.trg 130.trg
140.trg 140.trg
140.trg
150.trg 150.trg
169.trg 169.trg
169.trg
175.trg
175.trg 175.trg
186.trg 186.trg
186.trg 186.trg
187.trg 187.trg
187.trg
200.trg
200.trg 200.trg
201.trg 201.trg
220.trg 220.trg
232.trg 232.trg
232.trg
233.trg
233.trg 233.trg
234.trg 234.trg
234.trg
235.trg
235.trg 235.trg
236.trg 236.trg
236.trg
237.trg
237.trg 237.trg
238.trg 238.trg
238.trg
239.trg
239.trg 239.trg
240.trg 240.trg
240.trg
241.trg
241.trg 241.trg
242.trg 242.trg
242.trg
243.trg
243.trg 243.trg
244.trg 244.trg
244.trg
245.trg
245.trg 245.trg
246.trg 246.trg
246.trg
247.trg
247.trg 247.trg
248.trg 248.trg
248.trg
249.trg
249.trg 249.trg
250.trg 250.trg
250.trg
251.trg
251.trg 251.trg
252.trg 252.trg
252.trg
253.trg
253.trg 253.trg
254.trg 254.trg
254.trg
255.trg
255.trg 255.trg
256.trg 256.trg
256.trg
257.trg
257.trg 257.trg
258.trg 258.trg
258.trg
259.trg
259.trg 259.trg
260.trg 260.trg
260.trg
261.trg
261.trg 261.trg
262.trg 262.trg
262.trg
263.trg
263.trg 263.trg
264.trg 264.trg
264.trg
265.trg
265.trg 265.trg
266.trg 266.trg
266.trg
267.trg
267.trg 267.trg
268.trg 268.trg
268.trg
269.trg
269.trg 269.trg
270.trg 270.trg
270.trg
271.trg
271.trg 271.trg
272.trg 272.trg
272.trg
273.trg
273.trg 273.trg
274.trg 274.trg
274.trg
275.trg
275.trg 275.trg
276.trg 276.trg
276.trg
277.trg
277.trg 277.trg
278.trg 278.trg
278.trg
279.trg
279.trg 279.trg
280.trg 280.trg
280.trg
281.trg
281.trg 281.trg
282.trg 282.trg
282.trg
283.trg
283.trg 283.trg
284.trg 284.trg
284.trg
285.trg
285.trg 285.trg
286.trg 286.trg
286.trg
287.trg
287.trg 287.trg
288.trg 288.trg
288.trg
289.trg
289.trg 289.trg
290.trg 290.trg
290.trg
291.trg
291.trg 291.trg
292.trg 292.trg
292.trg
293.trg
293.trg 293.trg
294.trg 294.trg
294.trg
295.trg
295.trg 295.trg
296.trg 296.trg
296.trg
298.trg
298.trg 298.trg
299.trg 299.trg
299.trg
300.trg
300.trg 300.trg
301.trg 301.trg
301.trg
302.trg
302.trg 302.trg
303.trg 303.trg
303.trg
304.trg
304.trg 304.trg
305.trg 305.trg
305.trg
306.trg
306.trg 306.trg
307.trg 307.trg
307.trg
308.trg
308.trg 308.trg
309.trg 309.trg
309.trg
310.trg
310.trg 310.trg
311.trg 311.trg
311.trg
312.trg
312.trg 312.trg
313.trg 313.trg
313.trg
314.trg
314.trg 314.trg
315.trg 315.trg
315.trg
316.trg
316.trg 316.trg
317.trg 317.trg
317.trg
318.trg
318.trg 318.trg
319.trg 319.trg
319.trg
320.trg
320.trg 320.trg
321.trg 321.trg
321.trg
322.trg
322.trg 322.trg
323.trg 323.trg
323.trg
324.trg
324.trg 324.trg
325.trg 325.trg
325.trg
326.trg 326.trg
326.trg
345.trg
345.trg 345.trg
$ $

View file

@ -10,7 +10,6 @@
#include "conf.h" #include "conf.h"
#include "sysdep.h" #include "sysdep.h"
#include "structs.h" #include "structs.h"
#include "utils.h" #include "utils.h"
#include "comm.h" #include "comm.h"
@ -28,7 +27,6 @@ extern struct help_index_element *help_table;
extern char *help; extern char *help;
extern char *ihelp; extern char *ihelp;
extern struct time_info_data time_info; extern struct time_info_data time_info;
extern char *credits; extern char *credits;
extern char *news; extern char *news;
extern char *info; extern char *info;
@ -49,6 +47,7 @@ char *title_male(int chclass, int level);
char *title_female(int chclass, int level); char *title_female(int chclass, int level);
struct time_info_data *real_time_passed(time_t t2, time_t t1); struct time_info_data *real_time_passed(time_t t2, time_t t1);
int compute_armor_class(struct char_data *ch); int compute_armor_class(struct char_data *ch);
int has_mail(long id);
/* local functions */ /* local functions */
int sort_commands_helper(const void *a, const void *b); int sort_commands_helper(const void *a, const void *b);
@ -98,7 +97,6 @@ int *cmd_sort_info;
#define SHOW_OBJ_SHORT 1 #define SHOW_OBJ_SHORT 1
#define SHOW_OBJ_ACTION 2 #define SHOW_OBJ_ACTION 2
void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode) void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode)
{ {
if (!obj || !ch) { if (!obj || !ch) {
@ -170,7 +168,6 @@ void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode)
send_to_char(ch, "\r\n"); send_to_char(ch, "\r\n");
} }
void show_obj_modifiers(struct obj_data *obj, struct char_data *ch) void show_obj_modifiers(struct obj_data *obj, struct char_data *ch)
{ {
if (OBJ_FLAGGED(obj, ITEM_INVISIBLE)) if (OBJ_FLAGGED(obj, ITEM_INVISIBLE))
@ -189,7 +186,6 @@ 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!");
} }
void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mode, int show) void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mode, int show)
{ {
struct obj_data *i, *j; struct obj_data *i, *j;
@ -209,9 +205,12 @@ void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mode, int
if (!strcmp(j->short_description, i->short_description)) if (!strcmp(j->short_description, i->short_description))
num++; num++;
if (CAN_SEE_OBJ(ch, i) && (*i->description != '.' || (IS_NPC(ch) || PRF_FLAGGED(ch, PRF_HOLYLIGHT)))) { if (CAN_SEE_OBJ(ch, i) && (*i->description != '.' || (IS_NPC(ch) || PRF_FLAGGED(ch, PRF_HOLYLIGHT)))) {
if (mode == SHOW_OBJ_LONG)
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(i, ch, mode); show_obj_to_char(i, ch, mode);
send_to_char(ch, "%s", CCNRM(ch, C_NRM));
found = TRUE; found = TRUE;
} }
} }
@ -249,7 +248,6 @@ void diag_char_to_char(struct char_data *i, struct char_data *ch)
send_to_char(ch, "%c%s %s\r\n", UPPER(*pers), pers + 1, diagnosis[ar_index].text); send_to_char(ch, "%c%s %s\r\n", UPPER(*pers), pers + 1, diagnosis[ar_index].text);
} }
void look_at_char(struct char_data *i, struct char_data *ch) void look_at_char(struct char_data *i, struct char_data *ch)
{ {
int j, found; int j, found;
@ -294,7 +292,6 @@ void look_at_char(struct char_data *i, struct char_data *ch)
} }
} }
void list_one_char(struct char_data *i, struct char_data *ch) void list_one_char(struct char_data *i, struct char_data *ch)
{ {
const char *positions[] = { const char *positions[] = {
@ -378,8 +375,6 @@ void list_one_char(struct char_data *i, struct char_data *ch)
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);
} }
void list_char_to_char(struct char_data *list, struct char_data *ch) void list_char_to_char(struct char_data *list, struct char_data *ch)
{ {
struct char_data *i; struct char_data *i;
@ -390,15 +385,16 @@ 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));
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));
} }
} }
void do_auto_exits(struct char_data *ch) void do_auto_exits(struct char_data *ch)
{ {
int door, slen = 0; int door, slen = 0;
@ -418,7 +414,6 @@ void do_auto_exits(struct char_data *ch)
send_to_char(ch, "%s]%s\r\n", slen ? "" : "None!", CCNRM(ch, C_NRM)); send_to_char(ch, "%s]%s\r\n", slen ? "" : "None!", CCNRM(ch, C_NRM));
} }
ACMD(do_exits) ACMD(do_exits)
{ {
int door, len = 0; int door, len = 0;
@ -438,7 +433,7 @@ ACMD(do_exits)
len++; len++;
if (GET_LEVEL(ch) >= LVL_IMMORT) if (PRF_FLAGGED(ch, PRF_SHOWVNUMS))
send_to_char(ch, "%-5s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room), 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); world[EXIT(ch, door)->to_room].name);
else else
@ -450,8 +445,6 @@ ACMD(do_exits)
send_to_char(ch, " None.\r\n"); send_to_char(ch, " None.\r\n");
} }
void look_at_room(struct char_data *ch, int ignore_brief) void look_at_room(struct char_data *ch, int ignore_brief)
{ {
struct room_data *rm = &world[IN_ROOM(ch)]; struct room_data *rm = &world[IN_ROOM(ch)];
@ -489,15 +482,10 @@ void look_at_room(struct char_data *ch, int ignore_brief)
do_auto_exits(ch); do_auto_exits(ch);
/* now list characters & objects */ /* now list characters & objects */
send_to_char(ch, "%s", CCGRN(ch, C_NRM));
list_obj_to_char(world[IN_ROOM(ch)].contents, ch, SHOW_OBJ_LONG, FALSE); list_obj_to_char(world[IN_ROOM(ch)].contents, ch, SHOW_OBJ_LONG, FALSE);
send_to_char(ch, "%s", CCYEL(ch, C_NRM));
list_char_to_char(world[IN_ROOM(ch)].people, ch); list_char_to_char(world[IN_ROOM(ch)].people, ch);
send_to_char(ch, "%s", CCNRM(ch, C_NRM));
} }
void look_in_direction(struct char_data *ch, int dir) void look_in_direction(struct char_data *ch, int dir)
{ {
if (EXIT(ch, dir)) { if (EXIT(ch, dir)) {
@ -514,8 +502,6 @@ void look_in_direction(struct char_data *ch, int dir)
send_to_char(ch, "Nothing special there...\r\n"); send_to_char(ch, "Nothing special there...\r\n");
} }
void look_in_obj(struct char_data *ch, char *arg) void look_in_obj(struct char_data *ch, char *arg)
{ {
struct obj_data *obj = NULL; struct obj_data *obj = NULL;
@ -568,8 +554,6 @@ void look_in_obj(struct char_data *ch, char *arg)
} }
} }
char *find_exdesc(char *word, struct extra_descr_data *list) char *find_exdesc(char *word, struct extra_descr_data *list)
{ {
struct extra_descr_data *i; struct extra_descr_data *i;
@ -581,7 +565,6 @@ char *find_exdesc(char *word, struct extra_descr_data *list)
return (NULL); return (NULL);
} }
/* /*
* 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 * matches the target. First, see if there is another char in the room
@ -668,7 +651,6 @@ void look_at_target(struct char_data *ch, char *arg)
send_to_char(ch, "You do not see that here.\r\n"); send_to_char(ch, "You do not see that here.\r\n");
} }
ACMD(do_look) ACMD(do_look)
{ {
int look_type; int look_type;
@ -722,8 +704,6 @@ ACMD(do_look)
} }
} }
ACMD(do_examine) ACMD(do_examine)
{ {
struct char_data *tmp_char; struct char_data *tmp_char;
@ -753,8 +733,6 @@ ACMD(do_examine)
} }
} }
ACMD(do_gold) ACMD(do_gold)
{ {
if (GET_GOLD(ch) == 0) if (GET_GOLD(ch) == 0)
@ -765,7 +743,6 @@ ACMD(do_gold)
send_to_char(ch, "You have %d gold coins.\r\n", GET_GOLD(ch)); send_to_char(ch, "You have %d gold coins.\r\n", GET_GOLD(ch));
} }
ACMD(do_score) ACMD(do_score)
{ {
struct time_info_data playing_time; struct time_info_data playing_time;
@ -892,7 +869,6 @@ ACMD(do_inventory)
list_obj_to_char(ch->carrying, ch, SHOW_OBJ_SHORT, TRUE); list_obj_to_char(ch->carrying, ch, SHOW_OBJ_SHORT, TRUE);
} }
ACMD(do_equipment) ACMD(do_equipment)
{ {
int i, found = 0; int i, found = 0;
@ -915,7 +891,6 @@ ACMD(do_equipment)
send_to_char(ch, " Nothing.\r\n"); send_to_char(ch, " Nothing.\r\n");
} }
ACMD(do_time) ACMD(do_time)
{ {
const char *suf; const char *suf;
@ -959,7 +934,6 @@ ACMD(do_time)
day, suf, month_name[time_info.month], time_info.year); day, suf, month_name[time_info.month], time_info.year);
} }
ACMD(do_weather) ACMD(do_weather)
{ {
const char *sky_look[] = { const char *sky_look[] = {
@ -1073,7 +1047,6 @@ ACMD(do_help)
page_string(ch->desc, help_table[mid].entry, 0); page_string(ch->desc, help_table[mid].entry, 0);
} }
#define WHO_FORMAT \ #define WHO_FORMAT \
"Usage: who [minlev[-maxlev]] [-n name] [-c classlist] [-k] [-l] [-n] [-q] [-r] [-s] [-z]\r\n" "Usage: who [minlev[-maxlev]] [-n name] [-c classlist] [-k] [-l] [-n] [-q] [-r] [-s] [-z]\r\n"
@ -1314,11 +1287,9 @@ ACMD(do_who)
send_to_char(ch, "%d characters displayed.\r\n", num_can_see); send_to_char(ch, "%d characters displayed.\r\n", num_can_see);
} }
#define USERS_FORMAT \ #define USERS_FORMAT \
"format: users [-l minlevel[-maxlevel]] [-n name] [-h host] [-c classlist] [-o] [-p]\r\n" "format: users [-l minlevel[-maxlevel]] [-n name] [-h host] [-c classlist] [-o] [-p]\r\n"
/* BIG OL' FIXME: Rewrite it all. Similar to do_who(). */
ACMD(do_users) ACMD(do_users)
{ {
char line[200], line2[220], idletime[10], classname[20]; char line[200], line2[220], idletime[10], classname[20];
@ -1383,7 +1354,7 @@ ACMD(do_users)
} }
} /* end while (parser) */ } /* end while (parser) */
send_to_char(ch, send_to_char(ch,
"Num Class Name State Idl Login@ Site\r\n" "Num Class Name State Idl Login@@ Site\r\n"
"--- ------- ------------ -------------- ----- -------- ------------------------\r\n"); "--- ------- ------------ -------------- ----- -------- ------------------------\r\n");
one_argument(argument, arg); one_argument(argument, arg);
@ -1462,7 +1433,6 @@ ACMD(do_users)
send_to_char(ch, "\r\n%d visible sockets connected.\r\n", num_can_see); send_to_char(ch, "\r\n%d visible sockets connected.\r\n", num_can_see);
} }
/* Generic page_string function for displaying text */ /* Generic page_string function for displaying text */
ACMD(do_gen_ps) ACMD(do_gen_ps)
{ {
@ -1520,7 +1490,6 @@ ACMD(do_gen_ps)
} }
} }
void perform_mortal_where(struct char_data *ch, char *arg) void perform_mortal_where(struct char_data *ch, char *arg)
{ {
struct char_data *i; struct char_data *i;
@ -1554,7 +1523,6 @@ void perform_mortal_where(struct char_data *ch, char *arg)
} }
} }
void print_object_location(int num, struct obj_data *obj, struct char_data *ch, void print_object_location(int num, struct obj_data *obj, struct char_data *ch,
int recur) int recur)
{ {
@ -1580,8 +1548,6 @@ void print_object_location(int num, struct obj_data *obj, struct char_data *ch,
send_to_char(ch, "in an unknown location\r\n"); send_to_char(ch, "in an unknown location\r\n");
} }
void perform_immort_where(struct char_data *ch, char *arg) void perform_immort_where(struct char_data *ch, char *arg)
{ {
struct char_data *i; struct char_data *i;
@ -1621,8 +1587,6 @@ void perform_immort_where(struct char_data *ch, char *arg)
} }
} }
ACMD(do_where) ACMD(do_where)
{ {
char arg[MAX_INPUT_LENGTH]; char arg[MAX_INPUT_LENGTH];
@ -1635,8 +1599,6 @@ ACMD(do_where)
perform_mortal_where(ch, arg); perform_mortal_where(ch, arg);
} }
ACMD(do_levels) ACMD(do_levels)
{ {
char buf[MAX_STRING_LENGTH]; char buf[MAX_STRING_LENGTH];
@ -1677,8 +1639,6 @@ ACMD(do_levels)
page_string(ch->desc, buf, TRUE); page_string(ch->desc, buf, TRUE);
} }
ACMD(do_consider) ACMD(do_consider)
{ {
char buf[MAX_INPUT_LENGTH]; char buf[MAX_INPUT_LENGTH];
@ -1725,8 +1685,6 @@ ACMD(do_consider)
send_to_char(ch, "You ARE mad!\r\n"); send_to_char(ch, "You ARE mad!\r\n");
} }
ACMD(do_diagnose) ACMD(do_diagnose)
{ {
char buf[MAX_INPUT_LENGTH]; char buf[MAX_INPUT_LENGTH];
@ -2009,8 +1967,11 @@ ACMD(do_toggle)
case SCMD_AFK: case SCMD_AFK:
if ((result = PRF_TOG_CHK(ch, PRF_AFK))) if ((result = PRF_TOG_CHK(ch, PRF_AFK)))
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 return to $s keyboard.", TRUE, ch, 0, 0, TO_ROOM); act("$n has return to $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
if (has_mail(GET_IDNUM(ch)))
send_to_char(ch, "You have mail waiting.\r\n");
}
break; break;
case SCMD_WIMPY: case SCMD_WIMPY:
if (!*arg2) { if (!*arg2) {
@ -2076,7 +2037,6 @@ int sort_commands_helper(const void *a, const void *b)
complete_cmd_info[*(const int *)b].sort_as); complete_cmd_info[*(const int *)b].sort_as);
} }
void sort_commands(void) void sort_commands(void)
{ {
int a, num_of_cmds = 0; int a, num_of_cmds = 0;
@ -2094,7 +2054,6 @@ void sort_commands(void)
qsort(cmd_sort_info + 1, num_of_cmds - 2, sizeof(int), sort_commands_helper); qsort(cmd_sort_info + 1, num_of_cmds - 2, sizeof(int), sort_commands_helper);
} }
ACMD(do_commands) ACMD(do_commands)
{ {
int no, i, cmd_num; int no, i, cmd_num;

View file

@ -836,6 +836,8 @@ void do_stat_character(struct char_data *ch, struct char_data *k)
send_to_char(ch, ", OLC[%sAedit%s]", CCCYN(ch, C_NRM), CCNRM(ch, C_NRM)); send_to_char(ch, ", OLC[%sAedit%s]", CCCYN(ch, C_NRM), CCNRM(ch, C_NRM));
else if (GET_OLC_ZONE(k)==HEDIT_PERMISSION) else if (GET_OLC_ZONE(k)==HEDIT_PERMISSION)
send_to_char(ch, ", OLC[%sHedit%s]", CCCYN(ch, C_NRM), CCNRM(ch, C_NRM)); send_to_char(ch, ", OLC[%sHedit%s]", CCCYN(ch, C_NRM), CCNRM(ch, C_NRM));
else if (GET_OLC_ZONE(k) == ALL_PERMISSION)
send_to_char(ch, ", OLC[%sAll%s]", CCCYN(ch, C_NRM), CCNRM(ch, C_NRM));
else if (GET_OLC_ZONE(k)==NOWHERE) else if (GET_OLC_ZONE(k)==NOWHERE)
send_to_char(ch, ", OLC[%sOFF%s]", CCCYN(ch, C_NRM), CCNRM(ch, C_NRM)); send_to_char(ch, ", OLC[%sOFF%s]", CCCYN(ch, C_NRM), CCNRM(ch, C_NRM));
else else
@ -2160,7 +2162,7 @@ ACMD(do_wiznet)
delete_doubledollar(argument); delete_doubledollar(argument);
if (!*argument) { if (!*argument) {
send_to_char(ch, "Usage: wiznet <text> | #<level> <text> | *<emotetext> |\r\n wiznet @<level> *<emotetext> | wiz @\r\n"); send_to_char(ch, "Usage: wiznet [ #<level> ] [<text> | *<emotetext> | @@ ]\r\n");
return; return;
} }
switch (*argument) { switch (*argument) {
@ -3020,8 +3022,10 @@ int perform_set(struct char_data *ch, struct char_data *vict, int mode, char *va
case 36: /* olc */ case 36: /* olc */
if (is_abbrev(val_arg, "socials") || is_abbrev(val_arg, "actions") || is_abbrev(val_arg, "aedit")) if (is_abbrev(val_arg, "socials") || is_abbrev(val_arg, "actions") || is_abbrev(val_arg, "aedit"))
GET_OLC_ZONE(vict) = AEDIT_PERMISSION; GET_OLC_ZONE(vict) = AEDIT_PERMISSION;
else if (is_abbrev(val_arg, "hedit")) else if (is_abbrev(val_arg, "hedit") || is_abbrev(val_arg, "help"))
GET_OLC_ZONE(vict) = HEDIT_PERMISSION; GET_OLC_ZONE(vict) = HEDIT_PERMISSION;
else if (*val_arg == '*' || is_abbrev(val_arg, "all"))
GET_OLC_ZONE(vict) = ALL_PERMISSION;
else if (is_abbrev(val_arg, "off")) else if (is_abbrev(val_arg, "off"))
GET_OLC_ZONE(vict) = NOWHERE; GET_OLC_ZONE(vict) = NOWHERE;
else if (!is_number(val_arg)) { else if (!is_number(val_arg)) {

View file

@ -53,7 +53,7 @@ ACMD(do_oasis_aedit)
return; return;
} }
if (GET_OLC_ZONE(ch) != AEDIT_PERMISSION && GET_LEVEL(ch) < LVL_GOD) { if (!can_edit_zone(ch, AEDIT_PERMISSION)) {
send_to_char(ch, "You don't have access to editing socials.\r\n"); send_to_char(ch, "You don't have access to editing socials.\r\n");
return; return;
} }

View file

@ -10,7 +10,6 @@
#include "conf.h" #include "conf.h"
#include "sysdep.h" #include "sysdep.h"
#include "structs.h" #include "structs.h"
#include "interpreter.h" /* alias_data */ #include "interpreter.h" /* alias_data */
@ -24,11 +23,8 @@ cpp_extern const char *ascii_pfiles_version =
"ASCII Player Files 3.0.1"; "ASCII Player Files 3.0.1";
/* strings corresponding to ordinals/bitvectors in structs.h */ /* strings corresponding to ordinals/bitvectors in structs.h */
/* (Note: strings for class definitions in class.c instead of here) */ /* (Note: strings for class definitions in class.c instead of here) */
/* cardinal directions */ /* cardinal directions */
const char *dirs[] = const char *dirs[] =
{ {
@ -41,7 +37,6 @@ const char *dirs[] =
"\n" "\n"
}; };
/* ROOM_x */ /* ROOM_x */
const char *room_bits[] = { const char *room_bits[] = {
"DARK", "DARK",
@ -63,7 +58,6 @@ const char *room_bits[] = {
"\n" "\n"
}; };
/* EX_x */ /* EX_x */
const char *exit_bits[] = { const char *exit_bits[] = {
"DOOR", "DOOR",
@ -73,7 +67,6 @@ const char *exit_bits[] = {
"\n" "\n"
}; };
/* SECT_ */ /* SECT_ */
const char *sector_types[] = { const char *sector_types[] = {
"Inside", "Inside",
@ -89,7 +82,6 @@ const char *sector_types[] = {
"\n" "\n"
}; };
/* /*
* SEX_x * SEX_x
* Not used in sprinttype() so no \n. * Not used in sprinttype() so no \n.
@ -102,7 +94,6 @@ const char *genders[] =
"\n" "\n"
}; };
/* POS_x */ /* POS_x */
const char *position_types[] = { const char *position_types[] = {
"Dead", "Dead",
@ -117,7 +108,6 @@ const char *position_types[] = {
"\n" "\n"
}; };
/* PLR_x */ /* PLR_x */
const char *player_bits[] = { const char *player_bits[] = {
"KILLER", "KILLER",
@ -145,7 +135,6 @@ const char *player_bits[] = {
"\n" "\n"
}; };
/* MOB_x */ /* MOB_x */
const char *action_bits[] = { const char *action_bits[] = {
"SPEC", "SPEC",
@ -170,7 +159,6 @@ const char *action_bits[] = {
"\n" "\n"
}; };
/* PRF_x */ /* PRF_x */
const char *preference_bits[] = { const char *preference_bits[] = {
"BRIEF", "BRIEF",
@ -207,7 +195,6 @@ const char *preference_bits[] = {
"\n" "\n"
}; };
/* AFF_x */ /* AFF_x */
const char *affected_bits[] = const char *affected_bits[] =
{ {
@ -236,7 +223,6 @@ const char *affected_bits[] =
"\n" "\n"
}; };
/* CON_x */ /* CON_x */
const char *connected_types[] = { const char *connected_types[] = {
"Playing", "Playing",
@ -295,7 +281,6 @@ const char *wear_where[] = {
"<held> " "<held> "
}; };
/* WEAR_x - for stat */ /* WEAR_x - for stat */
const char *equipment_types[] = { const char *equipment_types[] = {
"Used as light", "Used as light",
@ -319,7 +304,6 @@ const char *equipment_types[] = {
"\n" "\n"
}; };
/* ITEM_x (ordinal object types) */ /* ITEM_x (ordinal object types) */
const char *item_types[] = { const char *item_types[] = {
"UNDEFINED", "UNDEFINED",
@ -349,7 +333,6 @@ const char *item_types[] = {
"\n" "\n"
}; };
/* ITEM_WEAR_ (wear bitvector) */ /* ITEM_WEAR_ (wear bitvector) */
const char *wear_bits[] = { const char *wear_bits[] = {
"TAKE", "TAKE",
@ -370,7 +353,6 @@ const char *wear_bits[] = {
"\n" "\n"
}; };
/* ITEM_x (extra bits) */ /* ITEM_x (extra bits) */
const char *extra_bits[] = { const char *extra_bits[] = {
"GLOW", "GLOW",
@ -393,7 +375,6 @@ const char *extra_bits[] = {
"\n" "\n"
}; };
/* APPLY_x */ /* APPLY_x */
const char *apply_types[] = { const char *apply_types[] = {
"NONE", "NONE",
@ -424,7 +405,6 @@ const char *apply_types[] = {
"\n" "\n"
}; };
/* CONT_x */ /* CONT_x */
const char *container_bits[] = { const char *container_bits[] = {
"CLOSEABLE", "CLOSEABLE",
@ -434,7 +414,6 @@ const char *container_bits[] = {
"\n", "\n",
}; };
/* LIQ_x */ /* LIQ_x */
const char *drinks[] = const char *drinks[] =
{ {
@ -457,10 +436,7 @@ const char *drinks[] =
"\n" "\n"
}; };
/* other constants for liquids ******************************************/ /* other constants for liquids ******************************************/
/* one-word alias for each drink */ /* one-word alias for each drink */
const char *drinknames[] = const char *drinknames[] =
{ {
@ -483,7 +459,6 @@ const char *drinknames[] =
"\n" "\n"
}; };
/* effect of drinks on hunger, thirst, and drunkenness -- see values.doc */ /* effect of drinks on hunger, thirst, and drunkenness -- see values.doc */
int drink_aff[][3] = { int drink_aff[][3] = {
{0, 1, 10}, {0, 1, 10},
@ -504,7 +479,6 @@ int drink_aff[][3] = {
{0, 0, 13} {0, 0, 13}
}; };
/* color of the various drinks */ /* color of the various drinks */
const char *color_liquid[] = const char *color_liquid[] =
{ {
@ -527,7 +501,6 @@ const char *color_liquid[] =
"\n" "\n"
}; };
/* /*
* level of fullness for drink containers * level of fullness for drink containers
* Not used in sprinttype() so no \n. * Not used in sprinttype() so no \n.
@ -540,10 +513,7 @@ const char *fullness[] =
"" ""
}; };
/* str, int, wis, dex, con applies **************************************/ /* str, int, wis, dex, con applies **************************************/
/* [ch] strength apply (all) */ /* [ch] strength apply (all) */
cpp_extern const struct str_app_type str_app[] = { cpp_extern const struct str_app_type str_app[] = {
{-5, -4, 0, 0}, /* str = 0 */ {-5, -4, 0, 0}, /* str = 0 */
@ -579,8 +549,6 @@ cpp_extern const struct str_app_type str_app[] = {
{3, 6, 480, 30} /* str = 18/100 */ {3, 6, 480, 30} /* str = 18/100 */
}; };
/* [dex] skill apply (thieves only) */ /* [dex] skill apply (thieves only) */
cpp_extern const struct dex_skill_type dex_app_skill[] = { cpp_extern const struct dex_skill_type dex_app_skill[] = {
{-99, -99, -90, -99, -60}, /* dex = 0 */ {-99, -99, -90, -99, -60}, /* dex = 0 */
@ -611,8 +579,6 @@ cpp_extern const struct dex_skill_type dex_app_skill[] = {
{25, 30, 15, 25, 25} /* dex = 25 */ {25, 30, 15, 25, 25} /* dex = 25 */
}; };
/* [dex] apply (all) */ /* [dex] apply (all) */
cpp_extern const struct dex_app_type dex_app[] = { cpp_extern const struct dex_app_type dex_app[] = {
{-7, -7, 6}, /* dex = 0 */ {-7, -7, 6}, /* dex = 0 */
@ -643,8 +609,6 @@ cpp_extern const struct dex_app_type dex_app[] = {
{5, 5, -6} /* dex = 25 */ {5, 5, -6} /* dex = 25 */
}; };
/* [con] apply (all) */ /* [con] apply (all) */
cpp_extern const struct con_app_type con_app[] = { cpp_extern const struct con_app_type con_app[] = {
{-4, 20}, /* con = 0 */ {-4, 20}, /* con = 0 */
@ -675,8 +639,6 @@ cpp_extern const struct con_app_type con_app[] = {
{6, 99} /* con = 25 */ {6, 99} /* con = 25 */
}; };
/* [int] apply (all) */ /* [int] apply (all) */
cpp_extern const struct int_app_type int_app[] = { cpp_extern const struct int_app_type int_app[] = {
{3}, /* int = 0 */ {3}, /* int = 0 */
@ -707,7 +669,6 @@ cpp_extern const struct int_app_type int_app[] = {
{60} /* int = 25 */ {60} /* int = 25 */
}; };
/* [wis] apply (all) */ /* [wis] apply (all) */
cpp_extern const struct wis_app_type wis_app[] = { cpp_extern const struct wis_app_type wis_app[] = {
{0}, /* wis = 0 */ {0}, /* wis = 0 */
@ -738,14 +699,12 @@ cpp_extern const struct wis_app_type wis_app[] = {
{7} /* wis = 25 */ {7} /* wis = 25 */
}; };
const char *npc_class_types[] = { const char *npc_class_types[] = {
"Normal", "Normal",
"Undead", "Undead",
"\n" "\n"
}; };
int rev_dir[] = int rev_dir[] =
{ {
2, 2,
@ -756,7 +715,6 @@ int rev_dir[] =
4 4
}; };
int movement_loss[] = int movement_loss[] =
{ {
1, /* Inside */ 1, /* Inside */
@ -782,7 +740,6 @@ const char *weekdays[] = {
"the Day of the Sun" "the Day of the Sun"
}; };
/* Not used in sprinttype(). */ /* Not used in sprinttype(). */
const char *month_name[] = { const char *month_name[] = {
"Month of Winter", /* 0 */ "Month of Winter", /* 0 */
@ -829,7 +786,6 @@ const char *trig_types[] = {
"\n" "\n"
}; };
/* obj trigger types */ /* obj trigger types */
const char *otrig_types[] = { const char *otrig_types[] = {
"Global", "Global",
@ -855,7 +811,6 @@ const char *otrig_types[] = {
"\n" "\n"
}; };
/* wld trigger types */ /* wld trigger types */
const char *wtrig_types[] = { const char *wtrig_types[] = {
"Global", "Global",
@ -881,27 +836,6 @@ const char *wtrig_types[] = {
"\n" "\n"
}; };
#if defined(CONFIG_OASIS_MPROG)
/*
* Definitions necessary for MobProg support in OasisOLC
*/
const char *mobprog_types[] = {
"INFILE",
"ACT",
"SPEECH",
"RAND",
"FIGHT",
"DEATH",
"HITPRCNT",
"ENTRY",
"GREET",
"ALL_GREET",
"GIVE",
"BRIBE",
"\n"
};
#endif
/* --- End of constants arrays. --- */ /* --- End of constants arrays. --- */
/* /*

View file

@ -38,9 +38,6 @@ extern int drink_aff[][3];
extern const char *trig_types[]; extern const char *trig_types[];
extern const char *otrig_types[]; extern const char *otrig_types[];
extern const char *wtrig_types[]; extern const char *wtrig_types[];
#if defined(CONFIG_OASIS_MPROG)
extern const char *mobprog_types[];
#endif
extern size_t room_bits_count; extern size_t room_bits_count;
extern size_t action_bits_count; extern size_t action_bits_count;
extern size_t affected_bits_count; extern size_t affected_bits_count;

View file

@ -3279,7 +3279,7 @@ void load_default_config( void )
CONFIG_DON_ROOM_3 = donation_room_3; CONFIG_DON_ROOM_3 = donation_room_3;
/****************************************************************************/ /****************************************************************************/
/**eration options. **/ /** Game operation options. **/
/****************************************************************************/ /****************************************************************************/
CONFIG_DFLT_PORT = DFLT_PORT; CONFIG_DFLT_PORT = DFLT_PORT;

View file

@ -70,15 +70,6 @@ int add_mobile(struct char_data *mob, mob_vnum vnum)
log("GenOLC: add_mobile: Added mobile %d at index #%d.", vnum, found); log("GenOLC: add_mobile: Added mobile %d at index #%d.", vnum, found);
#if CONFIG_GENOLC_MOBPROG
GET_MPROG(OLC_MOB(d)) = OLC_MPROGL(d);
GET_MPROG_TYPE(OLC_MOB(d)) = (OLC_MPROGL(d) ? OLC_MPROGL(d)->type : 0);
while (OLC_MPROGL(d)) {
GET_MPROG_TYPE(OLC_MOB(d)) |= OLC_MPROGL(d)->type;
OLC_MPROGL(d) = OLC_MPROGL(d)->next;
}
#endif
/* /*
* Update live mobile rnums. * Update live mobile rnums.
*/ */
@ -313,29 +304,6 @@ int save_mobiles(zone_rnum rznum)
return written; return written;
} }
#if CONFIG_GENOLC_MOBPROG
int write_mobile_mobprog(mob_vnum mvnum, struct char_data *mob, FILE *fd)
{
char wmmarg[MAX_STRING_LENGTH], wmmcom[MAX_STRING_LENGTH];
MPROG_DATA *mob_prog;
for (mob_prog = GET_MPROG(mob); mob_prog; mob_prog = mob_prog->next) {
wmmarg[MAX_STRING_LENGTH - 1] = '\0';
wmmcom[MAX_STRING_LENGTH - 1] = '\0';
strip_cr(strncpy(wmmarg, mob_prog->arglist, MAX_STRING_LENGTH - 1));
strip_cr(strncpy(wmmcom, mob_prog->comlist, MAX_STRING_LENGTH - 1));
fprintf(fd, "%s %s~\n"
"%s%c\n",
medit_get_mprog_type(mob_prog), wmmarg,
wmmcom, STRING_TERMINATOR
);
if (mob_prog->next == NULL)
fputs("|\n", fd);
}
return TRUE;
}
#endif
int write_mobile_espec(mob_vnum mvnum, struct char_data *mob, FILE *fd) int write_mobile_espec(mob_vnum mvnum, struct char_data *mob, FILE *fd)
{ {
if (GET_ATTACK(mob) != 0) if (GET_ATTACK(mob) != 0)

View file

@ -26,17 +26,8 @@
/* external variables */ /* external variables */
extern struct attack_hit_type attack_hit_text[]; extern struct attack_hit_type attack_hit_text[];
#if CONFIG_OASIS_MPROG
extern const char *mobprog_types[];
#endif
/* local functions */ /* local functions */
#if CONFIG_OASIS_MPROG
void medit_disp_mprog(struct descriptor_data *d);
void medit_disp_mprog_types(struct descriptor_data *d);
void medit_change_mprog(struct descriptor_data *d);
const char *medit_get_mprog_type(struct mob_prog_data *mprog);
#endif
void medit_setup_new(struct descriptor_data *d); void medit_setup_new(struct descriptor_data *d);
void medit_setup_existing(struct descriptor_data *d, int rmob_num); void medit_setup_existing(struct descriptor_data *d, int rmob_num);
void init_mobile(struct char_data *mob); void init_mobile(struct char_data *mob);
@ -49,12 +40,6 @@ void medit_disp_mob_flags(struct descriptor_data *d);
void medit_disp_aff_flags(struct descriptor_data *d); void medit_disp_aff_flags(struct descriptor_data *d);
void medit_disp_menu(struct descriptor_data *d); void medit_disp_menu(struct descriptor_data *d);
/* handy macros */
#if CONFIG_OASIS_MPROG
#define GET_MPROG(mob) (mob_index[(mob)->nr].mobprogs)
#define GET_MPROG_TYPE(mob) (mob_index[(mob)->nr].progtypes)
#endif
/*-------------------------------------------------------------------*\ /*-------------------------------------------------------------------*\
utility functions utility functions
\*-------------------------------------------------------------------*/ \*-------------------------------------------------------------------*/
@ -226,10 +211,6 @@ void medit_setup_new(struct descriptor_data *d)
GET_SDESC(mob) = strdup("the unfinished mob"); GET_SDESC(mob) = strdup("the unfinished mob");
GET_LDESC(mob) = strdup("An unfinished mob stands here.\r\n"); GET_LDESC(mob) = strdup("An unfinished mob stands here.\r\n");
GET_DDESC(mob) = strdup("It looks unfinished.\r\n"); GET_DDESC(mob) = strdup("It looks unfinished.\r\n");
#if CONFIG_OASIS_MPROG
OLC_MPROGL(d) = NULL;
OLC_MPROG(d) = NULL;
#endif
SCRIPT(mob) = NULL; SCRIPT(mob) = NULL;
mob->proto_script = OLC_SCRIPT(d) = NULL; mob->proto_script = OLC_SCRIPT(d) = NULL;
@ -254,28 +235,6 @@ void medit_setup_existing(struct descriptor_data *d, int rmob_num)
copy_mobile(mob, mob_proto + rmob_num); copy_mobile(mob, mob_proto + rmob_num);
#if CONFIG_OASIS_MPROG
{
MPROG_DATA *temp;
MPROG_DATA *head;
if (GET_MPROG(mob))
CREATE(OLC_MPROGL(d), MPROG_DATA, 1);
head = OLC_MPROGL(d);
for (temp = GET_MPROG(mob); temp; temp = temp->next) {
OLC_MPROGL(d)->type = temp->type;
OLC_MPROGL(d)->arglist = strdup(temp->arglist);
OLC_MPROGL(d)->comlist = strdup(temp->comlist);
if (temp->next) {
CREATE(OLC_MPROGL(d)->next, MPROG_DATA, 1);
OLC_MPROGL(d) = OLC_MPROGL(d)->next;
}
}
OLC_MPROGL(d) = head;
OLC_MPROG(d) = OLC_MPROGL(d);
}
#endif
OLC_MOB(d) = mob; OLC_MOB(d) = mob;
OLC_ITEM_TYPE(d) = MOB_TRIGGER; OLC_ITEM_TYPE(d) = MOB_TRIGGER;
dg_olc_script_copy(d); dg_olc_script_copy(d);
@ -332,8 +291,6 @@ void medit_save_internally(struct descriptor_data *d)
return; return;
} }
/* Update triggers */ /* Update triggers */
/* Free old proto list */ /* Free old proto list */
if (mob_proto[new_rnum].proto_script && if (mob_proto[new_rnum].proto_script &&
@ -401,97 +358,6 @@ void medit_disp_positions(struct descriptor_data *d)
write_to_output(d, "Enter position number : "); write_to_output(d, "Enter position number : ");
} }
/*-------------------------------------------------------------------*/
#if CONFIG_OASIS_MPROG
/*
* Get the type of MobProg.
*/
const char *medit_get_mprog_type(struct mob_prog_data *mprog)
{
switch (mprog->type) {
case IN_FILE_PROG: return ">in_file_prog";
case ACT_PROG: return ">act_prog";
case SPEECH_PROG: return ">speech_prog";
case RAND_PROG: return ">rand_prog";
case FIGHT_PROG: return ">fight_prog";
case HITPRCNT_PROG: return ">hitprcnt_prog";
case DEATH_PROG: return ">death_prog";
case ENTRY_PROG: return ">entry_prog";
case GREET_PROG: return ">greet_prog";
case ALL_GREET_PROG: return ">all_greet_prog";
case GIVE_PROG: return ">give_prog";
case BRIBE_PROG: return ">bribe_prog";
}
return ">ERROR_PROG";
}
/*-------------------------------------------------------------------*/
/*
* Display the MobProgs.
*/
void medit_disp_mprog(struct descriptor_data *d)
{
struct mob_prog_data *mprog = OLC_MPROGL(d);
OLC_MTOTAL(d) = 1;
clear_screen(d);
while (mprog) {
write_to_output(d, "%d) %s %s\r\n", OLC_MTOTAL(d), medit_get_mprog_type(mprog),
(mprog->arglist ? mprog->arglist : "NONE"));
OLC_MTOTAL(d)++;
mprog = mprog->next;
}
write_to_output(d, "%d) Create New Mob Prog\r\n"
"%d) Purge Mob Prog\r\n"
"Enter number to edit [0 to exit]: ",
OLC_MTOTAL(d), OLC_MTOTAL(d) + 1);
OLC_MODE(d) = MEDIT_MPROG;
}
/*-------------------------------------------------------------------*/
/*
* Change the MobProgs.
*/
void medit_change_mprog(struct descriptor_data *d)
{
clear_screen(d);
write_to_output(d, "1) Type: %s\r\n"
"2) Args: %s\r\n"
"3) Commands:\r\n%s\r\n\r\n"
"Enter number to edit [0 to exit]: ",
medit_get_mprog_type(OLC_MPROG(d)),
(OLC_MPROG(d)->arglist ? OLC_MPROG(d)->arglist: "NONE"),
(OLC_MPROG(d)->comlist ? OLC_MPROG(d)->comlist : "NONE"));
OLC_MODE(d) = MEDIT_CHANGE_MPROG;
}
/*-------------------------------------------------------------------*/
/*
* Change the MobProg type.
*/
void medit_disp_mprog_types(struct descriptor_data *d)
{
int i;
get_char_colors(d->character);
clear_screen(d);
for (i = 0; i < NUM_PROGS-1; i++) {
write_to_output(d, "%s%2d%s) %s\r\n", grn, i, nrm, mobprog_types[i]);
}
write_to_output(d, "Enter mob prog type : ");
OLC_MODE(d) = MEDIT_MPROG_TYPE;
}
#endif
/*-------------------------------------------------------------------*/
/* /*
* Display the gender of the mobile. * Display the gender of the mobile.
*/ */
@ -622,9 +488,6 @@ void medit_disp_menu(struct descriptor_data *d)
"%sK%s) Attack : %s%s\r\n" "%sK%s) Attack : %s%s\r\n"
"%sL%s) NPC Flags : %s%s\r\n" "%sL%s) NPC Flags : %s%s\r\n"
"%sM%s) AFF Flags : %s%s\r\n" "%sM%s) AFF Flags : %s%s\r\n"
#if CONFIG_OASIS_MPROG
"%sP%s) Mob Progs : %s%s\r\n"
#endif
"%sS%s) Script : %s%s\r\n" "%sS%s) Script : %s%s\r\n"
"%sX%s) Delete mob\r\n" "%sX%s) Delete mob\r\n"
"%sQ%s) Quit\r\n" "%sQ%s) Quit\r\n"
@ -635,9 +498,6 @@ void medit_disp_menu(struct descriptor_data *d)
grn, nrm, yel, attack_hit_text[(int)GET_ATTACK(mob)].singular, grn, nrm, yel, attack_hit_text[(int)GET_ATTACK(mob)].singular,
grn, nrm, cyn, flags, grn, nrm, cyn, flags,
grn, nrm, cyn, flag2, grn, nrm, cyn, flag2,
#if CONFIG_OASIS_MPROG
grn, nrm, cyn, (OLC_MPROGL(d) ? "Set." : "Not Set."),
#endif
grn, nrm, cyn, OLC_SCRIPT(d) ?"Set.":"Not Set.", grn, nrm, cyn, OLC_SCRIPT(d) ?"Set.":"Not Set.",
grn, nrm, grn, nrm,
grn, nrm grn, nrm
@ -822,13 +682,6 @@ void medit_parse(struct descriptor_data *d, char *arg)
write_to_output(d, "Are you sure you want to delete this mobile? "); write_to_output(d, "Are you sure you want to delete this mobile? ");
OLC_MODE(d) = MEDIT_DELETE; OLC_MODE(d) = MEDIT_DELETE;
return; return;
#if CONFIG_OASIS_MPROG
case 'p':
case 'P':
OLC_MODE(d) = MEDIT_MPROG;
medit_disp_mprog(d);
return;
#endif
case 's': case 's':
case 'S': case 'S':
OLC_SCRIPT_EDIT_MODE(d) = SCRIPT_MAIN_MENU; OLC_SCRIPT_EDIT_MODE(d) = SCRIPT_MAIN_MENU;
@ -887,16 +740,6 @@ void medit_parse(struct descriptor_data *d, char *arg)
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: medit_parse(): Reached D_DESC case!"); mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: medit_parse(): Reached D_DESC case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
/*-------------------------------------------------------------------*/
#if CONFIG_OASIS_MPROG
case MEDIT_MPROG_COMLIST:
/*
* We should never get here, but if we do, bail out.
*/
cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: medit_parse(): Reached MPROG_COMLIST case!");
break;
#endif
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/
case MEDIT_NPC_FLAGS: case MEDIT_NPC_FLAGS:
if ((i = atoi(arg)) <= 0) if ((i = atoi(arg)) <= 0)
@ -917,102 +760,12 @@ void medit_parse(struct descriptor_data *d, char *arg)
AFF_CHARM | AFF_POISON | AFF_GROUP | AFF_SLEEP); AFF_CHARM | AFF_POISON | AFF_GROUP | AFF_SLEEP);
medit_disp_aff_flags(d); medit_disp_aff_flags(d);
return; return;
/*-------------------------------------------------------------------*/
#if CONFIG_OASIS_MPROG
case MEDIT_MPROG:
if ((i = atoi(arg)) == 0)
medit_disp_menu(d);
else if (i == OLC_MTOTAL(d)) {
struct mob_prog_data *temp;
CREATE(temp, struct mob_prog_data, 1);
temp->next = OLC_MPROGL(d);
temp->type = -1;
temp->arglist = NULL;
temp->comlist = NULL;
OLC_MPROG(d) = temp;
OLC_MPROGL(d) = temp;
OLC_MODE(d) = MEDIT_CHANGE_MPROG;
medit_change_mprog (d);
} else if (i < OLC_MTOTAL(d)) {
struct mob_prog_data *temp;
int x = 1;
for (temp = OLC_MPROGL(d); temp && x < i; temp = temp->next)
x++;
OLC_MPROG(d) = temp;
OLC_MODE(d) = MEDIT_CHANGE_MPROG;
medit_change_mprog (d);
} else if (i == (OLC_MTOTAL(d) + 1)) {
write_to_output(d, "Which mob prog do you want to purge? ");
OLC_MODE(d) = MEDIT_PURGE_MPROG;
} else
medit_disp_menu(d);
return;
case MEDIT_PURGE_MPROG:
if ((i = atoi(arg)) > 0 && i < OLC_MTOTAL(d)) {
struct mob_prog_data *temp;
int x = 1;
for (temp = OLC_MPROGL(d); temp && x < i; temp = temp->next)
x++;
OLC_MPROG(d) = temp;
REMOVE_FROM_LIST(OLC_MPROG(d), OLC_MPROGL(d), next);
free(OLC_MPROG(d)->arglist);
free(OLC_MPROG(d)->comlist);
free(OLC_MPROG(d));
OLC_MPROG(d) = NULL;
OLC_VAL(d) = 1;
}
medit_disp_mprog(d);
return;
case MEDIT_CHANGE_MPROG:
if ((i = atoi(arg)) == 1)
medit_disp_mprog_types(d);
else if (i == 2) {
write_to_output(d, "Enter new arg list: ");
OLC_MODE(d) = MEDIT_MPROG_ARGS;
} else if (i == 3) {
write_to_output(d, "Enter new mob prog commands:\r\n");
/*
* Pass control to modify.c for typing.
*/
OLC_MODE(d) = MEDIT_MPROG_COMLIST;
if (OLC_MPROG(d)->comlist) {
write_to_output(d, "%s", OLC_MPROG(d)->comlist);
oldtext = strdup(OLC_MPROG(d)->comlist);
}
string_write(d, &OLC_MPROG(d)->comlist, MAX_STRING_LENGTH, 0, oldtext);
OLC_VAL(d) = 1;
} else
medit_disp_mprog(d);
return;
#endif
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/
/* /*
* Numerical responses. * Numerical responses.
*/ */
#if CONFIG_OASIS_MPROG
case MEDIT_MPROG_TYPE:
/*
* This calculation may be off by one too many powers of 2?
* Someone who actually uses MobProgs will have to check.
*/
OLC_MPROG(d)->type = (1 << LIMIT(atoi(arg), 0, NUM_PROGS - 1));
OLC_VAL(d) = 1;
medit_change_mprog(d);
return;
case MEDIT_MPROG_ARGS:
OLC_MPROG(d)->arglist = strdup(arg);
OLC_VAL(d) = 1;
medit_change_mprog(d);
return;
#endif
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; break;
@ -1134,12 +887,6 @@ void medit_string_cleanup(struct descriptor_data *d, int terminator)
{ {
switch (OLC_MODE(d)) { switch (OLC_MODE(d)) {
#if CONFIG_OASIS_MPROG
case MEDIT_MPROG_COMLIST:
medit_change_mprog(d);
break;
#endif
case MEDIT_D_DESC: case MEDIT_D_DESC:
default: default:
medit_disp_menu(d); medit_disp_menu(d);

View file

@ -394,7 +394,13 @@ int can_edit_zone(struct char_data *ch, zone_rnum rnum)
if (!ch->desc || IS_NPC(ch) || rnum == NOWHERE) if (!ch->desc || IS_NPC(ch) || rnum == NOWHERE)
return FALSE; return FALSE;
if (rnum == HEDIT_PERMISSION) if (GET_OLC_ZONE(ch) == ALL_PERMISSION)
return TRUE;
if (GET_OLC_ZONE(ch) == HEDIT_PERMISSION && rnum == HEDIT_PERMISSION)
return TRUE;
if (GET_OLC_ZONE(ch) == AEDIT_PERMISSION && rnum == AEDIT_PERMISSION)
return TRUE; return TRUE;
/* always access if ch is high enough level */ /* always access if ch is high enough level */

View file

@ -16,18 +16,7 @@
#define AEDIT_PERMISSION 999 /* arbitrary number higher than max zone vnum*/ #define AEDIT_PERMISSION 999 /* arbitrary number higher than max zone vnum*/
#define HEDIT_PERMISSION 888 /* arbitrary number higher then max zone vnum*/ #define HEDIT_PERMISSION 888 /* arbitrary number higher then max zone vnum*/
#define ALL_PERMISSION 666 /* arbitrary number higher then max zone vnum*/
/*
* Set this to 1 to enable MobProg support. MobProgs are available on
* the CircleMUD FTP site in the "contrib/scripting/" directory.
*
* -- THIS WILL NOT WORK WITHOUT MobProgs INSTALLED. --
* -- OasisOLC DOES NOT COME WITH THEM. -- Loud enough for you?
*
* It might work with DG Scripts (successor to MobProgs) but I haven't
* tried, nor have I heard of anyone trying.
*/
#define CONFIG_OASIS_MPROG 0
/* /*
* Macros, defines, structs and globals for the OLC suite. You will need * Macros, defines, structs and globals for the OLC suite. You will need
@ -52,13 +41,6 @@
#define NUM_SHOP_FLAGS 3 #define NUM_SHOP_FLAGS 3
#define NUM_TRADERS 7 #define NUM_TRADERS 7
#if CONFIG_OASIS_MPROG
/*
* Define this to how many MobProg scripts you have.
*/
#define NUM_PROGS 12
#endif
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* /*
@ -136,11 +118,6 @@ struct oasis_olc_data {
struct shop_data *shop; /* used for 'sedit' */ struct shop_data *shop; /* used for 'sedit' */
struct config_data *config; /* used for 'cedit' */ struct config_data *config; /* used for 'cedit' */
struct extra_descr_data *desc; /* used in '[r|o|m]edit' */ struct extra_descr_data *desc; /* used in '[r|o|m]edit' */
#if CONFIG_OASIS_MPROG /* */
int total_mprogs; /* */
struct mob_prog_data *mprog; /* */
struct mob_prog_data *mprogl; /* */
#endif
struct social_messg *action; /* Aedit uses this one */ struct social_messg *action; /* Aedit uses this one */
struct trig_data *trig; struct trig_data *trig;
int script_mode; int script_mode;
@ -174,12 +151,6 @@ extern const char *nrm, *grn, *cyn, *yel;
#define OLC_CONFIG(d) (OLC(d)->config) /* Config structure. */ #define OLC_CONFIG(d) (OLC(d)->config) /* Config structure. */
#define OLC_TRIG(d) (OLC(d)->trig) /* Trigger structure. */ #define OLC_TRIG(d) (OLC(d)->trig) /* Trigger structure. */
#if CONFIG_OASIS_MPROG
#define OLC_MPROG(d) (OLC(d)->mprog) /* Temporary MobProg. */
#define OLC_MPROGL(d) (OLC(d)->mprogl) /* MobProg list. */
#define OLC_MTOTAL(d) (OLC(d)->total_mprogs) /* Total mprog number. */
#endif
#define OLC_ACTION(d) (OLC(d)->action) /* Action structure */ #define OLC_ACTION(d) (OLC(d)->action) /* Action structure */
#define OLC_HELP(d) (OLC(d)->help) /* Hedit structure */ #define OLC_HELP(d) (OLC(d)->help) /* Hedit structure */
@ -326,14 +297,6 @@ extern const char *nrm, *grn, *cyn, *yel;
#define MEDIT_LEVEL 25 #define MEDIT_LEVEL 25
#define MEDIT_ALIGNMENT 26 #define MEDIT_ALIGNMENT 26
#define MEDIT_DELETE 27 #define MEDIT_DELETE 27
#if CONFIG_OASIS_MPROG
#define MEDIT_MPROG 27
#define MEDIT_CHANGE_MPROG 28
#define MEDIT_MPROG_COMLIST 29
#define MEDIT_MPROG_ARGS 30
#define MEDIT_MPROG_TYPE 31
#define MEDIT_PURGE_MPROG 32
#endif
/* /*
* Submodes of SEDIT connectedness. * Submodes of SEDIT connectedness.

View file

@ -69,7 +69,12 @@ ACMD(do_oasis_list)
case SCMD_OASIS_RLIST: list_rooms(ch, rzone, vmin, vmax); break; case SCMD_OASIS_RLIST: list_rooms(ch, rzone, vmin, vmax); break;
case SCMD_OASIS_TLIST: list_triggers(ch, rzone, vmin, vmax); break; case SCMD_OASIS_TLIST: list_triggers(ch, rzone, vmin, vmax); break;
case SCMD_OASIS_SLIST: list_shops(ch, rzone, vmin, vmax); break; case SCMD_OASIS_SLIST: list_shops(ch, rzone, vmin, vmax); break;
case SCMD_OASIS_ZLIST: list_zones(ch, rzone, vmin, vmax); break; case SCMD_OASIS_ZLIST:
if (!*smin)
list_zones(ch, NOWHERE, 0, zone_table[top_of_zone_table].number);
else
list_zones(ch, rzone, vmin, vmax);
break;
default: default:
send_to_char(ch, "You can't list that!\r\n"); send_to_char(ch, "You can't list that!\r\n");
mudlog(BRF, LVL_IMMORT, TRUE, mudlog(BRF, LVL_IMMORT, TRUE,

View file

@ -486,11 +486,12 @@ void save_char(struct char_data * ch)
/* Unaffect everything a character can be affected by */ /* Unaffect everything a character can be affected by */
for (i = 0; i < NUM_WEARS; i++) { for (i = 0; i < NUM_WEARS; i++) {
if (GET_EQ(ch, i)) if (GET_EQ(ch, i)) {
char_eq[i] = unequip_char(ch, i); char_eq[i] = unequip_char(ch, i);
#ifndef NO_EXTRANEOUS_TRIGGERS #ifndef NO_EXTRANEOUS_TRIGGERS
remove_otrigger(char_eq[i], ch); remove_otrigger(char_eq[i], ch);
#endif #endif
}
else else
char_eq[i] = NULL; char_eq[i] = NULL;
} }

View file

@ -529,7 +529,7 @@
#define MAX_HELP_KEYWORDS 256 #define MAX_HELP_KEYWORDS 256
#define MAX_HELP_ENTRY MAX_STRING_LENGTH #define MAX_HELP_ENTRY MAX_STRING_LENGTH
/* define the largest set of commands for as trigger */ /* define the largest set of commands for a trigger */
#define MAX_CMD_LENGTH 16384 /* 16k should be plenty and then some */ #define MAX_CMD_LENGTH 16384 /* 16k should be plenty and then some */
/********************************************************************** /**********************************************************************