Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- M = peripheral.wrap("monitor_0")
- M.clear()
- C = peripheral.wrap("container_chest_1")
- function fillTable()
- button.setTable("Old Warehouse", test1, 5, 23, 3, 5)
- button.setTable("The Factory", theFactory, 27, 45, 3, 5)
- button.setTable("Wither Spawning", wither, 5, 23, 7, 9)
- button.setTable("Deep Dark", deepDark, 27, 45, 7, 9)
- button.setTable("Nether", nether, 5, 23, 11, 13)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function test1()
- button.flash("Old Warehouse")
- print("Activating portal to Old Warehouse")
- activatePortal(1)
- end
- function theFactory()
- button.flash("The Factory")
- print("Activating portal to the factory")
- activatePortal(2)
- end
- function wither()
- button.flash("Wither Spawning")
- print("Activating portal to the wither")
- activatePortal(3)
- end
- function deepDark()
- button.flash("Deep Dark")
- print("Activating portal to the deep dark")
- activatePortal(4)
- end
- function nether()
- button.flash("Nether")
- print("Activating portal to the Nether")
- activatePortal(5)
- end
- function activatePortal(value)
- redstone.setOutput("right",true)
- sleep(1)
- C.pushItem("up",value)
- sleep(5)
- C.pullItem("up",1,value)
- redstone.setOutput("right",false)
- end
- fillTable()
- button.heading("Choose your destination wisely!")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement