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

[Script] Flight

1379931874
Lithl
Pro
Sheet Author
API Scripter
My Sunday night D&amp;D 4e campaign is starting to get interesting; half the party has picked up dragon mounts, and the rest are likely not far behind. (Step 1: Encounter dragon. Step 2: Smack the dragon around. Step 3: Start throwing skill rolls at the dragon. Step 4: Purchase new saddle.) Now that we're playing with mounted aerial combat, we're working hard to remember how high everyone is! I tossed this script together after our most recent game so that the players can employ it the next time they're flying around. Now I share it with you! The script is fairly simple. It adds one new API command (!fly), which takes one optional argument. If the height is more than 0, all selected tokens are given the "fluffy-wing" statusmarker with the height argument as a badge on the wing. If the height is 0 or less, or is omitted, the wing marker is removed. If there are no selected tokens, the command does nothing. Note: statusmarkers don't like numbers larger than 9 displayed as badges. If height is higher than 9, the wing will be displayed, but, there will be no badge. <a href="https://gist.github.com/Lithl/6668700" rel="nofollow">https://gist.github.com/Lithl/6668700</a>
1379933528
Lithl
Pro
Sheet Author
API Scripter
After posting, I realized an alternate option might be preferred, although I don't know if it's using intentional features of the API with regard to statusmarkers, so I can't guarantee that it will always work. With direct access to the statusmarker list, you can add the same marker multiple times. See: Digits that are 0 won't have numbered badges, but this version of the script supports any number of digits, and it doesn't get messed up by other markers being placed on the token. Leading zeroes are ignored. Negative values remove all wing markers. Again, I'm not certain whether the ability to use multiple copies of a marker are intended, so a future change may break this "2.0" version of the script. I'm leaving both versions up as separate scripts, so that you can choose which one you prefer. <a href="https://gist.github.com/Lithl/6668914" rel="nofollow">https://gist.github.com/Lithl/6668914</a>