-
Notifications
You must be signed in to change notification settings - Fork 1
/
spec_assign.c
133 lines (103 loc) · 4.41 KB
/
spec_assign.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/* ************************************************************************
* file: spec_assign.c , Special module. Part of DIKUMUD *
* Usage: Procedures assigning function pointers. *
* Copyright (C) 1990, 1991 - see 'license.doc' for complete information. *
************************************************************************* */
#include <stdio.h>
#include "structs.h"
#include "db.h"
extern struct room_data *world;
extern struct index_data *mob_index;
extern struct index_data *obj_index;
void boot_the_shops();
void assign_the_shopkeepers();
/* ********************************************************************
* Assignments *
******************************************************************** */
/* assign special procedures to mobiles */
void assign_mobiles(void)
{
int cityguard(struct char_data *ch, int cmd, char *arg);
int receptionist(struct char_data *ch, int cmd, char *arg);
int guild(struct char_data *ch, int cmd, char *arg);
int guild_guard(struct char_data *ch, int cmd, char *arg);
int puff(struct char_data *ch, int cmd, char *arg);
int fido(struct char_data *ch, int cmd, char *arg);
int janitor(struct char_data *ch, int cmd, char *arg);
int mayor(struct char_data *ch, int cmd, char *arg);
int snake(struct char_data *ch, int cmd, char *arg);
int thief(struct char_data *ch, int cmd, char *arg);
int magic_user(struct char_data *ch, int cmd, char *arg);
int bat_red(struct char_data *ch, int cmd, char *arg);
int bat_blue(struct char_data *ch, int cmd, char *arg);
int bat_green(struct char_data *ch, int cmd, char *arg);
int bat_black(struct char_data *ch, int cmd, char *arg);
int bat_white(struct char_data *ch, int cmd, char *arg);
mob_index[real_mobile(1)].func = puff;
mob_index[real_mobile(3060)].func = cityguard;
mob_index[real_mobile(3067)].func = cityguard;
mob_index[real_mobile(3061)].func = janitor;
mob_index[real_mobile(3062)].func = fido;
mob_index[real_mobile(3066)].func = fido;
mob_index[real_mobile(3005)].func = receptionist;
mob_index[real_mobile(5007)].func = receptionist;
mob_index[real_mobile(3020)].func = guild;
mob_index[real_mobile(3021)].func = guild;
mob_index[real_mobile(3022)].func = guild;
mob_index[real_mobile(3023)].func = guild;
mob_index[real_mobile(3024)].func = guild_guard;
mob_index[real_mobile(3025)].func = guild_guard;
mob_index[real_mobile(3026)].func = guild_guard;
mob_index[real_mobile(3027)].func = guild_guard;
mob_index[real_mobile(3143)].func = mayor;
/* MORIA */
mob_index[real_mobile(4000)].func = snake;
mob_index[real_mobile(4001)].func = snake;
mob_index[real_mobile(4053)].func = snake;
mob_index[real_mobile(4103)].func = thief;
mob_index[real_mobile(4100)].func = magic_user;
mob_index[real_mobile(4102)].func = snake;
mob_index[real_mobile(4150)].func = bat_blue;
mob_index[real_mobile(4151)].func = bat_red;
mob_index[real_mobile(4152)].func = bat_green;
mob_index[real_mobile(4153)].func = bat_white;
mob_index[real_mobile(4154)].func = bat_black;
mob_index[real_mobile(4155)].func = thief;
mob_index[real_mobile(4157)].func = magic_user;
mob_index[real_mobile(4158)].func = snake;
/* SEWERS */
mob_index[real_mobile(7006)].func = snake;
mob_index[real_mobile(7040)].func = bat_red;
/* FOREST */
mob_index[real_mobile(6113)].func = snake;
mob_index[real_mobile(6114)].func = snake;
mob_index[real_mobile(6910)].func = magic_user;
boot_the_shops();
assign_the_shopkeepers();
}
/* assign special procedures to objects */
void assign_objects(void)
{
int board(struct char_data *ch, int cmd, char *arg);
obj_index[real_object(3099)].func = board;
}
/* assign special procedures to rooms */
void assign_rooms(void)
{
int dump(struct char_data *ch, int cmd, char *arg);
int chalice(struct char_data *ch, int cmd, char *arg);
int kings_hall(struct char_data *ch, int cmd, char *arg);
int pet_shops(struct char_data *ch, int cmd, char *arg);
int mar_gate(struct char_data *ch, int cmd, char *arg);
int pray_for_items(struct char_data *ch, int cmd, char *arg);
int worm_ritual(struct char_data *ch, int cmd, char *arg);
world[real_room(5039)].funct = worm_ritual;
world[real_room(3030)].funct = dump;
world[real_room(3054)].funct = pray_for_items;
/*
world[real_room(704)].funct = chalice;
world[real_room(2518)].funct = kings_hall;
*/
world[real_room(3031)].funct = pet_shops;
world[real_room(8001)].funct = mar_gate;
}