ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/pod/events.pod
(Generate patch)

Comparing deliantra/server/pod/events.pod (file contents):
Revision 1.3 by root, Tue Sep 12 23:22:32 2006 UTC vs.
Revision 1.8 by root, Tue Dec 19 04:58:05 2006 UTC

48made. The copy automatically has all attachments the original object 48made. The copy automatically has all attachments the original object
49had. The perl variables get copied in a shallow way (references are shared 49had. The perl variables get copied in a shallow way (references are shared
50between instances). If this is not the behaviour you need, you have to 50between instances). If this is not the behaviour you need, you have to
51adjust the B<destination> object as you see fit. 51adjust the B<destination> object as you see fit.
52 52
53=head3 add_bonus (item creator difficulty max_magic flags)
54
55A basic item has been created (e.g. for shops, monsters drops etc.)
56that needs bonus values applied. The B<creator> object is a template
57object that can be used to inherit stuff (and can be NULL). Flags is a
58combination of GT_ENVIRONMENT (???) or GT_STARTEQUIP (set FLAG_STARTEQUIP
59on item or set its value to 0) or GT_MINIMAL (???)
60
61When overriden, built-in bonus generation is skipped, otherwise
62treasure generation continues as it would without this hook.
63
64In general, if flags != 0 or creator != 0 you should just return and leave
65item generation to the standard code.
66
53=head3 destroy (object) 67=head3 destroy (object)
54 68
55Invoked when the crossfire object gets destroyed, and only when the object 69Invoked when the crossfire object gets destroyed, and only when the object
56has a handler for this event. This event can occur many times, as its 70has a handler for this event. This event can occur many times, as its
57called when the in-memory object is destroyed, not when the object itself 71called when the in-memory object is destroyed, not when the object itself
235 249
236=head3 death (player) 250=head3 death (player)
237 251
238Invoked whenever a player dies, before the death actually gets processed. 252Invoked whenever a player dies, before the death actually gets processed.
239 253
240=head3 map_change (player oldmap newmap) 254=head3 map_change (player newmap x y -- )
241 255
242Invoked whenever a player moves from one map to another. 256Invoked before a player moves from one map to another, can override the movement.
257
258=head3 command (player command args -- time)
259
260Execute a user command send by the client. Programmable plug-ins usually
261handle this event internally.
243 262
244=head3 extcmd (player string) 263=head3 extcmd (player string)
245 264
246Invoked whenever a client issues the C<extcmd> protocol command. It's 265Invoked whenever a client issues the C<extcmd> protocol command.
247argument is passed without any changes. 266Programmable plug-ins usually handle this event internally.
248 267
249=head3 move (player direction -- ) 268=head3 move (player direction -- )
250 269
251=head3 pray_altar (player altar skill -- ) 270=head3 pray_altar (player altar skill -- )
252 271
304 323
305=head3 clean (map) 324=head3 clean (map)
306 325
307Invoked when a temporary B<map> gets deleted on-disk. 326Invoked when a temporary B<map> gets deleted on-disk.
308 327
309=head3 enter (map player) 328=head3 enter (map player x y -- )
310 329
311Invoked whenever a player enters the B<map>. This event is likely unreliable. 330Invoked whenever a player tries to enter the B<map>, while he/she is still
331on the old map. Overriding means the player won't be able to enter, and,
332if newmap/x/y are given, will be redirected to that map instead.
312 333
313=head3 leave (map player) 334=head3 leave (map player -- )
314 335
315Invoked whenever a player leaves the B<map>. This event is likely unreliable. 336Invoked whenever a player tries to leave the B<map>. Overriding means the
316 337player won't be able to leave.
317=head3 upgrade (map)
318
319(TEMPORARY EVENT) gets invoked whenever a old-style map has been upgraded.
320 338
321=head3 trigger (map connection state) 339=head3 trigger (map connection state)
322 340
323Invoked whenever something activates a B<connection> on the B<map>. If B<state> 341Invoked whenever something activates a B<connection> on the B<map>. If B<state>
324is true the connection was 'state' and if false it is 'released'. 342is true the connection was 'state' and if false it is 'released'.
343
344
345=head2 CLIENT EVENTS
346
347These events are very similar to player events, but they are might be
348handled asynchronously as soon as the command reaches the server, even when
349the player hasn't logged in yet (meaning there is no player yet).
350
351=head3 exticmd (client string)
352
353Like C<extcmd>, but can be called before a player has logged in.
354
355Programmable plug-ins usually handle this event internally.
356

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines