Add all systems effects scripts + translations
This commit is contained in:
18
reference_scripts/KICZPwLvbUSxbDrE.js
Normal file
18
reference_scripts/KICZPwLvbUSxbDrE.js
Normal file
@ -0,0 +1,18 @@
|
||||
let table = game.wfrp4e.tables.findTable("mutatemental");
|
||||
if (!table)
|
||||
{
|
||||
ui.notifications.error("Cannot find table with key: mutatemental")
|
||||
}
|
||||
let result = (await table.roll()).results[0];
|
||||
let uuid = `Compendium.${result.documentCollection}.${result.documentId}`
|
||||
let item = await fromUuid(uuid);
|
||||
|
||||
if (item)
|
||||
{
|
||||
this.script.scriptNotification(`${item.name} added`)
|
||||
this.actor.createEmbeddedDocuments("Item", [item])
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.notifications.error("Item could not be found: " + uuid)
|
||||
}
|
Reference in New Issue
Block a user