Nike622000

UU Anzeige

Jun 10th, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.30 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2. senI = sensor.wrap("left")
  3. monSide = "back"
  4. mon = peripheral.wrap(monSide)
  5. xMax,yMax = mon.getSize()
  6. while true do
  7. for xPos = 1,xMax do
  8.     for yPos = 1,yMax do
  9.         mon.setCursorPos(xPos,yPos)
  10.         mon.setBackgroundColor(colors.white)
  11.         mon.write(" ")
  12. end
  13. end
  14.     menge = 0
  15.     anzeigeuu = 0
  16.  
  17.     zieleinv = senI.getTargets()
  18.  
  19.         for k,v in pairs(zieleinv) do
  20.             if v.Name == "Diamond Chest"
  21.             and v.Position.X==3
  22.             and v.Position.Y==-1
  23.             and v.Position.Z==0
  24.             then
  25.             print("Chest detected")
  26.             details = senI.getTargetDetails(k)
  27.                 for i = 1,108 do
  28.                     if details.Slots[i].Name == "UU-Matter" then
  29.                     menge = details.Slots[i].Size
  30.                     anzeigeuu = anzeigeuu+menge
  31.                     mon.setCursorPos(1,1)
  32.                     mon.setBackgroundColor(colors.white)
  33.                     mon.setTextColor(colors.black)
  34.                     mon.write("Lohn: ")
  35.                     mon.setTextColor(colors.pink)
  36.                     mon.write(anzeigeuu.." UU")
  37.                     mon.setCursorPos(1,2)
  38.                     mon.setTextColor(colors.black)
  39.                     mon.write("momentan in der Truhe")
  40.                     end
  41.             end
  42.             end
  43. end
  44. sleep(2)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment