I came across a site with programs that print the lyrics to 99 Bottles of Beer in 1103 different programming languages. After perusing the list, which included everything from Brainf*ck to PHP to MS DOS batch files. One thing it lacked was a Halo Script. Seeing as I was still bored out of my mind, I wrote one up and tested it.
Code: Select all
(global real bottles 99)
(script continuous drinkBeer
(if (> bottles 1)
(begin
(inspect bottles)
(print "bottles of beer on the wall!")
(inspect bottles)
(print "bottles of beer!")
(print "Take one down, pass it around")
(set bottles (- bottles 1))
(inspect bottles)
(print "bottles of beer on the wall!")
(print " ")
)
)
(if (= bottles 1)
(begin
(print "One bottle of beer on the wall")
(print "One last bottle of beer!")
(print "Take it down, pass it around")
(print "No more bottles of beer on the wall!")
(print " ")
(print "No bottles of beer on the wall")
(print "No more bottles of beer!")
(print "Go to the store, buy some more")
(print "99 bottles of beer on the wall!")
(set bottles -1)
(print " ")
)
)
)
Enjoy.