Posted 03 January 2016 - 09:12 PM
Hello guys,
I havent been playing around with FTB/cc in a long time since I wanted to get back into Diamond 1 in LoL.
Now I'm back but all my worlds are gone cuz of a system reset.
I used to have a program I cant figure out how to write it anymore so I'm here for help. :P/>
I want to have a main computer sending a turtle what to do by simply entering it in the computer
It should look somewhat like this:
Can anyone tell me where my mistakes are and or if this is correct?
I know It would work like this on the turtle:
Thanks!
I havent been playing around with FTB/cc in a long time since I wanted to get back into Diamond 1 in LoL.
Now I'm back but all my worlds are gone cuz of a system reset.
I used to have a program I cant figure out how to write it anymore so I'm here for help. :P/>
I want to have a main computer sending a turtle what to do by simply entering it in the computer
It should look somewhat like this:
---- Computer
rednet.open("right", "92") --- The wireless modem is on the right
--- and 92 should be the channel!?
while true do
term.clear()
term.setCursorPos(1,1)
write("Command: ")
input = read()
rednet.broadcast(input)
end
--- I already need some help here. Is the code above right? Can I use
--- it like this or do I need it to be "rednet.send(input)"?
----Turtle
rednet.open("left","92") ---- Opening the modem and the channel
while true do
local event message = os.pullEvent("rednet_message")
--- Im pretty sure that code is somewhat wrong in so many ways
if message == "1" then
turtle.dropUp(1)
elseif message == "2" then
turtle.dropUp(2)
end
end
Can anyone tell me where my mistakes are and or if this is correct?
I know It would work like this on the turtle:
rednet.open("left", "92")
id, message = rednet.receive()
print(message)
shell.run(message)
Could I use something like this? I wouldnt want to write a program for every single command so I dont like it this way.Thanks!