Manage Condition Events¶
Adding a new Condition Event¶
- Select
Condition Events
and clickAdd Event...
and a new window will appear. - Enter a name for the new event.
- Optionally, set a category for the event.
- Implement the
condition
function for the new event. The condition function should return a result which can be evaluated to a boolean value,true
orfalse
. If the condition function result evaluates totrue
, then theaction
function will be called. If the condition function evaluates tofalse
, then the action function will not be called. Note that in addition totrue
andfalse
,nil
is also considered to befalse
and any other non-nil and non-boolean value is considered to betrue
. Unlike other languages, the number0
would also evaluate totrue
. - Implement the
action
function for the new event. Theaction
function is called when the condition function returns a result which evaluates totrue
, and should perform whatever action you want to be taken when the condition is satisfied. - Optionally, also implement the
on_load
function if you would like any actions to be performed immediately upon the event being enabled. - Click
Save
to save the new event.
Editing Condition Events¶
- Select
Condition Events
and find the event you wish to edit. - Select the event and click the
Edit
button. - Make updates to the event in the new window that appears, and then click
Save
.
Viewing Condition Events¶
- Select
Condition Events
and find the event you wish to edit. - Double click the event you wish to view and a new event viewer window will appear.
Removing Condition Events¶
- Select
Condition Events
and find the event you wish to edit. - Select the event and click the
Remove
button.
Toggling Events¶
Events can be enabled or disabled for a given character.
Using the UI¶
- Select
Condition Events
and find the event you wish to edit. - Check or uncheck the box next to the event name to toggle the event.
Using the Command Line¶
- Run the command
/lem cond event_name 0
to disable the event namedevent_name
. - Run the command
/lem cond event_name 1
to enable the event namedevent_name
.