Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isTurtle(direction)
- local success, data
- if direction == "front" then
- success, data = turtle.inspect()
- elseif direction == "down" then
- success, data = turtle.inspectDown()
- else
- success, data = turtle.inspectTop()
- end
- if success then
- return data.name == "ComputerCraft:CC-Turtle"
- end
- return false
- end
- if isTurtle("down") then
- print("Turtle !")
- end
Advertisement
Add Comment
Please, Sign In to add comment