startup_clients.lua
10 lines · 564 B
startup
Copy & run
wget https://perlytiara.github.io/turtles.tips/raw/programs/perlytiara/BigBaemingGamers/server/startup_clients.lua
| 1 | -- startup |
| 2 | local m = peripheral.find("modem", function(_, mm) return mm.isWireless and mm.isWireless() end) |
| 3 | if not m then error("Attach wireless modem") end |
| 4 | m.open(0) -- client port |
| 5 | m.transmit(420, 0, "CLIENT_DEPLOYED") -- ping server |
| 6 | -- fetch and run client |
| 7 | local url = "https://raw.githubusercontent.com/perlytiara/CC-Tweaked-TurtsAndComputers/refs/heads/main/programs/perlytiara/BigBaemingGamers/client/client.lua" |
| 8 | local r = http.get(url); local code = r.readAll(); r.close() |
| 9 | local f = fs.open("client.lua","w"); f.write(code); f.close() |
| 10 | shell.run("client.lua") |