Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echo out the chat message to use it in macros #115

Open
TrikyEMF opened this issue Sep 3, 2021 · 5 comments
Open

Echo out the chat message to use it in macros #115

TrikyEMF opened this issue Sep 3, 2021 · 5 comments

Comments

@TrikyEMF
Copy link

TrikyEMF commented Sep 3, 2021

In order to use this module in macros more effectively, could you echo out the chat message so the result can be managed by macros?

For instance, a macro will request a 3d6 roll, and use the roll value to do something else.

Thank you!!

@Little-Froggy
Copy link

I would also like this for writing macros as well. Getting the result from a request back into the macro would be very useful.

@irbian
Copy link

irbian commented May 11, 2022

I would like to add to this!

@vtt-lair
Copy link
Contributor

vtt-lair commented Sep 2, 2022

I think I'll need a little bit more information on this to fully understand what it is that you need.

@irbian
Copy link

irbian commented Sep 2, 2022

I´ll put it on different terms: how can we use the result of the LMRTFY roll? for example, as input for a macro

@TrikyEMF
Copy link
Author

TrikyEMF commented Sep 9, 2022

I switched to Monk's tokenbar to have this functionnality. The idea was being able to use the LMRTFY result in a macro. For instance, in the code below I use the roll result given by Monk's tokenbar to check if the macro has to apply an effect or not.

let results = await game.MonksTokenBar.requestRoll([{"token":tokenid}],{request:'save:con', dc:dc, showdc:true, silent:true, fastForward:false, 
            flavor:'Comprueba si soportas el aura venenosa', rollMode:'roll', 
            callback: () => { 
                let rollResult=results.data.flags['monks-tokenbar'][`token${tokenid}`].total;
                console.log(`Foul | Roll result=${rollResult}`);
                if (rollResult < dc) {
                    game.dfreds.effectInterface.removeEffect({ effectName: 'Foul - Poisoned', uuid: args[1].actorUuid });
                    game.dfreds.effectInterface.addEffect({ effectName: 'Foul - Poisoned', uuid: args[1].actorUuid });
                }
                else {
                    console.log("not poisoned");
                }
            }
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants