User Tools

Site Tools


server_plugin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
server_plugin [2017/07/29 21:59]
partmedia Clarify PLAYER_DEATH
server_plugin [2024/05/20 18:09] (current)
leaf Merge in changes from the wiki-data server_plugin page
Line 1: Line 1:
-====== ​General information ​======+====== ​Crossfire Server Plugins ​======
  
-Plugins enhance the game with optional features.+===== General information ===== 
 + 
 +Plugins enhance the Crossfire ​game with optional features.
  
 They allow for special behaviours that can't be done through simple mapping, or require complex scripting actions - the only thing limiting is the imagination of the coder! They allow for special behaviours that can't be done through simple mapping, or require complex scripting actions - the only thing limiting is the imagination of the coder!
  
 Current examples include: Current examples include:
-  * message boards, on which players can leave messages+  * Message Boards, on which players can leave messages
   * Imperial Post Office, that lets players exchange ingame mail   * Imperial Post Office, that lets players exchange ingame mail
-  * playing slot machines ​at casinos +  * Playing Slot Machines ​at casinos 
-  * [[:​dev_todo:​python_guilds|improved guild system]] - currently being tested+  * [[:​dev_todo:​python_guilds|Improved Guild System]] - currently being tested
  
  
Line 17: Line 19:
 Currently existing plugins are : Currently existing plugins are :
 ^ Name ^ Description ^ Status ^ Title for the event object ^ ^ Name ^ Description ^ Status ^ Title for the event object ^
-| [[cfanim]] | animate objects | experimental | Animator | +| [[:​server:​plugin:​cfanim]] | animate objects | experimental | Animator | 
-| [[cfpython]] | run Python scripts | working | Python | +| [[:cfpython:]] | run Python scripts | working | Python | 
-| [[cflogger]] | logs events to a SQLITE database | experimental | SqliteLogger | +| [[:​server:​plugin:​cflogger]] | logs events to a SQLITE database | experimental | SqliteLogger | 
-| [[cfnewspaper]] | newspaper generation | experimental | Newspaper | +| [[:​server:​plugin:​cfnewspaper]] | newspaper generation | experimental | Sqlite ​Newspaper, needs cflogger ​
-| [[citylife]] | adds/​removes NPCs in maps, to make towns lively | apparently stable | citylife | +| [[:​server:​plugin:​citylife]] | adds/​removes NPCs in maps, to make towns lively | apparently stable | citylife | 
-| [[cfrhg]] | random house generator, adds random maps to unlinked exits in specified maps | apparently stable | cfrhg | +| [[:​server:​plugin:​cfrhg]] | random house generator, adds random maps to unlinked exits in specified maps | apparently stable | cfrhg | 
-| <​del>​[[cf_darcap]]</​del>​ | <​del>​Darcap specific plugin, handling various things</​del>​ | <​del>​needs testing</​del>​ replaced by quest/​dialog mechanism |+| <​del>​[[:​server:​plugin:​cf_darcap]]</​del>​ | <​del>​Darcap specific plugin, handling various things</​del>​ | <​del>​needs testing</​del>​ replaced by quest/​dialog mechanism |
 | template | not a real plugin, but a skeleton to create new ones | up-to-date | | | template | not a real plugin, but a skeleton to create new ones | up-to-date | |
  
Line 79: Line 81:
   * bound to an arrow, it is triggered when the arrow hits something. "​op"​ is the arrow, "​activator"​ what really hits (arrow can have stuff inside), "​third"​ is the victim. Returning a non-zero value cancels the attack   * bound to an arrow, it is triggered when the arrow hits something. "​op"​ is the arrow, "​activator"​ what really hits (arrow can have stuff inside), "​third"​ is the victim. Returning a non-zero value cancels the attack
  
 +==== Bought ====
 +Archetype: event_bought
 +
 +This event is triggered when the associated object was paid by a player, but not yet marked as paid.
 +
 +"​op"​ is the item being bought, "​activator"​ is the player buying.
 +
 +Returning a non-zero value leaves the item as unpaid and prevents the player from buying still unpaid items.
 ==== Close ==== ==== Close ====
 Archetype: event_close Archetype: event_close
Line 89: Line 99:
 Generated when the object dies. Generated when the object dies.
  
 +==== Destroy ====
 +Archetype: event_destroy
 +
 +Used when the object is totally destroyed, either by a map reset or destruction by another item.
 +
 +"​op"​ is the object being destroyed.
 +
 +The return value is ignored.
 ==== Drop ==== ==== Drop ====
 Archetype: event_drop Archetype: event_drop
Line 150: Line 168:
 Generated when the timer connected triggered. Generated when the timer connected triggered.
  
 +==== User ====
 +Archetype: event_user
 +
 +Only triggered through a plugin call. This event can represent anything.
  
 +"​op"​ is the object on which the event is triggered, other parameters are specific to the use-case.
 ===== Hooking to global events ===== ===== Hooking to global events =====
  
Line 172: Line 195:
 | Mapunload | Generated when a map is being unloaded from memory. | ''​map*''​ pointing to the map | | | Mapunload | Generated when a map is being unloaded from memory. | ''​map*''​ pointing to the map | |
 | Muzzle | Generated when a player was muzzled by a DM. | ''​object*''​ pointing to muzzled player, ''​const char*''​ containing the parameter the DM used to muzzle | | | Muzzle | Generated when a player was muzzled by a DM. | ''​object*''​ pointing to muzzled player, ''​const char*''​ containing the parameter the DM used to muzzle | |
 +| Playerdeath | Generated whenever a player dies. | ''​object*''​ pointing to player, ''​object*''​ pointing to killer (can be NULL). | |
 | Remove | Generated when a player character is removed from the game ("​quit"​ command). | ''​object*''​ pointing to the player | | | Remove | Generated when a player character is removed from the game ("​quit"​ command). | ''​object*''​ pointing to the player | |
 | Shout | Generated whenever someone shouts something. | ''​object*''​ pointing to talking player, ''​const char*''​ containing the message, ''​int''​ containing the priority | | | Shout | Generated whenever someone shouts something. | ''​object*''​ pointing to talking player, ''​const char*''​ containing the message, ''​int''​ containing the priority | |
server_plugin.1501383555.txt.gz · Last modified: 2017/07/29 21:59 by partmedia