Crossfire Server, Trunk  R22047
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, 39 },
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  { 10, 34 },
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 
539 static const spawn_zone scorncounty_zones[] = {
540  {24, 27, 27, 35}, // village
541  {25, 12, 27, 18}, // field
542  {34, 12, 36, 16}, // field
543  {38, 0, 45, 2}, // field
544 
545 };
546 
547 static const spawn_point scorncounty_points[] = {
548  {24, 27},
549  {26, 27},
550  {24, 29},
551  {27, 29},
552  {24, 31},
553  {24, 34},
554  {34, 32},
555  {41, 1},
556 };
557 
558 static const char *const scorncounty_archs[] = {
559  "child",
560  "farmer",
561  "fatman",
562  "fatwoman",
563 };
571 static const mapzone available_zones[] = {
572  { scorn_nw_points, 5, scorn_nw_zones, 1, 2, "/world/world_104_115", scorn_archs, 12 },
573  { scorn_ne_points, 5, scorn_ne_zones, 1, 5, "/world/world_105_115", scorn_archs, 12 },
574  { scorn_sw_points, 3, scorn_sw_zones, 1, 5, "/world/world_104_116", scorn_archs, 12 },
575  { scorn_se_points, 4, scorn_se_zones, 1, 5, "/world/world_105_116", scorn_archs, 12 },
576  { scorncounty_points, 8, scorncounty_zones, 4, 8, "/world/world_105_116", scorncounty_archs, 4},
577  { darcap_points, 19, darcap_zones, 3, 4, "/world/world_116_102", darcap_archs, 12},
578  { navar_nw_points, 8, navar_nw_zones, 4, 2, "/world/world_121_116", navar_archs, 15 },
579  { navar_ne_points, 6, navar_ne_zones, 3, 5, "/world/world_122_116", navar_archs, 15 },
580  { navar_sw_points, 3, navar_sw_zones, 2, 3, "/world/world_121_117", navar_archs, 15 },
581  { navar_se_points, 8, navar_se_zones, 4, 5, "/world/world_122_117", navar_archs, 15 },
582  { port_joseph_points, 6, port_joseph_zones, 1, 3, "/world/world_101_114", port_joseph_archs, 8 },
583  { stoneville_points, 5, stoneville_zones, 1, 2, "/world/world_103_127", stoneville_archs, 8 },
584  { wolfsburg_points, 8, wolfsburg_zones, 1, 4, "/world/world_128_109", wolfsburg_archs, 8 },
585  { santo_dominion_points, 8, santo_dominion_zones, 2, 3, "/world/world_102_108", santo_dominion_archs, 8 },
586  { NULL, -1, NULL, -1, 1, "", NULL, 0 },
587 };
588 
597 static const mapzone *get_zone_for_map(mapstruct *map) {
598  int test;
599 
600  for (test = 0; available_zones[test].count_points != -1; test++) {
601  if (strcmp(available_zones[test].mapname, map->path) == 0)
602  return &available_zones[test];
603  }
604  return NULL;
605 }
606 
614 static object *get_npc(const mapzone *zone) {
615  int arch = RANDOM()%zone->archetypes_count;
616  object *npc = cf_create_object_by_name(zone->available_archetypes[arch]);
617  object *evt;
618 
619  if (!npc) {
620  cf_log(llevError, PLUGIN_NAME ": get_npc() got NULL object for %s!\n", zone->available_archetypes[arch]);
621  return NULL;
622  }
623 
625  /* Prevent disease spreading in cities, mostly rabies. */
627  /* add a key so NPC will not disappear in the house it came from */
628  cf_object_set_key(npc, FIRST_MOVE_KEY, "1", 1);
629 
630  evt = cf_create_object_by_name("event_time");
631  evt->slaying = cf_add_string(PLUGIN_NAME);
632  evt->title = cf_add_string(PLUGIN_NAME);
633  cf_object_insert_object(evt, npc);
634 
635  return npc;
636 }
637 
645 static void add_npc_to_zone(const mapzone *zone, mapstruct *map) {
646  int which;
647  object *npc = get_npc(zone);
648 
649  if (!npc)
650  return;
651  which = RANDOM()%zone->count_zones;
652  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))) {
654  }
655 }
656 
664 static void add_npc_to_point(const mapzone *zone, mapstruct *map) {
665  int which;
666  object *npc = get_npc(zone);
667 
668  which = RANDOM()%zone->count_points;
669  if (cf_object_teleport(npc, map, zone->points[which].x, zone->points[which].y)) {
671  }
672 }
673 
679 static void add_npcs_to_map(mapstruct *map) {
680  int add;
681  const mapzone *zone = get_zone_for_map(map);
682 
683  if (!zone)
684  return;
685 
686  add = 1+RANDOM()%zone->population;
687  cf_log(llevDebug, PLUGIN_NAME ": adding %d NPC to map %s.\n", add, map->path);
688 
689  while (--add >= 0) {
690  add_npc_to_zone(zone, map);
691  }
692 }
693 
697 static void add_npc_to_random_map(void) {
698  int count, test;
699  mapstruct *list[50];
700  int zones[50];
701  count = 0;
702 
703  for (test = 0; available_zones[test].count_points != -1 && count < 50; test++) {
704  if ((list[count] = cf_map_has_been_loaded(available_zones[test].mapname)) && (list[count]->in_memory == MAP_IN_MEMORY)) {
705  zones[count] = test;
706  count++;
707  }
708  }
709  if (!count)
710  return;
711 
712  test = RANDOM()%count;
713  add_npc_to_point(&available_zones[zones[test]], list[test]);
714 }
715 
717  va_list args;
718  int rv = 0;
719  mapstruct *map;
720  int code;
721 
722  va_start(args, type);
723  code = va_arg(args, int);
724 
725  switch (code) {
726  case EVENT_MAPLOAD:
727  map = va_arg(args, mapstruct *);
728  add_npcs_to_map(map);
729  break;
730 
731  case EVENT_CLOCK:
732  if (RANDOM()%40 == 0)
734  }
735  va_end(args);
736 
737  return rv;
738 }
739 
741  cf_log(llevDebug, PLUGIN_VERSION " post init\n");
742 
743  /* Pick the global events you want to monitor from this plugin */
744 
745 /*
746  cf_system_register_global_event(EVENT_BORN, PLUGIN_NAME, citylife_globalEventListener);
747  cf_system_register_global_event(EVENT_CRASH, PLUGIN_NAME, citylife_globalEventListener);
748  cf_system_register_global_event(EVENT_PLAYER_DEATH, PLUGIN_NAME, citylife_globalEventListener);
749  cf_system_register_global_event(EVENT_GKILL, PLUGIN_NAME, citylife_globalEventListener);
750  cf_system_register_global_event(EVENT_LOGIN, PLUGIN_NAME, citylife_globalEventListener);
751  cf_system_register_global_event(EVENT_LOGOUT, PLUGIN_NAME, citylife_globalEventListener);
752  cf_system_register_global_event(EVENT_MAPENTER, PLUGIN_NAME, citylife_globalEventListener);
753  cf_system_register_global_event(EVENT_MAPLEAVE, PLUGIN_NAME, citylife_globalEventListener);
754  cf_system_register_global_event(EVENT_MAPRESET, PLUGIN_NAME, citylife_globalEventListener);
755  cf_system_register_global_event(EVENT_REMOVE, PLUGIN_NAME, citylife_globalEventListener);
756  cf_system_register_global_event(EVENT_SHOUT, PLUGIN_NAME, citylife_globalEventListener);
757  cf_system_register_global_event(EVENT_TELL, PLUGIN_NAME, citylife_globalEventListener);
758  cf_system_register_global_event(EVENT_MUZZLE, PLUGIN_NAME, citylife_globalEventListener);
759  cf_system_register_global_event(EVENT_KICK, PLUGIN_NAME, citylife_globalEventListener);
760 */
763 /*
764  cf_system_register_global_event(EVENT_MAPRESET, PLUGIN_NAME, citylife_globalEventListener);
765 */
766 
767  return 0;
768 }
769 
770 CF_PLUGIN int eventListener(int *type, ...) {
771  int rv = 1;
772  va_list args;
773  /*char *buf;*/
774  object *ground, *who/*, *activator, *third*/, *event;
775  /*int fix;*/
776  const char *value;
777 
778  va_start(args, type);
779 
780  who = va_arg(args, object *);
781  /*activator =*/ va_arg(args, object *);
782  /*third =*/ va_arg(args, object *);
783  /*buf =*/ va_arg(args, char *);
784  /*fix =*/ va_arg(args, int);
785  event = va_arg(args, object *);
786  va_arg(args, talk_info *); /* ignored for now */
787  va_end(args);
788 
789  object *inv;
790  value = cf_object_get_key(who, FIRST_MOVE_KEY);
791  if (!value) {
797  if (event) {
798  cf_log(llevInfo, "citylife: removing event from object which we didn't generate\n");
799  cf_object_remove(event);
800  }
801  return rv;
802  }
803  // Set the flag regardless of whether we tried to move through an exit
804  if (strcmp(value, "1") == 0) {
805  cf_object_set_key(who, FIRST_MOVE_KEY, "0", 1);
806 
807  /* must set inventory as no drop, else it'll just drop on the ground */
810  }
811  /* should our npc disappear? -- Only attempt this if not first move */
812  else if (RANDOM()%100 < 30) {
813  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)) {
814  if (ground->type == EXIT) {
815 
816  cf_object_remove(who);
818  return rv;
819  }
820  }
821  }
822 
823  /* we have to move manually, because during the night NPCs don't move. */
824  cf_object_move(who, 1+RANDOM()%8, NULL);
825 
826  return rv;
827 }
828 
830  cf_log(llevDebug, PLUGIN_VERSION " closing\n");
831  return 0;
832 }
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:366
#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:125
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
StringBuffer * buf
Definition: readable.c:1591
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:128
int count_points
Definition: citylife.c:133
static const house_zone_struct zones[]
Definition: cfrhg.c:67
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:740
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:829
static object * get_npc(const mapzone *zone)
Definition: citylife.c:614
static const spawn_point scorn_sw_points[]
Definition: citylife.c:184
static void add_npc_to_random_map(void)
Definition: citylife.c:697
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:131
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)
static const char *const stoneville_archs[]
Definition: citylife.c:437
#define EVENT_CLOCK
Definition: events.h:39
static const spawn_zone navar_sw_zones[]
Definition: citylife.c:323
#define snprintf
Definition: win32.h:46
static void add_npc_to_zone(const mapzone *zone, mapstruct *map)
Definition: citylife.c:645
static const spawn_point scorncounty_points[]
Definition: citylife.c:547
#define PLUGIN_NAME
Definition: cfanim.h:32
static const mapzone available_zones[]
Definition: citylife.c:571
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:664
static const char *const scorncounty_archs[]
Definition: citylife.c:558
static const spawn_zone darcap_zones[]
Definition: citylife.c:229
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)
CF_PLUGIN int citylife_globalEventListener(int *type,...)
Definition: citylife.c:716
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_zone scorn_sw_zones[]
Definition: citylife.c:179
static const spawn_point wolfsburg_points[]
Definition: citylife.c:464
#define EVENT_MAPLOAD
Definition: events.h:47
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:597
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:679
Definition: map.h:326
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:124
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:81
CF_PLUGIN int initPlugin(const char *iversion, f_plug_api gethooksptr)
Definition: citylife.c:71
CF_PLUGIN int eventListener(int *type,...)
Definition: citylife.c:770
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)
static const spawn_zone scorncounty_zones[]
Definition: citylife.c:539
#define PLUGIN_VERSION
Definition: cfanim.h:33