SHOW:
|
|
- or go back to the newest paste.
| 1 | --#load the touchpoint API | |
| 2 | os.loadAPI("touchpoint")
| |
| 3 | os.sleep(1) | |
| 4 | ||
| 5 | --# wrap the modem to the computer | |
| 6 | local cmodem = peripheral.wrap("right")
| |
| 7 | ||
| 8 | --# initialize the button instance set on the monitor | |
| 9 | local t = touchpoint.new("left")
| |
| 10 | ||
| 11 | --# Add a new button | |
| 12 | - | t:add("WWCS - Online", nil, 5, 2, 45, 3, colors.black, colors.black)
|
| 12 | + | --t:add("WWCS - Online", nil, 5, 2, 45, 3, colors.black, colors.black)
|
| 13 | - | t:add("Click to Enable/Disable", nil, 5, 4, 45, 5, colors.black, colors.black)
|
| 13 | + | --t:add("Click to Enable/Disable", nil, 5, 4, 45, 5, colors.black, colors.black)
|
| 14 | t:add("Shulker", nil, 5, 6, 17, 8, colors.blue, colors.lightBlue)
| |
| 15 | t:add("Wither", nil, 19, 6, 31, 8, colors.blue, colors.lightBlue)
| |
| 16 | t:add("Feral Ghoul", nil, 33, 6, 45, 8, colors.blue, colors.lightBlue)
| |
| 17 | t:add("Evoker", nil, 5, 11, 17, 13, colors.blue, colors.lightBlue)
| |
| 18 | t:add("Z Pigman", nil, 19, 11, 31, 13, colors.blue, colors.lightBlue)
| |
| 19 | t:add("Ghast", nil, 33, 11, 45, 13, colors.blue, colors.lightBlue)
| |
| 20 | t:add("Skeleton", nil, 5, 16, 17, 18, colors.blue, colors.lightBlue)
| |
| 21 | t:add("Z Miner", nil, 19, 16, 31, 18, colors.blue, colors.lightBlue)
| |
| 22 | t:add("Witch", nil, 33, 16, 45, 18, colors.blue, colors.lightBlue)
| |
| 23 | t:add("Blizz", nil, 5, 21, 17, 23, colors.blue, colors.lightBlue)
| |
| 24 | t:add("Slime", nil, 19, 21, 31, 23, colors.blue, colors.lightBlue)
| |
| 25 | t:add("Cyberdemon", nil, 33, 21, 45, 23, colors.blue, colors.lightBlue)
| |
| 26 | t:add("Spider", nil, 5, 26, 17, 28, colors.blue, colors.lightBlue)
| |
| 27 | t:add("Enderman", nil, 19, 26, 31, 28, colors.blue, colors.lightBlue)
| |
| 28 | ||
| 29 | ||
| 30 | ||
| 31 | ||
| 32 | ||
| 33 | ||
| 34 | --t:add("You will be teleported upon picking a kit", nil, 3, 17, 47, 18, colors.black, colors.black)
| |
| 35 | --# draw the buttons | |
| 36 | t:draw() | |
| 37 | ||
| 38 | while true do | |
| 39 | --# handleEvents will convert monitor_touch events to button_click if it was on a button | |
| 40 | local event, kit = t:handleEvents(os.pullEvent()) | |
| 41 | if event == "button_click" then | |
| 42 | if kit == "Thermal Kit" then | |
| 43 | os.shutdown() | |
| 44 | --# Gives the player the Thermal Expansion Starter Kit #-- | |
| 45 | elseif kit == "Thaumic Kit" then | |
| 46 | os.shutdown() | |
| 47 | --# Gives the player the Thaumcraft Starter Kit #-- | |
| 48 | elseif kit == "AE2 Kit" then | |
| 49 | os.shutdown() | |
| 50 | --# Gives the player the AE2 Starter Kit #-- | |
| 51 | elseif kit == "Botania Kit" then | |
| 52 | os.shutdown() | |
| 53 | --# Gives the player the Botania Starter Kit #-- | |
| 54 | elseif kit == "Miner Kit" then | |
| 55 | os.shutdown() | |
| 56 | --# Gives the player the Miner Start Kit #-- | |
| 57 | end | |
| 58 | end | |
| 59 | end |