Advertisement
Guest User

drone.lua

a guest
Oct 16th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local n=component.proxy(component.list("navigation")())
  2. local c=component.proxy(component.list("chunkloader")())
  3. local g=component.proxy(component.list("geolyzer")())
  4. local m=component.proxy(component.list("modem")())
  5.  
  6.  
  7.  
  8. local x, y, z = n.getPosition()
  9.  
  10. if m.open(1000) == false then
  11.   event.onError("failled to bind port")
  12. end
  13.  
  14. local function test()
  15.   if c.isActive() == false then
  16.     c.setActive(true)
  17.   end
  18. end
  19.  
  20. local function pos()
  21.   m.broadcast(1000, x)
  22.   m.broadcast(1000, y)
  23.   m.broadcast(1000, z)
  24. end
  25.  
  26. test()
  27. pos()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement