hevohevo

CC: exercise6_2

May 19th, 2016
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. -- exercise6_2
  2. --   上面(top)にあるレバーONで討伐開始
  3.  
  4. -- ############## Functions #############
  5. function dropAllItems()
  6.   for i=1,16 do
  7.     turtle.select(i)
  8.     turtle.dropDown()
  9.   end
  10.   turtle.select(1)  -- 選択スロットをスロット1に戻す。
  11. end
  12.  
  13. -- ############## Main ###############
  14. while true do
  15.   while rs.getInput("top") do
  16.     turtle.attack()
  17.     turtle.dropDown()
  18.     dropAllItems()
  19.   end
  20.   os.sleep(1)
  21. end
Add Comment
Please, Sign In to add comment