Difference between revisions of "SetEventScript"
m (New working PC events)
m (clarified the oObject description)
|Line 11:||Line 11:|
: The object to
: The object to the event script .
Latest revision as of 05:11, 15 August 2019Sets the given event script for the given object and handler.
- The object to set the event script on.
- An EVENT_SCRIPT_* constant matching the event to set the script on.
- The script to attach to the event.
Sets the given event script for the given object and handler.
Returns 1 on success, 0 on failure.
Will fail if oObject is invalid or does not have the requested handler.
While this can set creature events for the PC, the only events that actually work on PCs are OnConversation, OnDeath, OnHeartbeat, and OnUserDefined. In development build 1.74.8171, OnCombatRoundEnd, OnPerception, and OnSpellCastAt now work for PCs as well.
|constants:||EVENT_SCRIPT_* Constant Group|