Advertisement
iosudvh

Untitled

Apr 28th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. local t = turtle
  2.  
  3. function macro(str)
  4.   for i = 1, #str do
  5.     local c = str:sub(i,i)
  6.     if c == "m" then
  7.       t.dig()
  8.     elseif c == "b" then
  9.       t.back()
  10.     elseif c == "d" then
  11.       t.down()
  12.     elseif c == "D" then
  13.       t.placeDown()
  14.     elseif c == "f" then
  15.       t.forward()
  16.     elseif c == "l" then
  17.       t.turnLeft()
  18.     elseif c == "p" then
  19.       t.place()
  20.     elseif c == "r" then
  21.       t.turnRight()
  22.     elseif c == "u" then
  23.       t.up()
  24.     elseif c == "#" then
  25.       t.refuel(32)
  26.     else
  27.       t.select(tonumber(c))
  28.     end
  29.   end
  30. end
  31.  
  32. while true do
  33.   while true do
  34.     t.select(1)
  35.     if t.getItemCount() > 3 then
  36.       t.select(2)
  37.       if t.getItemCount() > 4 then
  38.         break
  39.       end
  40.     end
  41.     sleep(10)
  42.   end
  43.   print "Go!"
  44.   -- go into spawner
  45.   macro("6#lfluumff")
  46.   -- place wither
  47.   macro("ddl2pufpbpuDf1pbprbp")
  48.   -- go to idle position
  49.   macro("b5pddlfl")
  50.  
  51.   sleep(20)
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement