View difference between Paste ID: GyVBiTkt and PyZnnuUE
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
5+
--# wrap the radar to the computer
6-
local cmodem = peripheral.wrap("right")
6+
local p = peripheral.find("warpdriveRadar")
7
    local x,y,z = p.getLocalPosition()
8-
--# initialize the button instance set on the monitor
8+
    local rPosOK,dim,rPosX,rPosY,rPosZ,localdim = p.getGlobalPosition()
9-
local t = touchpoint.new("left")
9+
    local text = x .. " "..y.." "..z
10
--# initialize the planet instance set on the monitor
11-
--# Add a new button
11+
local t = touchpoint.new("top")
12-
--t:add("WWCS - Online", nil, 5, 2, 45, 3, colors.black, colors.black)
12+
13-
--t:add("Click to Enable/Disable", nil, 5, 4, 45, 5, colors.black, colors.black)
13+
--# Add planets
14-
t:add("Shulker", nil, 5, 6, 17, 8, colors.blue, colors.lightBlue)
14+
    if localdim == "Hyperspace" then
15-
t:add("Wither", nil, 19, 6, 31, 8, colors.blue, colors.lightBlue)
15+
t:add("Galaxy Map V0.1", nil, 5, 2, 45, 3, colors.gray, colors.black)
16-
t:add("Feral Ghoul", nil, 33, 6, 45, 8, colors.blue, colors.lightBlue)
16+
t:add("Hyperspace", nil, 5, 4, 45, 5, colors.red, colors.black)
17-
t:add("Evoker", nil, 5, 11, 17, 13, colors.blue, colors.lightBlue)  
17+
t:add("Avalon", nil, 5, 6, 17, 8, colors.blue, colors.lightBlue)
18-
t:add("Z Pigman", nil, 19, 11, 31, 13, colors.blue, colors.lightBlue)
18+
t:add("Centauri", nil, 19, 6, 31, 8, colors.blue, colors.lightBlue)
19-
t:add("Ghast", nil, 33, 11, 45, 13, colors.blue, colors.lightBlue)
19+
t:add("Bogdaleos", nil, 33, 6, 45, 8, colors.blue, colors.lightBlue)
20-
t:add("Skeleton", nil, 5, 16, 17, 18, colors.blue, colors.lightBlue)  
20+
t:add("Groth", nil, 19, 11, 31, 13, colors.blue, colors.lightBlue)
21-
t:add("Z Miner", nil, 19, 16, 31, 18, colors.blue, colors.lightBlue)
21+
t:add("Click Planet to Auto Jumpto.", nil, 5, 16, 17, 18, colors.gray, colors.lightBlue)
22-
t:add("Witch", nil, 33, 16, 45, 18, colors.blue, colors.lightBlue)
22+
    elseif localdim == "" then
23-
t:add("Blizz", nil, 5, 21, 17, 23, colors.blue, colors.lightBlue)  
23+
t:add("Galaxy Map V0.1", nil, 5, 2, 45, 3, colors.black, colors.black)
24-
t:add("Slime", nil, 19, 21, 31, 23, colors.blue, colors.lightBlue)
24+
t:add("Hyperspace", nil, 5, 4, 45, 5, colors.black, colors.black)
25-
t:add("Cyberdemon", nil, 33, 21, 45, 23, colors.blue, colors.lightBlue)
25+
end
26-
t:add("Spider", nil, 5, 26, 17, 28, colors.blue, colors.lightBlue)  
26+
27-
t:add("Enderman", nil, 19, 26, 31, 28, colors.blue, colors.lightBlue)
27+
28
--t:add("Shulker", nil, 5, 6, 17, 8, colors.blue, colors.lightBlue)
29
--t:add("Wither", nil, 19, 6, 31, 8, colors.blue, colors.lightBlue)
30
--t:add("Feral Ghoul", nil, 33, 6, 45, 8, colors.blue, colors.lightBlue)
31
--t:add("Evoker", nil, 5, 11, 17, 13, colors.blue, colors.lightBlue)  
32
--t:add("Z Pigman", nil, 19, 11, 31, 13, colors.blue, colors.lightBlue)
33
--t:add("Ghast", nil, 33, 11, 45, 13, colors.blue, colors.lightBlue)
34
--t:add("Skeleton", nil, 5, 16, 17, 18, colors.blue, colors.lightBlue)  
35
--t:add("Z Miner", nil, 19, 16, 31, 18, colors.blue, colors.lightBlue)
36
--t:add("Witch", nil, 33, 16, 45, 18, colors.blue, colors.lightBlue)
37
--t:add("Blizz", nil, 5, 21, 17, 23, colors.blue, colors.lightBlue)  
38
--t:add("Slime", nil, 19, 21, 31, 23, colors.blue, colors.lightBlue)
39
--t:add("Cyberdemon", nil, 33, 21, 45, 23, colors.blue, colors.lightBlue)
40
--t:add("Spider", nil, 5, 26, 17, 28, colors.blue, colors.lightBlue)  
41
--t:add("Enderman", nil, 19, 26, 31, 28, colors.blue, colors.lightBlue)
42
43
44
45
46
47
48
--t:add("You will be teleported upon picking a kit", nil, 3, 17, 47, 18, colors.black, colors.black)
49
--# draw the buttons
50
t:draw()
51
52
while true do
53
  --# handleEvents will convert monitor_touch events to button_click if it was on a button
54
  local event, kit = t:handleEvents(os.pullEvent())
55
  if event == "button_click" then
56
        if kit == "Thermal Kit" then
57
          os.shutdown()
58
          --# Gives the player the Thermal Expansion Starter Kit #--
59
        elseif kit == "Thaumic Kit" then
60
         os.shutdown()
61
          --# Gives the player the Thaumcraft Starter Kit #--
62
        elseif kit == "AE2 Kit" then
63
          os.shutdown()
64
          --# Gives the player the AE2 Starter Kit #--
65
        elseif kit == "Botania Kit" then
66
          os.shutdown()
67
          --# Gives the player the Botania Starter Kit #--
68
        elseif kit == "Miner Kit" then
69
          os.shutdown()
70
          --# Gives the player the Miner Start Kit #--
71
        end
72
  end
73
end