Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local internet = component.proxy(component.list("internet")())
- local modem = component.proxy(component.list('modem')())
- drone=component.proxy(component.list('drone')())
- function sleep(n)
- local t0 = computer.uptime()
- while computer.uptime() - t0 <= n do computer.pushSignal("wait") computer.pullSignal() end
- end
- while true do
- local response = internet.request("http://hidden.me/mc/getAction.php") --gets a command like drone.move(0,1,0)
- sleep(1)
- if response.finishConnect() then
- message = response.read()
- if tostring(message) == "test" then
- drone.setStatusText("OOC")
- else
- modem.broadcast(20, tostring(message))
- pcall(load, 'drone.move(1,0,0)')
- drone.setStatusText("M: "..tostring(message))
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement