Today I bring you, along with my KESS program, something I like to call the Kizzbawx9001.
The Kizzbawx9001 is a Jukebox program that works with the Openblocks radios. It allows you to turn the radio on and off, as well as change the volume.
Please feel free to use any of my code!
Also keep in mind, the radio is part of the Openblocks mod, and thus this program may not be relevant for vanilla Minecraft.
The code:
while true do --Main menu print'Welcome to the Kizzbawx9001!' print'' print'Hit 1 to turn on and off.' print'Hit 2 to turn the volume up!' print'Hit 3 to turn the volume down, loser.' r=io.read() --get input if r~="1" and r~="2" and r~="3" then --input check print'Bad input idiot!' sleep(.5) end if r=="1" or r=="2" or r=="3" then--double check r=r+1-1--convert to numeric end if r==1 then --turn on/off chk=redstone.getAnalogOutput("top") if chk==0 then redstone.setAnalogOutput("top",5) print'Turned on!' sleep(1.5) end if chk>0 then redstone.setAnalogOutput("top",0) print'Turned off. Pussy.' sleep(1.5) end end if r==2 then --volume up chkv=redstone.getAnalogOutput("top") if chkv<15 then redstone.setAnalogOutput("top",chkv+1) chkv=redstone.getAnalogOutput("top") print("Pumped it up to "..chkv.." yo!") sleep(.5) end if chkv==15 then print'Volume max!' sleep(.5) end end if r==3 then --volume down chkv=redstone.getAnalogOutput("top") if chkv>1 then redstone.setAnalogOutput("top",chkv-1) chkv=redstone.getAnalogOutput("top") print("Dropped it down to "..chkv.." you woman.") sleep(.5) end if chkv==1 then print'Volume lowest!' sleep(.5) end end term.clear() --clear screen term.setCursorPos(1,1) --reset cursor end
Pastebin: http://pastebin.com/Jw7AfmyX
Imgur Album: http://imgur.com/a/HB0Wt