126 #define GET_HOOK(x, y, z) { \
127 getHooks(&z, 1, y, &x); \
128 if (z != CFAPI_FUNC) { \
129 printf("unable to find hook %s!\n", y); \
974 const char *
cf_re_cmp(
const char *str,
const char *regexp) {
1346 va_start(ap, format);
1348 vsprintf(buf, format, ap);
1819 if (time_Info != NULL) {
1820 time_Info->tv_sec = time(NULL);
1821 time_Info->tv_usec = timeGetTime()*1000;
1824 if (timezone_Info != NULL) {
partylist * cf_object_get_partylist_property(object *op, int propcode)
void cf_object_update(object *op, int flags)
region * cf_region_get_parent(region *reg)
#define CFAPI_PARTY_PROP_PASSWORD
int cf_object_query_cost(const object *tmp, object *who, int flag)
static f_plug_api cfapiCheck_inventory
const char * cf_get_directory(int id)
#define CFAPI_OBJECT_PROP_NAME
object * cf_player_get_marked_item(object *op)
const char * cf_object_get_key(object *op, const char *keyname)
#define CFAPI_PLAYER_PROP_TITLE
void cf_map_trigger_connected(objectlink *ol, object *cause, int state)
#define CFAPI_MAP_PROP_ENTER_Y
static f_plug_api cfapiSystem_register_global_event
#define CFAPI_REGION_PROP_MESSAGE
#define CFAPI_MAP_PROP_FLAGS
#define CFAPI_MAP_PROP_DARKNESS
void cf_object_set_flag(object *ob, int flag, int value)
#define CFAPI_OBJECT_PROP_WEIGHT
static f_plug_api cfapiMap_change_light
static f_plug_api cfapiSystem_log
int cf_map_get_width(mapstruct *map)
static f_plug_api cfapiObject_pay_amount
static f_plug_api cfapiSystem_find_face
const char * cf_get_weekday_name(int index)
static f_plug_api cfapiMap_get_object_at
static f_plug_api cfapiObject_drain
int cf_map_get_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny)
static f_plug_api cfapiMap_present_arch_by_name
#define CFAPI_MAP_PROP_DIFFICULTY
#define CFAPI_MAP_PROP_HEIGHT
void cf_spring_trap(object *trap, object *victim)
void cf_object_set_object_property(object *op, int propcode, object *value)
player * cf_party_get_first_player(partylist *party)
sstring cf_object_get_sstring_property(object *op, int propcode)
void cf_object_set_long_property(object *op, int propcode, long value)
object * cf_object_insert_object(object *op, object *container)
static f_plug_api cfapiPlayer_find
void cf_object_say(object *op, char *msg)
void cf_system_register_global_event(int event, const char *name, f_plug_api hook)
int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info)
static f_plug_api cfapiObject_change_exp
long cf_object_get_long_property(object *op, long propcode)
static f_plug_api cfapiObject_get_key
static f_plug_api cfapiObject_say
object * cf_archetype_get_clone(archetype *arch)
mapstruct * cf_get_empty_map(int sizex, int sizey)
#define CFAPI_ARCH_PROP_MORE
object * cf_create_object_by_name(const char *name)
static f_plug_api cfapiObject_distance
static f_plug_api cfapiObject_remove
static f_plug_api cfapiObject_fix
#define CFAPI_OBJECT_PROP_FLAGS
static f_plug_api cfapiObject_check_trigger
int cf_map_get_enter_x(mapstruct *map)
const char * cf_region_get_message(region *reg)
#define CFAPI_OBJECT_PROP_NAME_PLURAL
mapstruct * cf_map_has_been_loaded(const char *name)
partylist * cf_player_get_party(object *op)
static f_plug_api cfapiObject_set_key
int cf_object_check_trigger(object *op, object *cause)
void *(* f_plug_api)(int *type,...)
mapstruct * cf_map_get_first(void)
region * cf_region_get_first(void)
#define CFAPI_OBJECT_PROP_MESSAGE
void cf_player_set_marked_item(object *op, object *ob)
void cf_object_set_weight_limit(object *ob, int weight_limit)
static f_plug_api cfapiObject_query_cost
#define CFAPI_MAP_PROP_RESET_TIMEOUT
static f_plug_api cfapiObject_move
object * cf_map_get_object_at(mapstruct *m, int x, int y)
#define CFAPI_REGION_PROP_NEXT
void cf_player_set_party(object *op, partylist *party)
static f_plug_api cfapiSystem_get_time
object * cf_object_get_object_property(object *op, int propcode)
#define CFAPI_MAP_PROP_NEXT
mapstruct * cf_map_get_map_property(mapstruct *map, int propcode)
void cf_fix_object(object *op)
static f_plug_api cfapiObject_describe
void cf_object_set_string_property(object *op, int propcode, const char *value)
int cf_object_apply(object *op, object *tmp, int aflag)
static f_plug_api cfapiObject_find_archetype_inside
const char * cf_party_get_password(partylist *party)
const char * cf_get_periodofday_name(int index)
static f_plug_api cfapiSystem_find_animation
void cf_object_free(object *ob)
static f_plug_api cfapiObject_pay_item
int cf_object_get_int_property(object *op, int propcode)
static f_plug_api cfapiObject_merge
static f_plug_api cfapiRegion_get_property
static f_plug_api cfapiSystem_get_weekday_name
int cf_map_get_players(mapstruct *map)
void cf_map_set_string_property(mapstruct *map, int propcode, const char *value)
static f_plug_api cfapiSystem_timer_create
static f_plug_api cfapiMap_set_property
void cf_object_apply_below(object *pl)
archetype * cf_archetype_get_more(archetype *arch)
int cf_random_map_set_variable(RMParms *rp, const char *buf)
object * cf_map_present_arch_by_name(const char *str, mapstruct *map, int nx, int ny)
#define CFAPI_MAP_PROP_PLAYERS
static f_plug_api cfapiObject_query_money
static f_plug_api cfapiSystem_remove_string
void cf_object_pickup(object *op, object *what)
static f_plug_api cfapiObject_out_of_map
static f_plug_api cfapiObject_give_skill
partylist * cf_party_get_next(partylist *party)
void cf_log(LogLevel logLevel, const char *format,...)
void cf_object_change_exp(object *op, sint64 exp, const char *skill_name, int flag)
static f_plug_api cfapiObject_set_property
#define CFAPI_PLAYER_PROP_IP
region * cf_region_get_next(region *reg)
void cf_object_set_weight(object *ob, int weight)
int cf_map_change_light(mapstruct *m, int change)
int cf_map_get_reset_timeout(mapstruct *map)
#define CFAPI_PARTY_PROP_PLAYER
static f_plug_api cfapiObject_apply_below
int cf_find_animation(const char *name)
char * cf_object_get_string_property(object *op, int propcode, char *buf, int size)
static f_plug_api cfapiObject_find
sstring cf_add_string(const char *str)
#define CFAPI_MAP_PROP_RESET_TIME
#define CFAPI_ARCH_PROP_HEAD
int cf_object_pay_item(object *op, object *pl)
static f_plug_api cfapiObject_clear
object * cf_object_check_for_spell(object *op, const char *name)
static f_plug_api cfapiObject_split
sstring cf_query_name_pl(object *ob)
static f_plug_api cfapiObject_reset
#define CFAPI_ARCH_PROP_NEXT
static f_plug_api cfapiObject_get_property
int cf_timer_destroy(int id)
object * cf_object_clone(object *op, int clonetype)
static f_plug_api cfapiObject_user_event
const char * cf_get_season_name(int index)
void cf_system_unregister_global_event(int event, const char *name)
int cf_timer_create(object *ob, long delay, int mode)
double cf_object_get_double_property(object *op, int propcode)
static f_plug_api cfapiArchetype_get_property
int cf_object_get_weight_limit(object *ob)
static f_plug_api cfapiMap_message
int cf_object_get_weight(object *ob)
int cf_object_query_money(const object *op)
int cf_object_teleport(object *op, mapstruct *map, int x, int y)
static f_plug_api cfapiObject_delete
#define CFAPI_OBJECT_PROP_WEIGHT_LIMIT
char * cf_get_maps_directory(const char *name, char *buf, int size)
char * cf_query_name(object *ob, char *name, int size)
int cf_object_set_nrof(object *ob, int nrof)
int cf_object_transfer(object *op, int x, int y, int randomly, object *originator)
object * cf_object_insert_in_ob(object *op, object *where)
object * cf_map_insert_object(mapstruct *where, object *op, int x, int y)
static f_plug_api cfapiSystem_timer_destroy
int cf_map_get_reset_time(mapstruct *map)
int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key)
static f_plug_api cfapiSystem_unregister_global_event
int cf_find_face(const char *name, int error)
static f_plug_api cfapiObject_drop
static f_plug_api cfapiMap_get_property
static f_plug_api cfapiPlayer_send_inventory
void cf_player_set_title(object *op, const char *title)
#define CFAPI_REGION_PROP_LONGNAME
sint16 cf_object_get_resistance(object *op, int rtype)
static f_plug_api cfapiSystem_get_periodofday_name
const char * cf_region_get_longname(region *reg)
int cf_init_plugin(f_plug_api getHooks)
static f_plug_api cfapiPlayer_can_pay
static f_plug_api cfapiSystem_re_cmp
#define CFAPI_PARTY_PROP_NAME
static f_plug_api cfapiObject_transmute
#define CFAPI_PLAYER_PROP_PARTY
int cf_player_move(player *pl, int dir)
archetype * cf_archetype_get_next(archetype *arch)
void cf_object_set_int_property(object *op, int propcode, int value)
player * cf_party_get_next_player(partylist *party, player *op)
static const flag_definition flags[]
sstring cf_map_get_sstring_property(mapstruct *map, int propcode)
static f_plug_api cfapiObject_apply
int cf_object_get_flag(object *ob, int flag)
static f_plug_api cfapiObject_cast
void cf_object_set_movetype_property(object *op, int propcode, MoveType value)
static f_plug_api cfapiObject_insert
static f_plug_api cfapiParty_get_property
archetype * cf_archetype_get_head(archetype *arch)
static f_plug_api cfapiObject_activate_rune
#define CFAPI_OBJECT_PROP_BASE_NAME
#define CFAPI_REGION_PROP_PARENT
mapstruct * cf_random_map_generate(const char *OutFileName, RMParms *RP, char **use_layout)
static f_plug_api cfapiObject_pickup
static f_plug_api cfapiMap_get_map
static f_plug_api cfapiMap_has_been_loaded
#define CFAPI_ARCH_PROP_NAME
static f_plug_api cfapiMap_trigger_connected
sstring cf_player_get_title(object *op)
int cf_map_get_int_property(mapstruct *map, int property)
void cf_object_forget_spell(object *op, object *sp)
void cf_map_set_int_property(mapstruct *map, int propcode, int value)
const char * cf_region_get_name(region *reg)
static f_plug_api cfapiObject_transfer
float cf_object_get_float_property(object *op, int propcode)
static f_plug_api cfapiObject_check_spell
sstring cf_archetype_get_name(archetype *arch)
int cf_object_get_nrof(object *ob)
int cf_object_pay_amount(object *pl, uint64 to_pay)
static f_plug_api cfapiObject_teleport
int cf_map_get_darkness(mapstruct *map)
region * cf_map_get_region_property(mapstruct *map, int propcode)
MoveType cf_object_get_movetype_property(object *op, int propcode)
void cf_object_remove(object *op)
int cf_object_out_of_map(object *op, int x, int y)
const char * cf_party_get_name(partylist *party)
int cf_object_change_abil(object *op, object *tmp)
sstring cf_player_get_ip(object *op)
const uint32 weight_limit[MAX_STAT+1]
static f_plug_api cfapiObject_update
#define CFAPI_MAP_PROP_WIDTH
const char * cf_re_cmp(const char *str, const char *regexp)
int cf_object_move_to(object *op, int x, int y)
static f_plug_api cfapiObject_learn_spell
#define CFAPI_PARTY_PROP_NEXT
int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
void cf_object_drop(object *op, object *author)
object * cf_friendlylist_get_next(object *ob)
object * cf_object_present_archname_inside(object *op, char *whatstr)
void cf_get_time(timeofday_t *tod)
#define CFAPI_OBJECT_PROP_NROF
sstring cf_object_get_msg(object *ob)
static f_plug_api cfapiObject_create
int cf_map_get_enter_y(mapstruct *map)
#define CFAPI_ARCH_PROP_CLONE
#define GET_HOOK(x, y, z)
#define CFAPI_PLAYER_PROP_MARKED_ITEM
static f_plug_api cfapiFriendlylist_get_next
void cf_object_set_float_property(object *op, int propcode, float value)
int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix)
player * cf_player_find(const char *plname)
mapstruct * cf_object_get_map_property(object *op, int propcode)
int cf_object_move(object *op, int dir, object *originator)
mapstruct * cf_map_get_map(const char *name, int flags)
static f_plug_api cfapiSet_random_map_variable
static f_plug_api cfapiSystem_get_season_name
object * cf_map_insert_object_there(object *op, mapstruct *m, object *originator, int flag)
static f_plug_api cfapiSystem_directory
#define CFAPI_OBJECT_PROP_RESIST
char * cf_query_base_name(object *ob, int plural, char *name, int size)
void cf_map_message(mapstruct *m, const char *msg, int color)
sstring cf_find_string(const char *str)
void cf_object_set_resistance(object *op, int rtype, sint16 value)
static f_plug_api cfapiPlayer_message
object * cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y)
void cf_object_set_int64_property(object *op, int propcode, sint64 value)
archetype * cf_archetype_get_first(void)
void cf_player_message(object *op, char *txt, int flags)
object * cf_create_object(void)
void cf_object_learn_spell(object *op, object *spell, int special_prayer)
archetype * cf_object_get_archetype_property(object *op, int propcode)
static f_plug_api cfapiObject_identify
static f_plug_api cfapiSystem_strdup_local
static f_plug_api cfapiObject_clone
static f_plug_api cfapiGenerate_random_map
void cf_log_plain(LogLevel logLevel, const char *message)
static f_plug_api cfapiSystem_get_month_name
partylist * cf_party_get_first(void)
void cf_free_string(sstring str)
static f_plug_api cfapiMap_create_path
#define CFAPI_MAP_PROP_ENTER_X
const char * cf_get_month_name(int index)
int cf_object_cast_ability(object *caster, object *ctoo, int dir, object *sp, char *flags)
char * cf_strdup_local(const char *str)
object * cf_friendlylist_get_first(void)
int cf_player_can_pay(object *pl)
static f_plug_api cfapiObject_forget_spell
sint64 cf_object_get_int64_property(object *op, int propcode)
static f_plug_api cfapiSystem_add_string
static f_plug_api cfapiSystem_find_string
#define CFAPI_REGION_PROP_NAME
static f_plug_api cfapiObject_change_abil
int cf_map_get_height(mapstruct *map)
int cf_map_get_difficulty(mapstruct *map)