Marech

test

Jun 26th, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. function isTurtle(direction)
  2.     local success, data
  3.     if direction == "front" then
  4.         success, data = turtle.inspect()
  5.     elseif direction == "down" then
  6.         success, data = turtle.inspectDown()
  7.     else
  8.         success, data = turtle.inspectTop()
  9.     end
  10.  
  11.     if success then
  12.         return data.name == "ComputerCraft:CC-Turtle"
  13.     end
  14.     return false
  15. end
  16.  
  17. if isTurtle("down") then
  18.     print("Turtle !")
  19. end
Advertisement
Add Comment
Please, Sign In to add comment