home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / d-linux.zip / dm-dist / spec_assign.c < prev    next >
C/C++ Source or Header  |  1991-03-01  |  4KB  |  113 lines

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