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

Macro to call both custom api and ACT?

October 05 (4 years ago)

Edited October 05 (4 years ago)

I am working on a model to provide my players the ability to call a form, based largely on Nick O.'s Spiritual Weapon API.  The macro I am using to call the API is:

?{Spell:|
Darkness,!spellEffect darkness |
Faerie Fire,!spellEffect faeriefire |
Fireball,!spellEffect fireball |
Spiritual Weapon, !spellEffect spiritualWeapon |
Ring of Fire,!spellEffect ringoffire |
Wall of Fire,!spellEffect walloffire |
Web,!spellEffect web
}


Is there a way to also add in the ACT on some of those?  Specifically the Faerie Fire, Ring / Wall of Fire and Spiritual Weapon?  I have been hammering away at it for a couple hours, and before tossing in the towel, thought I would ask here.

Turns out yes, and it is easy.  Leaving it here for those who might also have the same question.  If there is an easier / more elegant way to do it, please don't hesitate to chime in.

?{Spell:|
Darkness,!spellEffect darkness |
Faerie Fire,!spellEffect faeriefire
!act -1 10 --Faerie Fire (C)|
Fireball,!spellEffect fireball |
Spiritual Weapon, !spellEffect spiritualWeapon
!act -1 10 --Spiritual Weapon (C)|
Ring of Fire,!spellEffect ringoffire
!act -1 10 --Ring of Fire (C) |
Wall of Fire,!spellEffect walloffire
!act -1 10 --Wall of Fire (C)|
Web,!spellEffect web
}



October 05 (4 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator

Is there a way to also add in the ACT on some of those?

What is "ACT" referring to in this context? Is it something Roll20-specific, like an abbreviation of an popular API?

October 05 (4 years ago)

Edited October 05 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

AddCustomTurn.  It's an API script that creates custom turn entries.  Details here: https://app.roll20.net/forum/permalink/3346527/


The Aaron said:

AddCustomTurn.  It's an API script that creates custom turn entries.  Details here: https://app.roll20.net/forum/permalink/3346527/


Sorry, but I really have to correct you here The Aaron... "It's an AWESOME script, created by a fantastic coder, that creates..."

October 05 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

BWHAHAHAHAHAHA!  Thanks, I stand corrected. =D

October 05 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

You might need to remove the space from this line

Spiritual Weapon, !spellEffect spiritualWeapon

making it

Spiritual Weapon,!spellEffect spiritualWeapon


GiGs said:

You might need to remove the space from this line

Spiritual Weapon, !spellEffect spiritualWeapon

making it

Spiritual Weapon,!spellEffect spiritualWeapon


Thanks GiGs, I caught that in testing, but it’s good to have it here just in case.