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

Having issues with an API/Macro grabbing the picture instead of the token - WildShape Druid

Hey everyone, I have been doing a lot of research and trying to come up with a way for my API/Macro to pull a token associated with a given character sheet instead of pulling the picture that is saved to it. I am doing this using the Wild Shape API, but I wasn't sure what the command is to make that happen. Any help would be greatly appreciated. on("chat:message", function (msg) { // Make sure to copy your druid character's name exactly in CharacterGet parameter. if (msg.type === "api" && msg.content === "!DSAxeBeak") { CharacterGet('Ashana Axe Beak', msg, 'Large', 0); } if (msg.type === "api" && msg.content === "!DSBaseChar") { CharacterGet('Ashana', msg, 'Normal', 0); } if (msg.type === "api" && msg.content === "!DSCat") { CharacterGet('Ashana Cat', msg, 'Tiny', 0); } }); Bold is the command to return the character to normal, but I would like it to be the token instead.
1587491362
The Aaron
Roll20 Production Team
API Scripter
CharacterGet() must be defined in the WildShape API, and is using the Avatar from the Character.  It probably predates the addition of API access to the Default Token.  It needs to be updated to parse the Default Token object assigned to the character.
The Aaron said: CharacterGet() must be defined in the WildShape API, and is using the Avatar from the Character.  It probably predates the addition of API access to the Default Token.  It needs to be updated to parse the Default Token object assigned to the character. Awesome Aaron! Any help on that front as I am extremely new in the API script front.
1587506274
The Aaron
Roll20 Production Team
API Scripter
Can you link to the script you're using?
Of Course! Here is the script I am using:&nbsp; <a href="https://gist.github.com/Bastlifa/0fb83ccd7d1039851b72e472b2178ec3" rel="nofollow">https://gist.github.com/Bastlifa/0fb83ccd7d1039851b72e472b2178ec3</a> Thanks for the help.