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 revisionPrevious revision
Next revision
Previous revision
server_plugin [2018/03/30 08:19] – link to files to be moved from the root of this wiki into namespaces karlserver_plugin [2025/04/18 12:51] (current) – external edit 127.0.0.1
Line 81: 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 91: 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 152: 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 174: 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.1522415943.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki