ShareShortcuts

Roll A Die

Quick and easy rolling of different types of dice

theshortcutguy2
Создать форк «Roll A Die»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы theshortcutguy2 получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
39K
Сохранено
0
Действия
37
Категория
Calculations
Версия
1.0
Язык
EN

Quick and easy rolling of different types of dice. Has a custom die option.

Что нового

Версия 1.0

First release

История версий
1.0 18 сен 2022 г.

First release

Что делает

Действий: 37
  1. Choose from Menu
    What Kind?
  2. Choose from Menu
    tetrahedron (4 sides)
  3. Random Number
  4. Show Notification
    Rolling...
  5. Wait
  6. Show Notification
    …
  7. Choose from Menu
    normal die (6 sides)
  8. Random Number
  9. Show Notification
    Rolling...
  10. Wait
  11. Show Notification
    …
  12. Choose from Menu
    octahedron (8 sides)
  13. Random Number
  14. Show Notification
    Rolling...
  15. Wait
  16. Show Notification
    …
  17. Choose from Menu
    dodecahedron (12 sides)
  18. Random Number
  19. Show Notification
    Rolling...
  20. Wait
  21. Show Notification
    …
  22. Choose from Menu
    icosahedron (20 sides)
  23. Random Number
  24. Show Notification
    Rolling...
  25. Wait
  26. Show Notification
    …
  27. Choose from Menu
    custom die (# number of sides)
  28. Ask for Input
    How Many Sides?
  29. Random Number
  30. Show Notification
    Rolling...
  31. Wait
  32. Show Notification
    …
  33. Choose from Menu
    Roll Again?
  34. Choose from Menu
    Yes
  35. Run Shortcut
    Roll A Die
  36. Choose from Menu
    No
  37. Stop This Shortcut

Посмотреть как код
Бета

Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.

#define color gray
#define glyph boxOutline


menu "What Kind?" {
item "tetrahedron (4 sides)":
	randomNumber(1, 4)
	showNotification("Rolling... ", false)
	wait(0)
	showNotification(, false)
item "normal die (6 sides)":
	randomNumber(1, 6)
	showNotification("Rolling... ", false)
	wait(0)
	showNotification(, false)
item "octahedron (8 sides)":
	randomNumber(1, 8)
	showNotification("Rolling... ", false)
	wait(0)
	showNotification(, false)
item "dodecahedron (12 sides)":
	randomNumber(1, 12)
	showNotification("Rolling... ", false)
	wait(0)
	showNotification(, false)
item "icosahedron (20 sides)":
	randomNumber(1, 20)
	showNotification("Rolling... ", false)
	wait(0)
	showNotification(, false)
item "custom die (# number of sides)":
	const ProvidedInput = prompt("How Many Sides?", "Number")
	randomNumber(1, ProvidedInput)
	showNotification("Rolling... ", false)
	wait(0)
	showNotification(, false)
}

menu "Roll Again?" {
item "Yes":
	runSelf()
item "No":
	stop()
}
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

Оценки и отзывы

Написать отзыв
–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Пока нет отзывов. Поделись мнением первым!

Реклама

Ещё от theshortcutguy2

См. все

Вам также может понравиться

См. все
Реклама