SHARE
TWEET

screen

a guest Aug 23rd, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("button")
  2. m = peripheral.wrap("top")
  3. local station = "Vezna Station"
  4. m.clear()
  5.  
  6. function fillTable()
  7.    button.setTable("Krab Mountain", routeOakKrab, 3,20,9,11)
  8.    button.setTable("Dave Factory", test2, 22,37,9,11)
  9. --   button.setTable("Test3", test3, 10,20,8,10)
  10.    button.setTable("DISPENSE CART", dispenseCart, 3,37,13,18)
  11.    button.screen()
  12. end
  13.  
  14. function getClick()
  15.    event,side,x,y = os.pullEvent("monitor_touch")
  16.    button.checkxy(x,y)
  17. end
  18.  
  19. function test1()
  20.    button.flash("Krab Mountain")
  21.    print("Test1")
  22. end
  23.  
  24. function test2()
  25.    button.toggleButton("Dave Factory")
  26.    print("Test2")
  27. end
  28.  
  29. function dispenseCart()
  30.    button.toggleButton("DISPENSE CART")
  31.    print("Dispensed")
  32.    rs.setOutput("front",true)
  33.    sleep(1)
  34.    rs.setOutput("front", false)
  35.    button.toggleButton("DISPENSE CART")
  36. end
  37.  
  38. function routeOakKrab()
  39.    print("OakToKrab")
  40.    rs.setOutput("front", true)
  41.    button.warningFormat()
  42.    m.clear()
  43.    button.addTexts("WARNING HEADING", 4, 8, "Warning label")
  44.    sleep(5)
  45.    rs.setOutput("front", false)
  46.    button.resetFormat()
  47.    m.clear()
  48.    button.resetTexts(station)
  49.    fillTable()
  50. end
  51.  
  52. button.resetTexts(station)
  53. fillTable()
  54.  
  55. while true do
  56.    getClick()
  57. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top