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

API to copy a page

Hello. I used to have an API which allowed for me to copy a page with all attributes in it. I no longer can find it. Can anyone help me? I created a page with a bunch of stuff on it, and I need to copy it in the same game to have 4 identical copies... Thank you so much!
1554642926
The Aaron
Roll20 Production Team
API Scripter
Is this what you’re looking for?&nbsp; <a href="https://app.roll20.net/forum/post/4785895/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/4785895/slug%7D</a>
1554651804
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If for some reason, that doesn't work, you could transmogrify it into a library game, change the name in your current game and transmogrify it back in, change that copy's name, and so forth until you have 4 copies.
Thanks, Aaron! That is exactly what I was looking for!
For some unknown reason it doesn't work for me even if I added the script... :( Did I just have to copy this info into the API Script field? // The exposed function is TruePageCopy.CopyPages(@sourcePageId, @destinationPageId) // The party is moving from an area to a similar looking area TruePageCopy.CopyPages(templateArea.id, targetLocation.id); exampleMovePlayersToNewArea(playersArray, targetLocation.id);
Oh, I am actually getting this error: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again.&nbsp; More info... For reference, the error message generated was:&nbsp; ReferenceError: TruePageCopy is not defined What am I doing wrong? :(
1554719077
GiGs
Pro
Sheet Author
API Scripter
Have you installed the full script from the linked page? The link goes to here:&nbsp; <a href="https://github.com/bpunya/roll20-api/blob/master/TruePageCopy/1.0/TruePageCopy.js" rel="nofollow">https://github.com/bpunya/roll20-api/blob/master/TruePageCopy/1.0/TruePageCopy.js</a>
1554724851
The Aaron
Roll20 Production Team
API Scripter
This script should be in the 1-click installer, so you should be able to just select it and add it to the game from there.
This is working now. Thank you!