Jump to content




Kizzbawx9001


2 replies to this topic

#1 Kizz

  • Members
  • 99 posts
  • LocationLouisville, Kentucky

Posted 26 August 2014 - 05:25 PM

Greetings again ladies and gentlemens...

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

Posted Image

Posted Image

Posted Image

Posted Image

#2 InputUsername

  • Members
  • 231 posts
  • LocationThe Netherlands

Posted 27 August 2014 - 02:35 PM

Pretty okay program. I do think you should remove the slightly sexist remark "turned down to ... you woman". Also, the name... it hurts my eyes ;__;

#3 Kizz

  • Members
  • 99 posts
  • LocationLouisville, Kentucky

Posted 27 August 2014 - 02:56 PM

Haha it was like that because I was having some fun with my buddies. I didn't plan to release this but decided I would because it makes the radio a much more enjoyable device.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users