Guest User

startup

a guest
Jul 23rd, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. e = peripheral.wrap("left")
  2. a = peripheral.wrap("right")
  3.  
  4. e.setAutoCollect(true)
  5.  
  6. while true do
  7.   if e.getLevels() >= 30 and turtle.getItemCount(16) >= 1 then
  8.     turtle.select(16)
  9.     turtle.transferTo(1,1)
  10.     turtle.select(1)
  11.     e.enchant(30)
  12.     turtle.dropDown()
  13.     turtle.select(1)
  14.   elseif turtle.getItemCount(13) >= 1 and turtle.getItemCount(14) >= 1 then
  15.     if e.getLevels() >= a.getRepairCost(13,14) then
  16.       turtle.select(15)
  17.       a.repair(13,14)
  18.       turtle.select(1)
  19.     end
  20.   end
  21.   term.clear()
  22.   term.setCursorPos(1,1)
  23.   print("Current Level Count: "..e.getLevels())
  24.   sleep(0.75)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment