Inumel

smelterystartup

Dec 28th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. pwrap = peripheral.wrap("tconstruct_smelterydrain_1")
  2. mon = peripheral.wrap("monitor_0")
  3. term.redirect(mon)
  4. --term.clear()
  5. --term.setCursorPos(1,1)
  6. while true do
  7. sleep(1)
  8. term.clear()
  9. term.setCursorPos(1,1)
  10.  
  11. local tabinf = pwrap.getTankInfo("unknown") --also tried an actual direction, didnt work
  12. --print(tabinf[1]) debug nonesense ignore this
  13. for k,v in pairs(tabinf) do
  14. --print(k,v)
  15.   for x,y in pairs(v) do
  16. --   print(x..": "..y)
  17.    if x == "rawName" then
  18.    --  write(y..": ")
  19.    if y:sub(1,7) == "Molten " then
  20.      write(y:sub(8,#y)..": ")
  21.    else
  22.      write(y..": ")
  23.    end
  24.    end
  25.    if x == "amount" then
  26.     ingot = math.floor(y/144)
  27.      -- ingot = y/144
  28.      print(ingot)
  29.    end
  30.  end
  31. end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment