Advertisement
BigGamingGamers

pnone app mine

Nov 14th, 2020
9,095
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. --PHONE APP MINE--
  2.  
  3. local SERVER_PORT = 420
  4. local PHONE_PORT = 69
  5.  
  6. modem = peripheral.wrap("back")
  7. local size = vector.new()
  8.  
  9. if (#arg == 3) then
  10. size.x = tonumber(arg[1])
  11. size.y = tonumber(arg[2])
  12. size.z = tonumber(arg[3])
  13. else
  14. print("NO SIZE GIVEN")
  15. os.exit(1)
  16. end
  17.  
  18. local target = vector.new(gps.locate())
  19. local payloadMessage = string.format("%d %d %d %d %d %d %d",
  20. target.x, target.y - 1, target.z,
  21. size.x, size.y, size.z,
  22. 1
  23. )
  24.  
  25. print(string.format("Targetting %d %d %d", target.x, target.y, target.z))
  26. modem.transmit(SERVER_PORT, PHONE_PORT, payloadMessage)
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement