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

Comparing deliantra/server/doc/events.pod (file contents):
Revision 1.5 by root, Mon Aug 28 16:13:00 2006 UTC vs.
Revision 1.8 by root, Tue Aug 29 07:54:36 2006 UTC

18player BIRTH event, nothing much will happen with respect to the built-in 18player BIRTH event, nothing much will happen with respect to the built-in
19processing, but if you override from within a player TELL event, the tell 19processing, but if you override from within a player TELL event, the tell
20will be ignored (presumably your plug-in took care of it). 20will be ignored (presumably your plug-in took care of it).
21 21
22 22
23=head2 GLOBAL EVENTS
24
25Global events have no relation to specific objects.
26
27=head3 clock ( )
28
29Is invoked on every server tick, usually every 0.12 seconds.
30
31
32=head2 PLAYER EVENTS
33
34Player events always have a player object as first argument.
35
36=head3 reattach (player)
37
38Invoked whenever attachments/plug-ins need to get reattached to the player
39object. This usually happens when the player gets loaded from disk, or
40when the server is reloaded.
41
42=head3 birth (player)
43
44Invoked as very first thing after creating a player.
45
46=head3 quit (player)
47
48Invoked wheneever a player quits, before actually removing him/her.
49
50=head3 load (player)
51
52Invoked whenever a player has been loaded from disk, but before
53actual login.
54
55=head3 save (player)
56
57Invoked just before a player gets saved.
58
59=head3 login (player)
60
61Invoked whenever a player logs in.
62
63=head3 logout (player)
64
65Invoked whenever a player logs out, gets disconnected etc.
66
67=head3 death (player)
68
69Invoked whenever a player dies, before the death actually gets processed.
70
71=head3 map_change (player oldmap newmap)
72
73Invoked whenever a player moves from one map to another.
74
75=head3 extcmd (player string)
76
77Invoked whenever a client issues the C<extcmd> protocol command. It's
78argument is passed without any changes.
79
80=head3 pray_altar (player altar skill -- )
81
82Invoked whenever the B<player> prays over an B<altar>, using the given B<skill>.
83
84=head3 tell (player -- )
85
86Invoked whenever the player uses the B<tell> command, before it gets processed.
87
88=head3 say (player --)
89
90Invoked whenever the player uses the B<say> command, before it gets processed.
91
92=head3 shout (player --)
93
94Invoked whenever the player uses the B<shout> command, before it gets processed.
95
96
97=head2 OBJECT EVENTS 23=head2 OBJECT EVENTS
98 24
99Object events always relate to a specific object, which is always the 25Object events always relate to a specific object, which is always the
100first argument. Not all events get generated for every object, some are 26first argument. Not all events get generated for every object, some are
101specific to an object type. 27specific to an object type.
154 80
155=item B<2> objects of that type can't be applied if not in inventory 81=item B<2> objects of that type can't be applied if not in inventory
156 82
157=back 83=back
158 84
85=head3 throw (object thrower)
86
87Invoked when an B<object> is thrown by B<thrower>.
88
89=head3 stop (object -- )
90
91Invoked when a thrown B<object> (arrow, other stuff) hits something and is
92thus being "stopped".
93
94=head3 can_apply (who object -- reason)
95
96=head3 can_be_applied (object who -- reason)
97
98Check wether the B<object> can be applied/readied/etc. by the
99object B<who> and return reason otherwise. Reason is a bitset composed of
100C<CAN_APPLY_*>-flags.
101
102=head3 be_ready (object who -- success)
103
104=head3 ready (who object -- success)
105
106Invoked whenever an B<object> is being applied by object B<who>. See
107I<can_apply> for an alternative if you just want to check wether something
108can apply an object.
109
110=head3 be_unready (object who -- deleted)
111
112=head3 unready (who object -- deleted)
113
114Unwield/unapply/unready the given spell/weapon/skill/etc. B<object>,
115currently applied by B<who>. If your override, make sure you give 'who'
116(if it is a player) an indication of whats wrong. Must return true if the
117object was freed.
118
159=head3 use_skill (skill who part direction strignarg -- ) 119=head3 use_skill (skill who part direction strignarg -- )
160 120
161Invoked whenever a skill is used by somebody or something. 121Invoked whenever a skill is used by somebody or something.
162 122
163=head3 cast_spell (spell casting_object owner direction stringarg -- ) 123=head3 cast_spell (spell casting_object owner direction stringarg -- )
172 132
173=head3 drop_on (floor object who -- ) 133=head3 drop_on (floor object who -- )
174 134
175Invoked whenever some B<object> is being dropped on the B<floor> object. 135Invoked whenever some B<object> is being dropped on the B<floor> object.
176 136
177=head3 listen 137=head3 say (object player message)
178 138
179Invoked whenever the object can hear something beign said in its 139Invoked whenever the I<object> can hear a B<message> being said by
180vicinity. Not yet implemented. 140B<player> in its vicinity.
181 141
182=head3 move (monster enemy -- ) 142=head3 move (monster enemy -- )
183 143
184Invoked whenever the B<monster> tries to move, just after B<enemy> and 144Invoked whenever the B<monster> tries to move, just after B<enemy> and
185other parameters have been determined, but before movement is actually 145other parameters have been determined, but before movement is actually
211signs and similar stuff. 171signs and similar stuff.
212 172
213=head3 close (container -- ) 173=head3 close (container -- )
214 174
215Invoked whenever a container gets closed (this event is not yet reliable!). 175Invoked whenever a container gets closed (this event is not yet reliable!).
176
177
178=head2 GLOBAL EVENTS
179
180Global events have no relation to specific objects.
181
182=head3 clock ( )
183
184Is invoked on every server tick, usually every 0.12 seconds.
185
186=head2 PLAYER EVENTS
187
188Player events always have a player object as first argument.
189
190=head3 reattach (player)
191
192Invoked whenever attachments/plug-ins need to get reattached to the player
193object. This usually happens when the player gets loaded from disk, or
194when the server is reloaded.
195
196=head3 birth (player)
197
198Invoked as very first thing after creating a player.
199
200=head3 quit (player)
201
202Invoked wheneever a player quits, before actually removing him/her.
203
204=head3 kick (player params -- )
205
206Invoked when the given plaer is being kicked, before the kick is executed.
207
208=head3 load (player)
209
210Invoked whenever a player has been loaded from disk, but before
211actual login.
212
213=head3 save (player)
214
215Invoked just before a player gets saved.
216
217=head3 login (player)
218
219Invoked whenever a player logs in.
220
221=head3 logout (player)
222
223Invoked whenever a player logs out, gets disconnected etc.
224
225=head3 death (player)
226
227Invoked whenever a player dies, before the death actually gets processed.
228
229=head3 map_change (player oldmap newmap)
230
231Invoked whenever a player moves from one map to another.
232
233=head3 extcmd (player string)
234
235Invoked whenever a client issues the C<extcmd> protocol command. It's
236argument is passed without any changes.
237
238=head3 move (player direction -- )
239
240=head3 pray_altar (player altar skill -- )
241
242Invoked whenever the B<player> prays over an B<altar>, using the given B<skill>.
243
244=head3 tell (player name message -- )
245
246Invoked whenever the player uses the B<tell> or B<reply> command, before
247it gets processed.
248
249=head3 say (player message --)
250
251=head3 chat (player message --)
252
253=head3 shout (player message --)
254
255Invoked whenever the player uses the B<say>, B<chat> or B<shout> command,
256before it gets processed.
216 257
217 258
218=head2 MAP EVENTS 259=head2 MAP EVENTS
219 260
220These events are generally dependent on a map and thus all have a map 261These events are generally dependent on a map and thus all have a map

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines