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

Lingering/Non Functional API Script Macros

My campaign (A Whisper in the Wind) was using the Areas of Effect API script some time ago.  However, we've stopped using it and disabled/removed the script, yet the macros remained.  All of them could be manually deleted, except for the two macros "AreasofEffectMenu."  These two macros cannot be edited or deleted (right clicking on them has no effect, adding them to the macro bar makes them selectable, but clicking the icon has no effect).  Any way to clean these up and remove them?
1532978360
The Aaron
Pro
API Scripter
This should prompt you to remove them: on('ready', ()=>{ const playerMap = findObjs({ type: 'player' }).map((p)=>p.id); const handleUnownedMacros = (remove) => { let macros = findObjs({ type: 'macro' }) .filter((m)=>!playerMap.includes(m.get('playerid'))) ; if(macros.length){ if(remove){ macros.forEach((m)=>m.remove()); } else { sendChat('Fix Macros', `/w gm <div><h3>Remove the following macros?</h3><ul>${macros.map((m)=>`<li><b>${m.get('name')}</b></li>`).join('')}</ul><div><a href="!fix-macros --delete">Delete them!</a></div></div>`); } } }; on('chat:message',(msg)=>{ if('api' === msg.type && playerIsGM(msg.playerid) && /^!fix-macros/i.test(msg.content)){ handleUnownedMacros( /--delete\b/i.test(msg.content)); } }); }); It should whisper to the gm a list the macros that are not owned by any players in the Game, a give you a button at the bottom that will cause them to be removed.  Let me know if that doesn't work for you, I didn't get the opportunity to test it...
Hmmm, it isn't whispering me anything.    As for the API output itself, it hangs at "starting webworker script..." and doesn't change its status.  For reference, the only other active script I have is 5th Edition OGL by Roll20 Companion. 
1533085681
The Aaron
Pro
API Scripter
Hmm.  If you want to PM me a join link and GM me, I can come see about fixing it. 
Oh!  That might work.  I'll PM you the link now.