OK.. so you've got 1.3 and now your thinking to yourself... I wanna use this modem... I wanna create the internet in minecraft!!!!
Lets take it back a few steps and first learn all about the modem and how to use it in a basic way.
The first thing you should know is that to attach the modem to a computer you must sneak first then right-click on the side of the computer you would like to attach the modem too.
Turtles with modems automatically have them placed on the right side when crafted.
So now that we have 2 computers or a computer and a turtle setup with modems we are going to learn how to pass information between them.
rednet.open("right")This command opens the port of the modem. The "right" statement is the side of the computer that the modem is located.
rednet.broadcast("Our information")This command says that we want to broadcast the string "Our Information" to every modem within range. Anyone that is listening for information will receive our statement.
rednet.open("right")Once again, we have to open up the port on the modem so that we can communicate, luckily turtle's always have their modems placed on the right side.
id, message = rednet.receive(10)This command makes the computer listen to the modem for 10 seconds. You could simply do () instead of (10) and it would listen indefinitely until it received communication. The rednet.receive function returns us 2 variables when it receives information. The ID of the computer that sent the information and the message itself.
print ("Computer ".. id .. " has sent us a message") print ("The message is") print (message)This is just some output information so we can see who sent us something and what that something was.
Now that's all fine and dandy, but we don't want all those computers getting our information, thats just wrong, we don't wanna share our private data with everyone. So this time instead of using the rednet.broadcast command we will be using the rednet.send command.
rednet.open("right") rednet.send(5, "Our Information")This will open the port like normal, and then it will send information but it will only send that information to Computer/Turtle #5 (you can see the ID of a computer or turtle by typing "id" inside your computer or turtle)
So now we have to make sure we use Computer or Turtle #5 to receive our information and we can do the same script as above.
I hope this gets everyone on their way to using modems successfully, I understand it's a brief tutorial, but your goal is to manipulate everything you learned here into something amazing />/>
If you need more help on anything in computercraft at anytime you can simply type "help index" inside your computer and it will show you an index of all the help files that are available. One of them happens to be "help rednet" which explains some more of the functions you have access to.