Advertisement
Guest User

rt1

a guest
Jun 8th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1.  
  2. os.loadAPI("ocs/apis/sensor")
  3. local modem = peripheral.wrap("bottom")
  4. local sendOnChannel = 1
  5. local replyChannel = 2
  6. prox = sensor.wrap("top")
  7. while true do
  8.  
  9. term.setCursorPos(1,3)
  10. moreDetails = prox.getTargetDetails("3,0,0")
  11. print(moreDetails.Tanks[1].Amount)
  12. term.setCursorPos(1,4)
  13. moreDetails = prox.getTargetDetails("-3,0,0")
  14. print(moreDetails.Tanks[1].Amount)
  15.  
  16. modem.transmit(2,1,moreDetails.Tanks[1].Amount)
  17.  
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement