Posted 19 February 2018 - 10:52 PM
I am super new to programming and I know very little. On the server I play on I am trying to set up an auto witchery cauldron. I am trying to use another mod to gain automated immortality. I figured out how to automate everything else but because the cauldron requires items to be dropped in a certain order and at certain times it became very complicated to automate. I am using a turtle to drop items into the cauldron and a translator computer to tell the turtle what items the auto system requires. The system needs to make three recipes mutandis, mutandis extremis, and Drop of Luck. it doesn't give me an error but the program stops and gives me a random number (as far I can tell), or it does nothing. It is almost always on the turtle side. If anyone can help that would be much appreciated. I think it has something to do with the way I am trying to make it repeat.
here is my setup
https://imgur.com/a/lOE9o
here is my code
here is my setup
https://imgur.com/a/lOE9o
here is my code
Translator
while rs.getInput("back") == true do
if rs.getInput("right") == true then
rs.setBundledOutput("top", 1)
print("making mutandis")
sleep(2)
rs.setBundledOutput("top", 0)
elseif rs.getInput("bottom") == true then
rs.setBundledOutput("top", 2)
print("making mutandis extremis")
sleep(2)
rs.setBundledOutput("top", 0)
elseif rs.getInput("left") == true then
rs.setBundledOutput("top", 3)
print("making Drop of luck")
sleep(2)
rs.setBundledOutput("top", 0)
end
end
Turtle
while true do
event = os.pullEvent()
if event == "redstone" then
break
end
end
if rs.getBundledInput("top") == 1 then
turtle.select(1)
turtle.dropDown(1)
sleep(5)
turtle.select(2)
turtle.dropDown(1)
sleep(5)
turtle.select(3)
turtle.dropDown(1)
sleep(30)
rs.setOutput("front", true)
sleep(5)
rs.setOutput("front", false)
elseif rs.getBundledInput("top") == 2 then
turtle.select(5)
turtle.dropDown(1)
sleep(5)
turtle.select(6)
turtle.dropDown(1)
sleep(30)
rs.setOutput("front", true)
sleep(5)
rs.setOutput("front", false)
elseif rs.getBundledInput("top") == 3 then
turtle.select(1)
turtle.dropDown(1)
sleep(5)
turtle.select(5)
turtle.dropDown(1)
sleep(5)
turtle.select(9)
turtle.dropDown(1)
sleep(5)
turtle.select(10)
turtle.dropDown(1)
sleep(5)
turtle.select(11)
turtle.dropDown(1)
sleep(30)
rs.setOutput("front", true)
sleep(5)
rs.setOutput("front", false)
else
sleep(20)
end
Edited on 20 February 2018 - 12:35 AM