Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = 0
- mon = peripheral.wrap("back")
- anzahl = turtle.getItemCount(1)
- rs.setOutput("right",false)
- rs.setOutput("left",false)
- redstone.setBundledOutput("top", 0)
- mon.clear()
- turtle.select(1)
- turtle.drop()
- mon.setBackgroundColor(colors.black)
- function stop()
- if colors.test (redstone.getBundledInput("top"), colors.red) then ----- red = cancel
- mon.clear()
- mon.setTextColor(colors.red)
- mon.setCursorPos(1, 1)
- mon.write("Progamm wurde gestoppt")
- sleep(3)
- os.reboot()
- end
- end
- function drawGer()
- mon.clear()
- mon.setTextColor(colors.white)
- mon.setCursorPos(1, 3)
- mon.write("Bitte zuerst nur die Shard of Minium")
- mon.setCursorPos(1, 4)
- mon.write("in das")
- mon.setTextColor(colors.lime)
- mon.write(" gråBCne")
- mon.setTextColor(colors.white)
- mon.write(" Input-ME legen")
- mon.setCursorPos(1, 5)
- mon.write("")
- mon.setCursorPos(1, 9)
- mon.write("Zum Berechnen dann hier klicken.")
- mon.setCursorPos(1, 10)
- mon.setTextColor(colors.lime)
- mon.write("<----")
- mon.setTextColor(colors.white)
- mon.setCursorPos(1, 15)
- mon.write("")
- mon.setCursorPos(1, 16)
- mon.write("")
- mon.setCursorPos(1, 17)
- mon.write("")
- deutsch()
- end
- function drawEng()
- mon.clear()
- mon.setCursorPos(1, 1)
- mon.write("Work in progress")
- sleep(5)
- os.reboot()
- end
- function count()
- mon.clear()
- mon.setCursorPos(1, 2)
- mon.write("Es wurden")
- mon.setCursorPos(11, 2)
- mon.setTextColor(colors.red)
- mon.write(anzahl)
- mon.setTextColor(colors.white)
- mon.setCursorPos(17, 2)
- mon.write("Shards erkannt.")
- mon.setCursorPos(1, 3)
- mon.write("=")
- mon.setCursorPos(3, 3)
- mon.write(craft)
- mon.setCursorPos(10, 3)
- mon.write("errechneten CraftingvorgåA4nge")
- mon.setCursorPos(1, 5)
- mon.write("Bitte jetzt mindestens")
- mon.setCursorPos(24, 5)
- mon.setTextColor(colors.orange)
- mon.write(craft)
- mon.setTextColor(colors.white)
- mon.setCursorPos(1, 6)
- mon.write("GoldblåB6cke in das Input ME legen.")
- mon.setCursorPos(1, 10)
- mon.write("Zum abbrechen hier klicken:")
- mon.setCursorPos(32, 10)
- mon.setTextColor(colors.red)
- mon.write("---->")
- mon.setTextColor(colors.white)
- mon.setCursorPos(1, 11)
- mon.write("dann landen eure Shards im Output ME.")
- mon.setCursorPos(1, 16)
- mon.write("Zum Starten dann hier klicken:")
- mon.setCursorPos(1, 17)
- mon.setTextColor(colors.cyan)
- mon.write("<----")
- mon.setTextColor(colors.white)
- mon.setCursorPos(1, 18)
- mon.setTextColor(colors.red)
- mon.write("Achtung danach kein ZuråBCck mehr måB6glich")
- mon.setTextColor(colors.white)
- end
- function buttonDraw()
- mon.clear()
- turtle.select(1)
- turtle.drop()
- mon.setBackgroundColor(colors.black)
- mon.clear()
- for yPos = 7, 11 do
- for xPos = 3, 15 do
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(xPos, yPos)
- mon.write(" ")
- end
- end
- mon.setTextColor(colors.white)
- mon.setCursorPos(6, 9)
- mon.write("Deutsch")
- for yPos = 7, 11 do
- for xPos = 24, 36 do
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(xPos, yPos)
- mon.write(" ")
- end
- end
- mon.setTextColor(colors.white)
- mon.setCursorPos(27, 9)
- mon.write("English")
- mon.setBackgroundColor(colors.black)
- button()
- end
- function button()
- event, side, x, y = os.pullEvent("monitor_touch")
- if (x >= 3 and x <= 15 and y >= 7 and y <= 11) then
- drawGer()
- elseif (x >= 24 and x <= 36 and y >= 7 and y <= 11) then
- drawEng()
- else
- button()
- end
- end
- function deutsch()
- while true do
- if (colors.test (redstone.getBundledInput("top"), colors.green) and a == 0) then --- green = count
- sleep(0.5)
- rs.setOutput("right",true)
- sleep(1)
- anzahl = turtle.getItemCount(1)
- craft = anzahl * 40
- count()
- a = 1
- else
- sleep(0.5)
- end
- stop()
- if (colors.test (redstone.getBundledInput("top"), colors.blue) and a == 1)then ----- blue = craft
- rs.setBundledOutput("top", colors.pink)
- rs.setOutput("right",false)
- turtle.drop()
- sleep(0.5)
- craft = craft + 8
- rs.setOutput("left",true)
- if craft == 0 then
- mon.clear()
- mon.setTextColor(colors.red)
- mon.setCursorPos(1, 1)
- mon.write("reboot....")
- sleep(5)
- buttonDraw()
- end
- while craft >= 1 do
- turtle.dropDown(8)
- mon.setCursorPos(26, 2)
- mon.clear()
- mon.setTextColor(colors.white)
- mon.setCursorPos(1, 2)
- mon.write("å9Cbrige CraftingvorgåA4nge:")
- mon.setCursorPos(1, 10)
- mon.write("Zum abbrechen hier klicken:")
- mon.setCursorPos(32, 10)
- mon.setTextColor(colors.red)
- mon.write("---->")
- mon.setTextColor(colors.white)
- mon.setCursorPos(1, 11)
- mon.setTextColor(colors.red)
- mon.write("Bei abbruch gehen alle Miniumshards")
- mon.setCursorPos(1, 12)
- mon.write("verloren!")
- mon.setCursorPos(1, 13)
- mon.setTextColor(colors.orange)
- mon.write("Nur GoldblåB6cke werden erstattet")
- mon.setTextColor(colors.lime)
- mon.setCursorPos(25, 2)
- mon.write(craft)
- craft = craft - 8
- sleep(0.5)
- stop()
- if craft == 0 then
- mon.clear()
- mon.setTextColor(colors.red)
- mon.setCursorPos(1, 1)
- mon.write("reboot....")
- mon.setTextColor(colors.white)
- sleep(5)
- os.reboot()
- end
- end
- a = 0
- else
- sleep(0.5)
- end
- end
- end
- function englisch()
- while true do
- if (colors.test (redstone.getBundledInput("top"), colors.green) and a == 0) then --- green = count
- sleep(0.5)
- rs.setOutput("right",true)
- sleep(1)
- anzahl = turtle.getItemCount(1)
- craft = anzahl * 40
- mon.clear()
- mon.setCursorPos(1, 1)
- mon.setTextColor(colors.white)
- mon.write("Anzahl der Miniumshards:")
- mon.setCursorPos(25, 1)
- mon.setTextColor(colors.red)
- mon.write(anzahl)
- mon.setCursorPos(1, 2)
- mon.setTextColor(colors.white)
- mon.write("Anzahl der maximalen Crafting VorgåA4nge:")
- mon.setCursorPos(40, 2)
- mon.setTextColor(colors.lime)
- mon.write(craft)
- a = 1
- else
- sleep(0.5)
- end
- stop()
- if (colors.test (redstone.getBundledInput("top"), colors.blue) and a == 1)then ----- blue = craft
- rs.setBundledOutput("top", colors.pink)
- rs.setOutput("right",false)
- turtle.drop()
- sleep(0.5)
- craft = craft + 8
- rs.setOutput("left",true)
- if craft == 0 then
- mon.clear()
- mon.setTextColor(colors.red)
- mon.setCursorPos(1, 1)
- mon.write("reboot....")
- sleep(5)
- os.reboot()
- end
- while craft >= 1 do
- turtle.dropDown(8)
- mon.setCursorPos(1, 1)
- mon.clear()
- mon.setTextColor(colors.lime)
- mon.write(craft)
- craft = craft - 8
- sleep(0.5)
- stop()
- if craft == 0 then
- mon.clear()
- mon.setTextColor(colors.red)
- mon.write("reboot....")
- sleep(5)
- os.reboot()
- end
- end
- a = 0
- else
- sleep(0.5)
- end
- end
- end
- buttonDraw()
Add Comment
Please, Sign In to add comment