Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function menu1()
- rednet.open("right")
- itemid = ""
- count = 0
- term.clear()
- term.setCursorPos(1,1)
- print(" -Retriever System OS--------------------------- ")
- print("| |")
- print("| 1. Cobble -- 2. Wooden Planks -- 3. Dirt |")
- print("| 4. Gravel -- |")
- print("| |")
- print(" ----------------------------------------------- ")
- while true do
- event, param1, param2 = os.pullEvent()
- if event == "char" and param1 == "n" then menu2() end
- if event == "char" and param1 == "1" then cobble() end
- if event == "char" and param1 == "2" then woodplank() end
- if event == "char" and param1 == "3" then dirt() end
- if event == "char" and param1 == "4" then gravel() end
- end
- end
- function menu2()
- rednet.open("right")
- itemid = ""
- count = 0
- term.clear()
- term.setCursorPos(1,1)
- print(" -Retriever System OS--------------------------- ")
- print("| |")
- print("| 1. Cobble -- 2. Wooden Planks -- 3. Dirt |")
- print("| 4. Gravel -- |")
- print("| |")
- print(" ----------------------------------------------- ")
- while true do
- event, param1, param2 = os.pullEvent()
- if event == "char" and param1 == "n" then menu3() end
- if event == "char" and param1 == "1" then cobble() end
- if event == "char" and param1 == "2" then woodplank() end
- if event == "char" and param1 == "3" then dirt() end
- if event == "char" and param1 == "4" then gravel() end
- end
- end
- function menu3()
- rednet.open("right")
- itemid = ""
- count = 0
- term.clear()
- term.setCursorPos(1,1)
- print(" -Retriever System OS--------------------------- ")
- print("| |")
- print("| 1. Cobble -- 2. Wooden Planks -- 3. Dirt |")
- print("| 4. Gravel -- |")
- print("| |")
- print(" ----------------------------------------------- ")
- while true do
- event, param1, param2 = os.pullEvent()
- if event == "char" and param1 == "n" then menu1() end
- if event == "char" and param1 == "1" then cobble() end
- if event == "char" and param1 == "2" then woodplank() end
- if event == "char" and param1 == "3" then dirt() end
- if event == "char" and param1 == "4" then gravel() end
- end
- end
- function cobble()
- itemid = "cobble"
- term.clear()
- term.setCursorPos(1,1)
- print(" -Retriever System OS--------------------------- ")
- print("| |")
- print("| Cobble comes in Stacks of 64 |")
- print("| Number of stacks you'd like? : |")
- print("| |")
- print(" ----------------------------------------------- ")
- term.setCursorPos(33, 4)
- count = io.read()
- count = tonumber(count)
- if count > 0 then
- counting()
- else
- menu1()
- end
- end
- function woodplank()
- itemid = "woodplank"
- term.clear()
- term.setCursorPos(1,1)
- print(" -Retriever System OS--------------------------- ")
- print("| |")
- print("| Woodend planks come one by one |")
- print("| Number of planks you'd like? : |")
- print("| |")
- print(" ----------------------------------------------- ")
- term.setCursorPos(33, 4)
- count = io.read()
- count = tonumber(count)
- if count > 0 then
- counting()
- else
- menu1()
- end
- end
- function dirt()
- print("ok dirt")
- sleep(1)
- menu1()
- end
- function gravel()
- print("ok gravel")
- sleep(1)
- menu1()
- end
- function counting()
- if count > 0 then
- rednet.broadcast(itemid)
- sleep(0.35)
- count = count - 1
- counting()
- else
- menu1()
- end
- end
- menu1()
Add Comment
Please, Sign In to add comment