User Tools

Site Tools


building:scripts:events

Scripting Events

Scripting events have 3 properties:

  1. The Moment and Condition in Which They Are Called (Event Name)
  2. The Event System Used (Event Type)
    This determine how to register the event and access the parameters.
  3. The Script to Execute
    This is your script or someone else script that you registered to a specific event to perform a specific behaviour on specific objects.

Event Systems

New Internal Events

Sinfar server side plugin adds many new events, they can be Script Based Events or Variable Based Events.

Here's the list of the new Variable Based Events:

Variable NameDescriptionCallerParametersReturn Value / BypassEvent() ResultExample
EVENT_CANUSECalled before determining if an item can be used or not.The Item0: The item possessorBoolean: Wether or not the item can be used (SetEventResultInt(TRUE or FALSE))scroll_w_canuse
EVENT_RECVITEMAn item is about to be added to an object inventoryThe object that will acquire the item0: The Item
1: The current item possessor
Boolean: Wether or not the item should be added to the caller's inventorymail_putinbox
EVENT_CLEARALLACTIONSCalled when an object actions list is about to be cleared.
It is one way to know when an action has been interrupted (for any reason)
The objectNoneNoneTODO
building/scripts/events.txt · Last modified: 2019/03/10 21:59 by Mavrixio