Jaronel

Custom OpenCCSensors Security v2

Jun 7th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2.  
  3. local proxSense = sensor.wrap("top")
  4. term.redirect(peripheral.wrap("right"))
  5.  
  6. repeat
  7.   term.clear()
  8.  
  9.   for target in pairs(proxSense.getTargets()) do
  10.    
  11.     local detailedInfo = proxSense.getTargetDetails(target)
  12.     if detailedInfo.Name == "Player" then
  13.     print("--> "..target.." <--")
  14.     end
  15.   end
  16. until false
Advertisement
Add Comment
Please, Sign In to add comment