Go to the documentation of this file.
138 #define GET_HOOK(x, y, z) { \
139 getHooks(&z, 1, y, &x); \
140 if (z != CFAPI_FUNC) { \
141 printf("unable to find hook %s!\n", y); \
1529 va_start(ap, format);
1531 vsprintf(
buf, format, ap);
archetype * cf_archetype_get_first(void)
static f_plug_api cfapiSystem_strdup_local
void cf_log_plain(LogLevel logLevel, const char *message)
int cf_player_knowledge_has(object *op, const char *knowledge)
static f_plug_api cfapiSystem_get_object_vector
void cf_object_set_long_property(object *op, int propcode, long value)
static f_plug_api cfapiSystem_find_string
command_registration cf_system_register_command_extra(const char *name, const char *extra, command_function_extra func, uint8_t command_type, float time)
static f_plug_api cfapiSystem_get_party_vector
player * cf_party_get_first_player(partylist *party)
static f_plug_api cfapiObject_pay_item
void cf_object_set_flag(object *ob, int flag, int value)
#define CFAPI_PARTY_VECTOR
char * cf_get_maps_directory(const char *name, char *buf, int size)
#define CFAPI_OBJECT_VECTOR
static f_plug_api cfapiObject_clear
static f_plug_api cfapiObject_find_by_arch_name
int cf_object_change_abil(object *op, object *tmp)
void cf_system_get_archetype_vector(int property, std::vector< archetype * > *list)
const char * cf_get_directory(int id)
const char * cf_get_periodofday_name(int index)
void cf_map_message(mapstruct *m, const char *msg, int color)
#define CFAPI_PARTY_PROP_NAME
player * cf_player_find(const char *plname)
static f_plug_api cfapiSystem_find_animation
void cf_player_set_marked_item(object *op, object *ob)
#define CFAPI_MAP_PROP_RESET_TIME
#define CFAPI_MAP_PROP_RESET_TIMEOUT
#define CFAPI_REGION_PROP_LONGNAME
void cf_object_change_exp(object *op, int64_t exp, const char *skill_name, int flag)
void cf_object_update(object *op, int flags)
int cf_object_move(object *op, int dir, object *originator)
void cf_log(LogLevel logLevel, const char *format,...)
object * cf_archetype_get_clone(archetype *arch)
int cf_object_check_trigger(object *op, object *cause)
static f_plug_api cfapiMap_set_property
static f_plug_api cfapiObject_remove_depletion
#define CFAPI_REGION_PROP_NEXT
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
static f_plug_api cfapiSystem_unregister_command
player * cf_party_get_next_player(partylist *party, player *op)
static f_plug_api cfapiObject_get_key
#define CFAPI_MAP_PROP_NEXT
static f_plug_api cfapiMap_get_object_at
static f_plug_api cfapiObject_apply
static f_plug_api cfapiObject_set_property
static f_plug_api cfapiSystem_find_face
int cf_map_get_enter_x(mapstruct *map)
void cf_player_knowledge_give(object *op, const char *knowledge)
int cf_object_get_int_property(object *op, int propcode)
const char * cf_region_get_message(region *reg)
partylist * cf_object_get_partylist_property(object *op, int propcode)
void cf_fix_object(object *op)
static f_plug_api cfapiRegion_get_property
object * cf_map_insert_object_there(object *op, mapstruct *m, object *originator, int flag)
const char * cf_object_get_key(object *op, const char *keyname)
sstring cf_object_get_msg(object *ob)
object * cf_map_insert_object_around(mapstruct *where, object *op, int x, int y)
void cf_object_set_weight_limit(object *ob, int weight_limit)
object * cf_object_insert_in_ob(object *op, object *where)
static f_plug_api cfapiMap_create_path
region * cf_region_get_first(void)
region * cf_region_get_parent(region *reg)
static f_plug_api cfapiPlayer_knowledge
static f_plug_api cfapiObject_move
void cf_system_unregister_command(command_registration command)
void cf_object_set_object_property(object *op, int propcode, object *value)
static f_plug_api cfapiObject_set_key
#define CFAPI_PLAYER_PROP_MARKED_ITEM
object * cf_object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
knowledge
DIALOGCHECK MINARGS 1 MAXARGS 1
sstring cf_object_get_sstring_property(object *op, int propcode)
#define CFAPI_ARCH_PROP_NEXT
static f_plug_api cfapiObject_pay_amount
region * cf_region_get_next(region *reg)
static const flag_definition flags[]
const char * cf_get_weekday_name(int index)
int cf_object_pay_item(object *op, object *pl)
int64_t cf_object_perm_exp(object *op)
double cf_object_get_double_property(object *op, int propcode)
void cf_object_learn_spell(object *op, object *spell, int special_prayer)
#define CFAPI_OBJECT_PROP_FACE
#define CFAPI_REGION_PROP_PARENT
static f_plug_api cfapiPlayer_find
static f_plug_api cfapiObject_insert
const char * cf_party_get_password(partylist *party)
static f_plug_api cfapiObject_fix
void cf_cost_string_from_value(uint64_t cost, int largest_coin, char *buffer, int length)
#define CFAPI_REGION_PROP_JAIL_PATH
#define CFAPI_MAP_PROP_WIDTH
int cf_map_get_players(mapstruct *map)
#define CFAPI_ARCH_PROP_NAME
object * cf_map_insert_object(mapstruct *where, object *op, int x, int y)
void cf_map_set_string_property(mapstruct *map, int propcode, const char *value)
partylist * cf_party_get_next(partylist *party)
void cf_object_set_movetype_property(object *op, int propcode, MoveType value)
static f_plug_api cfapiSystem_get_region_vector
command_registration cf_system_register_command(const char *name, command_function func, uint8_t command_type, float time)
static f_plug_api cfapiSystem_remove_string
static f_plug_api cfapiObject_apply_below
static f_plug_api cfapiSystem_get_time
#define CFAPI_MAP_PROP_ENTER_X
int cf_object_get_weight(object *ob)
static f_plug_api cfapiSystem_get_weekday_name
static f_plug_api cfapiObject_describe
int cf_map_get_reset_time(mapstruct *map)
static f_plug_api cfapiParty_get_property
static event_registration m
int cf_player_arrest(object *who)
static f_plug_api cfapiObject_distance
static f_plug_api cfapiObject_out_of_map
object * cf_player_get_marked_item(object *op)
int cf_timer_destroy(int id)
object * cf_friendlylist_get_first(void)
#define CFAPI_ARCH_PROP_HEAD
static f_plug_api cfapiSystem_re_cmp
static f_plug_api cfapiObject_get_property
#define CFAPI_PLAYER_PROP_PARTY
static f_plug_api cfapiSystem_timer_create
static f_plug_api cfapiSystem_unregister_global_event
int cf_object_transfer(object *op, int x, int y, int randomly, object *originator)
void cf_object_forget_spell(object *op, object *sp)
mapstruct * cf_random_map_generate(const char *OutFileName, RMParms *RP, char **use_layout, sstring reset_group)
archetype * cf_archetype_get_next(archetype *arch)
void cf_player_message(object *op, const char *txt, int flags)
void cf_quest_start(object *pl, sstring quest_code, int state)
static f_plug_api cfapiObject_pickup
static f_plug_api cfapiObject_check_trigger
object * cf_map_get_object_at(mapstruct *m, int x, int y)
#define CFAPI_REGION_PROP_JAIL_Y
int cf_map_get_reset_timeout(mapstruct *map)
static f_plug_api cfapiSystem_get_archetype_vector
void(* f_plug_api)(int *type,...)
int16_t cf_object_get_resistance(object *op, int rtype)
int cf_map_change_light(mapstruct *m, int change)
object * cf_identify(object *op)
int cf_find_animation(const char *name)
long cf_object_get_long_property(object *op, long propcode)
static f_plug_api cfapiObject_give_skill
#define CFAPI_OBJECT_PROP_WEIGHT
archetype * cf_object_get_archetype_property(object *op, int propcode)
#define CFAPI_OBJECT_PROP_RESIST
#define CFAPI_PLAYER_PROP_IP
static f_plug_api cfapiSystem_log
archetype * cf_archetype_get_head(archetype *arch)
static f_plug_api cfapiSystem_get_periodofday_name
static f_plug_api cfapiSystem_timer_destroy
int cf_init_plugin(f_plug_api getHooks)
int cf_object_move_to(object *op, int x, int y)
int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
object * cf_object_get_object_property(object *op, int propcode)
int cf_object_teleport(object *op, mapstruct *map, int x, int y)
sstring cf_add_string(const char *str)
void cf_player_set_party(object *op, partylist *party)
#define CFAPI_ARCH_PROP_CLONE
int cf_random_map_set_variable(RMParms *rp, const char *buf)
#define CFAPI_OBJECT_PROP_NROF
int cf_map_get_int_property(mapstruct *map, int property)
#define CFAPI_PLAYER_PROP_TITLE
int cf_timer_create(object *ob, long delay, int mode)
int cf_object_remove_depletion(object *op, int level)
static f_plug_api cfapiObject_find_by_name
static f_plug_api cfapiCost_string_from_value
char * cf_player_get_title(object *op, char *title, int size)
const char * cf_get_season_name(int index)
int cf_object_out_of_map(object *op, int x, int y)
#define CFAPI_REGION_VECTOR
static f_plug_api cfapiObject_drop
void cf_object_set_resistance(object *op, int rtype, int16_t value)
char * cf_object_get_string_property(object *op, int propcode, char *buf, int size)
int cf_quest_was_completed(object *pl, sstring quest_code)
static f_plug_api cfapiObject_user_event
static f_plug_api cfapiObject_find_archetype_inside
static f_plug_api cfapiSystem_directory
#define CFAPI_PLAYER_QUEST_START
#define CFAPI_REGION_PROP_NAME
void cf_object_apply_below(object *pl)
void cf_object_pickup(object *op, object *what)
static f_plug_api cfapiObject_transmute
sstring cf_player_get_ip(object *op)
#define CFAPI_REGION_PROP_JAIL_X
static f_plug_api cfapiObject_clone
const char * cf_region_get_longname(region *reg)
static f_plug_api cfapiSystem_get_season_name
static f_plug_api cfapiObject_delete
void cf_object_set_weight(object *ob, int weight)
int cf_object_set_face(object *op, const char *face)
#define CFAPI_OBJECT_PROP_NAME_PLURAL
#define CFAPI_PARTY_PROP_NEXT
const char * cf_region_get_jail_path(region *reg)
static f_plug_api cfapiObject_reset
static f_plug_api cfapiMap_get_map
static f_plug_api cfapiSystem_get_month_name
int cf_map_get_enter_y(mapstruct *map)
int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key)
sstring cf_map_get_sstring_property(mapstruct *map, int propcode)
int cf_object_apply(object *op, object *tmp, int aflag)
static f_plug_api cfapiObject_merge
void cf_system_get_region_vector(int property, std::vector< region * > *list)
#define CFAPI_REGION_PROP_MESSAGE
object * cf_object_find_by_name(const object *who, const char *name)
static f_plug_api cfapiObject_query_money
void cf_map_set_int_property(mapstruct *map, int propcode, int value)
object * cf_object_clone(object *op, int clonetype)
object * cf_object_find_by_arch_name(const object *who, const char *name)
int cf_object_set_nrof(object *ob, int nrof)
void cf_object_drop(object *op, object *author)
static f_plug_api cfapiMap_has_been_loaded
static f_plug_api cfapiMap_message
#define CFAPI_MAP_PROP_FLAGS
#define CFAPI_MAP_PROP_DARKNESS
int cf_player_move(player *pl, int dir)
static f_plug_api cfapiObject_cast
int cf_quest_get_player_state(object *pl, sstring quest_code)
#define CFAPI_MAP_PROP_PLAYERS
static f_plug_api cfapiObject_update
int cf_map_get_darkness(mapstruct *map)
static f_plug_api cfapiFriendlylist_get_next
static f_plug_api cfapiObject_say
void cf_object_set_float_property(object *op, int propcode, float value)
#define CFAPI_PARTY_PROP_PLAYER
#define CFAPI_PLAYER_QUEST_GET_STATE
#define CFAPI_MAP_PROP_DIFFICULTY
void cf_system_get_object_vector(int property, std::vector< object * > *list)
object * cf_object_insert_object(object *op, object *container)
int64_t cf_object_get_int64_property(object *op, int propcode)
mapstruct * cf_map_get_map(const char *name, int flags)
#define CFAPI_OBJECT_PROP_ANIMATION
int cf_region_get_jail_y(region *reg)
void cf_player_set_title(object *op, const char *title)
static f_plug_api cfapiObject_create
static f_plug_api cfapiObject_change_abil
int cf_object_get_weight_limit(object *ob)
static f_plug_api cfapiMap_trigger_connected
static f_plug_api cfapiMap_find_by_archetype_name
#define CFAPI_PLAYER_QUEST_SET_STATE
static f_plug_api cfapiObject_activate_rune
float cf_object_get_float_property(object *op, int propcode)
#define CFAPI_OBJECT_PROP_NAME
void cf_object_set_int64_property(object *op, int propcode, int64_t value)
const char * cf_get_month_name(int index)
static f_plug_api cfapiObject_forget_spell
static f_plug_api cfapiObject_teleport
static f_plug_api cfapiObject_remove
void cf_system_get_map_vector(int property, std::vector< mapstruct * > *list)
object * cf_friendlylist_get_next(object *ob)
int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix)
void cf_object_remove(object *op)
int(* f_plug_event)(int *type,...)
const typedef char * sstring
static f_plug_api cfapiObject_split
const char * cf_region_get_name(region *reg)
object * cf_object_present_archname_inside(object *op, char *whatstr)
archetype * cf_archetype_get_more(archetype *arch)
int cf_map_get_difficulty(mapstruct *map)
void cf_system_unregister_global_event(int event, const char *name)
MoveType cf_object_get_movetype_property(object *op, int propcode)
region * cf_map_get_region_property(mapstruct *map, int propcode)
static f_plug_api cfapiGenerate_random_map
void cf_system_register_global_event(int event, const char *name, f_plug_event hook)
int cf_object_get_nrof(object *ob)
object * cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y)
object * cf_object_check_for_spell(object *op, const char *name)
sstring cf_archetype_get_name(archetype *arch)
#define CFAPI_ARCHETYPE_VECTOR
static f_plug_api cfapiObject_learn_spell
static f_plug_api cfapiMap_get_property
sstring cf_query_name_pl(object *ob)
void cf_object_say(object *op, const char *msg)
void cf_spring_trap(object *trap, object *victim)
int cf_object_pay_amount(object *pl, uint64_t to_pay)
mapstruct * cf_map_get_first(void)
void cf_system_get_party_vector(int property, std::vector< partylist * > *list)
const char * cf_party_get_name(partylist *party)
int cf_find_face(const char *name, int error)
mapstruct * cf_object_get_map_property(object *op, int propcode)
#define CFAPI_MAP_PROP_ENTER_Y
char * cf_query_name(object *ob, char *name, int size)
void cf_get_time(timeofday_t *tod)
#define CFAPI_ARCH_PROP_MORE
static f_plug_api cfapiMap_change_light
void(* command_function_extra)(object *op, const char *params, const char *extra)
int cf_object_get_flag(object *ob, int flag)
static f_plug_api cfapiSet_random_map_variable
int cf_object_query_money(const object *op)
event
DIALOGCHECK MINARGS 1 MAXARGS 2
const char * cf_re_cmp(const char *str, const char *regexp)
uint64_t command_registration
partylist * cf_player_get_party(object *op)
#define CFAPI_OBJECT_PROP_FLAGS
static f_plug_api cfapiSystem_register_global_event
#define CFAPI_MAP_PROP_HEIGHT
static f_plug_api cfapiObject_transfer
int cf_player_can_pay(object *pl)
void cf_map_trigger_connected(objectlink *ol, object *cause, int state)
object * cf_create_object_by_name(const char *name)
void cf_object_set_int_property(object *op, int propcode, int value)
#define CFAPI_OBJECT_PROP_MESSAGE
int cf_object_set_animation(object *op, const char *animation)
static f_plug_api cfapiPlayer_can_pay
#define CFAPI_PLAYER_QUEST_WAS_COMPLETED
mapstruct * cf_map_has_been_loaded(const char *name)
static f_plug_api cfapiPlayer_message
void(* command_function)(object *op, const char *params)
int cf_map_get_height(mapstruct *map)
static f_plug_api cfapiObject_identify
partylist * cf_party_get_first(void)
void cf_object_free_drop_inventory(object *ob)
mapstruct * cf_get_empty_map(int sizex, int sizey)
#define GET_HOOK(x, y, z)
static f_plug_api cfapiSystem_add_string
void cf_free_string(sstring str)
mapstruct * cf_map_get_map_property(mapstruct *map, int propcode)
sstring cf_find_string(const char *str)
static f_plug_api cfapiSystem_get_map_vector
object * cf_map_find_by_archetype_name(const char *str, mapstruct *map, int nx, int ny)
static f_plug_api cfapiSystem_register_command
static f_plug_api cfapiObject_change_exp
object * cf_create_object(void)
void cf_object_set_string_property(object *op, int propcode, const char *value)
static f_plug_api cfapiObject_drain
#define CFAPI_PARTY_PROP_PASSWORD
int cf_map_get_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
char * cf_strdup_local(const char *str)
void cf_quest_set_player_state(object *pl, sstring quest_code, int state)
static f_plug_api cfapiObject_check_spell
int cf_map_get_width(mapstruct *map)
static f_plug_api cfapiArchetype_get_property
int cf_region_get_jail_x(region *reg)
#define CFAPI_OBJECT_PROP_WEIGHT_LIMIT
static f_plug_api cfapiPlayer_quest
static f_plug_api cfapiObject_perm_exp