Scan with your iPhone to install
Preview
PLEASE GO TO MY PROFILE TO GET THE LATEST VERSION OF DICE ROLLER. THIS IS NOT THE LATEST.
What's New
Version 1.0
First release
What it does
40 actions-
If
-
Text
-
Set VariableMenu
-
If
-
Text
-
Set VariableMenu
-
Dictionary
-
Text
-
Set VariableiCloudLink
-
Number
-
Set VariableSave1
-
Number
-
Set VariableSave2
-
Number
-
Set VariableSave3
-
Text
-
Set Name
-
Get Contacts from Input
-
Choose from List
-
If
-
Random Number
-
Run ShortcutDice Roller
-
If
-
If
-
Random Number
-
Run ShortcutDice Roller
-
If
-
If
-
Random Number
-
Run ShortcutDice Roller
-
If
-
If
-
Ask for InputHow many sides?
-
Random Number
-
Run ShortcutDice Roller
-
If
-
Share
-
Show Alert😎
-
Text
-
Run ShortcutDice Roller
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#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)
}
}
}
}
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by asboy
You Might Also Like
Advertisement