Advertisement
denvys5

Crafter

Apr 22nd, 2014
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local t = turtle
  2. -- up = tin
  3. -- down = copper
  4. -- now recipe for 4 tin and 5 copper
  5.  
  6. function slotC(i)
  7.  if t.getItemCount(i) < 1 then
  8.   t.select(i)
  9.   t.suckUp()
  10.  else
  11.   sleep(0.5)
  12.  end
  13. end
  14.  
  15. function slotT(i)
  16.  if t.getItemCount(i) < 1 then
  17.   t.select(i)
  18.   t.suckDown()
  19.  else
  20.   sleep(0.5)
  21.  end
  22. end
  23.  
  24. function slotD(i)
  25.  if t.getItemCount(i) < 1 then
  26.   t.select(i)
  27.   t.craft()
  28.   t.drop()
  29.  else
  30.   sleep(0.5)
  31.  end
  32. end
  33.  
  34. function craft() -- recipe
  35.  slotT(1)
  36.  slotC(2)
  37.  slotT(3)
  38.  slotC(5)
  39.  slotT(6)
  40.  slotC(7)
  41.  slotT(9)
  42.  slotC(10)
  43.  slotT(11)
  44.  slotD(4)
  45. end
  46.  
  47. while true do
  48.  craft()
  49.  sleep(1)
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement