heres what i got so far.. (it only goes up to 10 for now because the code has been copied and re-purposed from another program)
val = math.random(0,10)
sleep (1)
while true do
if val == "1" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.brown)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.brown)
end
if val == "2" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.white)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.white)
end
if val == "3" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.blue)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.blue)
end
if val == "4" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.lightBlue)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.lightBlue)
end
if val == "5" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.pink)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.pink)
end
if val == "6" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.orange)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.orange)
end
if val == "7" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.yellow)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.yellow)
end
if val == "8" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.purple)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.purple)
end
if val == "9" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.red)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.red)
end
if val == "10" then
rs.setBundledOutput("back", rs.getBundledOutput("back") + colours.green)
sleep(1)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colours.green)
end
end
right now, the only thing this program does is cause CPU usage to rocket to 100% and the only way to stop it is to kill the program then restart minecraft (tekkit)
any help is greatly appreciated.