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

[Question] API to create, edit, delete Handouts for player

Our group of 5e players is doing a good job of recording information, but at times its not possible to get a DM to create handouts. Is it possible to use APIs to allow non-GM accounts the option to create Handouts, and perhaps even using settings on who is able to edit that handout, view it etc. Further is it possible to delete a handout as a Player?
1489122284
The Aaron
Pro
API Scripter
This one will create them: on('ready',function(){ &nbsp; "use strict"; &nbsp; on('chat:message',function(msg){ &nbsp; &nbsp; var player,handout; &nbsp; &nbsp; if('api' === msg.type && msg.content.match(/^!handout/) ){ &nbsp; &nbsp; &nbsp; &nbsp; player=getObj('player',msg.playerid); &nbsp; &nbsp; &nbsp; &nbsp; if(player){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handout=createObj('handout',{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name: 'Handout for '+player.get('displayname'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; controlledby: (playerIsGM(msg.playerid) ? '' : msg.playerid) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendChat('','/w "'+player.get('displayname')+'" Created a handout for you: &lt;a href="<a href="http://journal.roll20.net/handout/'+handout.id+" rel="nofollow">http://journal.roll20.net/handout/'+handout.id+</a>'" style="color:blue;text-decoration:underline;"&gt;Handout for '+player.get('displayname')+'&lt;/a&gt;'); &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; } &nbsp; }); }); Just run: !handout
Thanks Aaron xD