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

Token Action whispers

I've set up token actions for the PCs in my game so they have quick access to weapon rolls and some skill rolls.  There are some of their skill rolls that I roll (check for traps, detect noise & spot hidden) so if the roll fails, I give an ambiguous response.  Is there a way to set up a token action as a whisper so only I see the result?  
You could use the script, "Blind Roll" in your macros to just message the rolls to you. // !broll 1d20+3 --Some text that shows up with the roll on("chat:message", function(msg) { var cmdName = "!broll "; var msgTxt = msg.content; var msgWho = msg.who; var msgArgs = msgTxt.slice(cmdName.length).split(/\s+--/); if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) { sendChat(msgWho, `/w gm [[${msgArgs[0]}]]${msgArgs.length>1?` ${msgArgs[1]}`:''}`); sendChat(msgWho, `/w "${msgWho}" secret roll sent to GM ( ${msgArgs[0]} )${msgArgs.length>1?` [${msgArgs[1]}]`:''}`); }; });      
I'm not good at coding, is there an easy way to explain how to add that in?  I get the macro information by  making a roll from the character sheet then clicking on the chat box and pressing the up arrow.
No problem (no coding necessary.) Go to your game launch page, click on Settings. Second one down is API Scripts. Click on "New Script." Copy and paste the script I pasted in above into the script area. Save it, and then you should be able to go into the game and type " !broll 1d20+3 --Test Roll." And it should whisper it to you.  As to the macros for your particular game I am not so sure what you are looking for. A simple macro I just tested would be: !broll  ?{message?} You would hit the macro and it would then prompt you for whatever die or message you want to send. 
OK, that seems to work. The follow is an example of the script the game generates so I can set up a token action: &{template:skillRoll} {{name=@{Reath |character_name}}} {{skillvalue=[[(55)]]}} {{fumble=[[{(101-(round((100-(55+@{Reath |skill_mod}))/20))),100}kl1]]}}  {{crit=[[round(([[(55+@{Reath |skill_mod})]])/20)+1]]}}  {{special=[[round(([[(55+@{Reath |skill_mod})]])/5)+1]]}}    {{success=[[(55+@{Reath |skill_mod})]]}} {{roll=[[1d100]]}} {{skillname=Spot Traps}} Is there a way to put your script and this one together so when the token action button is pushed only I see the result?