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

[PowerCards] [Help] Need some help from the amazing scriptomancers please, In over my head

1463015447

Edited 1463018867
I am trying to make the below macro work, Its using Powercards3 !power --tokenid|@{selected|token_id} --emote|The clean light of your weapon pierces your enemies and fills you with resolve. {{ --format|atwill --name|Virtuous Strike --leftsub|At-Will --rightsub|Standard Action^^Divine, Radiant, Weapon --Attack|[[ [$Atk] 1d20 + @{charisma-mod} [Charisma Mod]  + ?{Other Bonuses to Hit|0}]] + ?{Which weapon are you using?|Mace, @{weapon-1-total-attack}|Sword, @{weapon-2-total-attack}]] vs  @{target|token_name} AC --?? $Atk.base == 1 ?? !CritFail:|Critical Failure --?? $Atk.total < [[@{target|AC}]] ?? !Miss:|You missed. --?? $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Hit:|[[ [NH] d@{weapon-1-dice} + @{weapon-1-total-damage} + @{charisma-mod} + ?{Add Bonus Damage|0}]] radiant damage. You gain a +2 bonus to saving throws until the start of your next turn. --?? $Atk.base == 20 ?? Critical Hit:|[[1*@{weapon-1-dice} + @{weapon-1-total-damage} + @{charisma-mod} + ?{Add Bonus Damage|0}]] radiant damage. You gain a +2 bonus to saving throws until the start of your next turn. }} The above macro works just fine if I take out the ?{Which weapon are you using?...... part. But I was trying to see if there was a way to have to player choose their weapon before the macro does its magic. Currently the macro crashed with this error SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "i" found. undefined Weapon-1-total-attack and weapon-1-total-damage are as follows @{weapon-1-attack-class}+@{weapon-1-attack-misc}+@{weapon-1-attack-feat}+@{weapon-1-prof}+@{weapon-1-enh}+floor(@{level}/2) @{weapon-1-damage-class}+@{weapon-1-damage-misc}+@{weapon-1-damage-feat} + @{weapon-1-enh} Weapon-2-total-attack and weapon-2-total-damage are the same just with 2 instead of 1. [fixed] When the drop box appears it also has more options then just Mace and Sword. For some reason it goes to list critical failure, miss and hit. I am unsure why. I have no problem voice chatting with someone or even inviting to the campaign to figure it out. Thanks in advanced for any help given. Your Friendly Neighborhood Dungeon Master, Ryeaa
1463018362

Edited 1463018368
Looks like your Roll Query is missing a closing curly brace right after @{weapon-2-total-attack}
1463018612

Edited 1463018697
Silvyre said: Looks like your Roll Query is missing a closing curly brace right after @{weapon-2-total-attack} Ah. I was missing a second } after it. But it still crashed with the same error :-(
Do you still get the same error if you remove --tokenid|@{selected|token_id}?
Silvyre said: Do you still get the same error if you remove --tokenid|@{selected|token_id}? Just tried it. Yes, same error SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "i" found. undefined
I think its the ]] after ?{Other Bonuses to Hit|0}]] that is causing the problem.....
Oh yeah, that's an issue. If you remove that, does it work?
Yes, I get a chat output. Thanks. Minor oversight, huge problem. Now I have a new can of worms. The damage calculation need a drop menu too. What did I get myself into!
Haha, I'm glad you fixed it! Good luck!
1463020858

Edited 1463020916
I got it! I got it!! Looks like this! !power --tokenid|@{selected|token_id} --emote|The clean light of your weapon pierces your enemies and fills you with resolve. {{ --format|atwill --name|Virtuous Strike --leftsub|At-Will --rightsub|Standard Action^^Divine, Radiant, Weapon --Attack|[[ [$Atk] 1d20 + @{charisma-mod} [Charisma Mod]  + ?{Other Bonuses to Hit|0} + ?{Which weapon are you using?|Mace, @{weapon-1-total-attack}|Sword, @{weapon-2-total-attack}}]] vs  @{target|token_name} AC --?? $Atk.base == 1 ?? !CritFail:|Critical Failure --?? $Atk.total < [[@{target|AC}]] ?? !Miss:|You missed. --?? $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Hit:|[[ [NH] ?{Which weapon dice?|Mace, d@{weapon-1-dice}|Sword, d@{weapon-2-dice}} + @{charisma-mod} + ?{Which weapon is damaging?|Mace, @{weapon-1-total-damage}|Sword, @{weapon-2-total-damage}} + ?{Add Bonus Damage|0}]] damage. --?? $Atk.base == 20 ?? Critical Hit:|[[ ?{Which weapon dice?|Mace, 1*@{weapon-1-dice}|Sword, 1*@{weapon-2-dice}} + @{charisma-mod} + ?{Which weapon is damaging?|Mace, @{weapon-1-total-damage}|Sword, @{weapon-2-total-damage}} + ?{Add Bonus Damage|0}]] damage. }} Thank you Silvyre(AkA Jace.....) for helping me see the mistake.