Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inv = { [1] = 1, [2] = 2, [3] = 1, [4] = 2, [5] = 2, [6] = 3, [7] = 2, [8] = 3, [9] = 2,
- [10] = 3, [11] = 3, [12] = 2, [13] = 3, [14] = 1, [15] = 2, [16] = 4, [17] = 2, [18] = 1,
- [19] = 1, [20] = 2, [21] = 4, [22] = 2, [23] = 2, [24] = 3, [25] = 4, [26] = 3, [27] = 2,
- [28] = 2, [29] = 3, [30] = 4, [31] = 3, [32] = 2, [33] = 2, [34] = 4, [35] = 2, [36] = 1,
- [37] = 1, [38] = 2, [39] = 4, [40] = 2, [41] = 1, [42] = 3, [43] = 2, [44] = 3, [45] = 3,
- [46] = 2, [47] = 3, [48] = 2, [49] = 3, [50] = 2, [51] = 2, [52] = 1, [53] = 2, [54] = 1,}
- fre = {[1] = 273, [2] = 546, [3] = 1092}
- function find_peripheral(t, e)
- e = e or nil
- sides = {[1] = "front", [2] = "back", [3] = "left", [4] = "right", [5] = "top", [6] = "bottom"}
- peripheral_found = false
- for num=1, 6 do
- type = peripheral.getType(sides[num])
- if type == t then
- if e == "wireless" then
- if peripheral.call(sides[num], "isWireless") then
- return sides[num]
- end
- elseif e == "remote" then
- if not peripheral.call(sides[num], "isWireless") then
- return sides[num]
- end
- elseif e == nil then
- return sides[num]
- end
- end
- end
- error("No " .. t .. " attached to the computer", 0)
- end
- ender = find_peripheral(ender_chest)
- for num = 1,table.maxn(inv) do
- x = inv[num]
- if not fre[x] == nil then
- ender.setFrequency(fre[x])
- ender.condenseItems()
- ender.pushItemIntoSlot("down", 1, 1, num)
- end
- end
- print("complete")
Advertisement
Add Comment
Please, Sign In to add comment