This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LeDark Lua's profile picture

CraftNet | Simple rednet internet.

Started by LeDark Lua, 02 August 2015 - 05:49 PM
LeDark Lua #1
Posted 02 August 2015 - 07:49 PM
CraftNet


This is a little code example of how you can make Internet using computercraft.

This is very basic and would need to code auto server finders and such.






Hope to hear your thoughts on this.
LeDark Lua #2
Posted 02 August 2015 - 08:00 PM
And if you really want to make GOOGLE on this CraftNet, you could loop through numbers, and send a pact for example:

CraftNetMsg.IsServer="3"
CraftNetMsg.IsServerOK="3_5"
while true do
  if msg==CraftNetMsg.IsServer
	rednet.send(sender, CraftNetMsg.IsServerOK)
  end
end
Edited on 02 August 2015 - 06:01 PM
MKlegoman357 #3
Posted 02 August 2015 - 08:51 PM
In the tutorial subforum we expect people to not only give some code, but actually explain what it does. You should really write a description, an actual tutorial, about what you're trying to teach here.
Lyqyd #4
Posted 02 August 2015 - 11:52 PM
Moved to Programs.
LeDark Lua #5
Posted 03 August 2015 - 07:27 AM
Code is explained. I commented it.
Waitdev_ #6
Posted 03 August 2015 - 07:44 AM
you just need to edit the comment explaining it though, you did:

if (statement)
and not:

if (statement) then

also a tip you might want to know, you don't need string.len.
you can just do a simple #, but its not like it really matters.
just a tip :)/>

--instead of:
txt = "hi"
print(string.len(txt))
--you can do
txt = "hi"
print(#hi)
Edited on 03 August 2015 - 05:47 AM
LeDark Lua #7
Posted 03 August 2015 - 08:21 AM
Yes _Wait, I know that, but I dont use it very often one of the reasons why is I forget about it :D/>