Advertisement
mr_arte

grosserweichenmanager.lua

May 19th, 2022
638
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     * Weichenmanager
  3.     * Personen-Cargo-Verteil-Programm
  4.     * FOR Minecraft-Mod: cc-tweaked-1.18.2-1.100.4
  5.     * in LUA
  6.     * © Robin Nahrstedt 2022
  7. ]]
  8.  
  9. -- ##### Variablen #####
  10.  
  11. -- ##### Funktionen #####
  12.  
  13. -- ##### Hauptprogramm #####
  14.  
  15. rednet.open("top")
  16.  
  17. while true do
  18.     id, message = rednet.receive()
  19.     print("ID: ", id)
  20.     print("Nachricht", message)
  21.  
  22.     if message == "11" then
  23.         rednet.send(PC1, "stop")
  24.         rednet.send(PC3, "stop")
  25.        
  26.     elseif message == "10" then    
  27.         rednet.send(PC1, "stop")
  28.         rednet.send(PC3, "stop")
  29.     end
  30.  
  31.     sleep(0.1)
  32. end
Advertisement
RAW Paste Data Copied
Advertisement