1 | =head1 CROSSFIRE PLUG-IN EVENTS |
1 | =head1 CROSSFIRE+ PLUG-IN EVENTS |
2 | |
2 | |
3 | This document briefly describes each plug-in event. It is also used to |
3 | This document briefly describes each plug-in event. It is also used to |
4 | generate the event-list itself, so is always complete. Be careful wehn |
4 | generate the event-list itself, so is always complete. Be careful wehn |
5 | changing it, though. |
5 | changing it, though. |
6 | |
6 | |
… | |
… | |
183 | |
183 | |
184 | =head2 GLOBAL EVENTS |
184 | =head2 GLOBAL EVENTS |
185 | |
185 | |
186 | Global events have no relation to specific objects. |
186 | Global events have no relation to specific objects. |
187 | |
187 | |
|
|
188 | =head3 cleanup () |
|
|
189 | |
|
|
190 | Called when the server is cleaning up, just before it calls exit. |
|
|
191 | |
188 | =head3 clock ( ) |
192 | =head3 clock ( ) |
189 | |
193 | |
190 | Is invoked on every server tick, usually every 0.12 seconds. |
194 | Is invoked on every server tick, usually every 0.12 seconds. |
|
|
195 | |
191 | |
196 | |
192 | =head2 PLAYER EVENTS |
197 | =head2 PLAYER EVENTS |
193 | |
198 | |
194 | Player events always have a player object as first argument. |
199 | Player events always have a player object as first argument. |
195 | |
200 | |
… | |
… | |
230 | |
235 | |
231 | =head3 death (player) |
236 | =head3 death (player) |
232 | |
237 | |
233 | Invoked whenever a player dies, before the death actually gets processed. |
238 | Invoked whenever a player dies, before the death actually gets processed. |
234 | |
239 | |
235 | =head3 map_change (player oldmap newmap) |
240 | =head3 map_change (player newmap x y -- ) |
236 | |
241 | |
237 | Invoked whenever a player moves from one map to another. |
242 | Invoked before a player moves from one map to another, can override the movement. |
238 | |
243 | |
239 | =head3 extcmd (player string) |
244 | =head3 extcmd (player string) |
240 | |
245 | |
241 | Invoked whenever a client issues the C<extcmd> protocol command. It's |
246 | Invoked whenever a client issues the C<extcmd> protocol command. It's |
242 | argument is passed without any changes. |
247 | argument is passed without any changes. |
… | |
… | |
299 | |
304 | |
300 | =head3 clean (map) |
305 | =head3 clean (map) |
301 | |
306 | |
302 | Invoked when a temporary B<map> gets deleted on-disk. |
307 | Invoked when a temporary B<map> gets deleted on-disk. |
303 | |
308 | |
304 | =head3 enter (map player) |
309 | =head3 enter (map player x y -- ) |
305 | |
310 | |
306 | Invoked whenever a player enters the B<map>. This event is likely unreliable. |
311 | Invoked whenever a player tries to enter the B<map>, while he/she is still |
|
|
312 | on the old map. Overriding means the player won't be able to enter, and, |
|
|
313 | if newmap/x/y are given, will be redirected to that map instead. |
307 | |
314 | |
308 | =head3 leave (map player) |
315 | =head3 leave (map player -- ) |
309 | |
316 | |
310 | Invoked whenever a player leaves the B<map>. This event is likely unreliable. |
317 | Invoked whenever a player tries to leave the B<map>. Overriding means the |
311 | |
318 | player won't be able to leave. |
312 | =head3 upgrade (map) |
|
|
313 | |
|
|
314 | (TEMPORARY EVENT) gets invoked whenever a old-style map has been upgraded. |
|
|
315 | |
319 | |
316 | =head3 trigger (map connection state) |
320 | =head3 trigger (map connection state) |
317 | |
321 | |
318 | Invoked whenever something activates a B<connection> on the B<map>. If B<state> |
322 | Invoked whenever something activates a B<connection> on the B<map>. If B<state> |
319 | is true the connection was 'state' and if false it is 'released'. |
323 | is true the connection was 'state' and if false it is 'released'. |
|
|
324 | |