Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ids = {
- {id = "minecraft:stone", dmg = 0},
- {id = "minecraft:cobblestone", dmg = 0},
- {id = "minecraft:gold_ore", dmg = 0},
- {id = "minecraft:iron_ore", dmg = 0},
- {id = "minecraft:coal", dmg = 0},
- {id = "minecraft:redstone", dmg = 0},
- {id = "minecraft:emerald", dmg = 0},
- {id = "minecraft:quartz", dmg = 0},
- {id = "minecraft:dye", dmg = 4},
- {id = "minecraft:glowstone", dmg = 0},
- {id = "minecraft:iron_sword", dmg = 0},
- {id = "minecraft:iron_pickaxe", dmg = 0},
- {id = "minecraft:netherrack", dmg = 0},
- {id = "minecraft:soul_sand", dmg = 0},
- {id = "minecraft:lava_bucket", dmg = 0},
- {id = "minecraft:melon_seeds", dmg = 0}}
- while true do
- local event, slot, side = os.pullEvent("slot_click")
- local name = peripheral.call("pim_1","getInventoryName")
- if name ~= nil then
- local info = peripheral.call("back","getSlot",slot)
- commands.exec("give "..name.." "..info.id.." 1 "..info.dmg)
- for i=1,9 do
- peripheral.call("back","setSlot",i,ids[math.random(1,#ids)])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement