EventChatMessage
string EventChatMessage (bool strict);
Message content available on TriggerAddEventChatMessage callback
Since it's not possible to change the trigger prototype, additional arguments are accessed through function calls. When you are inside a trigger that has been bound thanks to TriggerAddEventChatMessage, you can call this function to get the full message.
Parameters
- bool strict
- true: return the substring that was matched.
- false: return the entire string including matched substring.
Return value
string - The message that has been typed by the user
Examples
- Example: Repeat Trigger
// Define the trigger function bool TriggerRepeat (bool checkConds, bool doActions) { // Repeat what you said DebugString(EventChatMessage(false)); return true; } // Create a new trigger based off the function trigger t = TriggerCreate("TriggerRepeat"); // Bind it to the Chat Message event TriggerAddEventChatMessage(t, 1, "waves", false);
See also
- 1 comment
- 1 comment
- Reply
- #1
vjeux Mar 04, 2010 at 17:21 UTC - 0 likesI wonder what is being returned when called outside a trigger callback.