diff --git a/Manual Roll Initiative.json b/Manual Roll Initiative.json new file mode 100644 index 0000000..fdb6527 --- /dev/null +++ b/Manual Roll Initiative.json @@ -0,0 +1,25 @@ +{ + "name": "Roll Initiative", + "type": "script", + "scope": "global", + "author": "KR32117fX0pxHkC5", + "img": "icons/svg/dice-target.svg", + "command": "let playerCombatants = [];\nlet combatants = game.combat.combatants\nfor (const combatant of combatants) {\n playerCombatants.push(combatant)\n}\n\nlet form = '
'\n\nasync function setInitiativesAndStartCombat(html) {\n\n for (const combatant of playerCombatants) {\n let initiative = html.find('input[name=\"' + combatant.id + '\"]')[0].value\n await game.combat.setInitiative(combatant.id, initiative).then(\n\n );\n }\n await game.combat.rollNPC();\n await game.combat.startCombat();\n}\n\n\nnew Dialog({\n title: 'Manual Initiative',\n content: form,\n buttons: {\n yes: {\n icon: \"\",\n label: \"Start Combat\",\n callback: (html) => setInitiativesAndStartCombat(html),\n }\n },\n default: 'yes'\n}).render(true);", + "folder": null, + "flags": { + "exportSource": { + "world": "the-well-wishers", + "system": "dnd5e", + "coreVersion": "11.315", + "systemVersion": "3.1.1" + } + }, + "_stats": { + "systemId": "dnd5e", + "systemVersion": "3.1.1", + "coreVersion": "11.315", + "createdTime": 1712067301107, + "modifiedTime": 1712067772822, + "lastModifiedBy": "KR32117fX0pxHkC5" + } +} \ No newline at end of file