Posted 03 March 2012 - 02:56 AM
Just a little program that presents a fortune, nothing that fancy. Note: I know it isn't terminate proof– It's not a national bank's lock, just a fortune system :unsure:/>/>
local yes = "Y"
local items = {"A dubious friend may be an enemy in camouflage.", "A friend asks only for your time not your money.", "A new perspective will come with the new year.", "A golden egg of opportunity falls into your lap this month.", "All your hard work will soon pay off.", "A soft voice may be awfully persuasive.", "A friend is a present you give yourself.", "Depart not from the path which fate has you assigned.", "Do not be intimidated by the eloquence of others.", "Get your mind set, confidence will lead you on.", "Love is a warm fire to keep the soul warm.", "Long life is in store for you."}
term.clear() --Clears screen and
term.setCursorPos(1,1) --sets position
write("Welcome! Would you like to take a fortune cookie? Y or N: ")
input = read()
if input == yes then
print("Okay, here you go!")
sleep(1)
print(items[math.random(1, #items)]) -- Pick a random item
sleep(3)
os.shutdown()
else
print("Oh, okay then.")
sleep(1)
os.shutdown()
end