Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- if not fs.exists("api") then
- shell.run("pastebin get QMct3H9x api")
- else
- shell.run("delete api")
- shell.run("pastebin get QMct3H9x api")
- end
- f = os.loadAPI("api")
- crafting = {}
- crafting["242:6"] = {4093,0}
- crafting["9258:2"] = {351,4}
- crafting["9258:1"] = {388,0}
- crafting["9258:0"] = {377,0}
- crafting["9258:6"] = {264,0}
- crafting["1133:0"] = {54,0}
- crafting["20261:69"] = {19264,0}
- p = peripheral.wrap("top")
- ID = p.getPeripheralWorldID()
- w = p.getWorld(ID)
- pl = p.getPlayerByName("Muzze77")
- ent = pl.asEntity()
- x, y, z = p.getPeripheralPos()
- if w.getBlockID(x,y+2,z) == 0 then
- w.setBlock(x, y+2, z, 54,0)
- end
- items = {}
- while true do
- shell.run("clear")
- te = w.getTileEntity(x,y+2,z)
- nbt = api.readTileNBT(te)
- tab = nbt.value.Items.value
- i = textutils.serialize(tab)
- for v, k in pairs(tab) do
- slot = k.value.Slot.value
- item = k.value.id.value
- meta = k.value.Damage.value
- count = k.value.Count.value
- for a,b in pairs(crafting) do
- itemCheck = item .. ":" .. meta
- if itemCheck == a then
- k.value.id.value = b[1]
- k.value.Damage.value = b[2]
- print("Switched " .. itemCheck .. " with " .. b[1] .. ":" .. b[2])
- end
- end
- end
- api.writeTileNBT(te,nbt)
- for tm = 1, 0,-0.1 do
- gx,gy = term.getSize()
- term.setCursorPos(2,gy-1)
- term.write(tm)
- term.setCursorPos(5,gy-1)
- term.write(" ")
- sleep(0.1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement