Nike622000

Alloy Furnace

Jun 13th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2. sen = sensor.wrap("left")
  3. mon = peripheral.wrap("back")
  4.  
  5. while true do
  6. mon.setCursorPos(1,1)
  7. mon.setTextColor(colors.red)
  8. mon.write("Alloy Furnace:")
  9. anzeigeB = 0
  10. anzeigeC = 0
  11. ziele = sen.getTargets()
  12. for k,v in pairs(ziele) do
  13.     if v.Name == "Alloy Furnace"
  14.     then
  15.     details = sen.getTargetDetails(k)
  16.             for i = 1,11 do
  17.             if details.Slots[i].Name == "Bucket" then
  18.             mengeB = details.Slots[i].Size
  19.             anzeigeB = anzeigeB+mengeB
  20.             end
  21.             if details.Slots[i].Name == "Charcoal" then
  22.             mengeC = details.Slots[i].Size
  23.             anzeigeC = anzeigeC+mengeC
  24.             end
  25.             mon.setCursorPos(1,3)
  26.             mon.setTextColor(colors.white)
  27.             mon.write("                                  ")
  28.             mon.setCursorPos(1,3)
  29.             mon.write("Buckets: "..anzeigeB)
  30.             mon.setCursorPos(1,4)
  31.             mon.setTextColor(colors.brown)
  32.             mon.write("                                  ")
  33.             mon.setCursorPos(1,4)
  34.             mon.write("Coal: "..anzeigeC)
  35.             end
  36. end
  37. end
  38. sleep(5)
  39. end
Add Comment
Please, Sign In to add comment