Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. -- Init vars
  2. local quarryid= 23
  3. local pumpid = 0
  4. -- Wrapping stuff
  5. rednet.open("bottom")
  6. b = peripheral.wrap("top")
  7. -- Starting with script
  8. while true do
  9. -- Step 1 = get information from quarry
  10. rednet.send(quarryid, "inforequest")
  11. id, msg = rednet.receive(3)
  12. if msg == nil then
  13. quarry="noconnection"
  14. else
  15. quarry=msg
  16. end
  17. -- Step 2 = process information from quarry
  18. if quarry==0 then
  19. quarrystat="active"
  20. else
  21. quarrystat="not active"
  22. end
  23. -- Step 3 = output information from quarry
  24. b.clear() -- Clear screen before running
  25. -- Create a init box
  26. b.addBox(5,5,50,10,0xFFFFFF,0.3)
  27. -- Create init text
  28. b.addText(6,6,"TekkitOS!?",0x123456)
  29. -- Create clock
  30. time= os.time()
  31. formattedTime= textutils.formatTime(time, true)
  32. clock = b.addText(6,10,"",0x123456)
  33. clock.setText(tostring(formattedTime))
  34. sleep(0.75)
  35. -- Make quarry info box
  36. b.addBox(5,20,100,20,0xFF0000,0.2)
  37. quarrytext= b.addText(6,21,"",0x123456)
  38. quarrytext.setText("Quarry is "..quarrystat.." with a power of "..quarry)
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement