ShareShortcuts

Dice Roller

PLEASE GO TO MY PROFILE TO GET THE LATEST VERSION OF DICE ROLLER

asboy
Fazer fork de “Dice Roller”

Criou algo novo a partir deste atalho? Compartilhe como uma derivação: ela se torna um atalho seu, que você gerencia, e as duas páginas têm links entre si para que asboy receba o crédito.

  1. 1Obtenha o atalho e altere-o no app Atalhos. Dê a ele um nome próprio.
  2. 2Compartilhe pelo app Atalhos e copie o link do iCloud.
  3. 3Volte aqui, cole o link e descreva o que mudou, por exemplo: “Adicionei uma etapa que usa a Apple Intelligence para personalizar o texto.”
Downloads
36K
Salvo
0
Ações
40
Categoria
Fun
Versão
1.0
Idioma
EN

Pré-visualização

PLEASE GO TO MY PROFILE TO GET THE LATEST VERSION OF DICE ROLLER. THIS IS NOT THE LATEST.

Novidades

Versão 1.0

First release

Histórico de versões
1.0 14 de dez de 2022

First release

O que ele faz

40 ações
  1. If
  2. Text
  3. Set Variable
    Menu
  4. If
  5. Text
  6. Set Variable
    Menu
  7. Dictionary
  8. Text
  9. Set Variable
    iCloudLink
  10. Number
  11. Set Variable
    Save1
  12. Number
  13. Set Variable
    Save2
  14. Number
  15. Set Variable
    Save3
  16. Text
  17. Set Name
  18. Get Contacts from Input
  19. Choose from List
  20. If
  21. Random Number
  22. Run Shortcut
    Dice Roller
  23. If
  24. If
  25. Random Number
  26. Run Shortcut
    Dice Roller
  27. If
  28. If
  29. Random Number
  30. Run Shortcut
    Dice Roller
  31. If
  32. If
  33. Ask for Input
    How many sides?
  34. Random Number
  35. Run Shortcut
    Dice Roller
  36. If
  37. Share
  38. Show Alert
    😎
  39. Text
  40. Run Shortcut
    Dice Roller

Ver como código
Beta

Todas as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele funciona.

#include 'actions/sharing'
#include 'actions/contacts'
#define color violet
#define glyph dice


if ShortcutInput {
	@Menu = "{ShortcutInput}. How many sides for next roll?"
} else {
	@Menu = "How many sides?"
}
@iCloudLink = "https://www.icloud.com/shortcuts/0a56860ecb564bb88dee26da91216be8"
@Save1 = 4
@Save2 = 6
@Save3 = 20
const Text = "BEGIN:VCARD\nVERSION:3.0\nN:{@Save1}\nPHOTO;ENCODING=b:{['1']}\nEND:VCARD\nBEGIN:VCARD\nVERSION:3.0\nN:{@Save2}\nPHOTO;ENCODING=b:{['2']}\nEND:VCARD\nBEGIN:VCARD\nVERSION:3.0\nN:{@Save3}\nPHOTO;ENCODING=b:{['3']}\nEND:VCARD\nBEGIN:VCARD\nVERSION:3.0\nN:Custom\nPHOTO;ENCODING=b:{['C']}\nEND:VCARD\nBEGIN:VCARD\nVERSION:3.0\nN:Share shortcut\nPHOTO;ENCODING=b:{['S']}\nEND:VCARD"
const RenamedItem = setName(Text, "Menu.vcf")
const Contacts = getContacts(RenamedItem)
const ChosenItem = chooseFromList(Contacts, @Menu)

if ChosenItem['Last Name'] contains @Save1 {
	const RandomNumber = randomNumber(1, @Save1)
	runSelf(RandomNumber)
} else {
	if ChosenItem['Last Name'] contains @Save2 {
		const RandomNumber1 = randomNumber(1, @Save2)
		runSelf(RandomNumber1)
	} else {
		if ChosenItem['Last Name'] contains @Save3 {
			const RandomNumber2 = randomNumber(1, @Save3)
			runSelf(RandomNumber2)
		} else {
			if ChosenItem['Last Name'] contains "Custom" {
				const ProvidedInput = prompt("How many sides?", "Number")
				const RandomNumber3 = randomNumber(1, ProvidedInput)
				runSelf(RandomNumber3)
			} else {
				share(@iCloudLink)
				alert("Thank You for sharing!", "😎")
				const Text1 = "Thank you for sharing"
				runSelf(Text1)
			}
		}
	}
}
Abrir no Cherri Playground Descompilado com cherri 2.3.0 (GPL-2.0). Pode precisar de pequenos ajustes antes de compilar.

Avaliações e comentários

Escrever uma avaliação
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ainda não há avaliações. Seja o primeiro a compartilhar o que você pensa!

Publicidade

Mais de asboy

Ver tudo

Você também pode gostar

Ver tudo
Publicidade