Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mobSlot = {enderman = 1, ghast = 2, sheep = 3, blaze = 4, slime = 5, witch = 6, cow = 7, ironGolem = 8, witherSkelly = 9, creeper = 10}
- mobActive = {enderman = true, ghast = true, sheep = true, blaze = true, slime = true, witch = true, cow = true, ironGolem = true, witherSkelly = true, creeper = true}
- function error()
- print("Please check all slots")
- for x, y in pairs(mobSlot) do
- if mobActive[x] then
- print("Place " .. x .. " in slot " .. y)
- end
- end
- end
- function init()
- currentMob = 0
- turtle.select(16)
- loadedNet = turtle.suckUp()
- for x, y in pairs(mobSlot) do
- if mobActive[x] then
- if turtle.getItemCount(y) == 0 then
- if loadedNet then
- turtle.transferTo(y)
- loadedNet = false
- else
- error()
- end
- end
- end
- end
- end
- init()
- local modem = peripheral.wrap("right")
- modem.open(1001)
- while true do
- local messageArguments = {os.pullEvent("modem_message")}
- selection = messageArguments[5]
- if selection == "reset" then
- init()
- else
- if currentMob ~= 0 then
- turtle.select(mobSlot[currentMob])
- turtle.suckUp()
- end
- turtle.select(mobSlot[selection])
- turtle.dropUp()
- currentMob = selection
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement