Crossfire Server, Trunk  R21226
citylife.c
Go to the documentation of this file.
1 /*****************************************************************************/
2 /* Template for version 2.0 plugins. */
3 /* Contact: yann.chachkoff@myrealbox.com */
4 /*****************************************************************************/
5 /* That code is placed under the GNU General Public Licence (GPL) */
6 /* (C)2001-2005 by Chachkoff Yann (Feel free to deliver your complaints) */
7 /*****************************************************************************/
8 /* CrossFire, A Multiplayer game for X-windows */
9 /* */
10 /* Copyright (C) 2000 Mark Wedel */
11 /* Copyright (C) 1992 Frank Tore Johansen */
12 /* */
13 /* This program is free software; you can redistribute it and/or modify */
14 /* it under the terms of the GNU General Public License as published by */
15 /* the Free Software Foundation; either version 2 of the License, or */
16 /* (at your option) any later version. */
17 /* */
18 /* This program is distributed in the hope that it will be useful, */
19 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
20 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
21 /* GNU General Public License for more details. */
22 /* */
23 /* You should have received a copy of the GNU General Public License */
24 /* along with this program; if not, write to the Free Software */
25 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
26 /* */
27 /*****************************************************************************/
28 
61 #include <stdarg.h>
62 #include <stdlib.h>
63 #include <string.h>
64 
65 #include "citylife.h"
66 #include "citylife_proto.h"
67 #include "svnversion.h"
68 
69 CF_PLUGIN char SvnRevPlugin[] = SVN_REV;
70 
71 CF_PLUGIN int initPlugin(const char *iversion, f_plug_api gethooksptr) {
72  cf_init_plugin(gethooksptr);
73 
74  cf_log(llevDebug, PLUGIN_VERSION " init\n");
75 
76  return 0;
77 }
78 
79 CF_PLUGIN void *getPluginProperty(int *type, ...) {
80  va_list args;
81  const char *propname;
82  int size;
83  char *buf;
84 
85  va_start(args, type);
86  propname = va_arg(args, const char *);
87 
88  if (!strcmp(propname, "Identification")) {
89  buf = va_arg(args, char *);
90  size = va_arg(args, int);
91  va_end(args);
92  snprintf(buf, size, PLUGIN_NAME);
93  return NULL;
94  } else if (!strcmp(propname, "FullName")) {
95  buf = va_arg(args, char *);
96  size = va_arg(args, int);
97  va_end(args);
98  snprintf(buf, size, PLUGIN_VERSION);
99  return NULL;
100  }
101  va_end(args);
102  return NULL;
103 }
104 
105 CF_PLUGIN int citylife_runPluginCommand(object *op, char *params) {
106  return -1;
107 }
108 
110 #define FIRST_MOVE_KEY "citylife_first_move"
111 
115 typedef struct {
116  int x;
117  int y;
118 } spawn_point;
119 
124 typedef struct {
125  int sx, sy, ex, ey;
126 } spawn_zone;
127 
131 typedef struct {
134  const spawn_zone *zones;
137  const char *mapname;
138  const char *const *available_archetypes;
140 } mapzone;
151 static const spawn_zone scorn_nw_zones[] = {
152  { 40, 26, 50, 50 }
153 };
154 
156 static const spawn_point scorn_nw_points[] = {
157  { 41, 37 },
158  { 48, 35 },
159  { 49, 40 },
160  { 47, 22 },
161  { 49, 37 }
162 };
163 
165 static const spawn_zone scorn_ne_zones[] = {
166  { 0, 26, 22, 50 }
167 };
168 
170 static const spawn_point scorn_ne_points[] = {
171  { 15, 42 },
172  { 9, 35 },
173  { 15, 29 },
174  { 1, 25 },
175  { 1, 29 }
176 };
177 
179 static const spawn_zone scorn_sw_zones[] = {
180  { 41, 0, 50, 10 }
181 };
182 
184 static const spawn_point scorn_sw_points[] = {
185  { 41, 2 },
186  { 46, 8 },
187  { 42, 8 }
188 };
189 
191 static const spawn_zone scorn_se_zones[] = {
192  { 0, 0, 13, 10 }
193 };
194 
196 static const spawn_point scorn_se_points[] = {
197  { 2, 8 },
198  { 11, 8 },
199  { 8, 1 },
200  { 5, 8 }
201 };
202 
204 static const char *const scorn_archs[] = {
205  "c_man",
206  "c_woman",
207  "child",
208  "farmer",
209  "fatman",
210  "fatwoman",
211  "guard",
212  "knight",
213  "man",
214  "nun",
215  "sage",
216  "woman"
217 };
218 
229 static const spawn_zone darcap_zones[] = {
230  { 19, 24, 32, 33 },
231  { 19, 35, 30, 44 },
232  { 31, 14, 41, 25 }
233 };
234 
236 static const spawn_point darcap_points[] = {
237  { 23, 25 },
238  { 19, 27 },
239  { 28, 25 },
240  { 28, 30 },
241  { 26, 33 },
242  { 28, 35 },
243  { 19, 37 },
244  { 25, 37 },
245  { 19, 43 },
246  { 32, 44 },
247  { 25, 43 },
248  { 31, 16 },
249  { 31, 18 },
250  { 31, 20 },
251  { 41, 16 },
252  { 41, 18 },
253  { 41, 20 },
254  { 34, 17 },
255  { 37, 22 }
256 };
257 
258 
260 static const char *const darcap_archs[] = {
261  "c_man",
262  "c_woman",
263  "child",
264  "farmer",
265  "fatman",
266  "fatwoman",
267  "guard",
268  "knight",
269  "man",
270  "nun",
271  "sage",
272  "woman"
273 };
274 
275 
286 static const spawn_zone navar_nw_zones[] = {
287  { 38, 29, 48, 35 },
288  { 36, 38, 49, 44 },
289  { 39, 45, 49, 49 },
290  { 36, 48, 38, 49 }
291 };
292 
294 static const spawn_point navar_nw_points[] = {
295  { 39, 29 },
296  { 41, 31 },
297  { 48, 29 },
298  { 38, 35 },
299  { 43, 39 },
300  { 38, 46 },
301  { 36, 48 },
302  { 45, 47 }
303 };
304 
306 static const spawn_zone navar_ne_zones[] = {
307  { 0, 33, 7, 49 },
308  { 10, 38, 19, 44},
309  { 11, 45, 19, 49}
310 };
311 
313 static const spawn_point navar_ne_points[] = {
314  { 4, 34 },
315  { 2, 39 },
316  { 2, 45 },
317  { 8, 46 },
318  { 13, 47 },
319  { 21, 42 }
320 };
321 
323 static const spawn_zone navar_sw_zones[] = {
324  { 36, 0, 49, 5 },
325  { 39, 6, 49, 15}
326 };
327 
329 static const spawn_point navar_sw_points[] = {
330  { 42, 7 },
331  { 37, 4 },
332  { 46, 11 }
333 };
334 
336 static const spawn_zone navar_se_zones[] = {
337  { 0, 0, 8, 15 },
338  { 4, 16, 13, 18},
339  { 9, 4, 18, 14},
340  { 10, 0, 18, 1}
341 };
342 
344 static const spawn_point navar_se_points[] = {
345  { 3, 0 },
346  { 1, 1 },
347  { 3, 9 },
348  { 5, 16 },
349  { 18, 14 },
350  { 12, 11 },
351  { 14, 4 },
352  { 12, 0 }
353 };
354 
356 static const char *const navar_archs[] = {
357  "c_man",
358  "c_woman",
359  "child",
360  "elf_man",
361  "courier",
362  "fatwoman",
363  "guard",
364  "knight",
365  "dwarf_wiz",
366  "clown",
367  "sage",
368  "woman",
369  "fighter",
370  "halfling",
371  "sailor"
372 };
373 
374 
385 static const spawn_zone port_joseph_zones[] = {
386  { 10, 27, 19, 43 }
387 };
388 
390 static const spawn_point port_joseph_points[] = {
391  { 14, 31 },
392  { 17, 32 },
393  { 13, 35 },
394  { 17, 42 },
395  { 13, 38 },
396  { 17, 36 }
397 };
398 
399 
401 static const char *const port_joseph_archs[] = {
402  "c_man",
403  "c_woman",
404  "pirate",
405  "fatman",
406  "fatwoman",
407  "man",
408  "sailor",
409  "woman3"
410 };
411 
422 static const spawn_zone stoneville_zones[] = {
423  { 0, 8, 14, 23 }
424 };
425 
427 static const spawn_point stoneville_points[] = {
428  { 3, 9 },
429  { 8, 15 },
430  { 1, 21 },
431  { 2, 17 },
432  { 12, 9 }
433 };
434 
435 
437 static const char *const stoneville_archs[] = {
438  "c_man",
439  "c_woman",
440  "pirate",
441  "fatman",
442  "fatwoman",
443  "man",
444  "sailor",
445  "woman3"
446 };
447 
448 
459 static const spawn_zone wolfsburg_zones[] = {
460  { 13, 1, 45, 17 }
461 };
462 
464 static const spawn_point wolfsburg_points[] = {
465  { 15, 1 },
466  { 19, 7 },
467  { 22, 10 },
468  { 29, 7 },
469  { 42, 2 },
470  { 35, 1 },
471  { 43, 8 },
472  { 33, 11 }
473 };
474 
475 
477 static const char *const wolfsburg_archs[] = {
478  "c_man",
479  "c_woman",
480 /* "prisoner", Why? They don't move. They look ridiculous spawning on the main map. */
481  "fatman",
482  "fatwoman",
483  "man",
484  "sailor",
485  "woman3",
486  "merchant"
487 };
488 
489 
501  { 9, 14, 25, 20 },
502  { 15, 6, 23, 13 }
503 };
504 
507  { 15, 6 },
508  { 18, 5 },
509  { 14, 9 },
510  { 15, 16 },
511  { 31, 15 },
512  { 22, 20 },
513  { 11, 19 },
514  { 26, 11 }
515 };
516 
517 
519 static const char *const santo_dominion_archs[] = {
520  "c_man",
521  "c_woman",
522 /* "prisoner", */
523  "fatman",
524  "fatwoman",
525  "man",
526  "sailor",
527  "woman3",
528  "merchant"
529 };
530 
538 static const spawn_zone scorncounty_zones[] = {
539  {24, 27, 27, 35}, // village
540  {25, 12, 27, 18}, // field
541  {34, 12, 36, 16}, // field
542  {38, 0, 45, 2}, // field
543 
544 };
545 
546 static const spawn_point scorncounty_points[] = {
547  {24, 27},
548  {26, 27},
549  {24, 29},
550  {27, 29},
551  {24, 31},
552  {24, 34},
553  {34, 32},
554  {41, 1},
555 };
556 
557 static const char *const scorncounty_archs[] = {
558  "child",
559  "farmer",
560  "fatman",
561  "fatwoman",
562 };
570 static const mapzone available_zones[] = {
571  { scorn_nw_points, 5, scorn_nw_zones, 1, 2, "/world/world_104_115", scorn_archs, 12 },
572  { scorn_ne_points, 1, scorn_ne_zones, 1, 5, "/world/world_105_115", scorn_archs, 12 },
573  { scorn_sw_points, 3, scorn_sw_zones, 1, 5, "/world/world_104_116", scorn_archs, 12 },
574  { scorn_se_points, 1, scorn_se_zones, 1, 5, "/world/world_105_116", scorn_archs, 12 },
575  { scorncounty_points, 8, scorncounty_zones, 4, 8, "/world/world_105_116", scorncounty_archs, 4},
576  { darcap_points, 19, darcap_zones, 3, 4, "/world/world_116_102", darcap_archs, 12},
577  { navar_nw_points, 8, navar_nw_zones, 4, 2, "/world/world_121_116", navar_archs, 15 },
578  { navar_ne_points, 6, navar_ne_zones, 3, 5, "/world/world_122_116", navar_archs, 15 },
579  { navar_sw_points, 3, navar_sw_zones, 2, 3, "/world/world_121_117", navar_archs, 15 },
580  { navar_se_points, 8, navar_se_zones, 4, 5, "/world/world_122_117", navar_archs, 15 },
581  { port_joseph_points, 6, port_joseph_zones, 1, 3, "/world/world_101_114", port_joseph_archs, 8 },
582  { stoneville_points, 5, stoneville_zones, 1, 2, "/world/world_103_127", stoneville_archs, 8 },
583  { wolfsburg_points, 8, wolfsburg_zones, 1, 4, "/world/world_128_109", wolfsburg_archs, 8 },
584  { santo_dominion_points, 8, santo_dominion_zones, 2, 3, "/world/world_102_108", santo_dominion_archs, 8 },
585  { NULL, -1, NULL, -1, 1, "", NULL, 0 },
586 };
587 
596 static const mapzone *get_zone_for_map(mapstruct *map) {
597  int test;
598 
599  for (test = 0; available_zones[test].count_points != -1; test++) {
600  if (strcmp(available_zones[test].mapname, map->path) == 0)
601  return &available_zones[test];
602  }
603  return NULL;
604 }
605 
613 static object *get_npc(const mapzone *zone) {
614  int arch = RANDOM()%zone->archetypes_count;
615  object *npc = cf_create_object_by_name(zone->available_archetypes[arch]);
616  object *evt;
617 
618  if (!npc) {
619  cf_log(llevError, PLUGIN_NAME ": get_npc() got NULL object for %s!\n", zone->available_archetypes[arch]);
620  return NULL;
621  }
622 
624  /* Prevent disease spreading in cities, mostly rabies. */
626  /* add a key so NPC will not disappear in the house it came from */
627  cf_object_set_key(npc, FIRST_MOVE_KEY, "1", 1);
628 
629  evt = cf_create_object_by_name("event_time");
632  cf_object_insert_object(evt, npc);
633 
634  return npc;
635 }
636 
644 static void add_npc_to_zone(const mapzone *zone, mapstruct *map) {
645  int which;
646  object *npc = get_npc(zone);
647 
648  if (!npc)
649  return;
650  which = RANDOM()%zone->count_zones;
651  if (cf_object_teleport(npc, map, zone->zones[which].sx+RANDOM()%(zone->zones[which].ex-zone->zones[which].sx), zone->zones[which].sy+RANDOM()%(zone->zones[which].ey-zone->zones[which].sy))) {
653  }
654 }
655 
663 static void add_npc_to_point(const mapzone *zone, mapstruct *map) {
664  int which;
665  object *npc = get_npc(zone);
666 
667  which = RANDOM()%zone->count_points;
668  if (cf_object_teleport(npc, map, zone->points[which].x, zone->points[which].y)) {
670  }
671 }
672 
678 static void add_npcs_to_map(mapstruct *map) {
679  int add;
680  const mapzone *zone = get_zone_for_map(map);
681 
682  if (!zone)
683  return;
684 
685  add = 1+RANDOM()%zone->population;
686  cf_log(llevDebug, PLUGIN_NAME ": adding %d NPC to map %s.\n", add, map->path);
687 
688  while (add-- >= 0) {
689  add_npc_to_zone(zone, map);
690  }
691 }
692 
696 static void add_npc_to_random_map(void) {
697  int count, test;
698  mapstruct *list[50];
699  int zones[50];
700  count = 0;
701 
702  for (test = 0; available_zones[test].count_points != -1 && count < 50; test++) {
703  if ((list[count] = cf_map_has_been_loaded(available_zones[test].mapname)) && (list[count]->in_memory == MAP_IN_MEMORY)) {
704  zones[count] = test;
705  count++;
706  }
707  }
708  if (!count)
709  return;
710 
711  test = RANDOM()%count;
712  add_npc_to_point(&available_zones[zones[test]], list[test]);
713 }
714 
716  va_list args;
717  int rv = 0;
718  mapstruct *map;
719  int code;
720 
721  va_start(args, type);
722  code = va_arg(args, int);
723 
724  switch (code) {
725  case EVENT_MAPLOAD:
726  map = va_arg(args, mapstruct *);
727  add_npcs_to_map(map);
728  break;
729 
730  case EVENT_CLOCK:
731  if (RANDOM()%40 == 0)
733  }
734  va_end(args);
735 
736  return rv;
737 }
738 
740  cf_log(llevDebug, PLUGIN_VERSION " post init\n");
741 
742  /* Pick the global events you want to monitor from this plugin */
743 
744 /*
745  cf_system_register_global_event(EVENT_BORN, PLUGIN_NAME, citylife_globalEventListener);
746  cf_system_register_global_event(EVENT_CRASH, PLUGIN_NAME, citylife_globalEventListener);
747  cf_system_register_global_event(EVENT_PLAYER_DEATH, PLUGIN_NAME, citylife_globalEventListener);
748  cf_system_register_global_event(EVENT_GKILL, PLUGIN_NAME, citylife_globalEventListener);
749  cf_system_register_global_event(EVENT_LOGIN, PLUGIN_NAME, citylife_globalEventListener);
750  cf_system_register_global_event(EVENT_LOGOUT, PLUGIN_NAME, citylife_globalEventListener);
751  cf_system_register_global_event(EVENT_MAPENTER, PLUGIN_NAME, citylife_globalEventListener);
752  cf_system_register_global_event(EVENT_MAPLEAVE, PLUGIN_NAME, citylife_globalEventListener);
753  cf_system_register_global_event(EVENT_MAPRESET, PLUGIN_NAME, citylife_globalEventListener);
754  cf_system_register_global_event(EVENT_REMOVE, PLUGIN_NAME, citylife_globalEventListener);
755  cf_system_register_global_event(EVENT_SHOUT, PLUGIN_NAME, citylife_globalEventListener);
756  cf_system_register_global_event(EVENT_TELL, PLUGIN_NAME, citylife_globalEventListener);
757  cf_system_register_global_event(EVENT_MUZZLE, PLUGIN_NAME, citylife_globalEventListener);
758  cf_system_register_global_event(EVENT_KICK, PLUGIN_NAME, citylife_globalEventListener);
759 */
762 /*
763  cf_system_register_global_event(EVENT_MAPRESET, PLUGIN_NAME, citylife_globalEventListener);
764 */
765 
766  return 0;
767 }
768 
769 CF_PLUGIN int eventListener(int *type, ...) {
770  int rv = 1;
771  va_list args;
772  /*char *buf;*/
773  object *ground, *who/*, *activator, *third, *event*/;
774  /*int fix;*/
775  const char *value;
776 
777  va_start(args, type);
778 
779  who = va_arg(args, object *);
780  /*activator =*/ va_arg(args, object *);
781  /*third =*/ va_arg(args, object *);
782  /*buf =*/ va_arg(args, char *);
783  /*fix =*/ va_arg(args, int);
784  /*event =*/ va_arg(args, object *);
785  va_arg(args, talk_info *); /* ignored for now */
786  va_end(args);
787 
788  /* should our npc disappear? */
789  if (RANDOM()%100 < 30) {
790  for (ground = cf_map_get_object_at(who->map, who->x, who->y); ground; ground = cf_object_get_object_property(ground, CFAPI_OBJECT_PROP_OB_ABOVE)) {
791  if (ground->type == EXIT) {
792  object *inv;
793 
794  value = cf_object_get_key(who, FIRST_MOVE_KEY);
795  if (strcmp(value, "1") == 0) {
796  cf_object_set_key(who, FIRST_MOVE_KEY, "0", 1);
797  break;
798  }
799 
800  /* must set inventory as no drop, else it'll just drop on the ground */
803 
804  cf_object_remove(who);
806  return rv;
807  }
808  }
809  }
810 
811  /* we have to move manually, because during the night NPCs don't move. */
812  cf_object_move(who, 1+RANDOM()%8, NULL);
813 
814  return rv;
815 }
816 
818  cf_log(llevDebug, PLUGIN_VERSION " closing\n");
819  return 0;
820 }
static const spawn_point scorn_se_points[]
Definition: citylife.c:196
static const spawn_zone scorn_nw_zones[]
Definition: citylife.c:151
char path[HUGE_BUF]
Definition: map.h:365
static const char *const scorncounty_archs[]
Definition: citylife.c:557
#define FLAG_NO_DROP
Definition: define.h:289
void cf_object_free_drop_inventory(object *ob)
#define CFAPI_OBJECT_PROP_OB_BELOW
Definition: plugin.h:172
static const spawn_zone navar_nw_zones[]
Definition: citylife.c:286
static const spawn_zone port_joseph_zones[]
Definition: citylife.c:385
const char * cf_object_get_key(object *op, const char *keyname)
static const char *const wolfsburg_archs[]
Definition: citylife.c:477
static const spawn_point scorn_nw_points[]
Definition: citylife.c:156
void cf_object_set_flag(object *ob, int flag, int value)
static const spawn_point scorn_ne_points[]
Definition: citylife.c:170
static const char *const darcap_archs[]
Definition: citylife.c:260
#define CFAPI_OBJECT_PROP_INVENTORY
Definition: plugin.h:175
int count_points
Definition: citylife.c:133
static const house_zone_struct zones[]
Definition: cfrhg.c:67
const char * slaying
Definition: object.h:319
CF_PLUGIN char SvnRevPlugin[]
Definition: citylife.c:69
static const spawn_point navar_nw_points[]
Definition: citylife.c:294
#define FLAG_RANDOM_MOVE
Definition: define.h:310
#define FIRST_MOVE_KEY
Definition: citylife.c:110
sstring cf_add_string(const char *str)
const spawn_zone * zones
Definition: citylife.c:134
CF_PLUGIN int postInitPlugin(void)
Definition: citylife.c:739
static const char *const navar_archs[]
Definition: citylife.c:356
static const spawn_zone navar_se_zones[]
Definition: citylife.c:336
CF_PLUGIN int closePlugin(void)
Definition: citylife.c:817
static object * get_npc(const mapzone *zone)
Definition: citylife.c:613
static const spawn_point scorn_sw_points[]
Definition: citylife.c:184
static void add_npc_to_random_map(void)
Definition: citylife.c:696
void cf_log(LogLevel logLevel, const char *format,...)
CF_PLUGIN void * getPluginProperty(int *type,...)
Definition: citylife.c:79
#define FLAG_UNDEAD
Definition: define.h:270
static const spawn_point stoneville_points[]
Definition: citylife.c:427
#define MAP_IN_MEMORY
Definition: map.h:130
const char * title
Definition: object.h:317
int16_t y
Definition: object.h:326
static const char *const santo_dominion_archs[]
Definition: citylife.c:519
static const spawn_zone stoneville_zones[]
Definition: citylife.c:422
int cf_init_plugin(f_plug_api getHooks)
Definition: object.h:181
static const char *const stoneville_archs[]
Definition: citylife.c:437
static const spawn_zone navar_sw_zones[]
Definition: citylife.c:323
struct mapdef * map
Definition: object.h:297
#define snprintf
Definition: win32.h:46
static void add_npc_to_zone(const mapzone *zone, mapstruct *map)
Definition: citylife.c:644
#define PLUGIN_NAME
Definition: cfanim.h:32
static const mapzone available_zones[]
Definition: citylife.c:570
void cf_system_register_global_event(int event, const char *name, f_plug_event hook)
static const spawn_point navar_sw_points[]
Definition: citylife.c:329
object * cf_object_insert_object(object *op, object *container)
const spawn_point * points
Definition: citylife.c:132
static void add_npc_to_point(const mapzone *zone, mapstruct *map)
Definition: citylife.c:663
#define EVENT_MAPLOAD
Definition: plugin.h:99
static const spawn_zone darcap_zones[]
Definition: citylife.c:229
int16_t x
Definition: object.h:326
static const spawn_zone scorn_ne_zones[]
Definition: citylife.c:165
void cf_object_remove(object *op)
object * cf_map_get_object_at(mapstruct *m, int x, int y)
CF_PLUGIN int citylife_runPluginCommand(object *op, char *params)
Definition: citylife.c:105
static const spawn_zone scorn_se_zones[]
Definition: citylife.c:191
static const spawn_zone navar_ne_zones[]
Definition: citylife.c:306
object * cf_object_get_object_property(object *op, int propcode)
#define EVENT_CLOCK
Definition: plugin.h:84
CF_PLUGIN int citylife_globalEventListener(int *type,...)
Definition: citylife.c:715
static const spawn_point port_joseph_points[]
Definition: citylife.c:390
#define CF_PLUGIN
Definition: plugin_common.h:38
#define RANDOM()
Definition: define.h:681
int cf_object_move(object *op, int dir, object *originator)
static const spawn_point scorncounty_points[]
Definition: citylife.c:546
static const spawn_zone scorn_sw_zones[]
Definition: citylife.c:179
uint8_t type
Definition: object.h:338
static const spawn_point wolfsburg_points[]
Definition: citylife.c:464
mapstruct * cf_map_has_been_loaded(const char *name)
static const spawn_point santo_dominion_points[]
Definition: citylife.c:506
static const spawn_point navar_se_points[]
Definition: citylife.c:344
int count_zones
Definition: citylife.c:135
static const char *const scorn_archs[]
Definition: citylife.c:204
static const mapzone * get_zone_for_map(mapstruct *map)
Definition: citylife.c:596
static const spawn_zone scorncounty_zones[]
Definition: citylife.c:538
int cf_object_teleport(object *ob, mapstruct *map, int x, int y)
static const char *const port_joseph_archs[]
Definition: citylife.c:401
static const spawn_point navar_ne_points[]
Definition: citylife.c:313
static void add_npcs_to_map(mapstruct *map)
Definition: citylife.c:678
Definition: map.h:325
static const spawn_zone santo_dominion_zones[]
Definition: citylife.c:500
static const spawn_point darcap_points[]
Definition: citylife.c:236
const char * mapname
Definition: citylife.c:137
#define CFAPI_OBJECT_PROP_OB_ABOVE
Definition: plugin.h:171
object * cf_create_object_by_name(const char *name)
int archetypes_count
Definition: citylife.c:139
const char *const * available_archetypes
Definition: citylife.c:138
int population
Definition: citylife.c:136
void(* f_plug_api)(int *type,...)
Definition: plugin.h:125
CF_PLUGIN int initPlugin(const char *iversion, f_plug_api gethooksptr)
Definition: citylife.c:71
CF_PLUGIN int eventListener(int *type,...)
Definition: citylife.c:769
static const spawn_zone wolfsburg_zones[]
Definition: citylife.c:459
int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key)
#define PLUGIN_VERSION
Definition: cfanim.h:33