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 move tokens on a map

I am looking for an API that can move a token from a location on the map to another.  I have found a couple of old scripts that don't seem to work anymore (Auto Teleporting or Token Slider).  Does anyone have a new script that works?
1476383384
The Aaron
Pro
API Scripter
Last I used Auto Teleport, it worked. &nbsp;I have a slightly modified version of it.&nbsp; If you want a way to manually move tokens, you can use TokenMod for that: !token-mod --set top|[[(1d8)*(70)-35]] left|[[(1d8)*(70)-35]] (moves the selected token to a random square in the first 8x8 of a map) Here is my modified version of Auto Teleport, in case the old one isn't working:&nbsp; <a href="https://gist.github.com/shdwjk/387e647d627ce71a5fc" rel="nofollow">https://gist.github.com/shdwjk/387e647d627ce71a5fc</a>...
1476385174

Edited 1476392101
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I could modify&nbsp; PageNavigator for this (currently it doesn't delete tokens once it creates the new token) as long as you were looking to go from a random/specific place to a specific place; it's something I've been thinking of doing anyways. Let me know if you want me to give it a whirl.
The token-mod will work if I can get it to work with the It's a trap mod. &nbsp; The problem now is It's a trap is not passing the VICTIMID. &nbsp;What is wrong with this? { "api":"!token-mod --ids VICTIMID --set top|[[35+(11*70)]] left|[[35+(16*70)]]" }
I have also tried your teleport script. &nbsp;I have a token on the gmlayer named Stairs2A and another one names Stairs2B. &nbsp;I ran !AutoTeleporting until it said it was enabled but when i move a token over either ot the stair tokens nothing happens. I do not get an error either. &nbsp;
1476395858
Ziechael
Forum Champion
Sheet Author
API Scripter
Make sure the player ribbon is on the page you are testing on... a mistake i regularly make!!
Thank you all the ribbon fixed the teleport script problem. &nbsp;