Crossfire Server  1.75.0
Local events

Local events are linked to particular objects, for example, a special apply event for a particular artifact sword. More...

Macros

#define EVENT_APPLY   1
 Object applied-unapplied. More...
 
#define EVENT_ATTACKED   2
 Object attacked, with weapon or spell. More...
 
#define EVENT_ATTACKS   33
 Weapon or arrow hitting something. More...
 
#define EVENT_BOUGHT   34
 Object is being bought by player. More...
 
#define EVENT_CLOSE   11
 Container closed. More...
 
#define EVENT_DEATH   3
 Player or monster dead. More...
 
#define EVENT_DESTROY   13
 Object destroyed (includes map reset/swapout) More...
 
#define EVENT_DROP   4
 Object dropped on the floor. More...
 
#define EVENT_NONE   0
 No event. More...
 
#define EVENT_PICKUP   5
 Object picked up. More...
 
#define EVENT_SAY   6
 Someone speaks. More...
 
#define EVENT_SELLING   32
 Object is being sold by another one. More...
 
#define EVENT_STOP   7
 Thrown object stopped. More...
 
#define EVENT_THROW   9
 Object is thrown. More...
 
#define EVENT_TIME   8
 Triggered each time the object can react/move. More...
 
#define EVENT_TIMER   12
 Timer connected triggered it. More...
 
#define EVENT_TRIGGER   10
 Button pushed, lever pulled, etc. More...
 
#define EVENT_USER   31
 User-defined event. More...
 

Detailed Description

Local events are linked to particular objects, for example, a special apply event for a particular artifact sword.

These objects need to contain a event handler object specifying the plugin/module to run in order for these types of events to be dispatched.

Macro Definition Documentation

◆ EVENT_APPLY

#define EVENT_APPLY   1

Object applied-unapplied.

Definition at line 28 of file events.h.

Referenced by eventListener(), ob_apply(), and pray_at_altar().

◆ EVENT_ATTACKED

#define EVENT_ATTACKED   2

Object attacked, with weapon or spell.

Definition at line 29 of file events.h.

Referenced by eventListener(), and hit_player().

◆ EVENT_ATTACKS

#define EVENT_ATTACKS   33

Weapon or arrow hitting something.

Definition at line 30 of file events.h.

Referenced by attack_ob_simple(), and hit_with_arrow().

◆ EVENT_BOUGHT

#define EVENT_BOUGHT   34

Object is being bought by player.

Definition at line 31 of file events.h.

Referenced by shop_pay_unpaid_callback().

◆ EVENT_CLOSE

#define EVENT_CLOSE   11

Container closed.

Definition at line 32 of file events.h.

Referenced by apply_container().

◆ EVENT_DEATH

#define EVENT_DEATH   3

Player or monster dead.

Definition at line 33 of file events.h.

Referenced by kill_object(), and kill_player().

◆ EVENT_DESTROY

#define EVENT_DESTROY   13

Object destroyed (includes map reset/swapout)

Definition at line 34 of file events.h.

Referenced by object_free().

◆ EVENT_DROP

#define EVENT_DROP   4

Object dropped on the floor.

Definition at line 35 of file events.h.

Referenced by drop_object().

◆ EVENT_NONE

#define EVENT_NONE   0

No event.

This exists only to reserve the "0".

Definition at line 27 of file events.h.

◆ EVENT_PICKUP

#define EVENT_PICKUP   5

Object picked up.

Definition at line 36 of file events.h.

Referenced by pick_up_object().

◆ EVENT_SAY

#define EVENT_SAY   6

Someone speaks.

Definition at line 37 of file events.h.

Referenced by events_execute_object_say().

◆ EVENT_SELLING

#define EVENT_SELLING   32

Object is being sold by another one.

Definition at line 38 of file events.h.

Referenced by sell_item().

◆ EVENT_STOP

#define EVENT_STOP   7

Thrown object stopped.

Definition at line 39 of file events.h.

Referenced by stop_projectile().

◆ EVENT_THROW

#define EVENT_THROW   9

Object is thrown.

Definition at line 41 of file events.h.

Referenced by do_throw().

◆ EVENT_TIME

#define EVENT_TIME   8

Triggered each time the object can react/move.

Definition at line 40 of file events.h.

Referenced by eventListener(), and process_object().

◆ EVENT_TIMER

#define EVENT_TIMER   12

Timer connected triggered it.

Definition at line 43 of file events.h.

Referenced by cftimer_create(), and cftimer_process_event().

◆ EVENT_TRIGGER

#define EVENT_TRIGGER   10

Button pushed, lever pulled, etc.

Definition at line 42 of file events.h.

Referenced by common_pre_ob_move_on(), move_teleporter(), pick_lock(), player_changer_type_process(), trigger_connected(), write_note(), and write_scroll().

◆ EVENT_USER

#define EVENT_USER   31

User-defined event.

Definition at line 44 of file events.h.

Referenced by events_execute_object_user().