SHOW:
|
|
- or go back to the newest paste.
1 | --#load the touchpoint API | |
2 | os.loadAPI("touchpoint") | |
3 | os.sleep(1) | |
4 | ||
5 | - | --# Control Channel |
5 | + | |
6 | - | local woot_control_channel = 8 |
6 | + | |
7 | ||
8 | --# initialize the button instance set on the monitor | |
9 | local t = touchpoint.new("right") | |
10 | ||
11 | --# Add a new button | |
12 | t:add("WWCS - Click To Enable/Disable", nil, 5, 1, 45, 1, colors.gray, colors.gray) | |
13 | t:add("Shulker", nil, 5, 3, 17, 3, colors.red, colors.green) | |
14 | t:add("Wither", nil, 19, 3, 31, 3, colors.red, colors.green) | |
15 | - | t:add("WWCS - Click To Enable/Disable", nil, 5, 1, 45, 1, colors.black, colors.black) |
15 | + | t:add("Feral Ghoul", nil, 33, 3, 45, 3, colors.red, colors.green) |
16 | - | --t:add("Click to Enable/Disable", nil, 5, 2, 45, 2, colors.black, colors.black) |
16 | + | t:add("Evoker", nil, 5, 5, 17, 5, colors.red, colors.green) |
17 | - | t:add("Shulker", nil, 5, 3, 17, 3, colors.red, colors.lightBlue) |
17 | + | t:add("Z Pigman", nil, 19, 5, 31, 5, colors.red, colors.green) |
18 | - | t:add("Wither", nil, 19, 3, 31, 3, colors.red, colors.lightBlue) |
18 | + | t:add("Ghast", nil, 33, 5, 45, 5, colors.red, colors.green) |
19 | - | t:add("Feral Ghoul", nil, 33, 3, 45, 3, colors.red, colors.lightBlue) |
19 | + | t:add("Skeleton", nil, 5, 7, 17, 7, colors.red, colors.green) |
20 | - | t:add("Evoker", nil, 5, 5, 17, 5, colors.red, colors.lightBlue) |
20 | + | t:add("Z Miner", nil, 19, 7, 31, 7, colors.red, colors.green) |
21 | - | t:add("Z Pigman", nil, 19, 5, 31, 5, colors.red, colors.lightBlue) |
21 | + | t:add("Witch", nil, 33, 7, 45, 7, colors.red, colors.green) |
22 | - | t:add("Ghast", nil, 33, 5, 45, 5, colors.red, colors.lightBlue) |
22 | + | t:add("Blizz", nil, 5, 9, 17, 9, colors.red, colors.green) |
23 | - | t:add("Skeleton", nil, 5, 7, 17, 7, colors.red, colors.lightBlue) |
23 | + | t:add("Slime", nil, 19, 9, 31, 9, colors.red, colors.green) |
24 | - | t:add("Z Miner", nil, 19, 7, 31, 7, colors.red, colors.lightBlue) |
24 | + | t:add("Cyberdemon", nil, 33, 9, 45, 9, colors.red, colors.green) |
25 | - | t:add("Witch", nil, 33, 7, 45, 7, colors.red, colors.lightBlue) |
25 | + | t:add("Spider", nil, 5, 11, 17, 11, colors.red, colors.green) |
26 | - | t:add("Blizz", nil, 5, 9, 17, 9, colors.red, colors.lightBlue) |
26 | + | t:add("Enderman", nil, 19, 11, 31, 11, colors.red, colors.green) |
27 | - | t:add("Slime", nil, 19, 9, 31, 9, colors.red, colors.lightBlue) |
27 | + | |
28 | - | t:add("Cyberdemon", nil, 33, 9, 45, 9, colors.red, colors.lightBlue) |
28 | + | |
29 | - | t:add("Spider", nil, 5, 11, 17, 11, colors.red, colors.lightBlue) |
29 | + | |
30 | - | t:add("Enderman", nil, 19, 11, 31, 11, colors.red, colors.lightBlue) |
30 | + | |
31 | ||
32 | --t:add("You will be teleported upon picking a kit", nil, 3, 17, 47, 18, colors.black, colors.black) | |
33 | --# draw the buttons | |
34 | t:draw() | |
35 | ||
36 | while true do | |
37 | --# handleEvents will convert monitor_touch events to button_click if it was on a button | |
38 | local event, p1 = t:handleEvents(os.pullEvent()) | |
39 | if event == "button_click" then | |
40 | if p1 == "Shulker" then | |
41 | if t.buttonList.p1.active then | |
42 | - | local event, kit = t:handleEvents(os.pullEvent()) |
42 | + | wlan.transmit(1,10,"WWCSON") |
43 | else | |
44 | - | if kit == "Shulker" then |
44 | + | wlan.transmit(1,10,"WWCSOFF") |
45 | - | wlan.transmit(woot_control_channel,10,"Shulker_ON") |
45 | + | end |
46 | - | --# Gives the player the Thermal Expansion Starter Kit #-- |
46 | + | wlan.transmit(1,10,"WWCSON") |
47 | - | elseif kit == "Thaumic Kit" then |
47 | + | t:toggleButton(p1) |
48 | - | os.shutdown() |
48 | + | elseif p1 == "Wither" then |
49 | - | --# Gives the player the Thaumcraft Starter Kit #-- |
49 | + | wlan.transmit(2,10,"WWCSON") |
50 | - | elseif kit == "AE2 Kit" then |
50 | + | t:toggleButton(p1) |
51 | - | os.shutdown() |
51 | + | elseif p1 == "Feral Ghoul" then |
52 | - | --# Gives the player the AE2 Starter Kit #-- |
52 | + | wlan.transmit(3,10,"WWCSON") |
53 | - | elseif kit == "Botania Kit" then |
53 | + | t:toggleButton(p1) |
54 | - | os.shutdown() |
54 | + | elseif p1 == "Evoker" then |
55 | - | --# Gives the player the Botania Starter Kit #-- |
55 | + | wlan.transmit(4,10,"WWCSON") |
56 | - | elseif kit == "Miner Kit" then |
56 | + | t:toggleButton(p1) |
57 | - | os.shutdown() |
57 | + | elseif p1 == "Z Pigman" then |
58 | - | --# Gives the player the Miner Start Kit #-- |
58 | + | wlan.transmit(5,10,"WWCSON") |
59 | t:toggleButton(p1) | |
60 | elseif p1 == "Ghast" then | |
61 | wlan.transmit(6,10,"WWCSON") | |
62 | t:toggleButton(p1) | |
63 | elseif p1 == "Skeleton" then | |
64 | wlan.transmit(7,10,"WWCSON") | |
65 | t:toggleButton(p1) | |
66 | elseif p1 == "Z Miner" then | |
67 | wlan.transmit(8,10,"WWCSON") | |
68 | t:toggleButton(p1) | |
69 | elseif p1 == "Witch" then | |
70 | wlan.transmit(9,10,"WWCSON") | |
71 | t:toggleButton(p1) | |
72 | elseif p1 == "Blizz" then | |
73 | wlan.transmit(10,10,"WWCSON") | |
74 | t:toggleButton(p1) | |
75 | elseif p1 == "Slime" then | |
76 | wlan.transmit(11,10,"WWCSON") | |
77 | t:toggleButton(p1) | |
78 | elseif p1 == "Cyberdemon" then | |
79 | wlan.transmit(12,10,"WWCSON") | |
80 | t:toggleButton(p1) | |
81 | elseif p1 == "Spider" then | |
82 | wlan.transmit(13,10,"WWCSON") | |
83 | t:toggleButton(p1) | |
84 | elseif p1 == "Enderman" then | |
85 | wlan.transmit(14,10,"WWCSON") | |
86 | t:toggleButton(p1) | |
87 | end | |
88 | end | |
89 | end |