Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module = peripheral.wrap("back")
- displayName = "minecraft:totem_of_undying"
- coinName = "xreliquary:fortune_coin"
- local cachedSlot
- local coinSlot
- local function moveTotem()
- while true do
- local found
- if module.getEquipment().getItem(2) == nil then
- for slot, meta in pairs(module.getEnder().list()) do
- if (meta.name == displayName) then
- cachedSlot = slot
- found = true
- break
- end
- end
- end
- if found then
- print("Totem Added")
- module.getEnder().pushItems("equipment", cachedSlot)
- else
- cachedSlot = nil
- end
- sleep(0.05)
- end
- end
- local function coinOfFortune()
- while true do
- local found
- for slot, meta in pairs(module.getInventory().list()) do
- if (meta.name == coinName) then
- print(meta.name)
- for i,v in pairs(meta) do
- print(i,v)
- end
- sleep(3)
- break
- end
- end
- if found then
- --print("Totem Added")
- --module.getEnder().pushItems("equipment", cachedSlot)
- else
- --cachedSlot = nil
- end
- sleep(0.05)
- end
- end
- parallel.waitForAll(moveTotem, coinOfFortune)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement