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

NumberNPCs

Is there a "help" option for !number-npcs? I've seen the --currentpage option and wondering if there are any other options.
1633477056
The Aaron
Roll20 Production Team
API Scripter
Hmm. Is that one of mine? I'm away from my computer right now but if you link to the script I can probably help you with that. 
1633477192
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This seems to be the only option. Link to script page.
1633479771
The Aaron
Roll20 Production Team
API Scripter
Ah.  No other options on that script, and no help.  What else do you want to do with it?
Being able to select specific creatures and numbering them. In Phandelver and there are a lot of tree blights but I don't want to number them until I need them.
1633488769
The Aaron
Roll20 Production Team
API Scripter
Here's a different script.  Select the tokens you want to number and issue: !number This version will just append a number to the existing names.  If you want to number based on the character name, let me know and I can expand it. Code: on('ready', ()=>{ on('chat:message', msg=>{ if('api' === msg.type && playerIsGM(msg.playerid) && /^!number(\b\s|$)/i.test(msg.content)){ let who = (getObj('player',msg.playerid)||{get:()=>'API'}).get('_displayname'); let n = 0; (msg.selected || []) .map(o=>getObj('graphic',o._id)) .filter(g=>undefined !== g) .forEach(g=>g.set({ name: `${g.get('name')} ${++n}` })); sendChat('Numbered',`/w "${who}" Renumbered ${n} tokens.`); } }); });