Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Critical hit script Message only to GM

I was wonderong if there is a way to make the critical hit script made by Brian, whisper the GM? This is also a question on how scripts work a bit as well, since '!r /w GM' or '/w GM !r' do not work, I was wondering if there was an alternative or if I have to modify the script? And if I do need to modify it, what do I need to add and how? thanks!
1418413632
The Aaron
Roll20 Production Team
API Scripter
Can you link the script? I'm not sure which one you're talking about. You would need to modify the script, but it shoudl be pretty straight forward. API commands begin with a ! in the first position. This causes the system to flag them as the type 'api', allowing the API script to easily filter them out of other messages. That is the sum total of what the system does automatically for filtering messages. Everything else for API messages is interpreted by the script. !r /w GM could work, but only if the script author setup their script to look for those characters and interpret them to mean whisper to the listed person, the GM.
<a href="https://app.roll20.net/forum/post/373442/script-critical-hits/#post-374867" rel="nofollow">https://app.roll20.net/forum/post/373442/script-critical-hits/#post-374867</a>
1418421249

Edited 1418421286
Lithl
Pro
Sheet Author
API Scripter
The message from the script is being sent at line #120 in the original script, with the sendChat function. Changing '/direct ' to '/w gm ' might be all you need to do, but the script is also rebuilding inline rolls, and I'm not certain the HTML is going to be stable for a whisper. (For such a simple change, however, it wouldn't be hard to try it.) Also, a caution: My critical hit script uses a primitive and fairly naive version of the buildInline function. For the basics of a D&D roll it ought to work okay (d20+modifier), but it may get jammed up with more complicated rolls, particularly ones which use grouping. The most up-to-date version of the function I'm aware of is employed by Honey Badger's Power Cards script. Unfortunately, the amount of modifications that have been made with respect to HB's script over the initial version used in mine means you can't simply copy the one into the other.
That seems to have worked! Thanks for the help! It doesn't seem to work when I try to make it more streamlined by directing at anything but! that's okay, only takes a second to change it to a the value I want!