Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. while true do
  2. -- pull a laser head for new target
  3. type, x_, y_, z_, id, meta, res = laser.getScanResult()
  4. if res ~= -1 then
  5. firedCount = firedCount + 1
  6.  
  7. -- send serialized target info
  8. target = textutils.serialize( { x = x_, y = y_, z = z_ } )
  9. print("Target#" .. firedCount .. " is " .. target)
  10.  
  11. -- init main laser with target
  12. modem.transmit(3, 1, target)
  13.  
  14. -- init boost (remove comment on next line if you use boosters)
  15. -- modem.transmit(4, 1, "go")
  16. end
  17. sleep(0.05)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement