Advertisement
Le_JuiceBOX

[App] fleet_slave.lua

Jan 22nd, 2025 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. -- eS2ExtpE
  2.  
  3. shell.run("delete netLib.lua")
  4. shell.run("pastebin get f3afq6kB netLib.lua")
  5. os.sleep(1)
  6. local netLib = require("netLib"):new()
  7. rednet.open("left")
  8.  
  9. repeat
  10.     term.clear()
  11.     print()
  12.     print("Waiting for a message...")
  13.     print()
  14.     id, message = rednet.receive()
  15. until id
  16. print("Message recieved, parsing info...")
  17. local packet = netLib:parsePacket(message)
  18. print("Message parsed, running cmd '"..packet.cmd.."'...")
  19. os.sleep(0.5)
  20. if packet.cmd == "MINE" then
  21.     local a = packet.args
  22.     shell.run("OS/Programs/Turtle/mine.lua "..a[1].." "..a[2].." "..a[3].." "..a[4].." "..a[5].." "..a[6])
  23. end
  24.  
  25.  
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement