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

name gen api

1656875954
Zym
Sheet Author
Is there a way to whisper the results to the gm? Script:namegen - Roll20 Wiki
1656878075

Edited 1656878447
David M.
Pro
API Scripter
Easiest way is to manually install the script and add a "/w gm " (note the trailing space) to each of the sendChat commands.  Delete the one-click version. Then, add it back in but instead of clicking the blue "Add script" button you'll click the grey "Import" button. Note that this effectively manually installs the script, so you won't get any future automatic updates. Then there are six instances where chat output is generated via sendChat. Here's the first one on line 84: sendChat('',`${BoxStyle} <b>Name is ${_.sample(names[language][boygirl])}</b></div>`); change this to  sendChat('',` /w gm ${BoxStyle} <b>Name is ${_.sample(names[language][boygirl])}</b></div>`); Repeat for the other 5 instances.
1656878200
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
David M. said: Delete or disable the one-click version.  I usually have to delete or rename the existing script to get the drop down to display the script.
1656878431

Edited 1656878504
David M.
Pro
API Scripter
Ah right, spot on Keith! I'll edit my reply above. I'd recommend OP deleting then since there could be a race condition or other funky behavior with two scripts responding to the same commands.
1656879718
Zym
Sheet Author
Thank you David I will give it a try.