Advertisement
abstract_abstract

spatial.lua

Oct 14th, 2024
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3.  
  4. local function clickPocketDimension()
  5.     redstone.setOutput("bottom", true)
  6.     os.sleep(1)
  7.     redstone.setOutput("bottom", false)
  8.     os.sleep(1)
  9. end
  10.  
  11.  
  12. local function dcPD()
  13.     clickPocketDimension()
  14.     clickPocketDimension()
  15. end
  16.    
  17.  
  18. if #arg == 0 then
  19.     print("Client has been started")
  20.     while true do
  21.         local senderID, message, protocol = rednet.receive()
  22.         print("Sender ID: " .. senderID)
  23.         print("Message: " .. message)
  24.         print("Protocol: " .. protocol)
  25.        
  26.         if protocol == "message" then
  27.             dcPD()
  28.         end
  29.     end
  30. elseif arg[1] == "send" then
  31.     rednet.send(tonumber(arg[2]), "Sended", "message")
  32.    
  33. end
  34.  
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement