Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local term = require("term")
- local component = require("component")
- local m = component.modem
- local event = require("event")
- m.open(1)
- event.listen("motion", function(_, _, x, y, z, dave)
- print(dave.." detected at:"..x..y..z)
- x=math.ceil(x)
- y=math.ceil(y)
- z=math.ceil(z)
- x=114.5+x
- z=-134.5+z
- local sendStr=x.."g"..z
- m.broadcast(1,sendStr)
- print(x.." "..y.." "..z)
- print(sendStr)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement