Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- *
- * TurtleBox V1.4
- * Changes
- * + Bypassing blocked turtle methods :D
- *
- * Made by Relative
- * Credits to /u/BOOMBOOMTHEHACKER(BoomBoomLHack in MC) for the turtleapi
- *
- ]]--
- os.pullEvent = os.pullEventRaw
- local p = peripheral.wrap("right")
- local version = "1.4"
- p.setLabel("TurtleBox")
- p.say("Loaded version "..version)
- local function parse(cmd,name)
- if cmd == "forward" then
- turtle.forward()
- elseif cmd == "back" then
- turtle.back()
- elseif cmd == "right" then
- turtle.turnRight()
- elseif cmd == "left" then
- turtle.turnLeft()
- elseif cmd == "up" then
- turtle.up()
- elseif cmd == "down" then
- turtle.down()
- elseif cmd:sub(1,6) == "select" then
- local sel = tonumber(cmd:sub(8))
- if sel > 16 or sel < 1 then
- p.say("Invalid select item entered, "..name)
- return
- end
- turtle.select(sel)
- elseif cmd == "refuel" then
- for i = 1, 16 do
- ta.select(i)
- if turtle.refuel(0) then
- ta.refuel()
- end
- end
- turtle.select(1)
- p.say("New fuel level: "..turtle.getFuelLevel())
- elseif cmd == "fuel" then
- p.say("Fuel level: "..turtle.getFuelLevel())
- elseif cmd == "flimit" then
- p.say("Fuel limit: "..turtle.getFuelLimit())
- elseif cmd == "digUp" then
- turtle.digUp()
- elseif cmd == "digDown" then
- turtle.digDown()
- elseif cmd == "dig" then
- turtle.dig()
- elseif cmd == "place" then
- turtle.place()
- elseif cmd == "placeUp" then
- turtle.placeUp()
- elseif cmd == "placeDown" then
- turtle.placeDown()
- else
- p.say("Invalid command, "..name)
- end
- end
- while true do
- local event = {os.pullEvent()}
- if event[1] == "chatbox_command" then
- if event[3] == "Relative" then
- local cmd = event[4]
- parse(cmd,event[3])
- else
- p.say(event[3]..", you are not allowed to use Turtlebox")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement