This script started out as a feature of Roll20AM, but I found it was easier to get the functionality as a standalone script. The script does what it says; you can define custom roll listeners to send additional chat messages based on the what was just sent (including the results of inline rolls). Listeners can trigger anything from an additional simple chat message (e.g. Congratulations! You scored a critical) to multiple API commands. Essentially, if you can do it in an ability, it can be a triggered output of a listener with the notable exception that roll queries, and attribute and ability calls using the selected and target keywords will not work.
Please note that the separation of individual arguments differs from the standard ' --' that you see in Aaron's scripts (and many others), instead using ' \\'. This is to ensure, as much as I can, that the script doesn't improperly separate multi argument API commands.
!!!!WARNING!!!! If you attempt to send an API command to a script that utilizes the playerid of the messaging player, that script may crash the API depending on how it's handling of playerid's was coded. Test all listeners before using them in a live game.
Now available from my fork of the repository and hopefully coming to one-click on the next merge day.
The CRL listens for user defined patterns in chat consisting of what roll template was sent (if any), what the text was (including inline rolls), and what the results of those rolls were (critical,fumble,success,failure). The script expects only a single inline roll in any provided text. Each roll listener is stored as an ability on the attributes & abilities tab of this character.Basic Syntax
Please note that the separation of individual arguments differs from the standard ' --' that you see in Aaron's scripts (and many others), instead using ' \\'. This is to ensure, as much as I can, that the script doesn't improperly separate multi argument API commands.
!!!!WARNING!!!! If you attempt to send an API command to a script that utilizes the playerid of the messaging player, that script may crash the API depending on how it's handling of playerid's was coded. Test all listeners before using them in a live game.
Now available from my fork of the repository and hopefully coming to one-click on the next merge day.
The CRL listens for user defined patterns in chat consisting of what roll template was sent (if any), what the text was (including inline rolls), and what the results of those rolls were (critical,fumble,success,failure). The script expects only a single inline roll in any provided text. Each roll listener is stored as an ability on the attributes & abilities tab of this character.Basic Syntax
All CRL commands use the same basic syntax. The contents of a command will change based on what you are doing, but the basic format will always look like this:
Action Keywords
Commands are shown with all possible settings. If a setting is optional, it will be enclosed in brackets. If only one of a series of settings will be accepted, they are separated by a slash "/". The order of options does not matter as long as the action keyword begins the first action group and the command(s) to execute are the following groups. And because I'm a horrible person I almost forgot to thank the people who helped make this script what it is:
Aaron and Stephen S. For code review and helping me implement some of the more complicated parts.
and DulfiJavadMalik at plainicon.com for all of the button icons for the chat menus.
Commands are shown with all possible settings. If a setting is optional, it will be enclosed in brackets. If only one of a series of settings will be accepted, they are separated by a slash "/". The order of options does not matter as long as the action keyword begins the first action group and the command(s) to execute are the following groups. And because I'm a horrible person I almost forgot to thank the people who helped make this script what it is:
Aaron and Stephen S. For code review and helping me implement some of the more complicated parts.
and DulfiJavadMalik at plainicon.com for all of the button icons for the chat menus.