Crossfire Server, Trunk
plugin_common.c
Go to the documentation of this file.
1 /*****************************************************************************/
2 /* Crossfire Plugin Interface Common Parts */
3 /* Version: 2.0beta8 (also known as "Alexander") */
4 /* Contact: yann.chachkoff@myrealbox.com */
5 /*****************************************************************************/
6 /* The CPICP are the various functions of the server that can be used by all */
7 /* plugins. It is recommended that plugins do not call the server-provided */
8 /* functions directly, but instead use the wrappers provided here by the */
9 /* CPICP interface. By doing so, various validity checks can be performed */
10 /* by CPICP, protecting the server from potential nasty effects of passing */
11 /* it wrong parameter values. */
12 /*****************************************************************************/
13 /* That code is placed under the GNU General Public Licence (GPL) */
14 /* (C)2001-2005 by Chachkoff Yann (Feel free to deliver your complaints) */
15 /*****************************************************************************/
16 /* CrossFire, A Multiplayer game for X-windows */
17 /* */
18 /* Copyright (C) 2000 Mark Wedel */
19 /* Copyright (C) 1992 Frank Tore Johansen */
20 /* */
21 /* This program is free software; you can redistribute it and/or modify */
22 /* it under the terms of the GNU General Public License as published by */
23 /* the Free Software Foundation; either version 2 of the License, or */
24 /* (at your option) any later version. */
25 /* */
26 /* This program is distributed in the hope that it will be useful, */
27 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
28 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
29 /* GNU General Public License for more details. */
30 /* */
31 /* You should have received a copy of the GNU General Public License */
32 /* along with this program; if not, write to the Free Software */
33 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
34 /* */
35 /*****************************************************************************/
36 
37 #include <assert.h>
38 #include <string.h>
39 
40 #include "plugin_common.h"
41 
56 
132 
133 #define GET_HOOK(x, y, z) { \
134  getHooks(&z, 1, y, &x); \
135  if (z != CFAPI_FUNC) { \
136  printf("unable to find hook %s!\n", y); \
137  return 0; \
138  } \
139 }
140 
141 int cf_init_plugin(f_plug_api getHooks) {
142  int z;
143 
144  GET_HOOK(cfapiSystem_strdup_local, "cfapi_system_strdup_local", z);
145  GET_HOOK(cfapiSystem_add_string, "cfapi_system_add_string", z);
146  GET_HOOK(cfapiSystem_register_global_event, "cfapi_system_register_global_event", z);
147  GET_HOOK(cfapiSystem_remove_string, "cfapi_system_remove_string", z);
148  GET_HOOK(cfapiSystem_directory, "cfapi_system_directory", z);
149  GET_HOOK(cfapiSystem_unregister_global_event, "cfapi_system_unregister_global_event", z);
150  GET_HOOK(cfapiSystem_find_animation, "cfapi_system_find_animation", z);
151  GET_HOOK(cfapiSystem_find_face, "cfapi_system_find_face", z);
152  GET_HOOK(cfapiSystem_re_cmp, "cfapi_system_re_cmp", z);
153  GET_HOOK(cfapiObject_get_property, "cfapi_object_get_property", z);
154  GET_HOOK(cfapiObject_set_property, "cfapi_object_set_property", z);
155  GET_HOOK(cfapiObject_apply, "cfapi_object_apply", z);
156  GET_HOOK(cfapiObject_identify, "cfapi_object_identify", z);
157  GET_HOOK(cfapiObject_describe, "cfapi_object_describe", z);
158  GET_HOOK(cfapiObject_drain, "cfapi_object_drain", z);
159  GET_HOOK(cfapiObject_fix, "cfapi_object_fix", z);
160  GET_HOOK(cfapiObject_give_skill, "cfapi_object_give_skill", z);
161  GET_HOOK(cfapiObject_transmute, "cfapi_object_transmute", z);
162  GET_HOOK(cfapiObject_remove, "cfapi_object_remove", z);
163  GET_HOOK(cfapiObject_delete, "cfapi_object_delete", z);
164  GET_HOOK(cfapiObject_clone, "cfapi_object_clone", z);
165  GET_HOOK(cfapiObject_create, "cfapi_object_create", z);
166  GET_HOOK(cfapiObject_insert, "cfapi_object_insert", z);
167  GET_HOOK(cfapiObject_split, "cfapi_object_split", z);
168  GET_HOOK(cfapiObject_merge, "cfapi_object_merge", z);
169  GET_HOOK(cfapiObject_distance, "cfapi_object_distance", z);
170  GET_HOOK(cfapiObject_update, "cfapi_object_update", z);
171  GET_HOOK(cfapiObject_clear, "cfapi_object_clear", z);
172  GET_HOOK(cfapiObject_reset, "cfapi_object_reset", z);
173  GET_HOOK(cfapiObject_activate_rune, "cfapi_object_spring_trap", z);
174  GET_HOOK(cfapiObject_check_trigger, "cfapi_object_check_trigger", z);
175  GET_HOOK(cfapiObject_query_money, "cfapi_object_query_money", z);
176  GET_HOOK(cfapiObject_cast, "cfapi_object_cast", z);
177  GET_HOOK(cfapiObject_learn_spell, "cfapi_object_learn_spell", z);
178  GET_HOOK(cfapiObject_forget_spell, "cfapi_object_forget_spell", z);
179  GET_HOOK(cfapiObject_check_spell, "cfapi_object_check_spell", z);
180  GET_HOOK(cfapiObject_pay_amount, "cfapi_object_pay_amount", z);
181  GET_HOOK(cfapiObject_pay_item, "cfapi_object_pay_item", z);
182  GET_HOOK(cfapiObject_transfer, "cfapi_object_transfer", z);
183  GET_HOOK(cfapiObject_find_archetype_inside, "cfapi_object_find_archetype_inside", z);
184  GET_HOOK(cfapiObject_remove, "cfapi_object_remove", z);
185  GET_HOOK(cfapiObject_delete, "cfapi_object_delete", z);
186  GET_HOOK(cfapiObject_out_of_map, "cfapi_map_out_of_map", z);
187  GET_HOOK(cfapiObject_drop, "cfapi_object_drop", z);
188  GET_HOOK(cfapiObject_change_abil, "cfapi_object_change_abil", z);
189  GET_HOOK(cfapiObject_say, "cfapi_object_say", z);
190  GET_HOOK(cfapiMap_create_path, "cfapi_map_create_path", z);
191  GET_HOOK(cfapiMap_get_property, "cfapi_map_get_property", z);
192  GET_HOOK(cfapiMap_set_property, "cfapi_map_set_property", z);
193  GET_HOOK(cfapiMap_get_map, "cfapi_map_get_map", z);
194  GET_HOOK(cfapiMap_message, "cfapi_map_message", z);
195  GET_HOOK(cfapiMap_get_object_at, "cfapi_map_get_object_at", z);
196  GET_HOOK(cfapiMap_find_by_archetype_name, "cfapi_map_find_by_archetype_name", z);
197  GET_HOOK(cfapiMap_change_light, "cfapi_map_change_light", z);
198  GET_HOOK(cfapiMap_has_been_loaded, "cfapi_map_has_been_loaded", z);
199  GET_HOOK(cfapiMap_trigger_connected, "cfapi_map_trigger_connected", z);
200  GET_HOOK(cfapiPlayer_find, "cfapi_player_find", z);
201  GET_HOOK(cfapiPlayer_message, "cfapi_player_message", z);
202  GET_HOOK(cfapiObject_teleport, "cfapi_object_teleport", z);
203  GET_HOOK(cfapiObject_pickup, "cfapi_object_pickup", z);
204  GET_HOOK(cfapiObject_get_key, "cfapi_object_get_key", z);
205  GET_HOOK(cfapiObject_set_key, "cfapi_object_set_key", z);
206  GET_HOOK(cfapiObject_move, "cfapi_object_move", z);
207  GET_HOOK(cfapiObject_apply_below, "cfapi_object_apply_below", z);
208  GET_HOOK(cfapiArchetype_get_property, "cfapi_archetype_get_property", z);
209  GET_HOOK(cfapiParty_get_property, "cfapi_party_get_property", z);
210  GET_HOOK(cfapiRegion_get_property, "cfapi_region_get_property", z);
211  GET_HOOK(cfapiPlayer_can_pay, "cfapi_player_can_pay", z);
212  GET_HOOK(cfapiSystem_log, "cfapi_log", z);
213  GET_HOOK(cfapiSystem_get_time, "cfapi_system_get_time", z);
214  GET_HOOK(cfapiSystem_timer_create, "cfapi_system_timer_create", z);
215  GET_HOOK(cfapiSystem_timer_destroy, "cfapi_system_timer_destroy", z);
216  GET_HOOK(cfapiFriendlylist_get_next, "cfapi_friendlylist_get_next", z);
217  GET_HOOK(cfapiSet_random_map_variable, "cfapi_set_random_map_variable", z);
218  GET_HOOK(cfapiGenerate_random_map, "cfapi_generate_random_map", z);
219  GET_HOOK(cfapiObject_change_exp, "cfapi_object_change_exp", z);
220  GET_HOOK(cfapiSystem_get_season_name, "cfapi_system_get_season_name", z);
221  GET_HOOK(cfapiSystem_get_month_name, "cfapi_system_get_month_name", z);
222  GET_HOOK(cfapiSystem_get_weekday_name, "cfapi_system_get_weekday_name", z);
223  GET_HOOK(cfapiSystem_get_periodofday_name, "cfapi_system_get_periodofday_name", z);
224  GET_HOOK(cfapiObject_user_event, "cfapi_object_user_event", z);
225  GET_HOOK(cfapiSystem_find_string, "cfapi_system_find_string", z);
226  GET_HOOK(cfapiCost_string_from_value, "cfapi_cost_string_from_value", z);
227  GET_HOOK(cfapiPlayer_quest, "cfapi_player_quest", z);
228  GET_HOOK(cfapiObject_remove_depletion, "cfapi_object_remove_depletion", z);
229  GET_HOOK(cfapiObject_find_by_arch_name, "cfapi_object_find_by_arch_name", z);
230  GET_HOOK(cfapiObject_find_by_name, "cfapi_object_find_by_name", z);
231  GET_HOOK(cfapiPlayer_knowledge, "cfapi_player_knowledge", z);
232  GET_HOOK(cfapiObject_perm_exp, "cfapi_object_perm_exp", z);
233  GET_HOOK(cfapiSystem_register_command, "cfapi_register_command", z);
234  GET_HOOK(cfapiSystem_unregister_command, "cfapi_unregister_command", z);
235  return 1;
236 }
237 
238 /* Should get replaced by tons of more explicit wrappers */
239 /*void *cf_map_get_property(mapstruct *map, int propcode) {
240  int type;
241  return cfapiMap_get_property(&type, propcode, map);
242 }*/
243 
244 int cf_map_get_int_property(mapstruct *map, int property) {
245  int type, value;
246 
247  cfapiMap_get_property(&type, map, property, &value);
248  assert(type == CFAPI_INT);
249  return value;
250 }
251 
252 int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix) {
253  int type, value;
254 
256  assert(type == CFAPI_INT);
257  return value;
258 }
259 
261  int type;
262  sstring value;
263 
264  cfapiMap_get_property(&type, map, propcode, &value);
265  assert(type == CFAPI_SSTRING);
266  return value;
267 }
268 
270  int type;
271  mapstruct *value;
272 
273  cfapiMap_get_property(&type, map, propcode, &value);
274  assert(type == CFAPI_PMAP);
275  return value;
276 }
277 
279  int type;
280  region *value;
281 
282  cfapiMap_get_property(&type, map, propcode, &value);
283  assert(type == CFAPI_PREGION);
284  return value;
285 }
286 
287 /* Should get replaced by tons of more explicit wrappers */
288 void cf_map_set_int_property(mapstruct *map, int propcode, int value) {
289  int type;
290 
291  cfapiMap_set_property(&type, map, propcode, value);
292  assert(type == CFAPI_INT);
293 }
294 
295 void cf_map_set_string_property(mapstruct *map, int propcode, const char *value) {
296  int type;
297 
298  cfapiMap_set_property(&type, map, propcode, value);
299  assert(type == CFAPI_STRING);
300 }
301 
302 /* Should get replaced by tons of more explicit wrappers */
303 int16_t cf_object_get_resistance(object *op, int rtype) {
304  int type;
305  int16_t resist;
306 
308  assert(type == CFAPI_INT16);
309  return resist;
310 }
311 void cf_object_set_resistance(object *op, int rtype, int16_t value) {
312  int type;
313 
315  assert(type == CFAPI_INT16);
316 }
317 
318 /* Should get replaced by tons of more explicit wrappers */
319 void cf_object_set_int_property(object *op, int propcode, int value) {
320  int type;
321 
322  cfapiObject_set_property(&type, op, propcode, value);
323  assert(type == CFAPI_INT);
324 }
325 int cf_object_get_int_property(object *op, int propcode) {
326  int type, value;
327 
328  cfapiObject_get_property(&type, op, propcode, &value);
329  assert(type == CFAPI_INT);
330  return value;
331 }
332 long cf_object_get_long_property(object *op, long propcode) {
333  int type;
334  long value;
335 
336  cfapiObject_get_property(&type, op, propcode, &value);
337  assert(type == CFAPI_LONG);
338  return value;
339 }
340 void cf_object_set_movetype_property(object *op, int propcode, MoveType value) {
341  int type;
342 
343  /* note: MoveType can't be used through va_arg, so use MoveType * */
344  cfapiObject_set_property(&type, op, propcode, &value);
345  assert(type == CFAPI_MOVETYPE);
346 }
348  int type;
349  MoveType value;
350 
351  cfapiObject_get_property(&type, op, propcode, &value);
352  assert(type == CFAPI_MOVETYPE);
353  return value;
354 }
355 object *cf_object_get_object_property(object *op, int propcode) {
356  int type;
357  object *value;
358 
359  cfapiObject_get_property(&type, op, propcode, &value);
360  assert(type == CFAPI_POBJECT);
361  return value;
362 }
363 mapstruct *cf_object_get_map_property(object *op, int propcode) {
364  int type;
365  mapstruct *value;
366 
367  cfapiObject_get_property(&type, op, propcode, &value);
368  assert(type == CFAPI_PMAP);
369  return value;
370 }
371 int64_t cf_object_get_int64_property(object *op, int propcode) {
372  int type;
373  int64_t value;
374 
375  cfapiObject_get_property(&type, op, propcode, &value);
376  assert(type == CFAPI_SINT64);
377  return value;
378 }
379 /* Should get replaced by tons of more explicit wrappers */
380 void cf_object_set_long_property(object *op, int propcode, long value) {
381  int type;
382 
383  cfapiObject_set_property(&type, op, propcode, value);
384  assert(type == CFAPI_LONG);
385 }
386 void cf_object_set_float_property(object *op, int propcode, float value) {
387  int type;
388 
389  cfapiObject_set_property(&type, op, propcode, value);
390  assert(type == CFAPI_FLOAT);
391 }
392 void cf_object_set_int64_property(object *op, int propcode, int64_t value) {
393  int type;
394 
395  cfapiObject_set_property(&type, op, propcode, value);
396  assert(type == CFAPI_SINT64);
397 }
398 float cf_object_get_float_property(object *op, int propcode) {
399  int type;
400  float value;
401 
402  cfapiObject_get_property(&type, op, propcode, &value);
403  assert(type == CFAPI_FLOAT);
404  return value;
405 }
407  int type;
408  archetype *value;
409 
410  cfapiObject_get_property(&type, op, propcode, &value);
411  assert(type == CFAPI_PARCH);
412  return value;
413 }
415  int type;
416  partylist *value;
417 
418  cfapiObject_get_property(&type, op, propcode, &value);
419  assert(type == CFAPI_PPARTY);
420  return value;
421 }
422 double cf_object_get_double_property(object *op, int propcode) {
423  int type;
424  double value;
425 
426  cfapiObject_get_property(&type, op, propcode, &value);
427  assert(type == CFAPI_DOUBLE);
428  return value;
429 }
430 sstring cf_object_get_sstring_property(object *op, int propcode) {
431  int type;
432  sstring value;
433 
434  cfapiObject_get_property(&type, op, propcode, &value);
435  assert(type == CFAPI_SSTRING);
436  return value;
437 }
438 char *cf_object_get_string_property(object *op, int propcode, char *buf, int size) {
439  int type;
440 
441  cfapiObject_get_property(&type, op, propcode, buf, size);
442  assert(type == CFAPI_STRING);
443  return buf;
444 }
445 /* Should get replaced by tons of more explicit wrappers */
446 void cf_object_set_string_property(object *op, int propcode, const char *value) {
447  int type;
448 
449  /* use cf_object_set_face() for changing the face! */
450  assert(propcode != CFAPI_OBJECT_PROP_FACE);
451  /* use cf_object_set_animation() to change the animation */
452  assert(propcode != CFAPI_OBJECT_PROP_ANIMATION);
453 
454  cfapiObject_set_property(&type, op, propcode, value);
455  assert(type == CFAPI_STRING);
456 }
457 
464 int cf_object_set_face(object *op, const char *face) {
465  int type, ret;
467  assert(type == CFAPI_INT);
468  return ret;
469 }
476 int cf_object_set_animation(object *op, const char *animation) {
477  int type, ret;
479  assert(type == CFAPI_INT);
480  return ret;
481 }
482 
483 void cf_object_set_object_property(object *op, int propcode, object *value) {
484  int type;
485 
486  cfapiObject_set_property(&type, op, propcode, value);
487  assert(type == CFAPI_POBJECT);
488 }
489 
494 void cf_object_change_exp(object *op, int64_t exp, const char *skill_name, int flag) {
495  int type;
496 
497  cfapiObject_change_exp(&type, op, exp, skill_name && strlen(skill_name) > 0 ? skill_name : NULL, flag);
498  assert(type == CFAPI_NONE);
499 }
500 
505 int64_t cf_object_perm_exp(object *op) {
506  int type;
507  int64_t ret;
508 
509  cfapiObject_perm_exp(&type, op, &ret);
510  assert(type == CFAPI_SINT64);
511  return ret;
512 }
513 
514 int cf_player_move(player *pl, int dir) {
515  int type, ret;
516 
517  cfapiObject_move(&type, 1, pl, dir, &ret);
518  assert(type == CFAPI_INT);
519  return ret;
520 }
521 int cf_object_move(object *op, int dir, object*originator) {
522  int type, ret;
523 
524  cfapiObject_move(&type, 0, op, dir, originator, &ret);
525  assert(type == CFAPI_INT);
526  return ret;
527 }
532 int cf_object_apply(object *op, object *tmp, int aflag) {
533  int type, ret;
534 
535  cfapiObject_apply(&type, op, tmp, aflag, &ret);
536  return ret;
537 }
538 
543 void cf_object_apply_below(object *pl) {
544  int type;
545 
547 }
552 void cf_object_remove(object *op) {
553  int type;
554 
556 }
562  int type;
563 
565 }
569 object *cf_object_present_archname_inside(object *op, char *whatstr) {
570  int type;
571  object *value;
572 
574  assert(type == CFAPI_POBJECT);
575  return value;
576 }
577 
582 object *cf_object_find_by_arch_name(const object *who, const char *name) {
583  int type;
584  object *result;
585 
587  assert(type == CFAPI_POBJECT);
588  return result;
589 }
590 
595 object *cf_object_find_by_name(const object *who, const char *name) {
596  int type;
597  object *result;
598 
599  cfapiObject_find_by_name(&type, who, name, &result);
600  assert(type == CFAPI_POBJECT);
601  return result;
602 }
603 
608 int cf_object_transfer(object *op, int x, int y, int randomly, object *originator) {
609  int type, value;
610 
611  cfapiObject_transfer(&type, op, 0, x, y, randomly, originator, &value);
612  assert(type == CFAPI_INT);
613  return value;
614 }
615 
620 int cf_object_move_to(object *op, int x, int y) {
621  int type, value;
622 
623  cfapiObject_transfer(&type, op, 2, x, y, &value);
624  assert(type == CFAPI_INT);
625  return value;
626 }
627 
632 object *cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y) {
633  int type;
634  object *value;
635 
636  cfapiObject_transfer(&type, op, 1, m, originator, flag, x, y, &value);
637  assert(type == CFAPI_POBJECT);
638  return value;
639 }
640 
645 object *cf_map_get_object_at(mapstruct *m, int x, int y) {
646  int type;
647  object *value;
648 
650  assert(type == CFAPI_POBJECT);
651  return value;
652 }
657 void cf_map_message(mapstruct *m, const char *msg, int color) {
658  int type;
659 
661 }
662 
673 object *cf_object_clone(object *op, int clonetype) {
674  int type;
675  object *value;
676 
677  cfapiObject_clone(&type, op, clonetype, &value);
678  assert(type == CFAPI_POBJECT);
679  return value;
680 }
681 
682 
687 object *cf_object_split(object *orig_ob, uint32_t nr, char *err, size_t size) {
688  int type;
689  object *value;
690 
691  cfapiObject_split(&type, orig_ob, nr, err, size, &value);
692 
693  if (value == NULL)
694  {
695  assert(type == CFAPI_NONE);
696  }
697  else
698  {
699  assert(type == CFAPI_POBJECT);
700  }
701 
702  return value;
703 }
704 
705 
710 int cf_object_pay_item(object *op, object *pl) {
711  int type, value;
712 
714  assert(type == CFAPI_INT);
715  return value;
716 }
717 
722 int cf_object_pay_amount(object *pl, uint64_t to_pay) {
723  int type, value;
724 
725  cfapiObject_pay_amount(&type, pl, to_pay, &value);
726  assert(type == CFAPI_INT);
727  return value;
728 }
729 
734 int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg) {
735  int type, value;
736 
737  cfapiObject_cast(&type, op, caster, dir, spell_ob, stringarg, &value);
738  assert(type == CFAPI_INT);
739  return value;
740 }
741 
746 void cf_object_learn_spell(object *op, object *spell, int special_prayer) {
747  int type;
748 
749  cfapiObject_learn_spell(&type, op, spell, special_prayer);
750  assert(type == CFAPI_NONE);
751 }
752 
758 void cf_object_forget_spell(object *op, object *sp) {
759  int type;
760 
762 }
763 
768 object *cf_object_check_for_spell(object *op, const char *name) {
769  int type;
770  object *value;
771 
773  assert(type == CFAPI_POBJECT);
774  return value;
775 }
776 
777 void cf_player_message(object *op, char *txt, int flags) {
778  int type;
779 
780  cfapiPlayer_message(&type, flags, 0, op, txt);
781  assert(type == CFAPI_NONE);
782 }
783 
789  int type, result;
790 
792  assert(type == CFAPI_INT);
793  return result;
794 }
795 
802 object *cf_identify(object *op) {
803  int type;
804  object *result;
805 
806  cfapiObject_identify(&type, op, &result);
807  assert(type == CFAPI_POBJECT);
808  return result;
809 }
810 
815 player *cf_player_find(const char *plname) {
816  int type;
817  player *value;
818 
819  cfapiPlayer_find(&type, plname, &value);
820  assert(type == CFAPI_PPLAYER);
821  return value;
822 }
823 
824 char *cf_player_get_title(object *op, char *title, int size) {
825  int type;
826 
828  assert(type == CFAPI_STRING);
829  return title;
830 }
831 
832 void cf_player_set_title(object *op, const char *title) {
833  int type;
834 
836 }
837 
839  int type;
840  sstring value;
841 
843  assert(type == CFAPI_SSTRING);
844  return value;
845 }
846 
847 object *cf_player_get_marked_item(object *op) {
848  int type;
849  object *value;
850 
852  assert(type == CFAPI_POBJECT);
853  return value;
854 }
855 
856 void cf_player_set_marked_item(object *op, object *ob) {
857  int type;
858 
860 }
861 
864 }
865 
866 void cf_player_set_party(object *op, partylist *party) {
867  int type;
868 
870 }
871 
876 int cf_player_can_pay(object *pl) {
877  int type, value;
878 
880  assert(type == CFAPI_INT);
881  return value;
882 }
883 
890 int cf_player_knowledge_has(object *op, const char *knowledge) {
891  int type, value;
892 
894  assert(type == CFAPI_INT);
895  return value;
896 }
897 
903 void cf_player_knowledge_give(object *op, const char *knowledge) {
904  int type;
905 
907  assert(type == CFAPI_NONE);
908 }
909 
914 int cf_player_arrest(object *who) {
915  int type, value;
916  cfapiObject_move(&type, 2, who, &value);
917  assert(type == CFAPI_INT);
918  return value;
919 }
920 
925 mapstruct *cf_map_get_map(const char *name, int flags) {
926  int type;
927  mapstruct *ret;
928 
929  cfapiMap_get_map(&type, 1, name, flags, &ret);
930  assert(type == CFAPI_PMAP);
931  return ret;
932 }
933 
938 mapstruct *cf_get_empty_map(int sizex, int sizey) {
939  int type;
940  mapstruct *ret;
941 
942  cfapiMap_get_map(&type, 0, sizex, sizey, &ret);
943  assert(type == CFAPI_PMAP);
944  return ret;
945 }
946 
952  int type;
953  mapstruct *ret;
954 
956  assert(type == CFAPI_PMAP);
957  return ret;
958 }
959 
967 }
968 
973 int cf_object_query_money(const object *op) {
974  int type, value;
975 
977  assert(type == CFAPI_INT);
978  return value;
979 }
980 
984 void cf_cost_string_from_value(uint64_t cost, int largest_coin, char *buffer, int length) {
985  int type;
986 
987  cfapiCost_string_from_value(&type, cost, largest_coin, buffer, length);
988  assert(type == CFAPI_NONE);
989 }
990 
995 void cf_spring_trap(object *trap, object *victim) {
996  int type;
997 
998  if (trap)
1000 }
1001 
1006 int cf_object_check_trigger(object *op, object *cause) {
1007  int type, value;
1008 
1009  cfapiObject_check_trigger(&type, op, cause, &value);
1010  assert(type == CFAPI_INT);
1011  return value;
1012 }
1013 
1018 void cf_map_trigger_connected(objectlink *ol, object *cause, int state) {
1019  int type;
1020 
1021  cfapiMap_trigger_connected(&type, ol, cause, state);
1022  assert(type == CFAPI_NONE);
1023 }
1024 
1025 int cf_object_out_of_map(object *op, int x, int y) {
1026  int type, value;
1027 
1028  cfapiObject_out_of_map(&type, op->map, x, y, &value);
1029  assert(type == CFAPI_INT);
1030  return value;
1031 }
1032 
1033 void cf_object_drop(object *op, object *author) {
1034  int type;
1035 
1037 }
1038 
1039 void cf_object_say(object *op, char *msg) {
1040  int type, value;
1041 
1043  assert(type == CFAPI_INT);
1044 }
1045 
1046 object *cf_object_insert_object(object *op, object *container) {
1047  int type;
1048  object *value;
1049 
1050  cfapiObject_insert(&type, op, 3, container, &value);
1051  assert(type == CFAPI_POBJECT);
1052  return value;
1053 }
1054 
1059 char *cf_get_maps_directory(const char *name, char *buf, int size) {
1060  int type;
1061 
1062  cfapiMap_create_path(&type, 0, name, buf, size);
1063  assert(type == CFAPI_STRING);
1064  return buf;
1065 }
1066 
1071 object *cf_create_object(void) {
1072  int type;
1073  object *value;
1074 
1075  cfapiObject_create(&type, 0, &value);
1076  assert(type == CFAPI_POBJECT);
1077  return value;
1078 }
1079 
1083 object *cf_create_object_by_name(const char *name) {
1084  int type;
1085  object *value;
1086 
1088  assert(type == CFAPI_POBJECT);
1089  return value;
1090 }
1091 
1093  int type;
1094 
1096  assert(type == CFAPI_NONE);
1097 }
1098 
1100  int type;
1101 
1103  assert(type == CFAPI_NONE);
1104 }
1105 
1120 const char *cf_get_directory(int id) {
1121  int type;
1122  const char *ret;
1123 
1124  cfapiSystem_directory(&type, id, &ret);
1125  assert(type == CFAPI_STRING);
1126  return ret;
1127 }
1128 
1133 const char *cf_re_cmp(const char *str, const char *regexp) {
1134  int type;
1135  const char *result;
1136 
1137  cfapiSystem_re_cmp(&type, str, regexp, &result);
1138  assert(type == CFAPI_STRING);
1139  return result;
1140 }
1141 
1146 void cf_fix_object(object *op) {
1147  int type;
1148 
1149  if (op)
1150  cfapiObject_fix(&type, op);
1151 }
1152 
1157 sstring cf_add_string(const char *str) {
1158  int type;
1159  sstring ret;
1160 
1161  if (!str)
1162  return NULL;
1163  cfapiSystem_add_string(&type, str, &ret);
1164  assert(type == CFAPI_SSTRING);
1165  return ret;
1166 }
1167 
1173  int type;
1174 
1175  if (str)
1177 }
1178 
1180  int type;
1181  sstring ret;
1182 
1183  if (!str)
1184  return NULL;
1185 
1186  cfapiSystem_find_string(&type, str, &ret);
1187  assert(type == CFAPI_SSTRING);
1188  return ret;
1189 }
1190 
1191 char *cf_query_name(object *ob, char *name, int size) {
1192  int type;
1193 
1195  assert(type == CFAPI_STRING);
1196  return name;
1197 }
1198 
1200  int type;
1201  sstring value;
1202 
1204  assert(type == CFAPI_SSTRING);
1205  return value;
1206 }
1207 
1209  int type;
1210  sstring value;
1211 
1213  assert(type == CFAPI_SSTRING);
1214  return value;
1215 }
1216 
1217 void cf_object_set_weight(object *ob, int weight) {
1218  int type;
1219 
1221  assert(type == CFAPI_INT);
1222 }
1223 
1224 void cf_object_set_weight_limit(object *ob, int weight_limit) {
1225  int type;
1226 
1228  assert(type == CFAPI_INT);
1229 }
1230 
1231 int cf_object_get_weight(object *ob) {
1232  int type, weight;
1233 
1235  assert(type == CFAPI_INT);
1236  return weight;
1237 }
1238 
1240  int type, limit;
1241 
1243  assert(type == CFAPI_INT);
1244  return limit;
1245 }
1246 
1250 int cf_object_set_nrof(object *ob, int nrof) {
1251  int type;
1252 
1253  if (nrof < 0)
1254  return -1;
1255 
1257  return 0;
1258 }
1259 
1260 int cf_object_get_nrof(object *ob) {
1261  int type, nrof;
1262 
1264  return nrof;
1265 }
1266 
1267 int cf_object_get_flag(object *ob, int flag) {
1268  int type;
1269  int rv;
1270 
1272  if (rv != 0)
1273  return 1;
1274  else
1275  return 0;
1276 }
1277 
1278 void cf_object_set_flag(object *ob, int flag, int value) {
1279  int type;
1280 
1282 }
1283 
1288 object *cf_object_insert_in_ob(object *op, object *where) {
1289  int type;
1290  object *value;
1291 
1294  }
1295 
1297  assert(type == CFAPI_POBJECT);
1298  return value;
1299 }
1300 
1305 object *cf_map_insert_object_there(object *op, mapstruct *m, object *originator, int flag) {
1306  int type;
1307  object *value;
1308 
1309  cfapiObject_insert(&type, op, 1, m, originator, flag, &value);
1310  assert(type == CFAPI_POBJECT);
1311  return value;
1312 }
1313 
1319 object *cf_map_insert_object(mapstruct *where, object *op, int x, int y) {
1320  int type;
1321  object *value;
1322 
1323  cfapiObject_insert(&type, op, 0, where, NULL, 0 , x, y, &value);
1324  assert(type == CFAPI_POBJECT);
1325  return value;
1326 }
1327 
1341 object *cf_map_insert_object_around(mapstruct *where, object *op, int x, int y) {
1342  int type;
1343  object *value;
1344 
1345  cfapiObject_insert(&type, op, 2, where, NULL, 0 , x, y, &value);
1346  assert(type == CFAPI_POBJECT);
1347  return value;
1348 }
1349 
1350 int cf_object_teleport(object *op, mapstruct *map, int x, int y) {
1351  int type, value;
1352 
1354  assert(type == CFAPI_INT);
1355  return value;
1356 }
1357 
1361 object *cf_map_find_by_archetype_name(const char *str, mapstruct *map, int nx, int ny) {
1362  int type;
1363  object *value;
1364 
1366  assert(type == CFAPI_POBJECT);
1367  return value;
1368 }
1369 
1372 }
1373 
1376 }
1377 
1380 }
1381 
1384 }
1385 
1388 }
1389 
1392 }
1393 
1396 }
1397 
1400 }
1401 
1404 }
1405 
1410 int cf_map_change_light(mapstruct *m, int change) {
1411  int type, value;
1412 
1413  cfapiMap_change_light(&type, m, change, &value);
1414  assert(type == CFAPI_INT);
1415  return value;
1416 }
1417 
1418 void cf_object_update(object *op, int flags) {
1419  int type;
1420 
1422 }
1423 
1424 void cf_object_pickup(object *op, object *what) {
1425  int type;
1426 
1427  cfapiObject_pickup(&type, op, what);
1428  assert(type == CFAPI_NONE);
1429 }
1430 
1436 char *cf_strdup_local(const char *str) {
1437  int type;
1438  char *dup;
1439 
1440  if (str == NULL)
1441  return NULL;
1443  assert(type == CFAPI_STRING);
1444  return dup;
1445 }
1446 
1451 int cf_map_get_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny) {
1452  int type, value;
1453 
1454  cfapiMap_get_property(&type, oldmap, CFAPI_MAP_PROP_FLAGS, newmap, x, y, nx, ny, &value);
1455  assert(type == CFAPI_INT);
1456  return value;
1457 }
1458 
1463 int cf_random_map_set_variable(RMParms *rp, const char *buf) {
1464  int type, ret;
1465 
1466  cfapiSet_random_map_variable(&type, rp, buf, &ret);
1467  assert(type == CFAPI_INT);
1468  return ret;
1469 }
1470 
1475 mapstruct *cf_random_map_generate(const char *OutFileName, RMParms *RP, char **use_layout) {
1476  int type;
1477  mapstruct *map;
1478 
1479  cfapiGenerate_random_map(&type, OutFileName, RP, use_layout, &map);
1480  assert(type == CFAPI_PMAP);
1481  return map;
1482 }
1483 
1488 int cf_find_animation(const char *name) {
1489  int type, anim;
1490 
1492  assert(type == CFAPI_INT);
1493  return anim;
1494 }
1495 
1500 int cf_find_face(const char *name, int error) {
1501  int type, anim;
1502 
1503  cfapiSystem_find_face(&type, name, error, &anim);
1504  assert(type == CFAPI_INT);
1505  return anim;
1506 }
1507 
1512 void cf_log(LogLevel logLevel, const char *format, ...) {
1513  int type;
1514  /* Copied from common/logger.c */
1515  char buf[20480]; /* This needs to be really really big - larger than any other buffer, since that buffer may
1516  need to be put in this one. */
1517  va_list ap;
1518 
1519  va_start(ap, format);
1520  buf[0] = '\0';
1521  vsprintf(buf, format, ap);
1522  va_end(ap);
1523 
1524  cfapiSystem_log(&type, logLevel, buf);
1525  assert(type == CFAPI_NONE);
1526 }
1527 
1532 void cf_log_plain(LogLevel logLevel, const char *message) {
1533  int type;
1534 
1535  cfapiSystem_log(&type, logLevel, message);
1536  assert(type == CFAPI_NONE);
1537 }
1538 
1540  int type;
1541 
1542  cfapiSystem_get_time(&type, tod);
1543  assert(type == CFAPI_NONE);
1544 }
1545 
1546 const char *cf_get_season_name(int index) {
1547  int type;
1548  char *result;
1549 
1551  assert(type == CFAPI_STRING);
1552  return result;
1553 }
1554 
1555 const char *cf_get_month_name(int index) {
1556  int type;
1557  char *result;
1558 
1560  assert(type == CFAPI_STRING);
1561  return result;
1562 }
1563 
1564 const char *cf_get_weekday_name(int index) {
1565  int type;
1566  char *result;
1567 
1569  assert(type == CFAPI_STRING);
1570  return result;
1571 }
1572 
1573 const char *cf_get_periodofday_name(int index) {
1574  int type;
1575  char *result;
1576 
1578  assert(type == CFAPI_STRING);
1579  return result;
1580 }
1581 
1594 int cf_timer_create(object *ob, long delay, int mode) {
1595  int type, timer;
1596 
1597  cfapiSystem_timer_create(&type, ob, delay, mode, &timer);
1598  assert(type == CFAPI_INT);
1599  return timer;
1600 }
1601 
1610 int cf_timer_destroy(int id) {
1611  int type, code;
1612 
1613  cfapiSystem_timer_destroy(&type, id, &code);
1614  assert(type == CFAPI_INT);
1615  return code;
1616 }
1617 
1627 const char *cf_object_get_key(object *op, const char *keyname) {
1628  int type;
1629  const char *value;
1630 
1631  cfapiObject_get_key(&type, op, keyname, &value);
1632  assert(type == CFAPI_SSTRING);
1633  return value;
1634 }
1635 
1649 int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key) {
1650  int type, ret;
1651 
1652  cfapiObject_set_key(&type, op, keyname, value, add_key, &ret);
1653  assert(type == CFAPI_INT);
1654  return ret;
1655 }
1656 
1661 int cf_object_change_abil(object *op, object *tmp) {
1662  int type, ret;
1663 
1664  cfapiObject_change_abil(&type, op, tmp, &ret);
1665  assert(type == CFAPI_INT);
1666  return ret;
1667 }
1668 
1669 /* Archetype-related functions */
1670 
1677  int type;
1678  archetype *value;
1679 
1681  assert(type == CFAPI_PARCH);
1682  return value;
1683 }
1684 
1693  int type;
1694  sstring name;
1695 
1697  assert(type == CFAPI_SSTRING);
1698  return name;
1699 }
1700 
1710  int type;
1711  archetype *value;
1712 
1714  assert(type == CFAPI_PARCH);
1715  return value;
1716 }
1717 
1726  int type;
1727  archetype *value;
1728 
1730  assert(type == CFAPI_PARCH);
1731  return value;
1732 }
1733 
1742  int type;
1743  archetype *value;
1744 
1746  assert(type == CFAPI_PARCH);
1747  return value;
1748 }
1749 
1758  int type;
1759  object *value;
1760 
1762  assert(type == CFAPI_POBJECT);
1763  return value;
1764 }
1765 
1766 /* Party-related functions */
1767 
1774  int type;
1775  partylist *value;
1776 
1778  assert(type == CFAPI_PPARTY);
1779  return value;
1780 }
1781 
1788 const char *cf_party_get_name(partylist *party) {
1789  int type;
1790  sstring value;
1791 
1793  assert(type == CFAPI_SSTRING);
1794  return value;
1795 }
1796 
1805  int type;
1806  partylist *value;
1807 
1809  assert(type == CFAPI_PPARTY);
1810  return value;
1811 }
1812 
1820 const char *cf_party_get_password(partylist *party) {
1821  int type;
1822  sstring value;
1823 
1825  assert(type == CFAPI_SSTRING);
1826  return value;
1827 }
1828 
1837  int type;
1838  player *value;
1839 
1841  assert(type == CFAPI_PPLAYER);
1842  return value;
1843 }
1844 
1855  int type;
1856  player *value;
1857 
1859  assert(type == CFAPI_PPLAYER);
1860  return value;
1861 }
1862 
1869  int type;
1870  region *value;
1871 
1873  assert(type == CFAPI_PREGION);
1874  return value;
1875 }
1876 
1884 const char *cf_region_get_name(region *reg) {
1885  int type;
1886  sstring value;
1887 
1889  assert(type == CFAPI_SSTRING);
1890  return value;
1891 }
1892 
1901  int type;
1902  region *value;
1903 
1905  assert(type == CFAPI_PREGION);
1906  return value;
1907 }
1908 
1917  int type;
1918  region *value;
1919 
1921  assert(type == CFAPI_PREGION);
1922  return value;
1923 }
1924 
1932 const char *cf_region_get_longname(region *reg) {
1933  int type;
1934  sstring value;
1935 
1937  assert(type == CFAPI_SSTRING);
1938  return value;
1939 }
1940 
1948 const char *cf_region_get_message(region *reg) {
1949  int type;
1950  sstring value;
1951 
1953  assert(type == CFAPI_SSTRING);
1954  return value;
1955 }
1956 
1965  int type, value;
1966 
1968  assert(type == CFAPI_INT);
1969  return value;
1970 }
1971 
1980  int type, value;
1981 
1983  assert(type == CFAPI_INT);
1984  return value;
1985 }
1986 
1994 const char *cf_region_get_jail_path(region *reg) {
1995  int type;
1996  sstring value;
1997 
1999  assert(type == CFAPI_SSTRING);
2000  return value;
2001 }
2002 
2003 /* Friendlylist functions. */
2004 
2011  int type;
2012  object *value;
2013 
2015  assert(type == CFAPI_POBJECT);
2016  return value;
2017 }
2018 
2026 object *cf_friendlylist_get_next(object *ob) {
2027  int type;
2028  object *value;
2029 
2031  assert(type == CFAPI_POBJECT);
2032  return value;
2033 }
2034 
2035 /* Quest-related functions */
2036 
2041 int cf_quest_get_player_state(object *pl, sstring quest_code) {
2042  int type, ret;
2043 
2044  cfapiPlayer_quest(&type, CFAPI_PLAYER_QUEST_GET_STATE, pl, quest_code, &ret);
2045  assert(type == CFAPI_INT);
2046 
2047  return ret;
2048 }
2049 
2054 void cf_quest_start(object *pl, sstring quest_code, int state) {
2055  int type;
2056 
2058  assert(type == CFAPI_NONE);
2059 }
2060 
2065 void cf_quest_set_player_state(object *pl, sstring quest_code, int state) {
2066  int type;
2067 
2069  assert(type == CFAPI_NONE);
2070 }
2071 
2076 int cf_quest_was_completed(object *pl, sstring quest_code) {
2077  int type, ret;
2078 
2080  assert(type == CFAPI_INT);
2081 
2082  return ret;
2083 }
2084 
2085 command_registration cf_system_register_command(const char *name, command_function func, uint8_t command_type, float time) {
2086  int type;
2088  cfapiSystem_register_command(&type, 1, name, func, command_type, time, &cr);
2089  assert(type == CFAPI_SINT64);
2090  return cr;
2091 }
2092 
2093 command_registration cf_system_register_command_extra(const char *name, const char *extra, command_function_extra func, uint8_t command_type, float time) {
2094  int type;
2096  cfapiSystem_register_command(&type, 2, name, extra, func, command_type, time, &cr);
2097  assert(type == CFAPI_SINT64);
2098  return cr;
2099 }
2100 
2102  int type;
2104 }
cf_region_get_message
const char * cf_region_get_message(region *reg)
Definition: plugin_common.c:1948
cfapiObject_drop
static f_plug_api cfapiObject_drop
Definition: plugin_common.c:91
CFAPI_SSTRING
#define CFAPI_SSTRING
Definition: plugin.h:77
cfapiMap_trigger_connected
static f_plug_api cfapiMap_trigger_connected
Definition: plugin_common.c:103
cf_object_pickup
void cf_object_pickup(object *op, object *what)
Definition: plugin_common.c:1424
cfapiObject_user_event
static f_plug_api cfapiObject_user_event
Definition: plugin_common.c:124
cfapiObject_give_skill
static f_plug_api cfapiObject_give_skill
Definition: plugin_common.c:64
CFAPI_PPLAYER
#define CFAPI_PPLAYER
Definition: plugin.h:71
cf_object_get_movetype_property
MoveType cf_object_get_movetype_property(object *op, int propcode)
Definition: plugin_common.c:347
cf_object_find_by_arch_name
object * cf_object_find_by_arch_name(const object *who, const char *name)
Definition: plugin_common.c:582
CFAPI_POBJECT
#define CFAPI_POBJECT
Definition: plugin.h:65
cfapiSystem_directory
static f_plug_api cfapiSystem_directory
Definition: plugin_common.c:54
cf_map_set_int_property
void cf_map_set_int_property(mapstruct *map, int propcode, int value)
Definition: plugin_common.c:288
cf_map_get_difficulty
int cf_map_get_difficulty(mapstruct *map)
Definition: plugin_common.c:1370
cf_system_register_command
command_registration cf_system_register_command(const char *name, command_function func, uint8_t command_type, float time)
Definition: plugin_common.c:2085
cf_player_set_party
void cf_player_set_party(object *op, partylist *party)
Definition: plugin_common.c:866
cfapiObject_update
static f_plug_api cfapiObject_update
Definition: plugin_common.c:74
cfapiSystem_get_time
static f_plug_api cfapiSystem_get_time
Definition: plugin_common.c:51
cfapiObject_apply
static f_plug_api cfapiObject_apply
Definition: plugin_common.c:59
cf_object_get_partylist_property
partylist * cf_object_get_partylist_property(object *op, int propcode)
Definition: plugin_common.c:414
cf_random_map_generate
mapstruct * cf_random_map_generate(const char *OutFileName, RMParms *RP, char **use_layout)
Definition: plugin_common.c:1475
CFAPI_PARTY_PROP_NAME
#define CFAPI_PARTY_PROP_NAME
Definition: plugin.h:274
CFAPI_MAP_PROP_RESET_TIME
#define CFAPI_MAP_PROP_RESET_TIME
Definition: plugin.h:254
cfapiObject_find_by_name
static f_plug_api cfapiObject_find_by_name
Definition: plugin_common.c:89
cfapiObject_cast
static f_plug_api cfapiObject_cast
Definition: plugin_common.c:80
CFAPI_MAP_PROP_RESET_TIMEOUT
#define CFAPI_MAP_PROP_RESET_TIMEOUT
Definition: plugin.h:255
CFAPI_REGION_PROP_LONGNAME
#define CFAPI_REGION_PROP_LONGNAME
Definition: plugin.h:282
CFAPI_NONE
#define CFAPI_NONE
Definition: plugin.h:60
cfapiSystem_find_face
static f_plug_api cfapiSystem_find_face
Definition: plugin_common.c:49
diamondslots.x
x
Definition: diamondslots.py:15
cfapiParty_get_property
static f_plug_api cfapiParty_get_property
Definition: plugin_common.c:113
CFAPI_REGION_PROP_NEXT
#define CFAPI_REGION_PROP_NEXT
Definition: plugin.h:280
archininventory.arch
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
Definition: archininventory.py:16
CFAPI_MAP_PROP_NEXT
#define CFAPI_MAP_PROP_NEXT
Definition: plugin.h:264
cf_object_update
void cf_object_update(object *op, int flags)
Definition: plugin_common.c:1418
cf_object_clone
object * cf_object_clone(object *op, int clonetype)
Definition: plugin_common.c:673
cfapiMap_message
static f_plug_api cfapiMap_message
Definition: plugin_common.c:97
cfapiSystem_find_animation
static f_plug_api cfapiSystem_find_animation
Definition: plugin_common.c:48
cf_object_teleport
int cf_object_teleport(object *op, mapstruct *map, int x, int y)
Definition: plugin_common.c:1350
cf_object_check_trigger
int cf_object_check_trigger(object *op, object *cause)
Definition: plugin_common.c:1006
cfapiSystem_get_season_name
static f_plug_api cfapiSystem_get_season_name
Definition: plugin_common.c:121
cfapiMap_get_object_at
static f_plug_api cfapiMap_get_object_at
Definition: plugin_common.c:98
pl
Definition: player.h:105
cf_player_get_ip
sstring cf_player_get_ip(object *op)
Definition: plugin_common.c:838
cfapiObject_say
static f_plug_api cfapiObject_say
Definition: plugin_common.c:93
cf_quest_get_player_state
int cf_quest_get_player_state(object *pl, sstring quest_code)
Definition: plugin_common.c:2041
cfapiSystem_unregister_global_event
static f_plug_api cfapiSystem_unregister_global_event
Definition: plugin_common.c:46
cfapiSystem_add_string
static f_plug_api cfapiSystem_add_string
Definition: plugin_common.c:42
cfapiObject_merge
static f_plug_api cfapiObject_merge
Definition: plugin_common.c:72
cf_create_object
object * cf_create_object(void)
Definition: plugin_common.c:1071
MoveType
unsigned char MoveType
Definition: define.h:417
guildjoin.ob
ob
Definition: guildjoin.py:42
cf_find_face
int cf_find_face(const char *name, int error)
Definition: plugin_common.c:1500
cf_map_insert_object_there
object * cf_map_insert_object_there(object *op, mapstruct *m, object *originator, int flag)
Definition: plugin_common.c:1305
cf_object_get_int_property
int cf_object_get_int_property(object *op, int propcode)
Definition: plugin_common.c:325
cf_quest_was_completed
int cf_quest_was_completed(object *pl, sstring quest_code)
Definition: plugin_common.c:2076
CFAPI_PLAYER_PROP_MARKED_ITEM
#define CFAPI_PLAYER_PROP_MARKED_ITEM
Definition: plugin.h:235
cf_object_find_by_name
object * cf_object_find_by_name(const object *who, const char *name)
Definition: plugin_common.c:595
cf_get_time
void cf_get_time(timeofday_t *tod)
Definition: plugin_common.c:1539
giveknowledge.knowledge
knowledge
DIALOGCHECK MINARGS 1 MAXARGS 1
Definition: giveknowledge.py:15
cf_region_get_jail_x
int cf_region_get_jail_x(region *reg)
Definition: plugin_common.c:1964
cfapiSystem_get_month_name
static f_plug_api cfapiSystem_get_month_name
Definition: plugin_common.c:120
CFAPI_ARCH_PROP_NEXT
#define CFAPI_ARCH_PROP_NEXT
Definition: plugin.h:269
cf_system_unregister_global_event
void cf_system_unregister_global_event(int event, const char *name)
Definition: plugin_common.c:1099
cf_init_plugin
int cf_init_plugin(f_plug_api getHooks)
Definition: plugin_common.c:141
cf_player_find
player * cf_player_find(const char *plname)
Definition: plugin_common.c:815
cf_object_get_map_property
mapstruct * cf_object_get_map_property(object *op, int propcode)
Definition: plugin_common.c:363
cfapiObject_query_money
static f_plug_api cfapiObject_query_money
Definition: plugin_common.c:79
cf_party_get_password
const char * cf_party_get_password(partylist *party)
Definition: plugin_common.c:1820
cf_object_query_money
int cf_object_query_money(const object *op)
Definition: plugin_common.c:973
cf_system_register_command_extra
command_registration cf_system_register_command_extra(const char *name, const char *extra, command_function_extra func, uint8_t command_type, float time)
Definition: plugin_common.c:2093
cfapiObject_get_key
static f_plug_api cfapiObject_get_key
Definition: plugin_common.c:108
cf_object_insert_in_ob
object * cf_object_insert_in_ob(object *op, object *where)
Definition: plugin_common.c:1288
cf_player_get_title
char * cf_player_get_title(object *op, char *title, int size)
Definition: plugin_common.c:824
cf_cost_string_from_value
void cf_cost_string_from_value(uint64_t cost, int largest_coin, char *buffer, int length)
Definition: plugin_common.c:984
cf_object_user_event
int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix)
Definition: plugin_common.c:252
cf_object_move
int cf_object_move(object *op, int dir, object *originator)
Definition: plugin_common.c:521
Ice.tmp
int tmp
Definition: Ice.py:207
cf_object_split
object * cf_object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
Definition: plugin_common.c:687
CFAPI_OBJECT_PROP_FACE
#define CFAPI_OBJECT_PROP_FACE
Definition: plugin.h:221
cf_system_register_global_event
void cf_system_register_global_event(int event, const char *name, f_plug_event hook)
Definition: plugin_common.c:1092
CFAPI_REGION_PROP_PARENT
#define CFAPI_REGION_PROP_PARENT
Definition: plugin.h:281
cfapiObject_set_key
static f_plug_api cfapiObject_set_key
Definition: plugin_common.c:109
cf_log
void cf_log(LogLevel logLevel, const char *format,...)
Definition: plugin_common.c:1512
CFAPI_PPARTY
#define CFAPI_PPARTY
Definition: plugin.h:72
cf_map_get_height
int cf_map_get_height(mapstruct *map)
Definition: plugin_common.c:1394
flags
static const flag_definition flags[]
Definition: gridarta-types-convert.c:101
cfapiObject_change_exp
static f_plug_api cfapiObject_change_exp
Definition: plugin_common.c:119
cf_get_weekday_name
const char * cf_get_weekday_name(int index)
Definition: plugin_common.c:1564
cf_object_change_map
object * cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Definition: plugin_common.c:632
cf_region_get_jail_y
int cf_region_get_jail_y(region *reg)
Definition: plugin_common.c:1979
CFAPI_REGION_PROP_JAIL_PATH
#define CFAPI_REGION_PROP_JAIL_PATH
Definition: plugin.h:286
CFAPI_MAP_PROP_WIDTH
#define CFAPI_MAP_PROP_WIDTH
Definition: plugin.h:259
cf_archetype_get_next
archetype * cf_archetype_get_next(archetype *arch)
Definition: plugin_common.c:1709
CFAPI_ARCH_PROP_NAME
#define CFAPI_ARCH_PROP_NAME
Definition: plugin.h:268
cf_object_get_weight_limit
int cf_object_get_weight_limit(object *ob)
Definition: plugin_common.c:1239
cf_object_insert_object
object * cf_object_insert_object(object *op, object *container)
Definition: plugin_common.c:1046
smoking_pipe.color
color
Definition: smoking_pipe.py:5
cf_get_periodofday_name
const char * cf_get_periodofday_name(int index)
Definition: plugin_common.c:1573
cf_player_can_pay
int cf_player_can_pay(object *pl)
Definition: plugin_common.c:876
CFAPI_FLOAT
#define CFAPI_FLOAT
Definition: plugin.h:67
cf_map_trigger_connected
void cf_map_trigger_connected(objectlink *ol, object *cause, int state)
Definition: plugin_common.c:1018
cf_map_get_int_property
int cf_map_get_int_property(mapstruct *map, int property)
Definition: plugin_common.c:244
Moving_Fog.z
z
Definition: Moving_Fog.py:17
cf_friendlylist_get_first
object * cf_friendlylist_get_first(void)
Definition: plugin_common.c:2010
_timeofday
Definition: tod.h:38
RMParms
Definition: random_map.h:14
cfapiObject_move
static f_plug_api cfapiObject_move
Definition: plugin_common.c:110
CFAPI_MAP_PROP_ENTER_X
#define CFAPI_MAP_PROP_ENTER_X
Definition: plugin.h:261
cfapiPlayer_knowledge
static f_plug_api cfapiPlayer_knowledge
Definition: plugin_common.c:128
cfapiObject_forget_spell
static f_plug_api cfapiObject_forget_spell
Definition: plugin_common.c:82
cf_object_set_nrof
int cf_object_set_nrof(object *ob, int nrof)
Definition: plugin_common.c:1250
cf_map_has_been_loaded
mapstruct * cf_map_has_been_loaded(const char *name)
Definition: plugin_common.c:951
cf_object_get_flag
int cf_object_get_flag(object *ob, int flag)
Definition: plugin_common.c:1267
archt
Definition: object.h:470
cf_object_get_sstring_property
sstring cf_object_get_sstring_property(object *op, int propcode)
Definition: plugin_common.c:430
cf_re_cmp
const char * cf_re_cmp(const char *str, const char *regexp)
Definition: plugin_common.c:1133
cf_object_say
void cf_object_say(object *op, char *msg)
Definition: plugin_common.c:1039
cfapiSystem_get_periodofday_name
static f_plug_api cfapiSystem_get_periodofday_name
Definition: plugin_common.c:123
cf_map_get_enter_x
int cf_map_get_enter_x(mapstruct *map)
Definition: plugin_common.c:1398
cf_object_transfer
int cf_object_transfer(object *op, int x, int y, int randomly, object *originator)
Definition: plugin_common.c:608
cfapiMap_get_property
static f_plug_api cfapiMap_get_property
Definition: plugin_common.c:94
m
static event_registration m
Definition: citylife.cpp:427
cfapiObject_activate_rune
static f_plug_api cfapiObject_activate_rune
Definition: plugin_common.c:77
cf_fix_object
void cf_fix_object(object *op)
Definition: plugin_common.c:1146
autojail.who
who
Definition: autojail.py:3
cfapiObject_teleport
static f_plug_api cfapiObject_teleport
Definition: plugin_common.c:106
cfapiCost_string_from_value
static f_plug_api cfapiCost_string_from_value
Definition: plugin_common.c:125
cfapiObject_check_spell
static f_plug_api cfapiObject_check_spell
Definition: plugin_common.c:83
cf_player_knowledge_give
void cf_player_knowledge_give(object *op, const char *knowledge)
Definition: plugin_common.c:903
CFAPI_ARCH_PROP_HEAD
#define CFAPI_ARCH_PROP_HEAD
Definition: plugin.h:270
disinfect.map
map
Definition: disinfect.py:4
cf_object_learn_spell
void cf_object_learn_spell(object *op, object *spell, int special_prayer)
Definition: plugin_common.c:746
titlestruct
Definition: readable.c:107
CFAPI_PLAYER_PROP_PARTY
#define CFAPI_PLAYER_PROP_PARTY
Definition: plugin.h:236
cf_object_present_archname_inside
object * cf_object_present_archname_inside(object *op, char *whatstr)
Definition: plugin_common.c:569
cfapiObject_pickup
static f_plug_api cfapiObject_pickup
Definition: plugin_common.c:107
diamondslots.activator
activator
Definition: diamondslots.py:10
cf_map_get_reset_time
int cf_map_get_reset_time(mapstruct *map)
Definition: plugin_common.c:1374
cfapiSystem_strdup_local
static f_plug_api cfapiSystem_strdup_local
Definition: plugin_common.c:47
cf_find_animation
int cf_find_animation(const char *name)
Definition: plugin_common.c:1488
cfapiObject_insert
static f_plug_api cfapiObject_insert
Definition: plugin_common.c:70
cf_archetype_get_head
archetype * cf_archetype_get_head(archetype *arch)
Definition: plugin_common.c:1741
CFAPI_REGION_PROP_JAIL_Y
#define CFAPI_REGION_PROP_JAIL_Y
Definition: plugin.h:285
cf_map_get_region_property
region * cf_map_get_region_property(mapstruct *map, int propcode)
Definition: plugin_common.c:278
f_plug_api
void(* f_plug_api)(int *type,...)
Definition: plugin.h:81
cfapiSystem_remove_string
static f_plug_api cfapiSystem_remove_string
Definition: plugin_common.c:45
cfapiSystem_register_global_event
static f_plug_api cfapiSystem_register_global_event
Definition: plugin_common.c:44
cfapiMap_change_light
static f_plug_api cfapiMap_change_light
Definition: plugin_common.c:102
cfapiObject_get_property
static f_plug_api cfapiObject_get_property
Definition: plugin_common.c:57
cf_object_check_for_spell
object * cf_object_check_for_spell(object *op, const char *name)
Definition: plugin_common.c:768
CFAPI_INT
#define CFAPI_INT
Definition: plugin.h:61
CFAPI_OBJECT_PROP_WEIGHT
#define CFAPI_OBJECT_PROP_WEIGHT
Definition: plugin.h:170
cf_map_get_darkness
int cf_map_get_darkness(mapstruct *map)
Definition: plugin_common.c:1386
cf_object_set_weight
void cf_object_set_weight(object *ob, int weight)
Definition: plugin_common.c:1217
cf_object_free_drop_inventory
void cf_object_free_drop_inventory(object *ob)
Definition: plugin_common.c:561
cf_map_get_map
mapstruct * cf_map_get_map(const char *name, int flags)
Definition: plugin_common.c:925
CFAPI_OBJECT_PROP_RESIST
#define CFAPI_OBJECT_PROP_RESIST
Definition: plugin.h:152
CFAPI_PLAYER_PROP_IP
#define CFAPI_PLAYER_PROP_IP
Definition: plugin.h:234
cf_object_forget_spell
void cf_object_forget_spell(object *op, object *sp)
Definition: plugin_common.c:758
make_face_from_files.str
str
Definition: make_face_from_files.py:24
cfapiGenerate_random_map
static f_plug_api cfapiGenerate_random_map
Definition: plugin_common.c:118
cfapiObject_create
static f_plug_api cfapiObject_create
Definition: plugin_common.c:69
cfapiObject_reset
static f_plug_api cfapiObject_reset
Definition: plugin_common.c:76
cf_map_get_sstring_property
sstring cf_map_get_sstring_property(mapstruct *map, int propcode)
Definition: plugin_common.c:260
cf_object_get_resistance
int16_t cf_object_get_resistance(object *op, int rtype)
Definition: plugin_common.c:303
navar-midane_pickup.msg
list msg
Definition: navar-midane_pickup.py:13
cfapiObject_drain
static f_plug_api cfapiObject_drain
Definition: plugin_common.c:62
cf_player_set_marked_item
void cf_player_set_marked_item(object *op, object *ob)
Definition: plugin_common.c:856
cf_object_set_flag
void cf_object_set_flag(object *ob, int flag, int value)
Definition: plugin_common.c:1278
cf_party_get_name
const char * cf_party_get_name(partylist *party)
Definition: plugin_common.c:1788
cf_object_out_of_map
int cf_object_out_of_map(object *op, int x, int y)
Definition: plugin_common.c:1025
cf_map_insert_object
object * cf_map_insert_object(mapstruct *where, object *op, int x, int y)
Definition: plugin_common.c:1319
cf_player_arrest
int cf_player_arrest(object *who)
Definition: plugin_common.c:914
cf_region_get_name
const char * cf_region_get_name(region *reg)
Definition: plugin_common.c:1884
CFAPI_ARCH_PROP_CLONE
#define CFAPI_ARCH_PROP_CLONE
Definition: plugin.h:272
cf_party_get_next
partylist * cf_party_get_next(partylist *party)
Definition: plugin_common.c:1804
cf_object_remove
void cf_object_remove(object *op)
Definition: plugin_common.c:552
CFAPI_OBJECT_PROP_NROF
#define CFAPI_OBJECT_PROP_NROF
Definition: plugin.h:146
cfapiFriendlylist_get_next
static f_plug_api cfapiFriendlylist_get_next
Definition: plugin_common.c:116
cf_object_set_weight_limit
void cf_object_set_weight_limit(object *ob, int weight_limit)
Definition: plugin_common.c:1224
CFAPI_PLAYER_PROP_TITLE
#define CFAPI_PLAYER_PROP_TITLE
Definition: plugin.h:241
cf_object_change_exp
void cf_object_change_exp(object *op, int64_t exp, const char *skill_name, int flag)
Definition: plugin_common.c:494
cf_archetype_get_name
sstring cf_archetype_get_name(archetype *arch)
Definition: plugin_common.c:1692
cfapiObject_clone
static f_plug_api cfapiObject_clone
Definition: plugin_common.c:68
cfapiObject_apply_below
static f_plug_api cfapiObject_apply_below
Definition: plugin_common.c:111
CFAPI_PREGION
#define CFAPI_PREGION
Definition: plugin.h:73
cf_object_get_object_property
object * cf_object_get_object_property(object *op, int propcode)
Definition: plugin_common.c:355
cf_object_set_long_property
void cf_object_set_long_property(object *op, int propcode, long value)
Definition: plugin_common.c:380
cf_player_set_title
void cf_player_set_title(object *op, const char *title)
Definition: plugin_common.c:832
sstring
const typedef char * sstring
Definition: global.h:40
cf_object_cast_spell
int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
Definition: plugin_common.c:734
cf_object_get_msg
sstring cf_object_get_msg(object *ob)
Definition: plugin_common.c:1208
cf_spring_trap
void cf_spring_trap(object *trap, object *victim)
Definition: plugin_common.c:995
CFAPI_PLAYER_QUEST_START
#define CFAPI_PLAYER_QUEST_START
Definition: plugin.h:244
CFAPI_REGION_PROP_NAME
#define CFAPI_REGION_PROP_NAME
Definition: plugin.h:279
cf_object_set_object_property
void cf_object_set_object_property(object *op, int propcode, object *value)
Definition: plugin_common.c:483
cf_get_maps_directory
char * cf_get_maps_directory(const char *name, char *buf, int size)
Definition: plugin_common.c:1059
cf_object_get_key
const char * cf_object_get_key(object *op, const char *keyname)
Definition: plugin_common.c:1627
CFAPI_REGION_PROP_JAIL_X
#define CFAPI_REGION_PROP_JAIL_X
Definition: plugin.h:284
cf_map_find_by_archetype_name
object * cf_map_find_by_archetype_name(const char *str, mapstruct *map, int nx, int ny)
Definition: plugin_common.c:1361
cfapiObject_remove
static f_plug_api cfapiObject_remove
Definition: plugin_common.c:66
animate.anim
string anim
Definition: animate.py:20
cf_map_get_width
int cf_map_get_width(mapstruct *map)
Definition: plugin_common.c:1390
devourers.command
command
Definition: devourers.py:16
cfapiObject_set_property
static f_plug_api cfapiObject_set_property
Definition: plugin_common.c:58
cf_strdup_local
char * cf_strdup_local(const char *str)
Definition: plugin_common.c:1436
mapdef
Definition: map.h:324
cfapiObject_transfer
static f_plug_api cfapiObject_transfer
Definition: plugin_common.c:86
cf_object_get_float_property
float cf_object_get_float_property(object *op, int propcode)
Definition: plugin_common.c:398
cf_object_set_resistance
void cf_object_set_resistance(object *op, int rtype, int16_t value)
Definition: plugin_common.c:311
cf_object_remove_depletion
int cf_object_remove_depletion(object *op, int level)
Definition: plugin_common.c:788
cf_region_get_parent
region * cf_region_get_parent(region *reg)
Definition: plugin_common.c:1916
CFAPI_OBJECT_PROP_NAME_PLURAL
#define CFAPI_OBJECT_PROP_NAME_PLURAL
Definition: plugin.h:135
cfapiObject_find_archetype_inside
static f_plug_api cfapiObject_find_archetype_inside
Definition: plugin_common.c:87
party_struct
Definition: party.h:10
cf_friendlylist_get_next
object * cf_friendlylist_get_next(object *ob)
Definition: plugin_common.c:2026
CFAPI_PARTY_PROP_NEXT
#define CFAPI_PARTY_PROP_NEXT
Definition: plugin.h:275
cfapiObject_fix
static f_plug_api cfapiObject_fix
Definition: plugin_common.c:63
cf_system_unregister_command
void cf_system_unregister_command(command_registration command)
Definition: plugin_common.c:2101
cf_object_set_animation
int cf_object_set_animation(object *op, const char *animation)
Definition: plugin_common.c:476
cf_query_name
char * cf_query_name(object *ob, char *name, int size)
Definition: plugin_common.c:1191
cf_map_insert_object_around
object * cf_map_insert_object_around(mapstruct *where, object *op, int x, int y)
Definition: plugin_common.c:1341
cf_party_get_next_player
player * cf_party_get_next_player(partylist *party, player *op)
Definition: plugin_common.c:1854
cf_object_get_nrof
int cf_object_get_nrof(object *ob)
Definition: plugin_common.c:1260
cf_object_set_face
int cf_object_set_face(object *op, const char *face)
Definition: plugin_common.c:464
title
struct titlestruct title
cf_party_get_first
partylist * cf_party_get_first(void)
Definition: plugin_common.c:1773
CFAPI_REGION_PROP_MESSAGE
#define CFAPI_REGION_PROP_MESSAGE
Definition: plugin.h:283
cf_player_get_party
partylist * cf_player_get_party(object *op)
Definition: plugin_common.c:862
cf_object_get_int64_property
int64_t cf_object_get_int64_property(object *op, int propcode)
Definition: plugin_common.c:371
cf_object_move_to
int cf_object_move_to(object *op, int x, int y)
Definition: plugin_common.c:620
cfapiSystem_find_string
static f_plug_api cfapiSystem_find_string
Definition: plugin_common.c:43
CFAPI_DOUBLE
#define CFAPI_DOUBLE
Definition: plugin.h:68
cf_add_string
sstring cf_add_string(const char *str)
Definition: plugin_common.c:1157
cf_object_pay_item
int cf_object_pay_item(object *op, object *pl)
Definition: plugin_common.c:710
cfapiObject_pay_amount
static f_plug_api cfapiObject_pay_amount
Definition: plugin_common.c:84
cf_map_get_first
mapstruct * cf_map_get_first(void)
Definition: plugin_common.c:965
CFAPI_MAP_PROP_FLAGS
#define CFAPI_MAP_PROP_FLAGS
Definition: plugin.h:249
CFAPI_MAP_PROP_DARKNESS
#define CFAPI_MAP_PROP_DARKNESS
Definition: plugin.h:258
cf_object_get_weight
int cf_object_get_weight(object *ob)
Definition: plugin_common.c:1231
diamondslots.message
string message
Definition: diamondslots.py:57
CFAPI_MAP_PROP_PLAYERS
#define CFAPI_MAP_PROP_PLAYERS
Definition: plugin.h:256
cf_object_set_int_property
void cf_object_set_int_property(object *op, int propcode, int value)
Definition: plugin_common.c:319
FLAG_REMOVED
#define FLAG_REMOVED
Definition: define.h:232
cf_object_perm_exp
int64_t cf_object_perm_exp(object *op)
Definition: plugin_common.c:505
cfapiObject_change_abil
static f_plug_api cfapiObject_change_abil
Definition: plugin_common.c:92
CFAPI_SINT64
#define CFAPI_SINT64
Definition: plugin.h:76
cf_quest_set_player_state
void cf_quest_set_player_state(object *pl, sstring quest_code, int state)
Definition: plugin_common.c:2065
cf_map_get_enter_y
int cf_map_get_enter_y(mapstruct *map)
Definition: plugin_common.c:1402
CFAPI_PARTY_PROP_PLAYER
#define CFAPI_PARTY_PROP_PLAYER
Definition: plugin.h:277
CFAPI_PMAP
#define CFAPI_PMAP
Definition: plugin.h:66
CFAPI_PLAYER_QUEST_GET_STATE
#define CFAPI_PLAYER_QUEST_GET_STATE
Definition: plugin.h:245
CFAPI_MAP_PROP_DIFFICULTY
#define CFAPI_MAP_PROP_DIFFICULTY
Definition: plugin.h:250
cf_get_season_name
const char * cf_get_season_name(int index)
Definition: plugin_common.c:1546
cf_object_get_string_property
char * cf_object_get_string_property(object *op, int propcode, char *buf, int size)
Definition: plugin_common.c:438
cfapiObject_delete
static f_plug_api cfapiObject_delete
Definition: plugin_common.c:67
cfapiObject_transmute
static f_plug_api cfapiObject_transmute
Definition: plugin_common.c:65
cf_object_get_long_property
long cf_object_get_long_property(object *op, long propcode)
Definition: plugin_common.c:332
cfapiMap_set_property
static f_plug_api cfapiMap_set_property
Definition: plugin_common.c:95
cf_object_apply_below
void cf_object_apply_below(object *pl)
Definition: plugin_common.c:543
CFAPI_OBJECT_PROP_ANIMATION
#define CFAPI_OBJECT_PROP_ANIMATION
Definition: plugin.h:222
cf_region_get_longname
const char * cf_region_get_longname(region *reg)
Definition: plugin_common.c:1932
cf_get_empty_map
mapstruct * cf_get_empty_map(int sizex, int sizey)
Definition: plugin_common.c:938
CFAPI_PLAYER_QUEST_SET_STATE
#define CFAPI_PLAYER_QUEST_SET_STATE
Definition: plugin.h:246
cf_region_get_first
region * cf_region_get_first(void)
Definition: plugin_common.c:1868
CFAPI_OBJECT_PROP_NAME
#define CFAPI_OBJECT_PROP_NAME
Definition: plugin.h:134
cf_player_knowledge_has
int cf_player_knowledge_has(object *op, const char *knowledge)
Definition: plugin_common.c:890
reputation.victim
victim
Definition: reputation.py:14
cfapiObject_check_trigger
static f_plug_api cfapiObject_check_trigger
Definition: plugin_common.c:78
CFAPI_PARCH
#define CFAPI_PARCH
Definition: plugin.h:69
f_plug_event
int(* f_plug_event)(int *type,...)
Definition: events.h:61
cf_player_message
void cf_player_message(object *op, char *txt, int flags)
Definition: plugin_common.c:777
cfapiObject_describe
static f_plug_api cfapiObject_describe
Definition: plugin_common.c:61
give.op
op
Definition: give.py:33
autojail.value
value
Definition: autojail.py:6
board.author
author
Definition: board.py:59
cfapiObject_distance
static f_plug_api cfapiObject_distance
Definition: plugin_common.c:73
cfapiPlayer_find
static f_plug_api cfapiPlayer_find
Definition: plugin_common.c:104
cf_object_change_abil
int cf_object_change_abil(object *op, object *tmp)
Definition: plugin_common.c:1661
CFAPI_INT16
#define CFAPI_INT16
Definition: plugin.h:74
cf_object_set_key
int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key)
Definition: plugin_common.c:1649
plugin_common.h
cf_object_get_double_property
double cf_object_get_double_property(object *op, int propcode)
Definition: plugin_common.c:422
cf_map_change_light
int cf_map_change_light(mapstruct *m, int change)
Definition: plugin_common.c:1410
cfapiRegion_get_property
static f_plug_api cfapiRegion_get_property
Definition: plugin_common.c:114
cfapiObject_find_by_arch_name
static f_plug_api cfapiObject_find_by_arch_name
Definition: plugin_common.c:88
cfapiSystem_log
static f_plug_api cfapiSystem_log
Definition: plugin_common.c:50
cf_object_apply
int cf_object_apply(object *op, object *tmp, int aflag)
Definition: plugin_common.c:532
diamondslots.y
y
Definition: diamondslots.py:16
cf_archetype_get_more
archetype * cf_archetype_get_more(archetype *arch)
Definition: plugin_common.c:1725
cfapiMap_create_path
static f_plug_api cfapiMap_create_path
Definition: plugin_common.c:100
CFAPI_STRING
#define CFAPI_STRING
Definition: plugin.h:64
python_pickup.where
where
Definition: python_pickup.py:7
npc_dialog.index
int index
Definition: npc_dialog.py:102
cf_map_get_reset_timeout
int cf_map_get_reset_timeout(mapstruct *map)
Definition: plugin_common.c:1378
buf
StringBuffer * buf
Definition: readable.c:1610
cfapiSystem_timer_destroy
static f_plug_api cfapiSystem_timer_destroy
Definition: plugin_common.c:53
cfapiPlayer_message
static f_plug_api cfapiPlayer_message
Definition: plugin_common.c:105
cfapiMap_has_been_loaded
static f_plug_api cfapiMap_has_been_loaded
Definition: plugin_common.c:101
cf_object_set_float_property
void cf_object_set_float_property(object *op, int propcode, float value)
Definition: plugin_common.c:386
cf_party_get_first_player
player * cf_party_get_first_player(partylist *party)
Definition: plugin_common.c:1836
cfapiSet_random_map_variable
static f_plug_api cfapiSet_random_map_variable
Definition: plugin_common.c:117
cf_log_plain
void cf_log_plain(LogLevel logLevel, const char *message)
Definition: plugin_common.c:1532
GET_HOOK
#define GET_HOOK(x, y, z)
Definition: plugin_common.c:133
cf_object_drop
void cf_object_drop(object *op, object *author)
Definition: plugin_common.c:1033
cf_query_name_pl
sstring cf_query_name_pl(object *ob)
Definition: plugin_common.c:1199
cfapiSystem_timer_create
static f_plug_api cfapiSystem_timer_create
Definition: plugin_common.c:52
cf_map_get_map_property
mapstruct * cf_map_get_map_property(mapstruct *map, int propcode)
Definition: plugin_common.c:269
cf_map_get_object_at
object * cf_map_get_object_at(mapstruct *m, int x, int y)
Definition: plugin_common.c:645
cf_region_get_next
region * cf_region_get_next(region *reg)
Definition: plugin_common.c:1900
cf_object_set_movetype_property
void cf_object_set_movetype_property(object *op, int propcode, MoveType value)
Definition: plugin_common.c:340
CFAPI_MAP_PROP_ENTER_Y
#define CFAPI_MAP_PROP_ENTER_Y
Definition: plugin.h:262
cfapiObject_clear
static f_plug_api cfapiObject_clear
Definition: plugin_common.c:75
cf_map_get_flags
int cf_map_get_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
Definition: plugin_common.c:1451
cf_find_string
sstring cf_find_string(const char *str)
Definition: plugin_common.c:1179
cfapiObject_remove_depletion
static f_plug_api cfapiObject_remove_depletion
Definition: plugin_common.c:127
CFAPI_ARCH_PROP_MORE
#define CFAPI_ARCH_PROP_MORE
Definition: plugin.h:271
cf_object_set_string_property
void cf_object_set_string_property(object *op, int propcode, const char *value)
Definition: plugin_common.c:446
cf_get_directory
const char * cf_get_directory(int id)
Definition: plugin_common.c:1120
command_function_extra
void(* command_function_extra)(object *op, const char *params, const char *extra)
Definition: commands.h:29
cf_random_map_set_variable
int cf_random_map_set_variable(RMParms *rp, const char *buf)
Definition: plugin_common.c:1463
cfapiPlayer_can_pay
static f_plug_api cfapiPlayer_can_pay
Definition: plugin_common.c:115
animate.event
event
DIALOGCHECK MINARGS 1 MAXARGS 2
Definition: animate.py:17
cf_map_get_players
int cf_map_get_players(mapstruct *map)
Definition: plugin_common.c:1382
cf_object_get_archetype_property
archetype * cf_object_get_archetype_property(object *op, int propcode)
Definition: plugin_common.c:406
cfapiObject_identify
static f_plug_api cfapiObject_identify
Definition: plugin_common.c:60
quest.state
state
Definition: quest.py:13
command_registration
uint64_t command_registration
Definition: commands.h:32
cf_get_month_name
const char * cf_get_month_name(int index)
Definition: plugin_common.c:1555
CFAPI_OBJECT_PROP_FLAGS
#define CFAPI_OBJECT_PROP_FLAGS
Definition: plugin.h:200
cf_player_get_marked_item
object * cf_player_get_marked_item(object *op)
Definition: plugin_common.c:847
cf_player_move
int cf_player_move(player *pl, int dir)
Definition: plugin_common.c:514
CFAPI_MAP_PROP_HEIGHT
#define CFAPI_MAP_PROP_HEIGHT
Definition: plugin.h:260
cf_map_set_string_property
void cf_map_set_string_property(mapstruct *map, int propcode, const char *value)
Definition: plugin_common.c:295
cfapiObject_perm_exp
static f_plug_api cfapiObject_perm_exp
Definition: plugin_common.c:129
cfapiPlayer_quest
static f_plug_api cfapiPlayer_quest
Definition: plugin_common.c:126
cfapiObject_split
static f_plug_api cfapiObject_split
Definition: plugin_common.c:71
cfapiSystem_unregister_command
static f_plug_api cfapiSystem_unregister_command
Definition: plugin_common.c:131
cf_archetype_get_first
archetype * cf_archetype_get_first(void)
Definition: plugin_common.c:1676
CFAPI_OBJECT_PROP_MESSAGE
#define CFAPI_OBJECT_PROP_MESSAGE
Definition: plugin.h:140
LogLevel
LogLevel
Definition: logger.h:10
diamondslots.cost
int cost
Definition: diamondslots.py:21
cf_archetype_get_clone
object * cf_archetype_get_clone(archetype *arch)
Definition: plugin_common.c:1757
cfapiSystem_re_cmp
static f_plug_api cfapiSystem_re_cmp
Definition: plugin_common.c:55
oblnk
Definition: object.h:447
CFAPI_PLAYER_QUEST_WAS_COMPLETED
#define CFAPI_PLAYER_QUEST_WAS_COMPLETED
Definition: plugin.h:247
cf_object_pay_amount
int cf_object_pay_amount(object *pl, uint64_t to_pay)
Definition: plugin_common.c:722
cf_region_get_jail_path
const char * cf_region_get_jail_path(region *reg)
Definition: plugin_common.c:1994
command_function
void(* command_function)(object *op, const char *params)
Definition: commands.h:17
CFAPI_LONG
#define CFAPI_LONG
Definition: plugin.h:62
cfapiSystem_register_command
static f_plug_api cfapiSystem_register_command
Definition: plugin_common.c:130
cfapiMap_find_by_archetype_name
static f_plug_api cfapiMap_find_by_archetype_name
Definition: plugin_common.c:99
cf_quest_start
void cf_quest_start(object *pl, sstring quest_code, int state)
Definition: plugin_common.c:2054
cfapiMap_get_map
static f_plug_api cfapiMap_get_map
Definition: plugin_common.c:96
cfapiSystem_get_weekday_name
static f_plug_api cfapiSystem_get_weekday_name
Definition: plugin_common.c:122
cf_create_object_by_name
object * cf_create_object_by_name(const char *name)
Definition: plugin_common.c:1083
cfapiArchetype_get_property
static f_plug_api cfapiArchetype_get_property
Definition: plugin_common.c:112
cf_map_message
void cf_map_message(mapstruct *m, const char *msg, int color)
Definition: plugin_common.c:657
cfapiObject_out_of_map
static f_plug_api cfapiObject_out_of_map
Definition: plugin_common.c:90
CFAPI_PARTY_PROP_PASSWORD
#define CFAPI_PARTY_PROP_PASSWORD
Definition: plugin.h:276
CFAPI_MOVETYPE
#define CFAPI_MOVETYPE
Definition: plugin.h:78
cf_timer_destroy
int cf_timer_destroy(int id)
Definition: plugin_common.c:1610
is_valid_types_gen.type
list type
Definition: is_valid_types_gen.py:25
cf_timer_create
int cf_timer_create(object *ob, long delay, int mode)
Definition: plugin_common.c:1594
cfapiObject_learn_spell
static f_plug_api cfapiObject_learn_spell
Definition: plugin_common.c:81
CFAPI_OBJECT_PROP_WEIGHT_LIMIT
#define CFAPI_OBJECT_PROP_WEIGHT_LIMIT
Definition: plugin.h:171
give.name
name
Definition: give.py:27
cf_free_string
void cf_free_string(sstring str)
Definition: plugin_common.c:1172
cf_identify
object * cf_identify(object *op)
Definition: plugin_common.c:802
cf_object_set_int64_property
void cf_object_set_int64_property(object *op, int propcode, int64_t value)
Definition: plugin_common.c:392
cfapiObject_pay_item
static f_plug_api cfapiObject_pay_item
Definition: plugin_common.c:85
level
Definition: level.py:1
regiondef
Definition: map.h:275