Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ender")
- os.loadAPI("touchpoint")
- main = touchpoint.new()
- inv = touchpoint.new()
- local t
- function mainMenu()
- t = main
- end
- function invMenu()
- t = inv
- end
- function tellTurtle(command)
- ender.send("kd8lvtTurtle",command)
- end
- --Main Movement/Digging--
- main:add("^",function() tellTurtle("forward") end,10,2,12,3,colors.green,colors.lime)
- main:add("<",function() tellTurtle("left") end,8,5,10,6,colors.green,colors.lime)
- main:add(">",function() tellTurtle("right") end,12,5,14,6,colors.green,colors.lime)
- main:add("Up",function() tellTurtle("up") end,20,2,25,3,colors.green,colors.lime)
- main:add("Down",function() tellTurtle("down") end,20,6,25,7,colors.green,colors.lime)
- main:add("Attack",function() tellTurtle("attack") end,2,12,10,13,colors.green,colors.lime)
- main:add("Mine",function() tellTurtle("mine") end,2,15,10,16,colors.green,colors.lime)
- main:add("Mine Up",function() tellTurtle("mine up") end,12,15,20,16,colors.green,colors.lime)
- main:add("Mine Down",function() tellTurtle("mine down") end,2,18,20,19,colors.green,colors.lime)
- main:add("Inv.",function() invMenu() end,12,12,20,13,colors.green,colors.lime)
- --Inventory--
- inv:add("1",function() tellTurtle("select1") end,2,2,4,5,colors.green,colors.lime)
- inv:add("2",function() tellTurtle("select2") end,5,2,8,5,colors.green,colors.lime)
- inv:add("3",function() tellTurtle("select3") end,9,2,12,5,colors.green,colors.lime)
- inv:add("4",function() tellTurtle("select4") end,13,2,16,5,colors.green,colors.lime)
- inv:add("5",function() tellTurtle("select5") end,2,6,4,8,colors.green,colors.lime)
- inv:add("6",function() tellTurtle("select6") end,5,6,8,8,colors.green,colors.lime)
- inv:add("7",function() tellTurtle("select7") end,9,6,12,8,colors.green,colors.lime)
- inv:add("8",function() tellTurtle("select8") end,13,6,16,8,colors.green,colors.lime)
- inv:add("9",function() tellTurtle("select9") end,2,9,5,11,colors.green,colors.lime)
- inv:add("10",function() tellTurtle("select10") end,6,9,9,11,colors.green,colors.lime)
- inv:add("11",function() tellTurtle("select11") end,10,9,13,11,colors.green,colors.lime)
- inv:add("12",function() tellTurtle("select12") end,14,9,17,11,colors.green,colors.lime)
- inv:add("13",function() tellTurtle("select13") end,2,12,5,12,colors.green,colors.lime)
- inv:add("14",function() tellTurtle("select14") end,6,12,9,12,colors.green,colors.lime)
- inv:add("15",function() tellTurtle("select15") end,10,12,13,12,colors.green,colors.lime)
- inv:add("16",function() tellTurtle("select16") end,14,12,17,12,colors.green,colors.lime)
- inv:add("Place",function() tellTurtle("place") end,2,14,25,15,colors.green,colors.lime)
- inv:add("Place Up",function() tellTurtle("place up") end,2,17,13,19,colors.green,colors.lime)
- inv:add("Place Down",function() tellTurtle("place down") end,15,17,25,19,colors.green,colors.lime)
- inv:add("Main",function() mainMenu() end,18,2,23,4,colors.green,colors.lime)
- mainMenu()
- while true do
- t:draw()
- -- local event, p1, p2, p3 = os.pullEvent() ---monitor_touch, side, xpos, ypos
- local event, p1 = t:handleEvents(os.pullEvent()) --button_click, name
- if event == "button_click" then
- --Remove toggling and simplify button running
- t.buttonList[p1].func()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment