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

Customizable Roll Listener not working with Token Mod

I am trying to use customizable roll listener to listen for text and then when it reads that text have it run a token mod  command  to set the side of a multi-sided  token  to  a specific  side.  Here is the CRL  code I  currently have. !crl \\create,name=ClearSkies,text=Clear Skies \\!token-mod --set  currentside|1 --ids -NJuwGURS6DPhyLgr2NG The token mod command is working fine on its own and when I go to the CRL character page and roll the ability from the page it also runs  the token  mod  command.  I am very new at  using api and any assistance  would be much appreciated.  
1671736432
The Aaron
Roll20 Production Team
API Scripter
I believe you need to pass --api-as to TokenMod with a player id. 
1671736816

Edited 1671736987
The Aaron
Roll20 Production Team
API Scripter
You can get your Player ID in that game with this script: Player ID is unique to the game you are in. Command: !who-am-i Code: on('ready',()=>{ on('chat:message',msg=>{ if('api'===msg.type && /^!who-am-i(\b\s|$)/i.test(msg.content) ){ let who = (getObj('player',msg.playerid)||{get:()=>'API'}).get('_displayname'); sendChat('',`/w "${who}" <div>Player <code>${who}</code> with Player ID: <code>${msg.playerid}</code></div>`); } }); });
1671737038
The Aaron
Roll20 Production Team
API Scripter
Customizable Roll Listener may also have a way to just supply the player id based on the roll, I'm not sure.
That Solved my issue! Thank you so much !crl \\create,name=Thunderstorm, text=Thunderstorm \\!token-mod --api-as -LJfBoMNXt0GgPv9uXAj --set currentside|1 --ids -NJuwGURS6DPhyLgr2NG
1671752182
The Aaron
Roll20 Production Team
API Scripter
Sweet. =D. I really need to build a better cross script permission system, but who has the time... Glad you got it working!