Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --bee door host V1
- local rChannel=104
- local hChannel=103
- local osName=beeDoor
- local change=0
- local x,y,z=gps.locate()
- modem=peripheral.wrap("back")
- modem.open(rChannel)
- modem.open(hChannel)
- print("modem status:",modem.isOpen(rChannel))
- print("modem status:",modem.isOpen(hChannel))
- while true do
- local event, osef, osef, osef, recieved, osef = os.pullEvent("modem_message")
- command=textutils.unserialize(recieved)
- if command.cx==nil or command.cy==nil or command.cz==nil then
- print("nil")
- else
- if command.cx>=1378 and command.cx<=1383 and command.cy>=60 and command.cy<=68 and command.cz>=917 and command.cz<=923 and (command.pass=="4GzRLp9LySZsj4c86i5NwGAzh89R528a" or command.pass=="JtfDGV3Y35VDx6sf9r8Q26Pfzc7ciR27") then
- if command.cx>=1379 and command.cx<=1382 and command.cy>=60 and command.cy<=68 and command.cz>=918 and command.cz<=922 then
- print("-----------------------")
- redstone.setOutput("right",false)
- doorState="open"
- print("door opened")
- print(command.cx)
- print(command.cy)
- print(command.cz)
- else
- print("-----------------------")
- redstone.setOutput("right",true)
- doorState="close"
- print("door closed")
- print(command.cx)
- print(command.cy)
- print(command.cz)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement