Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- senI = sensor.wrap("left")
- monSide = "back"
- mon = peripheral.wrap(monSide)
- xMax,yMax = mon.getSize()
- while true do
- for xPos = 1,xMax do
- for yPos = 1,yMax do
- mon.setCursorPos(xPos,yPos)
- mon.setBackgroundColor(colors.white)
- mon.write(" ")
- end
- end
- menge = 0
- anzeigeuu = 0
- zieleinv = senI.getTargets()
- for k,v in pairs(zieleinv) do
- if v.Name == "Diamond Chest"
- and v.Position.X==3
- and v.Position.Y==-1
- and v.Position.Z==0
- then
- print("Chest detected")
- details = senI.getTargetDetails(k)
- for i = 1,108 do
- if details.Slots[i].Name == "UU-Matter" then
- menge = details.Slots[i].Size
- anzeigeuu = anzeigeuu+menge
- mon.setCursorPos(1,1)
- mon.setBackgroundColor(colors.white)
- mon.setTextColor(colors.black)
- mon.write("Lohn: ")
- mon.setTextColor(colors.pink)
- mon.write(anzeigeuu.." UU")
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.black)
- mon.write("momentan in der Truhe")
- end
- end
- end
- end
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment