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