0% found this document useful (0 votes)
12 views2 pages

Hexblade Weapon Creation Script

This document contains code to summon or dismiss a Hexblade weapon item for an actor. It first checks if the Advanced Macros module is enabled, then gets the actor and target data. If the argument is "on" it will create a new Hexblade item for the actor with various data properties like name, damage values, and flags. If the argument is "off" it will delete any existing FlameBlade items for that actor.

Uploaded by

Leonardo Fonseca
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Hexblade Weapon Creation Script

This document contains code to summon or dismiss a Hexblade weapon item for an actor. It first checks if the Advanced Macros module is enabled, then gets the actor and target data. If the argument is "on" it will create a new Hexblade item for the actor with various data properties like name, damage values, and flags. If the argument is "off" it will delete any existing FlameBlade items for that actor.

Uploaded by

Leonardo Fonseca
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

if (![Link]("advanced-macros")?.active) [Link].

error("Please
enable the Advanced Macros module")
const { actor, token, lArgs } = [Link](args)
const DAEItem = [Link]

if (args[0] === "on") {


await [Link]("Item",
[{
"name": "Hexblade",
"type": "weapon",
"data": {
"quantity": 1,
"equipped": true,
"properties": {
"thr": false,
"ver": false,
"amm": false,
"hvy": true,
"fin": false,
"fir": false,
"foc": false,
"lgt": false,
"lod": false,
"rch": false,
"rel": false,
"ret": false,
"spc": false,
"two": true,
"ada": false,
"mgc": true,
"sil": false
},
"activation": {
"type": "action",
"cost": 1,
"condition": ""
},
"target": {
"value": 1,
"width": null,
"units": "",
"type": "creature"
},
"range": {
"value": 5,
},
"ability": "cha",
"actionType": "msak",
"attackBonus": "1",
"critical": {
"threshold": 19,
"damage": ""
},
"damage": {
"parts": [
["2d6 + @mod + 1 + (@[Link])",
"slashing"
],
],
},
"weaponType": "simpleM",
"proficient": true,
},
"flags": {
"midi-srd": {
"FlameBlade":
[Link]
}
},
"img": [Link],
"effects": []
}]
);
[Link]("A Hexblade appears in your inventory")
}

// Delete Flame Blade


if (args[0] === "off") {
[Link]("FlameBlade", actor)
}

You might also like