(set: $one to 0)
(set: $two to 0)
(set: $three to 0)
(set: $four to 0)
(set: $five to 0)
(set: $six to 0)
(put: (prompt: "What's your question for the virtual I Ching?", "Question") into $question)
[[Now let's determine what to meditate with on it...|Flip/Roll]] (set: _diceRoll to (random: 1, 16))
(if: $one is 0)[First line! (set: $one to _diceRoll)]
(else-if: $two is 0)[Second line! (set: $two to _diceRoll)]
(else-if: $three is 0)[Third line! (set: $three to _diceRoll)]
(else-if: $four is 0)[Fourth line! (set: $four to _diceRoll)]
(else-if: $five is 0)[Fifth line! (set: $five to _diceRoll)]
(else-if: $six is 0)[Sixth line! (set: $six to _diceRoll)]
(else:)[[[That's six lines now. Moving on...|After Six]]]
(if: _diceRoll is 1 and $complete is 0)[_diceRoll... [[Hmm...|Old Yin]]]
(else-if: (_diceRoll >= 2 and <= 8) and $complete is 0)[_diceRoll... [[Hmm...|Young Yin]]]
(else-if: (_diceRoll >= 9 and <= 11) and $complete is 0)[_diceRoll... [[Hmm...|Old Yang]]]
(else-if: (_diceRoll >=12 and <= 16) and $complete is 0)[_diceRoll... [[Hmm...|Young Yang]]]
(else:)[](set: _diceRoll to (random: 1, 2))
Do you accept this line's fate?
(if: _diceRoll is 1)[[[Yes|Flip/Roll]] or [[no|Reject Line]]...]
(else-if: _diceRoll is 2)[[[Yes|Flip/Roll]] or [[no|Forced Accept]]...]
(if: $six > 0)[(set: $complete to 1)]Are you ready to see the hexagram to meditate on your question with?
Remember: you asked, "$question"
[[Yes|Hexagram (x64)]] or [[no|Go Again?]]?
(if: $one is 1 or ($one >= 9 and <= 11))[(set: $changing1 to 1)]
(else-if: $two is 1 or ($two >= 9 and <= 11))[(set: $changing2 to 1)]
(else-if: $three is 1 or ($three >= 9 and <= 11))[(set: $changing3 to 1)]
(else-if: $four is 1 or ($four >= 9 and <= 11))[(set: $changing4 to 1)]
(else-if: $five is 1 or ($five >= 9 and <= 11))[(set: $changing5 to 1)]
(else-if: $six is 1 or ($six >= 9 and <= 11))[(set: $changing6 to 1)]
(if: $changing1 is 1 or $changing2 is 1 or $changing3 is 1 or $changing4 is 1 or $changing5 is 1 or $changing6 is 1)[(set: $changing to 1)]
(if: $one is 1 or ($one >= 2 and <= 8))[(set: $one to "Yin")]
(else:)[(set: $one to "Yang")]
(if: $two is 1 or ($two >= 2 and <= 8))[(set: $two to "Yin")]
(else:)[(set: $two to "Yang")]
(if: $three is 1 or ($three >= 2 and <= 8))[(set: $three to "Yin")]
(else:)[(set: $three to "Yang")]
(if: $four is 1 or ($four >= 2 and <= 8))[(set: $four to "Yin")]
(else:)[(set: $four to "Yang")]
(if: $five is 1 or ($five >= 2 and <= 8))[(set: $five to "Yin")]
(else:)[(set: $five to "Yang")]
(if: $six is 1 or ($six >= 2 and <= 8))[(set: $six to "Yin")]
(else:)[(set: $six to "Yang")]
Your top line is $six...
Your second line is $five...
Your third line is $four...
Your fourth line is $three...
Your fifth line is $two...
Your bottom line is $one...
Yin is a broken line, while yang is unbroken.
You may interpret your results <a href="http://www2.unipr.it/~deyoung/I_Ching_Wilhelm_Translation.html" target="_blank">here</a>. Going horizontally first, find the column that matches your top three lines. Then vertically, find the row that matches your bottom three lines. Click this number and reflect on your question.
(if: $changing is 1)[But wait... [[There's more...|Changed Hexagram (x64)]]]
(else:)[[[Moving on...|Go Again?]]]
(if: $changing1 is 1 and $one is "Yin")[(set: $one to "Yang")]
(else-if: $changing1 is 1)[(set: $one to "Yin")]
(if: $changing2 is 1 and $two is "Yin")[(set: $two to "Yang")]
(else-if: $changing2 is 1)[(set: $two to "Yin")]
(if: $changing3 is 1 and $three is "Yin")[(set: $three to "Yang")]
(else-if: $changing3 is 1)[(set: $three to "Yin")]
(if: $changing4 is 1 and $four is "Yin")[(set: $four to "Yang")]
(else-if: $changing4 is 1)[(set: $four to "Yin")]
(if: $changing5 is 1 and $five is "Yin")[(set: $five to "Yang")]
(else-if: $changing5 is 1)[(set: $five to "Yin")]
(if: $changing6 is 1 and $six is "Yin")[(set: $six to "Yang")]
(else-if: $changing6 is 1)[(set: $six to "Yin")]Some of your lines were changing... That means there's a second hexagram to reflect upon.
Your top line is $six...
Your second line is $five...
Your third line is $four...
Your fourth line is $three...
Your fifth line is $two...
Your bottom line is $one...
Yin is a broken line, while yang is unbroken.
You may interpret your results <a href="http://www2.unipr.it/~deyoung/I_Ching_Wilhelm_Translation.html" target="_blank">here</a>. Going horizontally first, find the column that matches your top three lines. Then vertically, find the row that matches your bottom three lines. Click this number and reflect on your question.
[[Moving on...|Go Again?]](set: _diceRoll to (random: 1, 2))
Maybe you'd like to try again?
(if: _diceRoll is 1)[[[Yes|Start]] or [[no|Reject]]...]
(else-if: _diceRoll is 2)[[[Yes|Reject]] or [[no|Reject]]...](if: $six > 0)[[[Fate doesn't seem to want to provide you a choice. That's six lines now. Moving on...|After Six]]]
(else:)[[[Fate doesn't seem to want to provide you a choice.|Flip/Roll]]][[0000|Accept?]](set: _diceRoll to (random: 1, 5))
(if: _diceRoll is 1)[[[0100|Accept?]]]
(else-if: _diceRoll is 2)[[[0101|Accept?]]]
(else-if: _diceRoll is 3)[[[0110|Accept?]]]
(else-if: _diceRoll is 4)[[[0111|Accept?]]]
(else-if: _diceRoll is 5)[[[1000|Accept?]]](set: _diceRoll to (random: 1, 3))
(if: _diceRoll is 1)[[[0001|Accept?]]]
(else-if: _diceRoll is 2)[[[0010|Accept?]]]
(else-if: _diceRoll is 3)[[[0011|Accept?]]](set: _diceRoll to (random: 1, 7))
(if: _diceRoll is 1)[[[1001|Accept?]]]
(else-if: _diceRoll is 2)[[[1010|Accept?]]]
(else-if: _diceRoll is 3)[[[1011|Accept?]]]
(else-if: _diceRoll is 4)[[[1100|Accept?]]]
(else-if: _diceRoll is 5)[[[1101|Accept?]]]
(else-if: _diceRoll is 6)[[[1110|Accept?]]]
(else-if: _diceRoll is 7)[[[1111|Accept?]]]Very well, [[try again...|Flip/Roll]]
(if: $six > 0)[(set: $six to 0)]
(else-if: $five > 0)[(set: $five to 0)]
(else-if: $four > 0)[(set: $four to 0)]
(else-if: $three > 0)[(set: $three to 0)]
(else-if: $two > 0)[(set: $two to 0)]
(else-if: $one > 0)[(set: $one to 0)]Fate must just not have it this time...