ShareShortcuts

Dice Roller

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

asboy
Bifurcar “Dice Roller”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que asboy reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
36K
Guardado
0
Acciones
40
Categoría
Fun
Versión
1.0
Idioma
EN

Vista previa

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

Novedades

Versión 1.0

First release

Historial de versiones
1.0 14 de dic. de 2022

First release

Qué hace

40 acciones
  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 las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo 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 en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

Más de asboy

Ver todo

También te puede gustar

Ver todo
Publicidad