Advertisement
masa-

CC Turtle: XPBot v0.1.1

Mar 29th, 2013
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. while true do
  2.     local i = 0
  3.     -- Attack 100 times
  4.     while i < 100 do
  5.         if turtle.attack() == true then
  6.             i = i + 1
  7.         elseif turtle.attackUp() == true then
  8.             i = i + 1
  9.         end
  10.     end
  11.     turtle.suck()
  12.  
  13.     -- Dump the inventory to the chest below
  14.     for j = 1, 16 do
  15.         local num = turtle.getItemCount(j)
  16.         if num > 0 then
  17.             turtle.select(j)
  18.             turtle.dropDown(num)
  19.         end
  20.     end
  21.     turtle.select(1)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement