Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for a,b in pairs(rs.getSides()) do
- if peripheral.getType(b) == "ender_tank" then
- p_tank = peripheral.wrap(b)
- print("Ender Tank an "..b.." gefunden")
- break
- end
- end
- local t_args = { ... }
- if #t_args ~= 0 and t_args[1] == "r" then
- p_tank.setColors(1, 1, 1)
- end
- local c3, c2, c1 = p_tank.getColors()
- local initial_i = math.log(c1) / math.log(2)
- local initial_j = math.log(c2) / math.log(2)
- local initial_k = math.log(c3) / math.log(2)
- local i, j, k
- local skip = true
- for i = initial_i, 15 do
- c3 = 2^i
- for j = initial_j, 15 do
- c2 = 2^j
- for k = initial_k, 15 do
- c1 = 2^k
- p_tank.setColors(c1, c2, c3)
- local t = p_tank.getTankInfo()
- if skip == true then skip = false
- else if t[1].contents.amount ~= 0 then
- do return end
- end --if
- end --if
- sleep(1.1)
- end --for k
- initial_k = 0
- end --for j
- initial_j = 0
- end --for i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement