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

Curiosity about an API

Is there an API that will work with the turn order so that when it's someone's turn it will automatically run a particular Macro? (I have a series of macros that are player specific for each of my guys, and in the game I'm running the very first thing to do is to roll what's called a Monthly Event, I'm hoping to automate that process.)
1535740833
The Aaron
Pro
API Scripter
There is!&nbsp; I wrote one for this just a few months ago, it's call OnMyTurn.&nbsp; Details:&nbsp;<a href="https://app.roll20.net/forum/post/6608405/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/6608405/slug%7D</a>
1535742093
Victor B.
Pro
Sheet Author
API Scripter
Your a machine The Aaron.&nbsp; I need an API to automatically run all characters through all my modules rolling out all encounters, tracking all XP, assigning magic items including random encounters.&nbsp; If you could include role playing that would be a bonus.&nbsp; You think you can have that done by tomorrow?&nbsp;&nbsp;
1535742472

Edited 1535742518
The Aaron
Pro
API Scripter
HAHAHAHA.&nbsp; I did used to work in the Video Game Industry, so I don't know about tomorrow, but I bet I could do it... =D Incidentally, what you said is about what it's like working in the Video Game Industry... I averaged 73 hours a week of work, and had a peak week where I worked 125 hours and slept in the office...
1535750728
vÍnce
Pro
Sheet Author
The Aaron said: HAHAHAHA.&nbsp; I did used to work in the Video Game Industry, so I don't know about tomorrow, but I bet I could do it... =D Incidentally, what you said is about what it's like working in the Video Game Industry... I averaged 73 hours a week of work, and had a peak week where I worked 125 hours and slept in the office... I have my suspicions about Aaron...
1535759190
The Aaron
Pro
API Scripter
You may be on to something...
thanks The Aaron! umm I am getting this error though, I did go ahead and disabled all of my other API's (except power cards, since the ability calls on it), to be sure but I still receive the below error. also included is the ability it should be calling: !power --name|Monthly Event&nbsp; --rightsub|Stonebrook --Province:|[[ 1t[Stonebrook] ]] --Event:| [[ 1t[Domain-Event] ]]&nbsp; SyntaxError: Expected "[" or [ |\t] but "1" found. undefined
1535832660
The Aaron
Pro
API Scripter
What do your StoneBrook and Domain-Event tables have in them?&nbsp; This is almost certainly this bug: <a href="https://app.roll20.net/forum/post/2217884/api-regressions-for-inline-dice-expression-in-the-sendchat-api-function" rel="nofollow">https://app.roll20.net/forum/post/2217884/api-regressions-for-inline-dice-expression-in-the-sendchat-api-function</a> Probably you have things like: [[1d6]] flying toads which would probably work if you changed it to: [[ 1d6]] flying toads
1535833530
GiGs
Pro
Sheet Author
API Scripter
Is that bug still live? they said they were working on a fix 2 years ago!
Ahh I will have to check that, I do have a couple of entries in the domain event table that have inline rolls. Now it all worked previously with the power cards, though. As soon as I get home today I'll have a look and see. Thanks for the assistance!
1535835269
The Aaron
Pro
API Scripter
Previously, it went through the chat system, not the API's sendChat() function.&nbsp; Annoyingly, they use different syntax parsers and the API one has a bug. =/
hmm ok I went through the table and adjusted all of the inline rolls, but it is still returning the error.
1535843474

Edited 1535843545
ok with some experimenting done, it's not crashing the API anymore, but it's also not rolling the tables. it just shows the command to roll the tables. I should note that what I tried was this: it does appear to be an issue with this command: !power --name|Monthly Event&nbsp; --rightsub|Stonebrook --Province:|[ 1t[Stonebrook]] --Event:| [ 1t[Domain-Event]]&nbsp;
1535846424
The Aaron
Pro
API Scripter
You don't have an Inline Roll in that.&nbsp; If you want to PM me an invite and GM me, I might be able to help figure it out...
sure I'd be happy to!
1535898886

Edited 1535898916
The Aaron
Pro
API Scripter
Ok, I've fixed it! I was getting slightly confused about the order of things and what the error was.&nbsp; It wasn't issues in the Rollable Table, it was in the command.&nbsp; I've changed it to fix the error, and added exception logging to catch any future errors.&nbsp; Here's what that looks like: "OnMyTurn: ERROR PARSING: !power --name|Monthly Event --rightsub|Stonebrook --Province:|[[1t[Stonebrook]]] --Event:|[[ 1t[Domain-Event]]] " "OnMyTurn: ERROR: SyntaxError: Expected \"[\" or [ |\\t] but \"1\" found." You shouldn't see this error again, but if something else crops up, this should give us a good start on what it is.
Awesome, Thanks so much for your assistance!
1535900333
The Aaron
Pro
API Scripter
No problem! =D