Sure thing! It is a modified version of Kurt's Action Button script, so it is big, but here is the command: !script {{ --&hitPointsBar|3 --&spellmulename|Spell_Mule --&UseNamedCharacterSettings|0 --&skipPreppedSpellsCheck|0 --&skipNPCPrepCheck|1 --&trackPCSpellSlots|1 --&showPCSpellSlotList|1 --&sendGmInfo|0 --&AllNPCActionsToSender|0 --&damageApplyScript|token-mod --&whisperDamageButtonsToDM|1 --&whisperDamageButtonResultsToDM|1 --&selfHandleAdvantageMode|0 --&defaultAdvantageMode|0 --&showAdvantageModeText|0 --&requireAmmo|1 --&showGlobalModifierButtons|0 --&showPCSkillsAndSaves|0 --&showNPCSkillsAndSaves|0 --&showPCStandardActions|1 --&showNPCStandardActions|1 --&compactGlobalModDisplay|1 --&defaultButtonPadding|4px --&smallButtonPadding|2px --&bodyFontSize|12 --&smallFontSize|10 --&showCharacterSummary|1 --&EnablePerCharacterConfiguration|1 --&UseResistances|1 --&ConcentrationMarkerName| --&DetectPlayersToken|0 --&ShowRestButtons|0 --&Template|none --&DisplayButtonsForAMAbilities|0 --~|array;define;SpellsToKeepWithSuffix; --~|array;define;SpellsToKeepNoSuffix; --/|End Settings Area --?"[@SC_SelectedTokens()]" -eq "undefined array" -and [&DetectPlayersToken] -ne 1|REPORT_NEED_SELECTED_TOKEN --?"[@SC_SelectedTokens()]" -ne "undefined array" -and "X[@SC_SelectedTokens()]" -eq "X1"|BEGIN_WITH_SC_SELECTED_TOKENS --?"[@SC_SelectedTokens()]" -gt 1|REPORT_MULTIPLE_SELECTED_TOKEN --?[&DetectPlayersToken] -ne 1 -and "X[@SC_SelectedTokens()]" -ne "X1"|REPORT_NEED_SELECTED_TOKEN --?[&DetectPlayersToken] -ne 1 -and "X[@SC_SelectedTokens()]" -eq "X1"|BEGIN_WITH_SC_SELECTED_TOKENS --?[&SendingPlayerIsGM] -eq 1 -and "X[@SC_SelectedTokens()]" -ne "X1"|REPORT_NEED_SELECTED_TOKEN -->GET_CONTROLLED_TOKENS_FROM_PAGETOKENS|saveTokenID --?"X[&saveTokenID]" -eq "X"|REPORT_NO_TOKENS_ON_PAGE --?"[&saveTokenID]" -inc ","|REPORT_MULTIPLE_POSSIBLE_TOKENS --^SKIP_SELECTED_TOKENS| --:BEGIN_WITH_SC_SELECTED_TOKENS| --&saveTokenID|[@SC_SelectedTokens(0)] --:SKIP_SELECTED_TOKENS| --#reentrant|CharacterAction [&saveTokenID] --&QB|? --&QB|+{ --&QE|} --&AB|@ --&AB|+{ --&TB|& --&TB|+# --&TB|+64 --&TB|+; --&TB|+{ --&BED|& --&BED|+# --&BED|+128719; --&CLOCK|& --&CLOCK|+# --&CLOCK|+128336; --&SPACE|X X --&SPACE|[&SPACE(1,1)] --#bodyfontface|Helvetica --#oddrowfontcolor|#382f18 --#evenrowfontcolor|#382f18 --#bodyfontsize|[&bodyFontSize]px --#buttonfontsize|10px --#buttonbackground|#0417c4 --#buttonfontface|Tahoma --#titlecardbackgroundcolor|#0417c4 --#titlefontcolor|#ffffff --#titlefontsize|1.5em --#titlefontshadow|1 --#oddrowbackground|#fce19a --#evenrowbackground|#fce19a --#subtitlefontcolor|#fcdb86 --#tablebgcolor|#fcdb86 --#lineheight|10pt --#buttonpadding|[&defaultButtonPadding] --#overridetemplate|[&Template] --#whisper|self --#sourcetoken|[&saveTokenID] --lsettings|[*S:character_name] --]| --&damageRoutine|DontApplyDamage --?[&damageApplyScript] -eq "scriptcards"|&damageRoutine;ApplyDamageScriptCards --?[&damageApplyScript] -eq "token-mod"|&damageRoutine;ApplyDamageTokenmod --?[&damageApplyScript] -eq "alterbars"|&damageRoutine;ApplyDamageAlterbars --?[&damageApplyScript] -eq "damagebuttons"|&damageRoutine;SHOW_DAMAGE_BUTTONS --#emotestate|visible --#emoteFont|Helvetica --#emoteFontColor|#ffffff --#emoteFontSize|11px --#emoteFontWeight|bold --#emoteBackground|#0417c4 --#emoteText|[*S:character_name] [*S:castquote] --#title|[*S:character_name] --:AFTER_ADVMODE_CHANGE| --#leftsub|Spell Menu --?[&EnablePerCharacterConfiguration] -eq 0|SKIP_PER_CHAR_SETTINGS --#leftsub|Action Menu [rbutton]&#x2699;::DISPLAY_CHARACTER_CONFIG_MENU[/rbutton] -->LOAD_PER_CHARACTER_CONFIG_OPTIONS|[*S:character_id] --:SKIP_PER_CHAR_SETTINGS| --?[*S:npc] -eq 1 -or [&ShowRestButtons] -ne 1|SKIP_REST_BUTTONS --?"[&perCharacterOptions]" -inc "$SHRB0$"|SKIP_REST_BUTTONS --#rightsub|Rest: [rbutton][&CLOCK]::DO_SHORT_REST[/rbutton][rbutton][&BED]::DO_LONG_REST[/rbutton] --:SKIP_REST_BUTTONS| --/|Determine if the selected character is a PC or NPC and process appropriately --?[*S:npc] -eq 1|proc_npc|proc_pc --/|Handle action menu creation for PCs --:proc_pc| --/+|[hr #58180d] --+| --#whisper|self -->BuildCharacterSummary|[*S:character_id];CharSummaryText;ac --?[&showCharacterSummary] -ne 1 -or "[&perCharacterOptions]" -inc "$SCS0$" |SKIP_PC_SUMMARY --+|[c][F[&smallFontSize]][&CharSummaryText][/F][/c] --:SKIP_PC_SUMMARY| --+|[br] --+|[t border=0 width=90%] [tr][td][b] &nbsp;&nbsp; Save DC:[/b] [*S:spell_save_dc] [/td][td][r] [b]Attack Bonus:[/b] +[*S:spell_attack_bonus][/r][/td][/tr][/t][br] --+|[t border=0 width=90%] [tr][td][b]&nbsp;&nbsp;&nbsp;[*S:class_resource_name]:[/b][/td][td][r][*S:class_resource][/r][/td][/tr] --+|[br] --/+|[hr #58180d] --?[&trackPCSpellSlots] -eq 1|[ -->GET_HIGHEST_LEVEL_SPELL_SLOT|HighestSlot --&spellSlotInfo1|[t align=center width=100% border=0][tr][td][b]Level[/b][/td] --&spellSlotInfo2|[/tr][tr][td][b]Slots[/b][/td] --&anySpell|0 --%levelCounter|1;9 -->GET_AVAILABLE_SPELL_SLOTS|[&levelCounter];slotCount --/?[*S:lvl[&levelCounter]_slots_total] -gt 0|&spellSlotInfo;+L[&levelCounter]([&slotCount]) --?[*S:lvl[&levelCounter]_slots_total] -gt 0|&spellSlotInfo1;+[td align=center][b][i][&levelCounter][/i][/b][/td] --?[*S:lvl[&levelCounter]_slots_total] -gt 0|&spellSlotInfo2;+[td align=center][&slotCount][/td] --?[*S:lvl[&levelCounter]_slots_total] -gt 0|&anySpell;1 --%| --?[&anySpell] -eq 0|SKIP_SLOT_DISPLAY --?[&showPCSpellSlotList] -eq 0|SKIP_SLOT_DISPLAY --+|[c][b]Available Spell Slots[/b][/c][&spellSlotInfo1][&spellSlotInfo2][/tr][/t] --+|[br] --+|[hr #58180d] --:SKIP_SLOT_DISPLAY| --]| --/|The PC's cantrips --Rfirst|[*S:character_id];repeating_spell-cantrip --&PCCantrips|[br] --?"[*R:spellname]" -ne "NoRepeatingAttributeLoaded"|[ --:PCCantrips_Display| --~testName|string;replaceall; ;-;[*R:spellname] --~testMule|system;findability;[&spellmulename];[&testName] --?[&testMule] -ne "AbilityNotFound"|MULE_CANTRIP --?"[*R:spelloutput]" -eq ATTACK|CANTRIP_GENERATE_WITH_TARGET --&PCCantrips|+[rbutton][*R:spellname]::EXEC_PC_CANTRIP;[*R:spellname]|NONE[/rbutton][&SPACE] --^CANTRIP_END_GENERATE| --:CANTRIP_GENERATE_WITH_TARGET| --&PCCantrips|+[rbutton][*R:spellname]::EXEC_PC_CANTRIP;[*R:spellname]|[&TB]target|token_id}[/rbutton][&SPACE] --^CANTRIP_END_GENERATE| --:MULE_CANTRIP| --&PCCantrips|+[button][*R:spellname]::~[&spellmulename]|[&testName][/button][&SPACE] --:CANTRIP_END_GENERATE| --Rnext| --?"[*R:spellname]" -ne "NoRepeatingAttributeLoaded"|PCCantrips_Display --+[c]Cantrips[/c]|[c][&PCCantrips][/c] --+|[br] --+|[hr #58180d] --]| --+| --/|The PC's level 1 thru 9 spells --&HighestSlot|9 --%levelCounter|1;9 --Rfirst|[*S:character_id];repeating_spell-[&levelCounter] --&PCSpells|[br] --&slotString| --&slotString||&# --&slotString|+63;{Slot Level| --%slotcounter|[&levelCounter];[&HighestSlot] --?[&trackPCSpellSlots] -eq 0|SKIP_THIS_SLOT_CHECK -->GET_AVAILABLE_SPELL_SLOTS|[&slotcounter];hasSlots --?[&hasSlots] -eq 0|SKIP_THIS_SLOT_STRING --:SKIP_THIS_SLOT_CHECK| --&slotString|+[&slotcounter] --?[&slotcounter] -eq [&HighestSlot]|SKIP_THIS_SLOT_STRING --&slotString|+| --:SKIP_THIS_SLOT_STRING| --%| --?[&levelCounter] -lt 9|DONE_SLOT_STRING --&slotString||9 --:DONE_SLOT_STRING| --&slotString|+} --=PCSpellCount|0 --?"[*R:spellname]" -ne "NoRepeatingAttributeLoaded"|[ --:PCSpells_Display| --?[&skipPreppedSpellsCheck] -eq 1|SKIP_PREP_CHECK --?[*S:class] -eq "Sorcerer"|SKIP_PREP_CHECK --?[*S:class] -eq "Warlock"|SKIP_PREP_CHECK --?"X[*S:multiclass1_flag]" -eq "X1" -and [*S:multiclass1] -eq "Sorcerer"|SKIP_PREP_CHECK --?"X[*S:multiclass2_flag]" -eq "X1" -and [*S:multiclass2] -eq "Sorcerer"|SKIP_PREP_CHECK --?"X[*S:multiclass3_flag]" -eq "X1" -and [*S:multiclass3] -eq "Sorcerer"|SKIP_PREP_CHECK --?"X[*S:multiclass1_flag]" -eq "X1" -and [*S:multiclass1] -eq "Warlock"|SKIP_PREP_CHECK --?"X[*S:multiclass2_flag]" -eq "X1" -and [*S:multiclass2] -eq "Warlock"|SKIP_PREP_CHECK --?"X[*S:multiclass3_flag]" -eq "X1" -and [*S:multiclass3] -eq "Warlock"|SKIP_PREP_CHECK --&isWizard|0 --?[*S:class] -eq "Wizard"|&isWizard;1 --?"X[*S:multiclass1_flag]" -eq "X1" -and [*S:multiclass1] -eq "Wizard"|&isWizard;1 --?"X[*S:multiclass2_flag]" -eq "X1" -and [*S:multiclass2] -eq "Wizard"|&isWizard;1 --?"X[*S:multiclass3_flag]" -eq "X1" -and [*S:multiclass3] -eq "Wizard"|&isWizard;1 --?[&isWizard] -eq 0 -and "X[*R:spellprepared]" -ne "X1"|DONE_SPELL_BUTTON --?"X[*R:spellprepared]" -ne "X1" -and "X[*R:spellritual]" -ne "XYes"|DONE_SPELL_BUTTON --&spellsuffix| --?"X[*R:spellritual]" -eq "XYes"|&spellsuffix; [R] --:SKIP_PREP_CHECK| --?[&trackPCSpellSlots] -eq 0|SKIP_FREE_SLOTS_CHECK --?[&HighestSlot] -lt [&levelCounter]|DONE_SPELL_BUTTON --:SKIP_FREE_SLOTS_CHECK| --~testName|string;replaceall; ;-;[*R:spellname] --~testMule|system;findability;[&spellmulename];[&testName] --?[&testMule] -ne "AbilityNotFound"|MULE_SPELL --&PCSpells|+[rbutton][*R:spellname][&spellsuffix]::EXEC_PC_SPELL;[&levelCounter]|[*R:spellname]|[&TB]target|token_id}[&slotString][/rbutton][&SPACE] --=PCSpellCount|[$PCSpellCount.Raw] + 1 --^DONE_SPELL_BUTTON| --:MULE_SPELL| --&PCSpells|+[button][*R:spellname][&spellsuffix]::~[&spellmulename]|[&testName][/button][&SPACE] --=PCSpellCount|[$PCSpellCount.Raw] + 1 --:DONE_SPELL_BUTTON| --Rnext| --?"[*R:spellname]" -ne "NoRepeatingAttributeLoaded"|PCSpells_Display --?[$PCSpellCount] -eq 0|PC_SKIP_LEVEL_DISPLAY --+[c]Level [&levelCounter] Spells[/c]|[c][&PCSpells][/c] --+|[br] --+|[hr #58180d] --:PC_SKIP_LEVEL_DISPLAY| --]| --%| --?[&DisplayButtonsForAMAbilities] -eq 1|>DISPLAY_ACTIONMENU_CHARACTER_ABILITIES;[*S:character_id] --#buttonpadding|[&smallButtonPadding] --X| --/|Reentrant points for PC actions --:EXEC_PC_CANTRIP| --/+|[hr #58180d] --?[*S:npc] -eq 1 -and [&AllNPCActionsToSender]||[ --#whisper|self --]|[ --#whisper| --]| --~cantrip_name|string;before;|;[&reentryval] --~cantrip_target|string;after;|;[&reentryval] --#whisper| --#emotestate|visible --#targettoken|[&cantrip_target] --#emotetext|[*S:t-name] uses [&cantrip_name] against [*T:t-name] -->Find_Active_Global_Attack_Modifiers|[*S:character_id];PC_GAM -->Find_Active_Global_Damage_Modifiers|[*S:character_id];PC_GDM -->Find_Active_Global_Damage_Modifiers|[*S:character_id];PC_GDM_CRIT;1 -->Find_Active_Global_Save_Modifiers|[$cantrip_target];TARGET_GSM --Rfind|[*S:character_id];[&cantrip_name];repeating_spell-cantrip;spellname --?"[*R:spelloutput]" -eq ATTACK|PC_ATTACK_CANTRIP|PC_CARD_CANTRIP --=cantrip_crit|0 --:PC_ATTACK_CANTRIP| --?"X[*R:spellattack]" -eq "XRanged" -or "X[*R:spellattack]" -eq "XMelee"|CANTRIP_ATTACK_ROLL|CANTRIP_DONE_ATTACK_ROLL --:CANTRIP_ATTACK_ROLL| --&rollType|1d20 --?"[*S:advantagetoggle]" -inc advantage|&rollType;2d20kh1 --?"[*S:advantagetoggle]" -inc disadvantage|&rollType;2d20kl1 --?[&selfHandleAdvantageMode] -eq 1 -and [&currentAdvantageMode] -eq 0|&rollType;1d20 --?[&selfHandleAdvantageMode] -eq 1 -and [&currentAdvantageMode] -eq 1|&rollType;2d20kh1 --?[&selfHandleAdvantageMode] -eq 1 -and [&currentAdvantageMode] -eq 2|&rollType;2d20kl1 --=attackRoll|[&rollType] + [*S:spell_attack_bonus] [Spell Atk Bonus] [&PC_GAM] --=AC|[*T:ac] --?"X[*T:npc_ac]" -ne "X"|=AC;[*T:npc_ac] --?[&sendGmInfo] -eq 1|[ --+[*R:spellattack] Attack|rolled [$attackRoll] vs the target's AC[br][br] --*[*R:spellattack] Attack|rolled [$attackRoll] vs AC [b][$AC.Raw][/b] --]|[ --+[*R:spellattack] Attack|rolled [$attackRoll] vs AC [b][$AC.Raw][/b][br][br] --]| --?[$attackRoll.Base] -ge 20|=cantrip_crit;1|=cantrip_crit;0 --?[$attackRoll.Total] -lt [$AC]|CANTRIP_ATTACK_MISS --?[$attackRoll.Base] -eq 1|CANTRIP_ATTACK_MISS --:CANTRIP_DONE_ATTACK_ROLL| --&damageRoll|[*R:spelldamage] --?[*S:level] -ge 5|&damageRoll;+ + [*R:spelldamage] --?[*S:level] -ge 11|&damageRoll;+ + [*R:spelldamage] --?[*S:level] -ge 17|&damageRoll;+ + [*R:spelldamage] --?[$cantrip_crit] -eq 1|&damageRoll;+ + [&damageRoll] --?[$cantrip_crit] -eq 1|&damageRoll;+ [&PC_GDM_CRIT]|&damageRoll;+ [&PC_GDM] --&dmgModType1| --?"X[*T:npc]" -ne "X1" -or [&UseResistances] -eq 0|SKIP_PC_CANTRIP_RESIST -->CheckDamageModifiersNPC|[*T:character_id];dmgModType1;[*R:spelldamagetype];1;0;0 --:SKIP_PC_CANTRIP_RESIST| --=cantripDamage|[&damageRoll] [&dmgModType1] --?"X[*R:spellsave]" -ne "X"|CANTRIP_SAVE|CANTRIP_NO_SAVE --:CANTRIP_NO_SAVE| --?[$cantrip_crit] -eq 1|&hittag;Critical Hit!|&hittag;Hit! --?[$cantrip_crit] -eq 1|&hitdesc;critically hits|&hitdesc;hits --+[&hittag]|The [*R:spellname] [&hitdesc] and deals [$cantripDamage] [*R:spelldamagetype] damage.[br][br] -->[&damageRoutine]|[&cantrip_target];[&hitPointsBar];-[$cantripDamage.Raw] --^PC_CARD_CANTRIP| --:CANTRIP_SAVE| --+|The target needs to make a DC [*S:spell_save_dc] [*R:spellsave] saving throw or take [$cantripDamage] [*R:spelldamagetype] damage.[br][br] --/&output|The [b][i][*R:spellname][/i][/b] deals [$cantripDamage] [*R:spelldamagetype] damage. --/?"X[*R:spellsave]" -ne "X"|&output;+ The target can make a [*R:spellsave] save vs DC [*S:spell_save_dc] to negate the damage. --^PC_CARD_CANTRIP| --:CANTRIP_ATTACK_MISS| --+The [*R:spellname] attack missed!|[br][br] --:PC_CARD_CANTRIP| --#title|[&cantrip_name] --#leftsub|[*S:character_name] --#rightsub| --+|[*R:spelldescription] --:PC_DONE_CANTRIP| --X| --:EXEC_PC_SPELL|spellInfo1=Spell Level, 2=SpellName, 3=Target ID, 4=Slot Level --/+|[hr #58180d] --?[*S:npc] -eq 1 -and [&AllNPCActionsToSender]||[ --#whisper|self --]|[ --#whisper| --]| --~spellInfo|string;split;|;[&reentryval] --=UpCast|[&spellInfo4] - [&spellInfo1] --?[&trackPCSpellSlots] -eq 0|SKIP_CASTING_SLOT_CHECK -->GET_AVAILABLE_SPELL_SLOTS|[&spellInfo4];castSlotAvailable --?[&castSlotAvailable] -eq 0|NO_SLOTS_AVAILABLE -->DEDUCT_SPELL_SLOT|[&spellInfo4] --^SKIP_CASTING_SLOT_CHECK| --:NO_SLOTS_AVAILABLE| --#whisper|self --+|You do not have a level [$spellInfo4] spell slot available to cast [&spellInfo2] --^PC_DONE_SPELL| --:SKIP_CASTING_SLOT_CHECK| --&action_target|[&spellInfo3] --#title|[&spellInfo2] --#leftsub|[*S:character_name] --#rightsub| --#whisper| --#emotestate|visible --#targettoken|[&action_target] --#emotetext|[*S:t-name] uses [&spellInfo2] against [*T:t-name] -->Find_Active_Global_Attack_Modifiers|[*S:character_id];PC_GAM -->Find_Active_Global_Damage_Modifiers|[*S:character_id];PC_GDM -->Find_Active_Global_Damage_Modifiers|[*S:character_id];PC_GDM_CRIT;1 -->Find_Active_Global_Save_Modifiers|[$cantrip_target];TARGET_GSM --Rfind|[*S:character_id];[&spellInfo2];repeating_spell-[&spellInfo1];spellname --#targettoken|[&spellInfo3] --?"[*R:spellconcentration]" -inc "concentration=1" -and [&ConcentrationMarkerName]" -ne "0"|>ADD_STATUS_MARKER;[&saveTokenID];[&ConcentrationMarkerName] --?"[*R:spelloutput]" -eq ATTACK|PC_ATTACK_SPELL|PC_CARD_SPELL --:PC_ATTACK_SPELL| --&spell_crit|0 --?"X[*R:spellattack]" -eq "XRanged" -or "X[*R:spellattack]" -eq "XMelee"|SPELL_ATTACK_ROLL|SPELL_DONE_ATTACK_ROLL --:SPELL_ATTACK_ROLL| --&rollType|1d20 --?"[*S:advantagetoggle]" -inc advantage|&rollType;2d20kh1 --?"[*S:advantagetoggle]" -inc disadvantage|&rollType;2d20kl1 --?[&selfHandleAdvantageMode] -eq 1 -and [&currentAdvantageMode] -eq 0|&rollType;1d20 --?[&selfHandleAdvantageMode] -eq 1 -and [&currentAdvantageMode] -eq 1|&rollType;2d20kh1 --?[&selfHandleAdvantageMode] -eq 1 -and [&currentAdvantageMode] -eq 2|&rollType;2d20kl1 --=attackRoll|[&rollType] + [*S:spell_attack_bonus] [Spell Atk Bonus] [&PC_GAM] --=AC|[*T:ac] --?"X[*T:npc_ac]" -ne "X"|=AC;[*T:npc_ac] --?[&sendGmInfo] -eq 1|[ --+[*R:spellattack] Attack|rolled [$attackRoll] vs the target's AC[br][br] --*[*R:spellattack] Attack|rolled [$attackRoll] vs AC [b][$AC.Raw][/b] --]|[ --+[*R:spellattack] Attack|rolled [$attackRoll] vs AC [b][$AC.Raw][/b][br][br] --]| --?[$attackRoll.Base] -ge 20|=spell_crit;1|=spell_crit;0 --?[$attackRoll.Total] -lt [$AC]|SPELL_ATTACK_MISS --:SPELL_DONE_ATTACK_ROLL| --?"X[*T:npc]" -ne "X1" -or [&UseResistances] -eq 0|SKIP_PC_SPELL_RESIST --&dmgModType1| --&dmgModType2| -->CheckDamageModifiersNPC|[*T:character_id];dmgModType1;[*R:spelldamagetype];1;0;0 -->CheckDamageModifiersNPC|[*T:character_id];dmgModType2;[*R:spelldamagetype2];1;0;0 --:SKIP_PC_SPELL_RESIST| --&damageRoll|[*R:spelldamage] --?[$spell_crit] -eq 1|&damageRoll;+ [&PC_GDM_CRIT]|&damageRoll;+ [&PC_GDM] --&damageRoll2|[*R:spelldamage2] --&ability_bonus| --?"X[*R:spell_ability]" -eq "Xspell"|[ --~ability|string;before;};[*S:spellcasting_ability] --~ability|string;after;{;[&ability] --?[&ability] -eq strength_mod|&ability_bonus; + [*S:strength_mod] [Spellcasting Ability] --?[&ability] -eq dexterity_mod|&ability_bonus; + [*S:dexterity_mod] [Spellcasting Ability] --?[&ability] -eq constitution_mod|&ability_bonus; + [*S:constitution_mod] [Spellcasting Ability] --?[&ability] -eq intelligence_mod|&ability_bonus; + [*S:intelligence_mod] [Spellcasting Ability] --?[&ability] -eq wisdom_mod|&ability_bonus; + [*S:wisdom_mod] [Spellcasting Ability] --?[&ability] -eq charisma_mod|&ability_bonus; + [*S:charisma_mod] [Spellcasting Ability] --]| --&spell_heal|0 --?"X[*R:spellhealing]" -ne "X"|&spell_heal;1 --?"X[*R:spellhealing]" -ne "X"|&damageRoll;[*R:spellhealing] --&damageToApply|- --?[$UpCast] -eq 0|NO_UPCAST --=upcastDice|[$UpCast.Raw] * [*R:spellhldie] --&damageRoll|+ + [$upcastDice.Raw][*R:spellhldietype] [Upcasting] --:NO_UPCAST| --?[$spell_crit] -eq 1|&damageRoll;+ + [&damageRoll] --?[$spell_crit] -eq 1|&damageRoll2;+ + [&damageRoll2] --?[$spell_crit] -eq 1|&hittag;Critical Hit!|&hittag;Hit! --?[$spell_crit] -eq 1|&hitdesc;critically hits|&hitdesc;hits and deals --?[&spell_heal] -eq 1|&hittag;[b][/b] --?[&spell_heal] -eq 1|&hitdesc;heals for --?[&spell_heal] -eq 1|[ --&damageToApply| --]| --=spellDamage|[&damageRoll] [&dmgModType1] --=spellDamage2|[&damageRoll2] [&dmgModType2] --=TotalDamage|[$spellDamage.Raw] + [$spellDamage2.Raw] --?"X[*R:spelldamage2]" -ne "X"|TWO_DAMAGE --+[&hittag]|The [*R:spellname] [&hitdesc] [$spellDamage] [*R:spelldamagetype] damage.[br][br] --&damageToApply|+[$spellDamage.Raw] -->[&damageRoutine]|[&action_target];[&hitPointsBar];[&damageToApply] --^DONE_SPELL_DAMAGE| --:TWO_DAMAGE| --+[&hittag]|The [*R:spellname] [&hitdesc] [$spellDamage] [*R:spelldamagetype] damage and [$spellDamage2] [*R:spelldamagetype2] damage.[br][br] --&damageToApply|+[$TotalDamage.Raw] -->[&damageRoutine]|[&action_target];[&hitPointsBar];[&damageToApply] --:DONE_SPELL_DAMAGE| --?"X[*R:spellsave]" -eq "X"|PC_CARD_SPELL --+|The target can make a [*R:spellsave] save vs DC [*S:spell_save_dc] to modify the damage as described below.[br][br] --^PC_CARD_SPELL| --:SPELL_ATTACK_MISS| --+The [*R:spellname] attack missed!|[br][br] --:PC_CARD_SPELL| --+|[*R:spelldescription] --:PC_DONE_SPELL| --X| --:Get_Ability_Modifier|attribute_string;returnnumericvalue;returnnamestring --?"[%1%]" -eq "strength_mod"|=[%2%];[*S:strength_mod] --?"[%1%]" -eq "strength_mod"|&[%3%];[STR] --?"[%1%]" -eq "intelligence_mod"|=[%2%];[*S:intelligence_mod] --?"[%1%]" -eq "intelligence_mod"|&[%3%];[INT] --?"[%1%]" -eq "wisdom_mod"|=[%2%];[*S:wisdom_mod] --?"[%1%]" -eq "wisdom_mod"|&[%3%];[WIS] --?"[%1%]" -eq "dexterity_mod"|=[%2%];[*S:dexterity_mod] --?"[%1%]" -eq "dexterity_mod"|&[%3%];[DEX] --?"[%1%]" -eq "constitution_mod"|=[%2%];[*S:constitution_mod] --?"[%1%]" -eq "constitution_mod"|&[%3%];[CON] --?"[%1%]" -eq "charisma_mod"|=[%2%];[*S:charisma_mod] --?"[%1%]" -eq "charisma_mod"|&[%3%];[CHA] --<| --/|There are four different options for applying damage. The selected option is set in the settings area of the macro. --/|When applying damage, one of the four functions listed below will be executed to alter the target's HP. The ScriptCards --/|method is recommended, as there won't be an issue with impacting the same target more than once. --/|Apply damage via ScriptCards' built-in object modification function (new in ScriptCards 1.5.0) --:ApplyDamageScriptCards|Parameters are tokenid;bar#;amount --=applyValue|[%3%] --=newValue|[*[%1%]:t-bar[%2%]_value] + [$applyValue] --?[$newValue] -lt 0|=newValue;0 --?[$newValue] -gt [*[%1%]:t-bar[%2%]_max]|=newValue;[*[%1%]:t-bar[%2%]_max] --!t:[%1%]|bar[%2%]_value:[$newValue.Raw] --<| --/|Token-Mod doesn't have a "set to a relative number", so we get the current bar value, subtract thedamage amount --/|make sure it doesn't fall below 0, and set the amount back into the bar. --:ApplyDamageTokenmod|Parameters are tokenid;bar#;amount --=applyValue|[%3%] --=newValue|[*[%1%]:t-bar[%2%]_value] + [$applyValue] --?[$newValue] -lt 0|=newValue;0 --?[$newValue] -gt [*[%1%]:t-bar[%2%]_max]|=newValue;[*[%1%]:t-bar[%2%]_max] --@token-mod|_ignore-selected _ids [%1%] _set bar[%2%]_value|[$newValue.Raw] --<| --/|Just a dummy routine that doesn't do anything, but it is easier to do it this way than adding logic to see if we are --/|skipping applying damage in the main routine. --:DontApplyDamage| --<| --:FIND_REPEATING_RESOURCE|character_id;resourceName;resourceReturnNameStringVariable;ResourceReturnValueStringVariable;ResouceCurrentValue --?"[%2%]" -eq "[*[%1%]:class_resource_name]"|_IsResourceClass --?"[%2%]" -eq "[*[%1%]:other_resource_name]"|_IsResourceOther --Rfirst|[%1%];repeating_resource --:_ResourceLoop| --?"[*R:resource_left_name]" -eq "[%2%]"|_IsResourceLeft --?"[*R:resource_right_name]" -eq "[%2%]"|_IsResourceRight --Rnext| --?"[*R:resource_left_name]" -ne "NoRepeatingAttributeLoaded"|_ResourceLoop --&[%3%]|NotFound --&[%4%]|NotFound --&[%5%]|0 --<| --:_IsResourceClass| --&[%3%]|class_resource_name --&[%4%]|class_resource --&[%5%]|[*[%1%]:class_resource] --<| --:_IsResourceOther| --&[%3%]|other_resource_name --&[%4%]|other_resource --&[%5%]|[*[%1%]:other_resource] --<| --:_IsResourceLeft| --&[%3%]|[*R:resource_left_name] --&[%4%]|[*R>resource_left] --&[%5%]|[*S:[*R>resource_left]] --<| --:_IsResourceRight| --&[%3%]|[*R:resource_left_name] --&[%4%]|[*R>resource_right] --&[%5%]|[*S:[*R>resource_right]] --<| --:_NO_AMMO_AVAILABLE| --#whisper| --+|[*S:character_name] has no [&ResourceUsed] left. --#emoteText|[*S:character_name] is all out of [&ResourceUsed]. --X| --:FIND_CLASS_LEVEL|class;variableToSet --&[%2%]|0 --?"[*S:class]" -eq "[%1%]"|&[%2%];[*S:base_level] --?"[*S:multiclass1]" -eq "[%1%]"|&[%2%];[*S:multiclass1_lvl] --?"[*S:multiclass2]" -eq "[%1%]"|&[%2%];[*S:multiclass2_lvl] --?"[*S:multiclass3]" -eq "[%1%]"|&[%2%];[*S:multiclass3_lvl] --?"[*S:multiclass4]" -eq "[%1%]"|&[%2%];[*S:multiclass4_lvl] --<| --:GET_AVAILABLE_SPELL_SLOTS|slotlevel;variableToSet --&_maxSlots|[*S:lvl[%1%]_slots_total] --&[%2%]|[*S:lvl[%1%]_slots_expended] --<| --:DEDUCT_SPELL_SLOT|slotlevel --!a:[*S:character_id]|lvl[%1%]_slots_expended:-=1 --<| --:GET_HIGHEST_LEVEL_SPELL_SLOT|variableToSet --&[%1%]|0 --%levelCounter|1;9 -->GET_AVAILABLE_SPELL_SLOTS|[&levelCounter];slotTest --?[&slotTest] -gt 0|&[%1%];[&levelCounter] --%| --<| --:BuildCharacterSummary|charid;Return variable;ac attribute (either ac or npc_ac) --?[%3%] -eq "npc_ac"|BuildNPCSummary --&[%2%]|[*[%1%]:class_display], AC [*[%1%]:[%3%]], HP [*[%1%]:hp]/[*[%1%]:hp^] --<|| --:BuildNPCSummary| --&[%2%]|CR[*[%1%]:npc_challenge] [*[%1%]:npc_type], AC [*[%1%]:[%3%]], HP [*[%1%]:t-bar[&hitPointsBar]_value]/[*[%1%]:hp^] --<|| --:CheckDamageModifiersNPC|characterid;damageVariableName;damageType;isMagical(0 or 1);IsSilver (0 or 1);IsAdamantine (0 or 1);NPCType(A or T) --&[%2%]| --#parameterdelimiter|!! --~Vulns|string!!split!!;!![*[%1%]:npc_vulnerabilities];[&[%7%]NPC_VULNS] --~Resists|string!!split!!;!![*[%1%]:npc_resistances];[&[%7%]NPC_RESISTS] --~Immunes|string!!split!!;!![*[%1%]:npc_immunities];[&[%7%]NPC_IMMUNES] --#parameterdelimiter|; --%VulnLoop|1;[$VulnsCount] --&hasModifier|0 --?"X[&Vulns[&VulnLoop]]" -inc "silver" -or "X[&Vulns[&VulnLoop]]" -inc "adamantine" -or "X[&Vulns[&VulnLoop]]" -inc "magical"|&hasModifier;1 --?"X[&Vulns[&VulnLoop]]" -inc "[%3%]" -and "X[&Vulns[&VulnLoop]]" -inc "adamantine" -and [%6%] -eq 1|>IsVulnerable;[%2%] --?"X[&Vulns[&VulnLoop]]" -inc "[%3%]" -and "X[&Vulns[&VulnLoop]]" -inc "silver" -and [%5%] -eq 1|>IsVulnerable;[%2%] --?"X[&Vulns[&VulnLoop]]" -inc "[%3%]" -and "X[&Vulns[&VulnLoop]]" -inc "magical" -and [%4%] -eq 1|>IsVulnerable;[%2%] --?"X[&Vulns[&VulnLoop]]" -inc "[%3%]" -and [&hasModifier] -eq 0|>IsVulnerable;[%2%] --%| --:SKIP_VULN_CHECK| --%ResistLoop|1;[$ResistsCount] --&hasModifier|0 --?"X[&Resists[&ResistLoop]]" -inc "silver" -or "X[&Resists[&ResistLoop]]" -inc "adamantine" -or "X[&Resists[&ResistLoop]]" -inc "magical"|&hasModifier;1 --?"X[&Resists[&ResistLoop]]" -inc "[%3%]" -and [&hasModifier] -eq 0|>IsResistant;[%2%] --?"X[&Resists[&ResistLoop]]" -inc "[%3%]" -and [&hasModifier] -eq 0|FINISH_RESIST_CHECK --?"X[&Resists[&ResistLoop]]" -inc "[%3%]" -and "X[&Resists[&ResistLoop]]" -inc "adamantine" -and [%6%] -eq 1|FINISH_RESIST_CHECK --?"X[&Resists[&ResistLoop]]" -inc "[%3%]" -and "X[&Resists[&ResistLoop]]" -inc "silver" -and [%5%] -eq 1|FINISH_RESIST_CHECK --?"X[&Resists[&ResistLoop]]" -inc "[%3%]" -and "X[&Resists[&ResistLoop]]" -inc "magical" -and [%4%] -eq 1|FINISH_RESIST_CHECK --?"X[&Resists[&ResistLoop]]" -inc "[%3%]"|>IsResistant;[%2%] --:FINISH_RESIST_CHECK| --%| --:SKIP_RESIST_CHECK| --%ImmuneLoop|1;[$ImmunesCount] --&hasModifier|0 --?"X[&Immunes[&ImmuneLoop]]" -inc "silver" -or "X[&Immunes[&ImmuneLoop]]" -inc "adamantine" -or "X[&Immunes[&ImmuneLoop]]" -inc "magical"|&hasModifier;1 --?"X[&Immunes[&ImmuneLoop]]" -inc "[%3%]" -and [&hasModifier] -eq 0|>IsImmune;[%2%] --?"X[&Immunes[&ImmuneLoop]]" -inc "[%3%]" -and [&hasModifier] -eq 0|FINISH_IMMUNE_CHECK --?"X[&Immunes[&ImmuneLoop]]" -inc "[%3%]" -and [&hasModifier] -eq 1 -and "X[&Immunes[&ImmuneLoop]]" -inc "adamantine" -and [%6%] -eq 1|FINISH_IMMUNE_CHECK --?"X[&Immunes[&ImmuneLoop]]" -inc "[%3%]" -and [&hasModifier] -eq 1 -and "X[&Immunes[&ImmuneLoop]]" -inc "silver" -and [%5%] -eq 1|>FINISH_IMMUNE_CHECK;[%2%] --?"X[&Immunes[&ImmuneLoop]]" -inc "[%3%]" -and [&hasModifier] -eq 1 -and "X[&Immunes[&ImmuneLoop]]" -inc "magical" -and [%4%] -eq 1|>FINISH_IMMUNE_CHECK;[%2%] --?"X[&Immunes[&ImmuneLoop]]" -inc "[%3%]"|>IsImmune;[%2%] --:FINISH_IMMUNE_CHECK| --%| --:SKIP_IMMUNE_CHECK| --<| --:IsVulnerable| --&[%1%]| * 2 [Vulnerable] --<| --:IsResistant| --&[%1%]| \ 2 [Resistant] --<| --:IsImmune| --&[%1%]| * 0 [Immune] --<| --:DISPLAY_CHARACTER_CONFIG_MENU| --#whisper|self --#rightsub| --#leftsub|Action Menu Configuration [rbutton]&#x21b6;::AFTER_ADVMODE_CHANGE[/rbutton] --+|[b][c]Display Global Mods[/c][/b] -->CREATE_SETTINGS_TOGGLE_BUTTON|[*S:character_id];Attack;SGAM;BTN_SGAM -->CREATE_SETTINGS_TOGGLE_BUTTON|[*S:character_id];Damage;SGDM;BTN_SGDM -->CREATE_SETTINGS_TOGGLE_BUTTON|[*S:character_id];Save;SGSM;BTN_SGSM -->CREATE_SETTINGS_TOGGLE_BUTTON|[*S:character_id];AC;SGCM;BTN_SGAC -->CREATE_SETTINGS_TOGGLE_BUTTON|[*S:character_id];Skill;SGKM;BTN_SGSK --+|[c][&BTN_SGAM] [&BTN_SGDM] [&BTN_SGSM] [&BTN_SGAC] [&BTN_SGSK][/c] --+|[b][c]Display Skill and Saves Buttons[/c][/b] -->CREATE_SETTINGS_TOGGLE_BUTTON|[*S:character_id];Skills & Saves;SSAS;BTN_SSAS --+|[c][&BTN_SSAS][/c] -->CREATE_SETTINGS_TOGGLE_BUTTON|[*S:character_id];Rest Buttons in Header;SHRB;BTN_SHRB --+|[b][c]Other Features[/c][/b] --+|[c][&BTN_SHRB][/c] --X| --:CREATE_SETTINGS_TOGGLE_BUTTON|character_id;SettingName;SettingCode;ReturnStringVar -->GET_PER_CHARACTER_SETTING|[%1%];[%3%];_THIS_SETTING --&_BUTTON_COLOR|AA0000 --?[&_THIS_SETTING] -eq 1|&_BUTTON_COLOR;00AA00 --&[%4%]|[rbutton:#ffffff:#[&_BUTTON_COLOR]:8px][%2%]::TOGGLE_PER_CHARACTER_SETTING;[%1%]|[%3%][/rbutton] --<| --:GET_PER_CHARACTER_SETTING|CharID;SettingCode;Return String Var Name --&[%3%]|0 --?"X[*[%1%]:5ECAM_SETTINGS]" -inc "[%2%]1"|&[%3%];1 --<| --:LOAD_PER_CHARACTER_CONFIG_OPTIONS|characterID --?"X[*[%1%]:5ECAM_SETTINGS]" -eq "X"|>SET_DEFAULT_PER_CHARACTER_SETTINGS;[%1%] --?"X[*[%1%]:5ECAM_SETTINGS]" -eq "Xundefined"|>SET_DEFAULT_PER_CHARACTER_SETTINGS;[%1%] --&perCharacterOptions|[*[%1%]:5ECAM_SETTINGS] --<| --:SET_DEFAULT_PER_CHARACTER_SETTINGS|CharacterID --&SettingsString|$SGAM1$$SGDM1$$SGSM1$$SGMB1$$SSAS1$$SGCM1$$SGKM1$$SHRB1$ --!a:[%1%]|!5ECAM_SETTINGS:[&SettingsString] --<| --:TOGGLE_PER_CHARACTER_SETTING|CharacterID;Setting --~TOG_CHAR_ID|string;before;|;[&reentryval] --~TOG_SETTING|string;after;|;[&reentryval] --~beforeText|string;before;[&TOG_SETTING];[*[&TOG_CHAR_ID]:5ECAM_SETTINGS] --~beforeLength|string;length;[&beforeText] --~wholeLength|string;length;[*[&TOG_CHAR_ID]:5ECAM_SETTINGS] --?[$beforeLength] -eq [$wholeLength]|SETTING_NOT_FOUND --~oldSetting|string;substring;[$beforeLength];7;[*[&TOG_CHAR_ID]:5ECAM_SETTINGS] --~oldValue|string;substring;6;1;[&oldSetting] --~newSetting|string;left;5;[&oldSetting] --?"X[&oldValue]" -eq "X1"|&newSetting;+0$ --?"X[&oldValue]" -ne "X1"|&newSetting;+1$ --~replacement|string;replace;[&oldSetting];[&newSetting];[*[&TOG_CHAR_ID]:5ECAM_SETTINGS] --!a:[&TOG_CHAR_ID]|5ECAM_SETTINGS:[&replacement] --^DISPLAY_CHARACTER_CONFIG_MENU| --:SETTING_NOT_FOUND| --!a:[&TOG_CHAR_ID]|5ECAM_SETTINGS:[*[&TOG_CHAR_ID]:5ECAM_SETTINGS]$[&TOG_SETTING]1$ --^DISPLAY_CHARACTER_CONFIG_MENU| --X| --:ADD_STATUS_MARKER|Token_ID;Status Marker;Count -->REMOVE_STATUS_MARKER|[%1%];[%2%] --~|array;statusmarkers;Conditions;[%1%] --&toAdd|[%2%] --?"X[%3%]" -ne "X" -and "X[%3%]" -ne "X0"|&toAdd;[%2%]@[%3%] --~|array;add;Conditions;[&toAdd] --~newConditions|array;stringify;Conditions --#parameterdelimiter|$ --~newConditions|string$replaceall$;$,$[&newConditions] --#parameterdelimiter|; --!t:[%1%]|statusmarkers:[&newConditions] --:DONE_ADD_STATUS_MARKER| --<| --:REMOVE_STATUS_MARKER|Token_ID;Status Marker -->CHECK_STATUS_MARKER|[%1%];[%2%];MarkerExists;MarkerCounter --?[&MarkerExists] -eq 0|< --~|array;statusmarkers;Conditions;[%1%] --?[&MarkerCounter] -eq 0|&toCheckFor;[%2%]|&toCheckFor;[%2%]@[&MarkerCounter] --~hasCondition|array;indexof;Conditions;[&toCheckFor] --?[&hasCondition] -eq "ArrayError"|DONE_REMOVE_STATUS_MARKER --~|array;remove;Conditions;[&toCheckFor] --~newConditions|array;stringify;Conditions --#parameterdelimiter|$ --~newConditions|string$replaceall$;$,$[&newConditions] --#parameterdelimiter|; --!t:[%1%]|statusmarkers: [&newConditions] --:DONE_REMOVE_STATUS_MARKER| --<| --:CHECK_STATUS_MARKER|TokenID;MarkerToFind;Exists;Counter --~|array;statusmarkers;Conditions;[%1%] --&FoundMarker|-1 --%loop|0;[@Conditions(maxindex)] --&Temp|[@Conditions([&loop])] --?[&Temp(indexof,[%2%])] -eq 0|&FoundMarker;[&loop] --%| --?[&FoundMarker] -ne -1|FOUND_STATUS_MARKER --&[%3%]|0 --&[%4%]|0 --<| --:FOUND_STATUS_MARKER| --&[%3%]|1 --&[%4%]|0 --&ThisMarker|[@Conditions([&FoundMarker])] --?[&ThisMarker(contains,@)] -eq 0|< --~[%4%]|string;after;@;[@Conditions([&FoundMarker])] --<| --:GET_CONTROLLED_TOKENS_FROM_PAGETOKENS| --~|array;pagetokens;_FCT_Tokens;[*C:playerpageid];pc --%_loop|0;[@_FCT_Tokens(maxindex)] --&_FCT_TID|[@_FCT_Tokens([&_loop])] --&_FCT_CHAR|[*[&_FCT_TID]:t-represents] --?"X[*O:[&_FCT_CHAR]:character:controlledby]" -ninc [&SendingPlayerID]|% --?"X[&[%1%]]" -eq "X"|&[%1%];+[&_FCT_TID]|&[%1%];+,[&_FCT_TID]] --%| --<| --:REPORT_NEED_SELECTED_TOKEN| --#whisper|self --+No Token Selected|You need to have a single token selected in order to use the 5E Character Action Menu. --X| --:REPORT_MULTIPLE_SELECTED_TOKEN| --#whisper|self --+Multiple Tokens Selected|You need to have a single token selected in order to use the 5E Character Action Menu. --X| --:REPORT_NO_TOKENS_ON_PAGE| --#whisper|self --+No Controlled Tokens|You do not appear to have any tokens on this page under your control. --X| --:REPORT_MULTIPLE_POSSIBLE_TOKENS| --#whisper|self --+Multiple Tokens|You appear to have more than one controlled token on this page. You will need to select a token manually to use the 5E Character Action Menu --X| --:DISPLAY_ACTIONMENU_CHARACTER_ABILITIES|Character ID --&DACA_BUTTONS| --~|array;objects:ability;AbilArray;AM-;[%1%] --~|array;define;DACA_OBJS_ID --%loop|foreach;AbilArray --&DACA_OBJS_ID(9999)|[*O:[&loop]:ability:name]|[&loop] --%| --~|array;sort;DACA_OBJS_ID --&DACA_BUTTONS| --%loop|foreach;DACA_OBJS_ID --~DACA_PARTS|string;split;|;[&loop] --&DACA_NAME|[&DACA_PARTS1(3)] --&DACA_BUTTONS|+[button][&DACA_NAME(replaceall,-, )]::~[%1%]|[&DACA_PARTS1][/button] --%| --?"X[&DACA_BUTTONS"] -eq "X"|< --+Custom Actions| --+|[&DACA_BUTTONS] --<| }} And here is the console log error message: TypeError: Cannot read properties of undefined (reading 'substring') TypeError: Cannot read properties of undefined (reading 'substring') at handleInput (apiscript.js:24623:35) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1762:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400