Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("top") -- Replace "top" with the side the monitor is on if it's not on top
- local orgTerm=term.redirect(monitor)
- term.redirect(orgTerm)
- local dsuItems = {
- { row = "R1", pos = 8, item = "lust shard" },
- { row = "R1", pos = 7, item = "envy shard" },
- { row = "R1", pos = 6, item = "pride shard" },
- { row = "R1", pos = 5, item = "wrath shard" },
- { row = "R1", pos = 4, item = "greed shard" },
- { row = "R1", pos = 3, item = "sloth shard" },
- { row = "R1", pos = 2, item = "coal dust" },
- { row = "R1", pos = 1, item = "rocky hive" },
- { row = "R2", pos = 8, item = "ferrous ingot" },
- { row = "R2", pos = 7, item = "charged certus quartz" },
- { row = "R2", pos = 6, item = "netherstar" },
- { row = "R2", pos = 5, item = "flint" },
- { row = "R2", pos = 4, item = "ardite" },
- { row = "R2", pos = 3, item = "cobalt" },
- { row = "R2", pos = 2, item = "water shard" },
- { row = "R2", pos = 1, item = "fire shard" },
- { row = "R3", pos = 8, item = "entropy shard" },
- { row = "R3", pos = 7, item = "order shard" },
- { row = "R3", pos = 6, item = "earth shard" },
- { row = "R3", pos = 5, item = "air shard" },
- { row = "R3", pos = 4, item = "yellow hearts" },
- { row = "R3", pos = 3, item = "saltpeter" },
- { row = "R3", pos = 2, item = "steel" },
- { row = "R3", pos = 1, item = "netherwart" },
- { row = "R4", pos = 8, item = "wither skulls" },
- { row = "R4", pos = 7, item = "necrotic bone" },
- { row = "R4", pos = 6, item = "rich slag" },
- { row = "R4", pos = 5, item = "emerald" },
- { row = "R4", pos = 4, item = "cactus green" },
- { row = "R4", pos = 3, item = "sugar cane" },
- { row = "R4", pos = 2, item = "wool" },
- { row = "R4", pos = 1, item = "glowstone" },
- { row = "R5", pos = 8, item = "rotten flesh" },
- { row = "R5", pos = 7, item = "bonemeal" },
- { row = "R5", pos = 6, item = "lapis ore" },
- { row = "R5", pos = 5, item = "diamond ore" },
- { row = "R5", pos = 4, item = "gold ore" },
- { row = "R5", pos = 3, item = "certus quartz ore" },
- { row = "R5", pos = 2, item = "dense iron ore" },
- { row = "R5", pos = 1, item = "salt ore" },
- { row = "R6", pos = 8, item = "aluminum ore" },
- { row = "R6", pos = 7, item = "yellorium ore" },
- { row = "R6", pos = 6, item = "redstone ore" },
- { row = "R6", pos = 5, item = "tin ore" },
- { row = "R6", pos = 4, item = "silver ore" },
- { row = "R6", pos = 3, item = "lead ore" },
- { row = "R6", pos = 2, item = "copper ore" },
- { row = "R6", pos = 1, item = "iron ore" },
- { row = "R7", pos = 8, item = "coal ore" },
- { row = "R7", pos = 7, item = "division sigil" },
- { row = "R7", pos = 6, item = "crystalized essence metallum" },
- { row = "R7", pos = 5, item = "rubber wood" },
- { row = "R7", pos = 4, item = "oak wood" },
- { row = "R7", pos = 3, item = "nether brick" },
- { row = "R7", pos = 2, item = "wheat" },
- { row = "R7", pos = 1, item = "nether quartz ore" },
- { row = "R8", pos = 8, item = "netherrack" },
- { row = "R8", pos = 7, item = "cobble" },
- { row = "R8", pos = 6, item = "salt" },
- { row = "R8", pos = 5, item = "gunpowder" },
- { row = "R8", pos = 4, item = "blaze rod" },
- { row = "R8", pos = 3, item = "vanilla bones" },
- { row = "R8", pos = 2, item = "uranium" },
- { row = "R8", pos = 1, item = "ferrous" },
- { row = "R9", pos = 8, item = "sulfur" },
- { row = "R9", pos = 7, item = "ender pearls" },
- { row = "R9", pos = 6, item = "nether quartz" },
- { row = "R9", pos = 5, item = "glass" },
- { row = "R9", pos = 4, item = "niter" },
- { row = "R9", pos = 3, item = "soul sand" },
- { row = "R9", pos = 2, item = "obsidian" },
- { row = "R9", pos = 1, item = "shiny" },
- { row = "R10", pos = 8, item = "enderium" },
- { row = "R10", pos = 7, item = "invar" },
- { row = "R10", pos = 6, item = "diorite" },
- { row = "R10", pos = 5, item = "clay" },
- { row = "R10", pos = 4, item = "rubber" },
- { row = "R10", pos = 3, item = "certus" },
- { row = "R10", pos = 2, item = "gravel" },
- { row = "R10", pos = 1, item = "coal" },
- { row = "R11", pos = 8, item = "dirt" },
- { row = "R11", pos = 7, item = "diamond" },
- { row = "R11", pos = 6, item = "lapis" },
- { row = "R11", pos = 5, item = "marble" },
- { row = "R11", pos = 4, item = "redstone" },
- { row = "R11", pos = 3, item = "stone" },
- { row = "R11", pos = 2, item = "sand" },
- { row = "R11", pos = 1, item = "aluminum" },
- { row = "R12", pos = 8, item = "copper" },
- { row = "R12", pos = 7, item = "yellorium" },
- { row = "R12", pos = 6, item = "draconium" },
- { row = "R12", pos = 5, item = "tin" },
- { row = "R12", pos = 4, item = "lead" },
- { row = "R12", pos = 3, item = "silver" },
- { row = "R12", pos = 2, item = "gold" },
- { row = "R12", pos = 1, item = "iron" },
- { row = "R13", pos = 8, item = "awakened drac" },
- { row = "R13", pos = 7, item = "draconium infused obsidian" },
- { row = "R13", pos = 6, item = "torch" },
- { row = "R13", pos = 5, item = "melon" },
- { row = "R13", pos = 4, item = "pyrotheum" },
- { row = "R13", pos = 3, item = "enderium base" },
- { row = "R13", pos = 2, item = "enderium" },
- { row = "R13", pos = 1, item = "gluttony shard" },
- { row = "R14", pos = 8, item = "pink slime" },
- { row = "R14", pos = 7, item = "yellow petal" },
- { row = "R14", pos = 6, item = "lt blue petal" },
- { row = "R14", pos = 5, item = "purple petal" },
- { row = "R14", pos = 4, item = "black petal" },
- { row = "R14", pos = 3, item = "vines" },
- { row = "R14", pos = 2, item = "orange petal" },
- { row = "R14", pos = 1, item = "cinderpearl" },
- { row = "R15", pos = 8, item = "brown petal" },
- { row = "R15", pos = 7, item = "blue petal" },
- { row = "R15", pos = 6, item = "red petal" },
- { row = "R15", pos = 5, item = "air infused stone" },
- { row = "R15", pos = 4, item = "energetic alloy" },
- { row = "R15", pos = 3, item = "green petal" },
- { row = "R15", pos = 2, item = "rocky princess" },
- { row = "R15", pos = 1, item = "crystalized essence terra" },
- { row = "R16", pos = 8, item = "white petal" },
- { row = "R16", pos = 7, item = "oak wood planks" },
- { row = "R16", pos = 6, item = "sticks" },
- { row = "R16", pos = 5, item = "cinnebar ore" },
- { row = "R16", pos = 4, item = "grass" },
- { row = "R16", pos = 3, item = "shimmerleaf" },
- { row = "R16", pos = 2, item = "soybean" },
- { row = "R16", pos = 1, item = "carrot" },
- { row = "R17", pos = 8, item = "glowstone block" },
- { row = "R17", pos = 7, item = "earth infused stone" },
- { row = "R17", pos = 6, item = "track 66 (railroad)" },
- { row = "R17", pos = 5, item = "lime petal" },
- { row = "R17", pos = 4, item = "raw beef" },
- { row = "R17", pos = 3, item = "pink petal" },
- { row = "R17", pos = 2, item = "hellbark wood" },
- { row = "R17", pos = 1, item = "raw firestone" },
- { row = "R18", pos = 8, item = "Watermelon" },
- { row = "R18", pos = 7, item = "Rubber tree saplings" },
- { row = "R18", pos = 6, item = "Oak saplings" },
- { row = "R18", pos = 5, item = "crystalized essence permutatio" },
- { row = "R18", pos = 4, item = "cyan petal" },
- { row = "R18", pos = 3, item = "magenta petal" },
- { row = "R18", pos = 2, item = "lt grey petal" },
- { row = "R18", pos = 1, item = "grey petal" },
- { row = "R19", pos = 3, item = "Pumpkin" },
- { row = "R19", pos = 2, item = "Silky propolis" },
- { row = "R19", pos = 1, item = "Silver ingot" }
- }
- function findItem(searchKey)
- local key = searchKey:lower()
- term.clear()
- monitor.clear()
- for i, v in ipairs(dsuItems) do
- if v.item:lower():find(key) then
- term.redirect(monitor)
- print(v.row..","..v.pos.." contains ".. v.item)
- term.redirect(orgTerm)
- print(v.row..","..v.pos.." contains ".. v.item)
- found=true
- end
- end
- if not found then
- print("No items found")
- end
- -- if found then
- -- print("Output redirected to monitor.")
- -- end
- end
- while true do
- print("Enter an item to search (or type 'exit' to stop):")
- local searchKey = read()
- if searchKey:lower() == "exit" then
- break
- end
- findItem(searchKey)
- os.sleep(3) -- Pause for 5 seconds
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement