fvtt-module-lmrtfy
fvtt-module-lmrtfy copied to clipboard
Echo out the chat message to use it in macros
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!!
I would also like this for writing macros as well. Getting the result from a request back into the macro would be very useful.
I would like to add to this!
I think I'll need a little bit more information on this to fully understand what it is that you need.
I´ll put it on different terms: how can we use the result of the LMRTFY roll? for example, as input for a macro
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");
}
}
});