Crossfire Server, Trunk
plugin_common.h
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 /* That code is placed under the GNU General Public Licence (GPL) */
7 /* (C)2001-2005 by Chachkoff Yann (Feel free to deliver your complaints) */
8 /*****************************************************************************/
9 /* CrossFire, A Multiplayer game for X-windows */
10 /* */
11 /* Copyright (C) 2000 Mark Wedel */
12 /* Copyright (C) 1992 Frank Tore Johansen */
13 /* */
14 /* This program is free software; you can redistribute it and/or modify */
15 /* it under the terms of the GNU General Public License as published by */
16 /* the Free Software Foundation; either version 2 of the License, or */
17 /* (at your option) any later version. */
18 /* */
19 /* This program is distributed in the hope that it will be useful, */
20 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
21 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
22 /* GNU General Public License for more details. */
23 /* */
24 /* You should have received a copy of the GNU General Public License */
25 /* along with this program; if not, write to the Free Software */
26 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
27 /* */
28 /*****************************************************************************/
29 #ifndef PLUGIN_COMMON_H
30 #define PLUGIN_COMMON_H
31 
32 #ifdef WIN32
33 #define CF_PLUGIN __declspec(dllexport)
34 #else
35 #ifdef HAVE_VISIBILITY
36 #define CF_PLUGIN __attribute__((visibility("default")))
37 #else
38 #define CF_PLUGIN
39 #endif
40 #endif
41 
42 #include <plugin.h>
43 
44 #define PLUGIN_ERROR_INT 0x0FFFFF
45 
46 extern int cf_init_plugin(f_plug_api getHooks);
47 extern void cf_system_register_global_event(int event, const char *name, f_plug_event hook);
48 extern void cf_system_unregister_global_event(int event, const char *name);
49 extern command_registration cf_system_register_command(const char *name, command_function func, uint8_t command_type, float time);
50 extern command_registration cf_system_register_command_extra(const char *name, const char *extra, command_function_extra func, uint8_t command_type, float time);
52 
53 /* General functions */
54 extern sstring cf_add_string(const char *str);
55 extern void cf_free_string(sstring str);
56 extern sstring cf_find_string(const char *str);
57 extern char *cf_strdup_local(const char *str);
58 extern char *cf_get_maps_directory(const char *name, char *buf, int size);
59 extern int cf_find_animation(const char *txt);
60 extern int cf_find_face(const char *name, int error);
61 extern void cf_log(LogLevel logLevel, const char *format, ...);
62 extern void cf_log_plain(LogLevel logLevel, const char *message);
63 extern void cf_get_time(timeofday_t *tod);
64 extern int cf_timer_create(object *ob, long delay, int mode);
65 extern int cf_timer_destroy(int id);
66 extern const char *cf_get_directory(int id);
67 extern const char *cf_re_cmp(const char *str, const char *regexp);
68 extern const char *cf_get_season_name(int index);
69 extern const char *cf_get_month_name(int index);
70 extern const char *cf_get_weekday_name(int index);
71 extern const char *cf_get_periodofday_name(int index);
72 extern void cf_cost_string_from_value(uint64_t cost, int largest_coin, char *buffer, int length);
73 extern void cf_system_get_object_vector(int property, std::vector<object *> *list);
74 extern void cf_system_get_map_vector(int property, std::vector<mapstruct *> *list);
75 extern void cf_system_get_archetype_vector(int property, std::vector<archetype *> *list);
76 extern void cf_system_get_party_vector(int property, std::vector<partylist *> *list);
77 extern void cf_system_get_region_vector(int property, std::vector<region *> *list);
78 
79 /* Objects */
80 extern void cf_object_set_int_property(object *op, int propcode, int value);
81 extern int cf_object_get_int_property(object *op, int propcode);
82 extern long cf_object_get_long_property(object *op, long propcode);
83 extern void cf_object_set_movetype_property(object *op, int propcode, MoveType value);
84 extern MoveType cf_object_get_movetype_property(object *op, int propcode);
85 extern object *cf_object_get_object_property(object *op, int propcode);
86 extern void cf_object_set_object_property(object *op, int propcode, object *value);
87 extern float cf_object_get_float_property(object *op, int propcode);
88 extern void cf_object_set_float_property(object *op, int propcode, float value);
89 extern mapstruct *cf_object_get_map_property(object *op, int propcode);
90 extern archetype *cf_object_get_archetype_property(object *op, int propcode);
91 extern partylist *cf_object_get_partylist_property(object *op, int propcode);
92 extern int64_t cf_object_get_int64_property(object *op, int propcode);
93 extern void cf_object_set_int64_property(object *op, int propcode, int64_t value);
94 extern double cf_object_get_double_property(object *op, int propcode);
95 extern sstring cf_object_get_sstring_property(object *op, int propcode);
96 extern char *cf_object_get_string_property(object *op, int propcode, char *buf, int size);
97 extern void cf_fix_object(object *op);
98 extern char *cf_query_name(object *ob, char *name, int size);
99 extern sstring cf_query_name_pl(object *ob);
100 extern const char *cf_object_get_msg(object *);
101 extern void cf_object_set_weight(object *ob, int weight);
102 extern int cf_object_get_weight(object *ob);
103 extern void cf_object_set_weight_limit(object *ob, int weight);
104 extern int cf_object_get_weight_limit(object *ob);
105 extern int cf_object_set_nrof(object *, int nrof);
106 extern int cf_object_get_nrof(object *);
107 extern int cf_object_get_flag(object *ob, int flag);
108 extern void cf_object_set_flag(object *ob, int flag, int value);
109 extern object *cf_object_insert_in_ob(object *op, object *where);
110 extern void cf_object_set_string_property(object *op, int propcode, const char *value);
111 extern void cf_spring_trap(object *trap, object *victim);
112 extern int cf_object_check_trigger(object *op, object *cause);
113 extern int cf_object_query_money(const object *op);
114 extern int cf_object_query_cost(const object *tmp, object *who, int flag);
115 extern void cf_object_query_cost_string(const object *tmp, object *who, int flag, char *buffer, int length);
116 extern int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg);
117 extern void cf_object_learn_spell(object *op, object *spell, int special_prayer);
118 extern void cf_object_forget_spell(object *op, object *sp);
119 extern object *cf_object_check_for_spell(object *op, const char *name);
120 extern int cf_object_pay_amount(object *pl, uint64_t to_pay);
121 extern int cf_object_pay_item(object *op, object *pl);
122 extern void cf_object_set_long_property(object *op, int propcode, long value);
123 extern int cf_object_transfer(object *op, int x, int y, int randomly, object *originator);
124 extern int cf_object_move_to(object *op, int x, int y);
125 extern int cf_object_out_of_map(object *op, int x, int y);
126 extern void cf_object_drop(object *op, object *author);
127 extern void cf_object_say(object *op, const char *msg);
128 extern object *cf_object_insert_object(object *op, object *container);
129 extern object *cf_object_present_archname_inside(object *op, char *whatstr);
130 extern int cf_object_apply(object *op, object *author, int flags);
131 extern void cf_object_remove(object *op);
132 extern void cf_object_free_drop_inventory(object *ob);
133 extern object *cf_create_object(void);
134 extern object *cf_create_object_by_name(const char *name);
135 extern object *cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y);
136 extern int cf_object_teleport(object *ob, mapstruct *map, int x, int y);
137 extern void cf_object_update(object *op, int flags);
138 extern void cf_object_pickup(object *op, object *what);
139 extern const char *cf_object_get_key(object *op, const char *keyname);
140 extern int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key);
141 extern int16_t cf_object_get_resistance(object *op, int rtype);
142 extern void cf_object_set_resistance(object *op, int rtype, int16_t value);
143 extern int cf_object_move(object *op, int dir, object*originator);
144 extern void cf_object_apply_below(object *pl);
145 extern object *cf_object_clone(object *op, int clonetype);
146 extern void cf_object_change_exp(object *op, int64_t exp, const char *skill_name, int flag);
147 extern int cf_object_change_abil(object *op, object *tmp);
148 extern int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix);
149 extern int cf_object_remove_depletion(object *op, int level);
150 extern object *cf_object_find_by_arch_name(const object *who, const char *name);
151 extern object *cf_object_find_by_name(const object *who, const char *name);
152 extern object *cf_object_split(object *orig_ob, uint32_t nr, char *err, size_t size);
153 extern object *cf_object_clone(object *op, int clonetype);
154 extern int cf_object_set_face(object *op, const char *face);
155 extern int cf_object_set_animation(object *op, const char *animation);
156 extern object *cf_identify(object *op);
157 extern int64_t cf_object_perm_exp(object *op);
158 /* Maps */
159 /*extern void *cf_map_get_property(mapstruct *map, int propcode);*/
160 extern sstring cf_map_get_sstring_property(mapstruct *map, int propcode);
161 extern mapstruct *cf_map_get_map_property(mapstruct *map, int propcode);
162 extern region *cf_map_get_region_property(mapstruct *map, int propcode);
163 extern int cf_map_get_int_property(mapstruct *map, int property);
164 
165 extern void cf_map_set_int_property(mapstruct *map, int propcode, int value);
166 extern void cf_map_set_string_property(mapstruct *map, int propcode, const char *value);
167 extern mapstruct *cf_map_get_map(const char *name, int flags);
168 extern mapstruct *cf_get_empty_map(int sizex, int sizey);
169 extern mapstruct *cf_map_get_first(void);
170 extern mapstruct *cf_map_has_been_loaded(const char *name);
171 extern void cf_map_message(mapstruct *m, const char *msg, int color);
172 extern object *cf_map_get_object_at(mapstruct *m, int x, int y);
173 extern object *cf_map_insert_object(mapstruct *where, object *op, int x, int y);
174 extern object *cf_map_insert_object_around(mapstruct *where, object *op, int x, int y);
175 extern object *cf_map_find_by_archetype_name(const char *str, mapstruct *map, int nx, int ny);
176 extern int cf_map_get_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny);
177 extern object *cf_map_insert_object_there(object *op, mapstruct *m, object *originator, int flag);
178 extern int cf_map_get_difficulty(mapstruct *map);
179 extern int cf_map_get_reset_time(mapstruct *map);
181 extern int cf_map_get_players(mapstruct *map);
182 extern int cf_map_get_darkness(mapstruct *map);
183 extern int cf_map_get_light(mapstruct *map);
184 extern int cf_map_get_width(mapstruct *map);
185 extern int cf_map_get_height(mapstruct *map);
186 extern int cf_map_get_enter_x(mapstruct *map);
187 extern int cf_map_get_enter_y(mapstruct *map);
188 extern int cf_map_change_light(mapstruct *m, int change);
189 extern void cf_map_trigger_connected(objectlink *ol, object *cause, int state);
190 
191 /* Random maps */
192 extern int cf_random_map_set_variable(RMParms *rp, const char *buf);
193 extern mapstruct *cf_random_map_generate(const char *OutFileName, RMParms *RP, char **use_layout, sstring reset_group);
194 
195 /* Players */
196 extern char *cf_player_get_title(object *op, char *title, int size);
197 extern void cf_player_set_title(object *op, const char *title);
198 extern sstring cf_player_get_ip(object *op);
199 extern object *cf_player_get_marked_item(object *op);
200 extern void cf_player_set_marked_item(object *op, object *ob);
201 extern player *cf_player_find(const char *plname);
202 extern void cf_player_message(object *op, const char *txt, int flags);
203 extern int cf_player_move(player *pl, int dir);
204 extern partylist *cf_player_get_party(object *op);
205 extern void cf_player_set_party(object *op, partylist *party);
206 extern int cf_player_can_pay(object *op);
207 extern int cf_player_knowledge_has(object *op, const char *knowledge);
208 extern void cf_player_knowledge_give(object *op, const char *knowledge);
209 extern int cf_player_arrest(object *who);
210 
211 /* Archetypes */
212 extern archetype *cf_archetype_get_first(void);
217 extern object *cf_archetype_get_clone(archetype *arch);
218 
219 /* Parties */
220 extern partylist *cf_party_get_first(void);
221 extern const char *cf_party_get_name(partylist *party);
222 extern partylist *cf_party_get_next(partylist *party);
223 extern const char *cf_party_get_password(partylist *party);
226 
227 /* Regions */
228 extern region *cf_region_get_first(void);
229 extern const char *cf_region_get_name(region *reg);
230 extern region *cf_region_get_next(region *reg);
231 extern region *cf_region_get_parent(region *reg);
232 extern const char *cf_region_get_longname(region *reg);
233 extern const char *cf_region_get_message(region *reg);
234 extern int cf_region_get_jail_x(region *reg);
235 extern int cf_region_get_jail_y(region *reg);
236 extern const char *cf_region_get_jail_path(region *reg);
237 
238 /* Friendly list */
239 extern object *cf_friendlylist_get_first(void);
240 extern object *cf_friendlylist_get_next(object *ob);
241 
242 /* Quest-related functions */
243 extern int cf_quest_get_player_state(object *pl, sstring quest_code);
244 extern void cf_quest_start(object *pl, sstring quest_code, int state);
245 extern void cf_quest_set_player_state(object *pl, sstring quest_code, int state);
246 extern int cf_quest_was_completed(object *pl, sstring quest_code);
247 
248 #endif /* PLUGIN_COMMON_H */
cf_cost_string_from_value
void cf_cost_string_from_value(uint64_t cost, int largest_coin, char *buffer, int length)
Definition: plugin_common.cpp:994
cf_map_get_region_property
region * cf_map_get_region_property(mapstruct *map, int propcode)
Definition: plugin_common.cpp:288
cf_log
void cf_log(LogLevel logLevel, const char *format,...)
Definition: plugin_common.cpp:1522
cf_query_name_pl
sstring cf_query_name_pl(object *ob)
Definition: plugin_common.cpp:1209
cf_map_get_height
int cf_map_get_height(mapstruct *map)
Definition: plugin_common.cpp:1404
cf_object_check_for_spell
object * cf_object_check_for_spell(object *op, const char *name)
Definition: plugin_common.cpp:778
cf_get_weekday_name
const char * cf_get_weekday_name(int index)
Definition: plugin_common.cpp:1574
cf_region_get_jail_y
int cf_region_get_jail_y(region *reg)
Definition: plugin_common.cpp:1989
cf_add_string
sstring cf_add_string(const char *str)
Definition: plugin_common.cpp:1167
cf_map_get_first
mapstruct * cf_map_get_first(void)
Definition: plugin_common.cpp:975
cf_map_get_sstring_property
sstring cf_map_get_sstring_property(mapstruct *map, int propcode)
Definition: plugin_common.cpp:270
cf_get_directory
const char * cf_get_directory(int id)
Definition: plugin_common.cpp:1130
cf_object_get_weight
int cf_object_get_weight(object *ob)
Definition: plugin_common.cpp:1241
cf_map_get_int_property
int cf_map_get_int_property(mapstruct *map, int property)
Definition: plugin_common.cpp:254
cf_player_set_marked_item
void cf_player_set_marked_item(object *op, object *ob)
Definition: plugin_common.cpp:866
cf_map_get_players
int cf_map_get_players(mapstruct *map)
Definition: plugin_common.cpp:1392
cf_object_teleport
int cf_object_teleport(object *ob, mapstruct *map, int x, int y)
Definition: plugin_common.cpp:1360
cf_party_get_name
const char * cf_party_get_name(partylist *party)
Definition: plugin_common.cpp:1798
cf_object_out_of_map
int cf_object_out_of_map(object *op, int x, int y)
Definition: plugin_common.cpp:1035
cf_get_season_name
const char * cf_get_season_name(int index)
Definition: plugin_common.cpp:1556
cf_object_get_string_property
char * cf_object_get_string_property(object *op, int propcode, char *buf, int size)
Definition: plugin_common.cpp:448
cf_object_get_long_property
long cf_object_get_long_property(object *op, long propcode)
Definition: plugin_common.cpp:342
cf_object_apply_below
void cf_object_apply_below(object *pl)
Definition: plugin_common.cpp:553
player
Definition: player.h:105
cf_archetype_get_name
sstring cf_archetype_get_name(archetype *arch)
Definition: plugin_common.cpp:1702
cf_archetype_get_first
archetype * cf_archetype_get_first(void)
Definition: plugin_common.cpp:1686
diamondslots.x
x
Definition: diamondslots.py:15
cf_object_get_sstring_property
sstring cf_object_get_sstring_property(object *op, int propcode)
Definition: plugin_common.cpp:440
cf_player_knowledge_has
int cf_player_knowledge_has(object *op, const char *knowledge)
Definition: plugin_common.cpp:900
archininventory.arch
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
Definition: archininventory.py:16
cf_object_query_cost
int cf_object_query_cost(const object *tmp, object *who, int flag)
cf_object_get_object_property
object * cf_object_get_object_property(object *op, int propcode)
Definition: plugin_common.cpp:365
cf_object_cast_spell
int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
Definition: plugin_common.cpp:744
cf_fix_object
void cf_fix_object(object *op)
Definition: plugin_common.cpp:1156
cf_region_get_jail_path
const char * cf_region_get_jail_path(region *reg)
Definition: plugin_common.cpp:2004
cf_player_knowledge_give
void cf_player_knowledge_give(object *op, const char *knowledge)
Definition: plugin_common.cpp:913
cf_strdup_local
char * cf_strdup_local(const char *str)
Definition: plugin_common.cpp:1446
cf_create_object_by_name
object * cf_create_object_by_name(const char *name)
Definition: plugin_common.cpp:1093
cf_map_get_reset_time
int cf_map_get_reset_time(mapstruct *map)
Definition: plugin_common.cpp:1384
guildoracle.list
list
Definition: guildoracle.py:87
MoveType
unsigned char MoveType
Definition: define.h:417
guildjoin.ob
ob
Definition: guildjoin.py:42
timeofday_t
Definition: tod.h:38
cf_query_name
char * cf_query_name(object *ob, char *name, int size)
Definition: plugin_common.cpp:1201
cf_map_insert_object_around
object * cf_map_insert_object_around(mapstruct *where, object *op, int x, int y)
Definition: plugin_common.cpp:1351
cf_object_set_float_property
void cf_object_set_float_property(object *op, int propcode, float value)
Definition: plugin_common.cpp:396
cf_party_get_first_player
player * cf_party_get_first_player(partylist *party)
Definition: plugin_common.cpp:1846
cf_timer_destroy
int cf_timer_destroy(int id)
Definition: plugin_common.cpp:1620
cf_object_apply
int cf_object_apply(object *op, object *author, int flags)
Definition: plugin_common.cpp:542
giveknowledge.knowledge
knowledge
DIALOGCHECK MINARGS 1 MAXARGS 1
Definition: giveknowledge.py:15
cf_region_get_next
region * cf_region_get_next(region *reg)
Definition: plugin_common.cpp:1910
cf_object_get_int64_property
int64_t cf_object_get_int64_property(object *op, int propcode)
Definition: plugin_common.cpp:381
cf_object_move_to
int cf_object_move_to(object *op, int x, int y)
Definition: plugin_common.cpp:630
cf_object_free_drop_inventory
void cf_object_free_drop_inventory(object *ob)
Definition: plugin_common.cpp:571
flags
static const flag_definition flags[]
Definition: gridarta-types-convert.cpp:101
cf_player_can_pay
int cf_player_can_pay(object *op)
Definition: plugin_common.cpp:886
cf_find_string
sstring cf_find_string(const char *str)
Definition: plugin_common.cpp:1189
cf_object_set_string_property
void cf_object_set_string_property(object *op, int propcode, const char *value)
Definition: plugin_common.cpp:456
Ice.tmp
int tmp
Definition: Ice.py:207
cf_object_perm_exp
int64_t cf_object_perm_exp(object *op)
Definition: plugin_common.cpp:515
plugin.h
cf_quest_set_player_state
void cf_quest_set_player_state(object *pl, sstring quest_code, int state)
Definition: plugin_common.cpp:2075
cf_map_get_light
int cf_map_get_light(mapstruct *map)
cf_map_insert_object
object * cf_map_insert_object(mapstruct *where, object *op, int x, int y)
Definition: plugin_common.cpp:1329
cf_player_arrest
int cf_player_arrest(object *who)
Definition: plugin_common.cpp:924
cf_player_move
int cf_player_move(player *pl, int dir)
Definition: plugin_common.cpp:524
cf_party_get_next
partylist * cf_party_get_next(partylist *party)
Definition: plugin_common.cpp:1814
partylist
Definition: party.h:10
smoking_pipe.color
color
Definition: smoking_pipe.py:5
buf
StringBuffer * buf
Definition: readable.cpp:1560
cf_archetype_get_clone
object * cf_archetype_get_clone(archetype *arch)
Definition: plugin_common.cpp:1767
cf_player_set_title
void cf_player_set_title(object *op, const char *title)
Definition: plugin_common.cpp:842
RMParms
Definition: random_map.h:14
cf_spring_trap
void cf_spring_trap(object *trap, object *victim)
Definition: plugin_common.cpp:1005
cf_object_get_msg
const char * cf_object_get_msg(object *)
Definition: plugin_common.cpp:1218
cf_object_pay_amount
int cf_object_pay_amount(object *pl, uint64_t to_pay)
Definition: plugin_common.cpp:732
cf_object_change_abil
int cf_object_change_abil(object *op, object *tmp)
Definition: plugin_common.cpp:1671
cf_object_set_key
int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key)
Definition: plugin_common.cpp:1659
cf_system_get_region_vector
void cf_system_get_region_vector(int property, std::vector< region * > *list)
Definition: plugin_common.cpp:2140
cf_quest_start
void cf_quest_start(object *pl, sstring quest_code, int state)
Definition: plugin_common.cpp:2064
cf_region_get_parent
region * cf_region_get_parent(region *reg)
Definition: plugin_common.cpp:1926
m
static event_registration m
Definition: citylife.cpp:425
autojail.who
who
Definition: autojail.py:3
cf_archetype_get_more
archetype * cf_archetype_get_more(archetype *arch)
Definition: plugin_common.cpp:1735
cf_object_set_animation
int cf_object_set_animation(object *op, const char *animation)
Definition: plugin_common.cpp:486
disinfect.map
map
Definition: disinfect.py:4
cf_log_plain
void cf_log_plain(LogLevel logLevel, const char *message)
Definition: plugin_common.cpp:1542
cf_party_get_first
partylist * cf_party_get_first(void)
Definition: plugin_common.cpp:1783
cf_player_get_party
partylist * cf_player_get_party(object *op)
Definition: plugin_common.cpp:872
cf_object_say
void cf_object_say(object *op, const char *msg)
Definition: plugin_common.cpp:1049
diamondslots.activator
activator
Definition: diamondslots.py:10
cf_map_get_object_at
object * cf_map_get_object_at(mapstruct *m, int x, int y)
Definition: plugin_common.cpp:655
cf_timer_create
int cf_timer_create(object *ob, long delay, int mode)
Definition: plugin_common.cpp:1604
cf_identify
object * cf_identify(object *op)
Definition: plugin_common.cpp:812
cf_object_set_int64_property
void cf_object_set_int64_property(object *op, int propcode, int64_t value)
Definition: plugin_common.cpp:402
cf_find_face
int cf_find_face(const char *name, int error)
Definition: plugin_common.cpp:1510
cf_map_insert_object_there
object * cf_map_insert_object_there(object *op, mapstruct *m, object *originator, int flag)
Definition: plugin_common.cpp:1315
f_plug_api
void(* f_plug_api)(int *type,...)
Definition: plugin.h:79
cf_map_get_enter_y
int cf_map_get_enter_y(mapstruct *map)
Definition: plugin_common.cpp:1412
cf_system_unregister_global_event
void cf_system_unregister_global_event(int event, const char *name)
Definition: plugin_common.cpp:1109
cf_get_month_name
const char * cf_get_month_name(int index)
Definition: plugin_common.cpp:1565
cf_init_plugin
int cf_init_plugin(f_plug_api getHooks)
Definition: plugin_common.cpp:146
cf_object_get_movetype_property
MoveType cf_object_get_movetype_property(object *op, int propcode)
Definition: plugin_common.cpp:357
cf_object_find_by_arch_name
object * cf_object_find_by_arch_name(const object *who, const char *name)
Definition: plugin_common.cpp:592
cf_object_get_map_property
mapstruct * cf_object_get_map_property(object *op, int propcode)
Definition: plugin_common.cpp:373
cf_object_query_money
int cf_object_query_money(const object *op)
Definition: plugin_common.cpp:983
make_face_from_files.str
str
Definition: make_face_from_files.py:30
cf_region_get_longname
const char * cf_region_get_longname(region *reg)
Definition: plugin_common.cpp:1942
cf_get_empty_map
mapstruct * cf_get_empty_map(int sizex, int sizey)
Definition: plugin_common.cpp:948
cf_region_get_first
region * cf_region_get_first(void)
Definition: plugin_common.cpp:1878
cf_map_set_int_property
void cf_map_set_int_property(mapstruct *map, int propcode, int value)
Definition: plugin_common.cpp:298
cf_object_query_cost_string
void cf_object_query_cost_string(const object *tmp, object *who, int flag, char *buffer, int length)
navar-midane_pickup.msg
list msg
Definition: navar-midane_pickup.py:13
cf_object_get_partylist_property
partylist * cf_object_get_partylist_property(object *op, int propcode)
Definition: plugin_common.cpp:424
cf_object_get_nrof
int cf_object_get_nrof(object *)
Definition: plugin_common.cpp:1270
cf_object_set_weight_limit
void cf_object_set_weight_limit(object *ob, int weight)
Definition: plugin_common.cpp:1234
cf_object_clone
object * cf_object_clone(object *op, int clonetype)
Definition: plugin_common.cpp:683
cf_object_get_double_property
double cf_object_get_double_property(object *op, int propcode)
Definition: plugin_common.cpp:432
title
Definition: readable.cpp:108
cf_map_message
void cf_map_message(mapstruct *m, const char *msg, int color)
Definition: plugin_common.cpp:667
archetype
Definition: object.h:474
cf_map_get_reset_timeout
int cf_map_get_reset_timeout(mapstruct *map)
Definition: plugin_common.cpp:1388
cf_object_get_flag
int cf_object_get_flag(object *ob, int flag)
Definition: plugin_common.cpp:1277
devourers.command
command
Definition: devourers.py:16
cf_object_drop
void cf_object_drop(object *op, object *author)
Definition: plugin_common.cpp:1043
cf_map_get_enter_x
int cf_map_get_enter_x(mapstruct *map)
Definition: plugin_common.cpp:1408
cf_map_get_map_property
mapstruct * cf_map_get_map_property(mapstruct *map, int propcode)
Definition: plugin_common.cpp:279
cf_object_transfer
int cf_object_transfer(object *op, int x, int y, int randomly, object *originator)
Definition: plugin_common.cpp:618
cf_object_set_movetype_property
void cf_object_set_movetype_property(object *op, int propcode, MoveType value)
Definition: plugin_common.cpp:350
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.cpp:1461
cf_free_string
void cf_free_string(sstring str)
Definition: plugin_common.cpp:1182
cf_region_get_message
const char * cf_region_get_message(region *reg)
Definition: plugin_common.cpp:1958
cf_random_map_set_variable
int cf_random_map_set_variable(RMParms *rp, const char *buf)
Definition: plugin_common.cpp:1473
cf_object_present_archname_inside
object * cf_object_present_archname_inside(object *op, char *whatstr)
Definition: plugin_common.cpp:579
cf_object_find_by_name
object * cf_object_find_by_name(const object *who, const char *name)
Definition: plugin_common.cpp:605
cf_object_pickup
void cf_object_pickup(object *op, object *what)
Definition: plugin_common.cpp:1434
cf_region_get_jail_x
int cf_region_get_jail_x(region *reg)
Definition: plugin_common.cpp:1974
cf_object_get_archetype_property
archetype * cf_object_get_archetype_property(object *op, int propcode)
Definition: plugin_common.cpp:416
cf_player_get_marked_item
object * cf_player_get_marked_item(object *op)
Definition: plugin_common.cpp:857
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.cpp:2103
cf_map_set_string_property
void cf_map_set_string_property(mapstruct *map, int propcode, const char *value)
Definition: plugin_common.cpp:305
cf_object_insert_in_ob
object * cf_object_insert_in_ob(object *op, object *where)
Definition: plugin_common.cpp:1298
cf_object_user_event
int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix)
Definition: plugin_common.cpp:262
cf_object_move
int cf_object_move(object *op, int dir, object *originator)
Definition: plugin_common.cpp:531
region
Definition: map.h:273
diamondslots.message
string message
Definition: diamondslots.py:57
cf_system_get_object_vector
void cf_system_get_object_vector(int property, std::vector< object * > *list)
Definition: plugin_common.cpp:2116
cf_object_split
object * cf_object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
Definition: plugin_common.cpp:697
cf_system_register_global_event
void cf_system_register_global_event(int event, const char *name, f_plug_event hook)
Definition: plugin_common.cpp:1102
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.cpp:2095
cf_player_set_party
void cf_player_set_party(object *op, partylist *party)
Definition: plugin_common.cpp:876
cf_find_animation
int cf_find_animation(const char *txt)
Definition: plugin_common.cpp:1498
cf_object_set_weight
void cf_object_set_weight(object *ob, int weight)
Definition: plugin_common.cpp:1227
cf_archetype_get_next
archetype * cf_archetype_get_next(archetype *arch)
Definition: plugin_common.cpp:1719
cf_get_periodofday_name
const char * cf_get_periodofday_name(int index)
Definition: plugin_common.cpp:1583
cf_map_trigger_connected
void cf_map_trigger_connected(objectlink *ol, object *cause, int state)
Definition: plugin_common.cpp:1028
reputation.victim
victim
Definition: reputation.py:14
mapstruct
Definition: map.h:314
cf_object_set_flag
void cf_object_set_flag(object *ob, int flag, int value)
Definition: plugin_common.cpp:1288
cf_system_get_map_vector
void cf_system_get_map_vector(int property, std::vector< mapstruct * > *list)
Definition: plugin_common.cpp:2122
f_plug_event
int(* f_plug_event)(int *type,...)
Definition: events.h:67
sstring
const typedef char * sstring
Definition: sstring.h:2
cf_region_get_name
const char * cf_region_get_name(region *reg)
Definition: plugin_common.cpp:1894
give.op
op
Definition: give.py:33
autojail.value
value
Definition: autojail.py:6
board.author
author
Definition: board.py:59
cf_object_set_nrof
int cf_object_set_nrof(object *, int nrof)
Definition: plugin_common.cpp:1260
cf_map_has_been_loaded
mapstruct * cf_map_has_been_loaded(const char *name)
Definition: plugin_common.cpp:961
cf_re_cmp
const char * cf_re_cmp(const char *str, const char *regexp)
Definition: plugin_common.cpp:1143
cf_object_check_trigger
int cf_object_check_trigger(object *op, object *cause)
Definition: plugin_common.cpp:1016
cf_quest_get_player_state
int cf_quest_get_player_state(object *pl, sstring quest_code)
Definition: plugin_common.cpp:2051
cf_object_set_long_property
void cf_object_set_long_property(object *op, int propcode, long value)
Definition: plugin_common.cpp:390
diamondslots.y
y
Definition: diamondslots.py:16
cf_create_object
object * cf_create_object(void)
Definition: plugin_common.cpp:1081
python_pickup.where
where
Definition: python_pickup.py:7
cf_get_maps_directory
char * cf_get_maps_directory(const char *name, char *buf, int size)
Definition: plugin_common.cpp:1069
npc_dialog.index
int index
Definition: npc_dialog.py:102
cf_object_get_key
const char * cf_object_get_key(object *op, const char *keyname)
Definition: plugin_common.cpp:1637
cf_system_get_archetype_vector
void cf_system_get_archetype_vector(int property, std::vector< archetype * > *list)
Definition: plugin_common.cpp:2128
cf_player_find
player * cf_player_find(const char *plname)
Definition: plugin_common.cpp:825
cf_friendlylist_get_next
object * cf_friendlylist_get_next(object *ob)
Definition: plugin_common.cpp:2036
cf_party_get_password
const char * cf_party_get_password(partylist *party)
Definition: plugin_common.cpp:1830
cf_player_get_title
char * cf_player_get_title(object *op, char *title, int size)
Definition: plugin_common.cpp:834
cf_system_unregister_command
void cf_system_unregister_command(command_registration command)
Definition: plugin_common.cpp:2111
cf_archetype_get_head
archetype * cf_archetype_get_head(archetype *arch)
Definition: plugin_common.cpp:1751
command_function_extra
void(* command_function_extra)(object *op, const char *params, const char *extra)
Definition: commands.h:29
cf_map_get_difficulty
int cf_map_get_difficulty(mapstruct *map)
Definition: plugin_common.cpp:1380
cf_party_get_next_player
player * cf_party_get_next_player(partylist *party, player *op)
Definition: plugin_common.cpp:1864
cf_object_set_face
int cf_object_set_face(object *op, const char *face)
Definition: plugin_common.cpp:474
animate.event
event
DIALOGCHECK MINARGS 1 MAXARGS 2
Definition: animate.py:17
quest.state
state
Definition: quest.py:13
command_registration
uint64_t command_registration
Definition: commands.h:32
cf_map_get_darkness
int cf_map_get_darkness(mapstruct *map)
Definition: plugin_common.cpp:1396
cf_player_message
void cf_player_message(object *op, const char *txt, int flags)
Definition: plugin_common.cpp:787
cf_map_get_map
mapstruct * cf_map_get_map(const char *name, int flags)
Definition: plugin_common.cpp:935
cf_object_change_map
object * cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Definition: plugin_common.cpp:642
cf_random_map_generate
mapstruct * cf_random_map_generate(const char *OutFileName, RMParms *RP, char **use_layout, sstring reset_group)
Definition: plugin_common.cpp:1485
cf_object_forget_spell
void cf_object_forget_spell(object *op, object *sp)
Definition: plugin_common.cpp:768
cf_object_pay_item
int cf_object_pay_item(object *op, object *pl)
Definition: plugin_common.cpp:720
cf_object_get_weight_limit
int cf_object_get_weight_limit(object *ob)
Definition: plugin_common.cpp:1249
cf_system_get_party_vector
void cf_system_get_party_vector(int property, std::vector< partylist * > *list)
Definition: plugin_common.cpp:2134
cf_object_insert_object
object * cf_object_insert_object(object *op, object *container)
Definition: plugin_common.cpp:1056
cf_object_get_resistance
int16_t cf_object_get_resistance(object *op, int rtype)
Definition: plugin_common.cpp:313
cf_object_set_int_property
void cf_object_set_int_property(object *op, int propcode, int value)
Definition: plugin_common.cpp:329
report.error
def error(pl)
Definition: report.py:43
LogLevel
LogLevel
Definition: logger.h:10
diamondslots.cost
int cost
Definition: diamondslots.py:21
cf_object_update
void cf_object_update(object *op, int flags)
Definition: plugin_common.cpp:1428
cf_friendlylist_get_first
object * cf_friendlylist_get_first(void)
Definition: plugin_common.cpp:2020
cf_object_remove
void cf_object_remove(object *op)
Definition: plugin_common.cpp:562
command_function
void(* command_function)(object *op, const char *params)
Definition: commands.h:17
cf_object_change_exp
void cf_object_change_exp(object *op, int64_t exp, const char *skill_name, int flag)
Definition: plugin_common.cpp:504
cf_player_get_ip
sstring cf_player_get_ip(object *op)
Definition: plugin_common.cpp:848
altar_valkyrie.pl
pl
Definition: altar_valkyrie.py:28
cf_object_set_object_property
void cf_object_set_object_property(object *op, int propcode, object *value)
Definition: plugin_common.cpp:493
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.cpp:1371
cf_object_learn_spell
void cf_object_learn_spell(object *op, object *spell, int special_prayer)
Definition: plugin_common.cpp:756
cf_map_get_width
int cf_map_get_width(mapstruct *map)
Definition: plugin_common.cpp:1400
cf_object_get_int_property
int cf_object_get_int_property(object *op, int propcode)
Definition: plugin_common.cpp:335
cf_quest_was_completed
int cf_quest_was_completed(object *pl, sstring quest_code)
Definition: plugin_common.cpp:2086
cf_object_get_float_property
float cf_object_get_float_property(object *op, int propcode)
Definition: plugin_common.cpp:408
cf_map_change_light
int cf_map_change_light(mapstruct *m, int change)
Definition: plugin_common.cpp:1420
cf_get_time
void cf_get_time(timeofday_t *tod)
Definition: plugin_common.cpp:1549
cf_object_set_resistance
void cf_object_set_resistance(object *op, int rtype, int16_t value)
Definition: plugin_common.cpp:321
cf_object_remove_depletion
int cf_object_remove_depletion(object *op, int level)
Definition: plugin_common.cpp:798
give.name
name
Definition: give.py:27
level
Definition: level.py:1