Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m=peripheral.wrap("top")
- local nasa = colors.red
- local circfab = colors.red
- local ecomp = colors.red
- local oxgear = colors.red
- local oxmach = colors.red
- local rocket = colors.red
- local para = colors.red
- local buggy = colors.red
- local rlp = colors.red
- local bfp = colors.red
- local rbf = colors.red
- function writeList()
- m.clear()
- m.setTextColor(colors.white)
- m.setCursorPos(17,1)
- m.write("Mission: Moon Dash")
- m.setCursorPos(2,3)
- m.write("To Do:")
- m.setTextColor(nasa)
- m.setCursorPos(4,4)
- m.write("N.A.S.A Work Bench")
- m.setTextColor(circfab)
- m.setCursorPos(4,5)
- m.write("Circuit Fabricator")
- m.setTextColor(ecomp)
- m.setCursorPos(4,6)
- m.write("Electric Compressor")
- m.setTextColor(oxgear)
- m.setCursorPos(4,7)
- m.write("Oxygen Gear")
- m.setTextColor(oxmach)
- m.setCursorPos(4,8)
- m.write("Oxygen Machines")
- m.setTextColor(rocket)
- m.setCursorPos(4,9)
- m.write("Rocket")
- m.setTextColor(para)
- m.setCursorPos(4,10)
- m.write("Parachute")
- m.setTextColor(buggy)
- m.setCursorPos(4,11)
- m.write("Moon Buggy")
- m.setTextColor(rlp)
- m.setCursorPos(4,12)
- m.write("Rocket Launch Pad")
- m.setTextColor(bfp)
- m.setCursorPos(4,13)
- m.write("Buggy Fuel Pad")
- m.setTextColor(rbf)
- m.setCursorPos(4,14)
- m.write("Rocket and Buggy Fuel")
- m.setTextColor(colors.white)
- end
- function fillTable()
- m.setTextColor(colors.white)
- button.setTable("Silo Door", door, 4,16,16,18)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function getClick2()
- event,side,x,y = os.pullEvent("monitor_touch")
- if (x>=3) and (x<=21) and (y==4) then
- print("NASA("..x..","..y..")")
- if nasa == colors.red then
- nasa = colors.green
- writeList()
- else
- nasa = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=20) and (y==5) then
- print("CircFab("..x..","..y..")")
- if circfab == colors.red then
- circfab = colors.green
- writeList()
- else
- circfab = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=22) and (y==6) then
- print("E-comp("..x..","..y..")")
- if ecomp == colors.red then
- ecomp = colors.green
- writeList()
- else
- ecomp = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=14) and (y==7) then
- print("OxGear("..x..","..y..")")
- if oxgear == colors.red then
- oxgear = colors.green
- writeList()
- else
- oxgear = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=18) and (y==8) then
- print("OxMach("..x..","..y..")")
- if oxmach == colors.red then
- oxmach = colors.green
- writeList()
- else
- oxmach = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=9) and (y==9) then
- print("Rocket("..x..","..y..")")
- if rocket == colors.red then
- rocket = colors.green
- writeList()
- else
- rocket = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=12) and (y==10) then
- print("Parachute("..x..","..y..")")
- if para == colors.red then
- para = colors.green
- writeList()
- else
- para = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=13) and (y==11) then
- print("MoonBuggy("..x..","..y..")")
- if buggy == colors.red then
- buggy = colors.green
- writeList()
- else
- buggy = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=20) and (y==12) then
- print("RLP("..x..","..y..")")
- if rlp == colors.red then
- rlp = colors.green
- writeList()
- else
- rlp = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=17) and (y==13) then
- print("BFP("..x..","..y..")")
- if bfp == colors.red then
- bfp = colors.green
- writeList()
- else
- bfp = colors.red
- writeList()
- end
- fillTable()
- end
- if (x>=4) and (x<=24) and (y==14) then
- print("RBF("..x..","..y..")")
- if rbf == colors.red then
- rbf = colors.green
- writeList()
- else
- rbf = colors.red
- writeList()
- end
- fillTable()
- end
- end
- function door()
- button.toggleButton("Silo Door")
- redstone.setOutput("back",true)
- print("Door")
- sleep(.25)
- redstone.setOutput("back",false)
- end
- writeList()
- fillTable()
- while true do
- getClick()
- getClick2()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement