Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Version 0.0.2
- --------LISCENCE--------
- --This code is owned by kd8lvt, and all APIs are owned by their respective creators, listed next to their 'os.loadAPI'-s
- --This code is liscensed under a custom liscence that is as follows:
- --You may:
- -- 1.Look at and use portions of the code, with credit.
- -- 2.Learn from this code
- -- 3.Include this code in your "Computecraft OS", with credit, and without modification.
- --You may NOT:
- -- 1.Claim this code as your own
- -- 2.Re-host this code (use the original pastebin!)
- -- 3.Put this code behind a adwall/paywall (ad.fly etc)
- --------HOW TO INSTALL--------
- --1. Install the APIs (they are on the ComputerCraft forums in the APIs section as CCEnder)
- --2. Install this program
- --3. Install CCEnder, Touchpoint, and the Portable Computer program on your PDA.
- --4. Configure both devices to the same "channel" below
- --------CONFIGURATION--------
- channel = "put your uuid here"
- --------ACTUAL CODE--------
- os.loadAPI("ender")--Created by Sxw on the Computercraft Forums
- ender.connect(channel)
- function slot(num)
- turtle.select(num)
- end
- while true do
- worked = false
- while worked == false do
- worked, command = ender.receive(channel)
- sleep(0.1)
- end
- if command == "forward" then
- turtle.forward()
- elseif command == "left" then
- turtle.turnLeft()
- elseif command == "right" then
- turtle.turnRight()
- elseif command == "up" then
- turtle.up()
- elseif command == "down" then
- turtle.down()
- elseif command == "attack" then
- turtle.attack()
- elseif command == "mine" then
- turtle.dig()
- elseif command == "mine up" then
- turtle.digUp()
- elseif command == "mine down" then
- turtle.digDown()
- elseif command == "pair" then
- --Ignore
- elseif command == "select1" then
- turtle.select(1)
- elseif command == "select2" then
- turtle.select(2)
- elseif command == "select3" then
- turtle.select(3)
- elseif command == "select4" then
- turtle.select(4)
- elseif command == "select5" then
- turtle.select(5)
- elseif command == "select6" then
- turtle.select(6)
- elseif command == "select7" then
- turtle.select(7)
- elseif command == "select8" then
- turtle.select(8)
- elseif command == "select9" then
- turtle.select(9)
- elseif command == "select10" then
- turtle.select(10)
- elseif command == "select11" then
- turtle.select(11)
- elseif command == "select12" then
- turtle.select(12)
- elseif command == "select13" then
- turtle.select(13)
- elseif command == "select14" then
- turtle.select(14)
- elseif command == "select15" then
- turtle.select(15)
- elseif command == "select16" then
- turtle.select(16)
- elseif command == "place" then
- turtle.place()
- elseif command == "place up" then
- turtle.placeUp()
- elseif command == "place down" then
- turtle.placeDown()
- else
- print("Unknown Command: "..command)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement