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

[Help] Customisable Roll Listener examples

I'm interested in possibly using the Customisable Roll Listener script in my game but for the life of me can not get it to function. Either the script runs every time there's something posted in chat or it never fires. Could someone give me examples on how to to use each arguments?
1501273027
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Marque, I'm happy to help. There are some bugs in the script that I have not had time to track down, but what are you trying to do? That will make it easier to give you example syntax. Also, did you look at the  script's forum thread ? -Scott
1501283655

Edited 1501283792
As of right now, I'm just trying to figure out how to make a command run when a crit is rolled (Trying to start simple before I try anything fancy). I can get the command to run when I'm looking for specific text, but when I'm looking for a specific roll the command runs regardless of what the roll is. I've tried roll=critical, roll=Critical, roll=20, and still every time something is posted, the script runs even if there wasn't even a roll to begin with.
1501356642

Edited 1501356727
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, ok, I see. You have to define some text for the script to match,otherwise it simply has a 0 length string to match to(which matches everything. Try this: !crl \\create,name=Listener1,text=##,roll=critical \\Congratulations, you scored a critical the ## denotes an inline roll, and in this case there is no context for it so any critical roll will result in the message being sent.
Well, I did as you said and I'm still not getting results. Defining text stops it from firing every time... but now it's not firing at all, even on a critical. I even copied the exact line you provided as an example, and I'm still getting nothing. I tried it both just rolling manually in chat, and with a character ability. There's nothing in the log about rolling in chat, but after using the ability I receive an error. Here is the log of my last test {"condition":{"txt":["\\$\\[\\[\\d\\]\\]"],"templates":"","roll":""},"act":""} " > CRL ERROR ||| Ability: Listener1 was not parseable. You may want to remove/update this ability via the config menu." Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... "-=> Customizable Roll Listener v1.0 <=- [Thu Nov 17 2016 20:27:54 GMT+0000 (UTC)]" " > Help Character Verified<" {"name":"Listener1","description":"{\"txt\":[\"\\\\$\\\\[\\\\[\\\\d\\\\]\\\\]\"],\"roll\":[\"critical\"],\"templates\":\"\"}","action":"Congratulations, you scored a critical","istokenaction":false,"_id":"-KqHG597kgOSZNeO5Cj-","_characterid":"-Kq65ByFenaMDJqrYoOH","_type":"ability"} {"details":{"name":"Listener1","text":"##"},"commands":[],"action":"edit"} {"condition":{"txt":["\\$\\[\\[\\d\\]\\]"],"templates":"","roll":""},"act":""} " > CRL ERROR ||| Ability: Listener1 was not parseable. You may want to remove/update this ability via the config menu." Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... "-=> Customizable Roll Listener v1.0 <=- [Thu Nov 17 2016 20:27:54 GMT+0000 (UTC)]" " > Help Character Verified<" " > CRL ERROR ||| Ability: Listener1 was not parseable. You may want to remove/update this ability via the config menu."
1501424997
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, ok, I'll take a look and see what's going on
Hi Scott, thanks for making the API. I'm testing to see if I can use it to respond to specific roll values. For instance if this roll: [[({3d20}kl1 + @{selected|CHR})]] produces a 13 or greater I want to execute a macro. I can't get the listener to respond to even specific roll values though. This is the syntax I used to test: !crl \\create,name=Listener2,text=13, \\Test
1506096696
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi DWZ, The problem is in your syntax. Your command tells it to look for text (as in regular typed text of 13). Currently the script doesn't have handling to look for specific roll results, only crits, fumbles, successes, and failures. We could adjust your command to work (potentially) though. Let me refresh my memory on the script today/this weekend and get back to you.
Thanks for your help, Scott.