crnormand / gurps

Implementing a GURPS 4e game aid for Foundry VTT
MIT License
105 stars 49 forks source link

First Code #438

Closed Boifuba closed 3 years ago

Boifuba commented 3 years ago

I need help with it. This macro will open window where i'll insert my OtF but i need help with the code, please do not laugh, i started in JavaScript 1 week ago!


let dialogEditor = new Dialog({
    title: "Macro 3d6 Gurps",
    content: "Clique para rolar 3d6",
    buttons: {
        one: {
            label: "Rolar",
            callback: () => {
                Roll.create("3d6").roll().toMessage(); // i don't know how to call the OTF here!

            },
        },
        close: {
            icon: "<i class='fas fa-tick'></i>",
            label: "Fechar"
        },
    },
    default: "close"
});

dialogEditor.render(true)
Boifuba commented 3 years ago

solved