Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- MineBotHost v1.0.0
- ]]--
- function findModem()
- local periList = peripheral.getNames()
- for i = 1, #periList do
- if peripheral.getType(periList[i]) == "modem" then
- return periList[i]
- end
- end
- return nil
- end
- function findMonitor()
- local periList = peripheral.getNames()
- for i = 1, #periList do
- if peripheral.getType(periList[i]) == "monitor" then
- return periList[i]
- end
- end
- return nil
- end
- -- Find the side of the modem and activate it.
- local modem = findModem()
- if rednet.isOpen(modem) == false then
- rednet.open(modem)
- end
- -- Find the monitor connected to the PC.
- local monitor = findMonitor()
- if monitor == nil then
- print("ERROR: Unable to find monitor...")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement