Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- ap = peripheral.wrap("back")
- itemsR = peripheral.wrap("right")
- itemsL = peripheral.wrap("left")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- if ap.getQueen() then
- print("hasQueen")
- else
- print("hasNoQueen")
- items = ap.list()
- i = 0
- for v, k in pairs(items) do
- if string.match(k.name,"drone") ~= nil then
- if i == 0 then
- if ap.getDrone() then
- print("hasDrone")
- ap.pushItems("right",v)
- sleep(0.1)
- else
- print("hasNoDrone")
- i = i + 1
- ap.drop(v)
- sleep(0.1)
- ap.suck()
- end
- else
- print("hasDrone")
- ap.pushItems("right",v)
- sleep(0.1)
- end
- elseif string.match(k.name,"princess") ~= nil then
- print("hasNoPrincess")
- ap.drop(v)
- sleep(0.1)
- ap.suck()
- else
- ap.pushItems("left",v)
- sleep(0.1)
- end
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement