Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Change log: V1.1: All I did was clean up the code a little to bit to make it look nicer and easier to read. The code itself isn't any different at all (Except for changing 10+1-i to 11-i. I don't know what I was thinking when I did that part; I probably wasn't xD).
- local sides = {"top","bottom","left","right","front","back"}
- local instr = {
- [1]="A note block is required for audio cues.",
- [2]="Make sure the note block is making a sound that is both audible and pleasant to you.",
- [3]="Relax yourself:",
- [4]="Get into a comfortable position.",
- [5]="Close your eyes.",
- [6]="Listen for audio cues.",
- [7]="Inhale through your nose for 5 seconds.",
- [8]="Hold for 3 seconds.",
- [9]="Exhale through your mouth for 8 seconds.",
- [10]="Repeat 10 times.",
- [11]="Press any key when you're ready to begin.",
- [12]="A sound indicating to begin will play in 10 seconds.",
- [13]="A sound will play twice once finished.",
- [14]="If time is a concern, this practice only takes less than 3 minutes.",
- [15]="This session is now finished. I hope you have a relaxing rest of your day."
- }
- function sound(t)
- sleep(t)
- for s = 1, #sides do
- rs.setOutput(sides[s],true)
- end
- sleep(0.05)
- for s = 1, #sides do
- rs.setOutput(sides[s],false)
- end
- end
- term.clear() term.setCursorPos(1,1)
- for i=1,#instr-1 do
- print(instr[i])
- end
- os.pullEvent("key")
- term.clear() term.setCursorPos(1,1)
- print(instr[3]) print(instr[4]) print(instr[5]) print(instr[12]) sound(10)
- for i=1,10 do
- term.clear() term.setCursorPos(1,1) print(instr[7]) print(11-i) sound(5)
- term.clear() term.setCursorPos(1,1) print(instr[8]) print(11-i) sound(3)
- term.clear() term.setCursorPos(1,1) print(instr[9]) print(11-i) sound(8)
- end
- term.clear() term.setCursorPos(1,1)
- print(instr[#instr])
- sound(0.25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement