New function for Mythic #97
Answered
by
alyssonlago
alyssonlago
asked this question in
Q&A
-
I am creating an sfile from the Mythicv2 found in the library. I would like to create a shortcut that allows the user to choose one from several shortcuts and, based on the chosen one, display the corresponding result. This is what I have today:
^event$
__
__
__ // Criar uma janela popup para escolher a tabela de significado
let tables = [
"ação", "descrição", "localidades", "personagens", "objetos",
"personalidade", "motivação", "aparência", "conversa"
];
// Perguntar ao usuário qual tabela usar
let tableChoice = popups.select("Escolha a tabela de significado", tables);
if (!tableChoice) {
return "Operação cancelada.";
}
// Executar o rolamento na tabela escolhida
return expand("significado " + tableChoice); __
__
__ // Limpa detalhes, se for uma nova interação
clearDetalhesIfUserTriggered();
// Lista de opções
const opcoes = [
["significado ação", "Ação"],
["significado descrição", "Descrição"],
["significado localidades", "Localidades"],
["significado personagens", "Personagens"],
["significado objetos", "Objetos"]
];
// UI: Tela com botões
return uiScreen("Significado (Mythic 2e)", {
buttons: opcoes.map(opcao => ({
label: opcao[1],
action: () => {
clearDetalhesIfUserTriggered();
return runShortcut(opcao[0]).then(result => {
return "**Significado:** " + result + getDetalhes();
});
}
}))
}); __
|
Beta Was this translation helpful? Give feedback.
Answered by
alyssonlago
Apr 21, 2025
Replies: 1 comment
-
I got it.
^significado$
__
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
alyssonlago
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got it.
^significado$
__
significado - Permite escolher uma tabela de significado para rolar.