Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Very Ignorant Code--
- while true do
- local event = os.pullEvent("redstone")
- local m = peripheral.wrap("monitor_11")
- local one = peripheral.wrap("diamond_2")
- bal = 0
- local stack = one.getStackInSlot(1)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(1)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(1)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(2)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(2)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(2)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(3)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(3)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(3)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(4)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(4)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(4)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(5)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(5)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(5)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(6)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(6)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(6)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(7)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(7)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(7)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(8)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(8)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(8)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(9)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(9)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(9)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(10)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(10)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(10)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(11)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(11)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(1)["qty"] * 64
- else print("Empty")
- end
- local stack = one.getStackInSlot(12)
- if stack and stack["id"] == 30257 then print("Copper Token")
- bal = bal + one.getStackInSlot(12)["qty"]
- elseif stack and stack["id"] == 30258 then print("Silver Token")
- bal = bal + one.getStackInSlot(12)["qty"] * 64
- else print("Empty")
- end
- m.setCursorPos(40,1)
- m.write(" ")
- m.setCursorPos(40,1)
- m.write(bal)
- print(bal)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement