Manage Condition Events¶
Adding a new Condition Event¶
- Select
Condition Eventsand clickAdd Event...and a new window will appear. - Enter a name for the new event.
- Optionally, set a category for the event.
- Implement the
conditionfunction for the new event. The condition function should return a result which can be evaluated to a boolean value,trueorfalse. If the condition function result evaluates totrue, then theactionfunction will be called. If the condition function evaluates tofalse, then the action function will not be called. Note that in addition totrueandfalse,nilis also considered to befalseand any other non-nil and non-boolean value is considered to betrue. Unlike other languages, the number0would also evaluate totrue. - Implement the
actionfunction for the new event. Theactionfunction 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_loadfunction if you would like any actions to be performed immediately upon the event being enabled. - Click
Saveto save the new event.
Editing Condition Events¶
- Select
Condition Eventsand find the event you wish to edit. - Select the event and click the
Editbutton. - Make updates to the event in the new window that appears, and then click
Save.
Viewing Condition Events¶
- Select
Condition Eventsand 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 Eventsand find the event you wish to edit. - Select the event and click the
Removebutton.
Toggling Events¶
Events can be enabled or disabled for a given character.
Using the UI¶
- Select
Condition Eventsand 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 0to disable the event namedevent_name. - Run the command
/lem cond event_name 1to enable the event namedevent_name.