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