Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 1.1.0
- while true do
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColour(colours.blue)
- print("Redstone V 1.1.0")
- print(" ")
- term.setTextColour(colours.brown)
- print(" Input Output")
- local Sides = redstone.getSides()
- local Values = {}
- local Out = {}
- local Inputs = {}
- for i=1,#Sides do
- Side = redstone.getInput(Sides[i])
- Outp = redstone.getOutput(Sides[i])
- if Side == true then
- strSide = "true"
- else
- strSide = "false"
- end
- table.insert(Values, strSide)
- table.insert(Out, Outp)
- end
- for g=1,#Sides do
- term.setTextColour(colours.brown)
- write(Sides[g])
- x, y = term.getCursorPos()
- term.setCursorPos(8,y)
- write(": ")
- if Values[g] == "true" then
- term.setTextColour(colours.green)
- else
- term.setTextColour(colours.red)
- end
- write(Values[g])
- term.setTextColour(colours.brown)
- term.setCursorPos(16,y)
- write(", ")
- if Out[g] == true then
- term.setTextColour(colours.green)
- else
- term.setTextColour(colours.red)
- end
- print(Out[g])
- end
- print(" ")
- term.setTextColour(colours.yellow)
- write("@redstone>")
- input = read()
- if input == "exit" then
- return false
- end
- for i in string.gmatch(input, "%S+") do
- table.insert(Inputs, i)
- end
- if Inputs[2] == "on" then
- OnOrOff = true
- end
- if Inputs[2] == "off" then
- OnOrOff = false
- end
- if Inputs[1] == "bottom" or Inputs[1] == "top" or Inputs[1] == "back" or Inputs[1] == "front" or Inputs[1] == "right" or Inputs[1] == "left" then
- redstone.setOutput(Inputs[1], OnOrOff)
- end
- if input == "help" then
- term.setTextColour(colours.green)
- write("help")
- term.setTextColour(colours.white)
- print(" : shows this panel")
- term.setTextColour(colours.green)
- write("exit")
- term.setTextColour(colours.white)
- print(" : get out of here")
- print(" ")
- term.setTextColour(colours.white)
- write("SYNTAX : ")
- term.setTextColour(colours.green)
- write("[side] [on]")
- term.setTextColour(colours.white)
- write(" or ")
- term.setTextColour(colours.green)
- print("[off]")
- os.sleep(0.5)
- os.pullEvent( "key" )
- end
- os.sleep(0.08)
- end
Add Comment
Please, Sign In to add comment