Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Init vars
- local quarryid= 23
- local pumpid = 0
- -- Wrapping stuff
- rednet.open("bottom")
- b = peripheral.wrap("top")
- -- Starting with script
- while true do
- -- Step 1 = get information from quarry
- rednet.send(quarryid, "inforequest")
- id, msg = rednet.receive(3)
- if msg == nil then
- quarry="noconnection"
- else
- quarry=msg
- end
- -- Step 2 = process information from quarry
- if quarry==0 then
- quarrystat="active"
- else
- quarrystat="not active"
- end
- -- Step 3 = output information from quarry
- b.clear() -- Clear screen before running
- -- Create a init box
- b.addBox(5,5,50,10,0xFFFFFF,0.3)
- -- Create init text
- b.addText(6,6,"TekkitOS!?",0x123456)
- -- Create clock
- time= os.time()
- formattedTime= textutils.formatTime(time, true)
- clock = b.addText(6,10,"",0x123456)
- clock.setText(tostring(formattedTime))
- sleep(0.75)
- -- Make quarry info box
- b.addBox(5,20,100,20,0xFF0000,0.2)
- quarrytext= b.addText(6,21,"",0x123456)
- quarrytext.setText("Quarry is "..quarrystat.." with a power of "..quarry)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement