Knux14

XP Blaze Farm

Jul 5th, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. print("Turtle XP Blaze Farm")
  2. m = peripheral.wrap("right")
  3.  
  4. var1 = true
  5.  
  6. function readKey()
  7.   while true do
  8.     local _, param1 = os.pullEvent("key")
  9.     if tostring(param1) == "57" then
  10.       print("Mettez un livre dans le slot 1")
  11.       os.sleep(2)
  12.       turtle.select(1)
  13.       m.enchant(30)
  14.     end
  15.   end
  16. end
  17.  
  18. coroutine.create(readKey)
  19. while true do
  20.   for i = 1, 10 do
  21.     turtle.attack()
  22.   end
  23.   if var1 == true then
  24.     for i = 1, 16 do
  25.       turtle.select(i)
  26.       turtle.dropDown()
  27.     end
  28.   end
  29.   if m.getLevels() > 30 then
  30.     rs.setOutput("top", false)
  31.   else
  32.     rs.setOutput("top", true)
  33.   end
  34.  
  35. end
Advertisement
Add Comment
Please, Sign In to add comment