Advertisement
PhyscoKillerMonkey

List Mobs

Apr 8th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. os.loadAPI("ocs/apis/sensor")
  4. local prox = sensor.wrap("top")
  5.  
  6. while true do
  7. term.clear()
  8. term.setCursorPos(1,1)
  9. target = prox.getTargets()
  10. for k,v in pairs(target) do
  11.     print(k)
  12.     details = prox.getTargetDetails(k)
  13.     print("X: "..details.Position.X)
  14.     print("Y: "..details.Position.Y)
  15.     print("Z: "..details.Position.Z)
  16. end
  17. sleep(0.5)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement