Advertisement
Guest User

smelter

a guest
Jan 25th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. function refillFuel()
  2.  
  3. t.select(1)
  4. t.goto(1,0,0,3)
  5. t.r(1)
  6. t.goto(1,1,4,2)
  7. --picking up any excess charcoal
  8. for i=1,8 do
  9.     t.suck("down")
  10. end
  11. t.d(2)
  12. t.w(1)
  13. --now above charcoal chest
  14.  
  15. for i=0,15 do
  16.     cSlot,cCount=t.findItem("charcoal")
  17.     if cSlot then
  18.         if cCount<64 then
  19.             t.goto(1,1,3,0)
  20.             t.suck("down")
  21.         end
  22.     else
  23.         t.goto(1,1,3,0)
  24.         t.suck("down")
  25.         print("charcoalCount=")
  26.         print(cCount)
  27.         print("charcoalSlot=")
  28.         print(cSlot)
  29.         read()
  30.     end
  31.    t.goto(1,1,i,1)
  32.    t.drop("front","charcoal")
  33. end
  34. t.goto(1,1,3,0)
  35. t.suck("down")
  36. shell.run("refuel all")
  37. t.goto(1,1,4,2)
  38. t.dropAll("down","charcoal")
  39. t.goto(1,1,0,1)
  40. t.f(1)
  41. t.goto(0,0,0,0)
  42. end --end of function refillFuel
  43.  
  44. --[[
  45. print("waiting for Furnaces:    ")
  46.  
  47. for p=310,1,-1 do
  48.     term.setCursorPos(23,1)
  49.     if p<10 then term.write("  ") end
  50.     if p<100 then term.write(" ") end
  51.     print(p)
  52.     sleep(1)
  53. end
  54. term.setCursorPos(1,1)
  55. term.write("                          ")
  56. --]]
  57.  
  58.  
  59. refillFuel()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement