Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Automatische Awakened Draconium Farm --
- -- Screen Programm --
- -- Draconic Evolution --
- -- von Thor_s_Crafter --
- -- Version 1.0 --
- mon = peripheral.find("monitor")
- function autoUpdate()
- if fs.exists("startup") then
- shell.run("rm startup")
- end
- local file = fs.open("startup","w")
- file.writeLine("shell.run(\"rm draconium\")")
- file.writeLine("shell.run(\"pastebin get ZYjNXvH5 draconium\")")
- file.writeLine("shell.run(\"draconium\")")
- file.close()
- end
- function checkRednet()
- --Suche Modem
- local pList = peripheral.getNames()
- for i=1,#pList do
- if peripheral.getType(pList[i]) == "modem" then
- rednet.open(pList[i])
- modem = pList[i]
- end
- end
- while modem == nil do
- term.clear()
- term.setCursorPos(1,1)
- print("Bitte ein Wireless Modem an eine (beliebige) freie Seite anschliessen!")
- --Suche Modem erneut
- local pList = peripheral.getNames()
- for i=1,#pList do
- if peripheral.getType(pList[i]) == "modem" then
- rednet.open(pList[i])
- modem = pList[i]
- end
- end
- print("Enter druecken...")
- local event,key = os.pullEvent("key")
- while key ~= 28 do
- sleep(0.5)
- event,key = os.pullEvent("key")
- end
- end
- local id,msg,protocol = rednet.receive(10)
- if msg == "test" and protocol == "draconium" then
- rednet.send(id,msg,protocol)
- end
- print("Einrichtung beendet.")
- term.clear()
- print("Programm laueft...")
- end
- function receiveData()
- id,msg = rednet.receive()
- mon.clear()
- mon.setCursorPos(1,1)
- mon.write("-- Statusdisplay der Turtle --")
- mon.setCursorPos(1,3)
- mon.write("Durchlauf: "..msg[1])
- mon.setCursorPos(1,5)
- mon.write("Status:")
- mon.setCursorPos(1,6)
- mon.write(msg[2])
- mon.setCursorPos(1,7)
- mon.write(msg[3])
- mon.setCursorPos(1,9)
- mon.write("Bitte Magneten o.รค. ausschalten!")
- end
- autoUpdate()
- checkRednet()
- while true do
- receiveData()
- if msg[2] == "Fertig" then
- break
- end
- end
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment