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 .
×
D&D 2024 has arrived! Pre-order the new core rulebooks now and get an exclusive pre-order bonus for free!
Create a free account

Teleport Script Tweaked

1488095329

Edited 1562882850
Finds
API Scripter
I don't take credit for the original script it was gotten from here . But I decided to use it in one of my campaigns and made a few tweaks along the way so I &nbsp;thought I'd share; still learning Java as I go... [07-10-2019] Update - I happen to notice some people were still using this script, I updated it to the version I'm currently using which should fix a few problems and add a few new things like pinging and moving the map for only the token owner when going through a teleporter now. Version 4: <a href="https://gist.github.com/lazy468/1ce8dee64c97b69dd22e0a06bdf29154" rel="nofollow">https://gist.github.com/lazy468/1ce8dee64c97b69dd22e0a06bdf29154</a> Version 4 Updates Fixed a crash related to the CreateMacro_TP function. I didn't realize this was happening until I installed the script from scratch on a new game. Updated the use of sendPing in the script, now it checks for token ownership and only moves &amp; pings the map for the token owner. If no owner is found it pings for the GM. (Having your map ping all over the place was getting annoying) Teleport-All got a tweak to ignore tokens that are NPCs. This is determined if they have no owner or are flagged with the NPC checkbox on the sheet. This works pretty well but I advise testing it before you pull it out in a session. I changed disabling the teleporter from using a Red X over the entire token to the Interdiction icon (circle with a slash) It was distracting Version 3 Updates Added the ability to toggle off teleporting, ping, fx, &amp; emotes on individual teleport tokens by adding status markers to the teleport token. Info updated for this in the help menu under "How To" Yellow Status - Disables Ping Pink Status - Disables Emotes Purple Status - Disables FX Red X - Disables the teleporter (easier way to make a 1 way teleporter) Added auto generated teleport macros for the current player page; allows you to target a token and pick the destination from a dropdown. This macro will actually update when you change the players location to display all the current objects on the gm layer in the dropdown for the new page. #teleport (lets you target a token and choose a destination) &nbsp;&amp; #teleport-all (lets you choose a destination to move all tokens) You can now use teleporters and teleport commands on all pages not just the map where the players are. (you should avoid having teleport tokens with the same name on separate pages). One interesting thing you can do now is use the #teleport-all macro to move all players to a location on their map even while your viewing another map. Initial Updates FX upon teleportation Emote upon teleportation Ping (center map on token) on teleport (note: this seems to only work for the GM at the moment,&nbsp; seems to be a known issue with the API?)&nbsp; All above effects can be toggled via command or buttons on the help menu !tp help Macros are auto generated to easily allow you to change the emotes or fx type #tp-emote &amp; #tp-fx Settings are stored via token for persistence. Minor change to prevent teleport pad tokens from teleporting to each other if they were named something other than "teleport"
Sounds great! I have a dungeon based on the original coming up! I will try to install yours and have a look.
Epic stuff :)
1488192231

Edited 1488192582
Ziechael
Forum Champion
Sheet Author
API Scripter
Nice update to a great script, I notice that you have Aaron's 'random' teleport addition in there too... great stuff :) I often use this script for stairs between levels etc so it would be handy to have a way to turn off the fx/emote on some 'teleporters' but not others? Not that I'm needy and demanding or anything...
I have an issue with this script in one of my campaigns, and only in that one. In the other 2 campaigns the teleportation works exactly the same and I've done exactly the same stuff to the third one, however, for some reason, it will not work. Can anyone shed some light on this? There seems to be no error messages in the API log either. Its all very weird.
1488206885
The Aaron
Pro
API Scripter
Do you have the player ribbon on the page where you're using it?
Nope, thats where it went wrong, haha. I discovered it right before opening this post, but thanks :)
1488210003
The Aaron
Pro
API Scripter
No worries. &nbsp;That always bites me. &nbsp;Honestly, I should just fix that.. (or Finds can!)
1488258925

Edited 1488259123
Finds
API Scripter
Version 3: <a href="https://gist.github.com/lazy468/93744539abf8f1895e" rel="nofollow">https://gist.github.com/lazy468/93744539abf8f1895e</a>... (updated the above as well) Version 3 Updates Added the ability to toggle off teleporting, ping, fx, & emotes on individual teleport tokens by adding status markers to the teleport token. Info updated for this in the help menu under "How To" Yellow Status - Disables Ping Pink Status - Disables Emotes Purple Status - Disables FX Red X - Disables the teleporter (easier way to make a 1 way teleporter) Added auto generated teleport macros for the current player page; allows you to target a token and pick the destination from a dropdown. This macro will actually update when you change the players location to display all the current objects on the gm layer in the dropdown for the new page. #teleport (lets you target a token and choose a destination) & #teleport-all (lets you choose a destination to move all tokens) You can now use teleporters and teleport commands on all pages not just the map where the players are. (you should avoid having teleport tokens with the same name on separate pages). One interesting thing you can do now is use the #teleport-all macro to move all players to a location on their map even while your viewing another map.
1488277379
Ziechael
Forum Champion
Sheet Author
API Scripter
Can't wait till my players are out of this boring single level crawl so I can try this out! I'm sensing another wizards tower in their near future... ;)