Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- sen = sensor.wrap("bottom")
- mon = peripheral.wrap("top")
- while true do
- uu = 0
- mengeore = 0
- mengeuran = 0
- mengecell = 0
- anzeigeore = 0
- anzeigeuran = 0
- anzeigecell = 0
- uugewinn = 0
- ziele = sen.getTargets()
- for k,v in pairs(ziele) do
- if v.Name == "Diamond Chest"
- and v.Position.X==0
- and v.Position.Y==1
- and v.Position.Z==-3
- then
- details = sen.getTargetDetails(k)
- for i = 1,108 do
- if details.Slots[i].Name == "Uranium Ore" then
- mengeore = details.Slots[i].Size
- uu = uu + 17*mengeore
- anzeigeore = anzeigeore+mengeore
- end
- if details.Slots[i].Name == "Refined Uranium" then
- mengeuran = details.Slots[i].Size
- uu = uu + 17*mengeuran
- anzeigeuran = anzeigeuran+mengeuran
- end
- if details.Slots[i].Name == "Uranium Cell" then
- mengecell = details.Slots[i].Size
- uu = uu + 2*mengecell
- anzeigecell = anzeigecell+mengecell
- end
- end
- end
- end
- for k,v in pairs(ziele) do
- if v.Name == "Diamond Chest"
- and v.Position.X==0
- and v.Position.Y==1
- and v.Position.Z==2
- then
- details = sen.getTargetDetails(k)
- for i = 1,108 do
- if details.Slots[i].Name == "UU-Matter" then
- mengeuu = details.Slots[i].Size
- uugewinn = uugewinn + mengeuu
- end
- end
- end
- end
- mon.clear()
- mon.setCursorPos(2,2)
- mon.setTextColor(colors.cyan)
- mon.write("Umtauschuebersicht")
- mon.setTextColor(colors.white)
- mon.setCursorPos(2,5)
- mon.setTextColor(colors.lime)
- mon.write("Uranium:")
- mon.setTextColor(colors.white)
- mon.setCursorPos(2,6)
- mon.write("Uranium Ore: "..anzeigeore)
- mon.setCursorPos(2,7)
- mon.write("Refined Uranium: "..anzeigeuran)
- mon.setCursorPos(2,8)
- mon.write("Uranium Cell: "..anzeigecell)
- mon.setCursorPos(2,10)
- mon.setTextColor(colors.pink)
- mon.write("Gewinn:")
- mon.setTextColor(colors.white)
- mon.setCursorPos(2,11)
- mon.write("noch zu erwartender Gewinn: "..uu.." UU")
- mon.setCursorPos(2,12)
- mon.write("bereits ausgezahlter Gewinn: "..uugewinn.." UU")
- sleep(3)
- end
Advertisement
Add Comment
Please, Sign In to add comment