Jump to content




Cookiebal's Programs (CookieSystem || Turtle advanced movement || Skynet networking || Project World Eater || And a lot more)


  • You cannot reply to this topic
160 replies to this topic

#41 LIMachi

  • New Members
  • 3 posts

Posted 28 February 2012 - 11:05 PM

Quote

To make a simple installer you can use things like
file = io.open("program you want to install name here", "w")
file:write([[
>
]])
file:close()
i'm not sure where i ave to put this code, and if i ave to change the ">".

#42 Cookiebal

  • Members
  • 82 posts

Posted 28 February 2012 - 11:16 PM

Put the code in place of the >

for example

file = io.open("program you want to install name here", "w")
file:write([[
while true do
event, par1 = os.pullEvent()
if event == "peripheral" and par1 == "back"
then
  peripheral.call("back", "turnOn")
end
end
]])
file:close()


#43 LIMachi

  • New Members
  • 3 posts

Posted 28 February 2012 - 11:20 PM

yes but... i've no understand. ave i to spécifiate an id for the turtle?
can you give me an example, a part of your code? i'm better with examples...

#44 LIMachi

  • New Members
  • 3 posts

Posted 28 February 2012 - 11:22 PM

if i ave understand, that function copy

while true do
event, par1 = os.pullEvent()
if event == "peripheral" and par1 == "back"
then
peripheral.call("back", "turnOn")
end
end
in the specified program

#45 Cookiebal

  • Members
  • 82 posts

Posted 29 February 2012 - 12:34 PM

Indeed. :o/>

So you just have to make one of those blocks for each program you want to install.

It can then be used immediately with the standard shell.run function too.

#46 Cookiebal

  • Members
  • 82 posts

Posted 29 February 2012 - 04:06 PM



Internet in Minecraft, getting close.

Copy paste of the description:

Quote

The base for an internet! It doesn't have real websites and browsers yet though, but this can be used to make them. Any computer/turtle in range of this and with the api can receive/send to any other computer connected to the network. The rednet messages are automatically repeated, but only once, so you won't get the same message spammed all the time (which would happen with simple repeaters).

The reason it's named skynet is because the network is supposed to be a network of turtles that run the repeater program somewhere at the max map height. So that you don't need to make towers or anything else. And it would allow you to easily set up a repeater turtle somewhere near your base to connect the rest of your computers to the big network.


#47 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 29 February 2012 - 04:16 PM

Bravo, nice to see such an idea actually implemented.
I'm looking forward to see how you handle routing. I assume at the moment you're using static routing?

#48 Cookiebal

  • Members
  • 82 posts

Posted 29 February 2012 - 04:24 PM

If static routing means that every computer on the network knows the 'path' to the other computers, then not.

I could make a computer, put it down somewhere in range of the network, install the api and send messages to any other computer connected to the net immediately.

#49 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 29 February 2012 - 04:35 PM

View PostCookiebal, on 29 February 2012 - 04:24 PM, said:

If static routing means that every computer on the network knows the 'path' to the other computers, then not. I could make a computer, put it down somewhere in range of the network, install the api and send messages to any other computer connected to the net immediately.
Do you mean that every turtle in the network keeps a list of all turtles in the network and/or a list with the route to every computer?

#50 Liraal

  • New Members
  • 477 posts
  • LocationPoland

Posted 29 February 2012 - 04:36 PM

He probably means that every turtle can access another using its ID by the use of API and network.

#51 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 29 February 2012 - 04:40 PM

View PostLiraal, on 29 February 2012 - 04:36 PM, said:

He probably means that every turtle can access another using its ID by the use of API and network.
That's not what I mean though.
If any turtle in the network receives a message that is meant for a specific computer, then the turtle has to know which turtle is the next in the route to that specific computer.
And I was curious what method he used to determine the path.

#52 Cookiebal

  • Members
  • 82 posts

Posted 29 February 2012 - 04:42 PM

View PostLiraal, on 29 February 2012 - 04:36 PM, said:

He probably means that every turtle can access another using its ID by the use of API and network.

This.

If I use skynetsendmessage("rawr", 5) it will send a message around the network and the computer with id 5 will receive it. If there is no computer with id 5 connected then of course nothing will receive it, but the message will get send across the network.

There is no path, everyone will receive everything and check some tags added at the start of the message.

#53 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 29 February 2012 - 04:47 PM

Oh, so you're essentially broadcasting messages then.
Sorry I misunderstood it to be sending messages to specific computers.

Last question then: Do the turtles make use of the rednet.broadcast function or the rednet.send function to send the message to all the other turtles around it?

Edited by Espen, 29 February 2012 - 04:47 PM.


#54 Cookiebal

  • Members
  • 82 posts

Posted 29 February 2012 - 04:52 PM

Yep, it's a giant broadcast basically.

Everything uses broadcast.

#55 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 29 February 2012 - 04:53 PM

Hmm, ok that means any computer or turtle that connects to this network without using your protocol can read all messages.
Kind of like sniffing with the network adapter in promiscuous mode.^^
Ah well, I was just asking these routing questions because I'm a bit of a security nut, I hope you don't mind. :unsure:/>/>

#56 Cookiebal

  • Members
  • 82 posts

Posted 29 February 2012 - 04:58 PM

Yeah, security obviously wasn't really my priority :unsure:/>/>. But there are many encoders around the forum, so fun for them I guess!

#57 BouncyWolf102

  • New Members
  • 4 posts

Posted 04 March 2012 - 11:19 AM

im getting an error pathfinding:191: attempt to compare __lt on nill and number please help btw i love this project!!! ty for putting out your hard work for the public to use XD

#58 Xtansia

  • Members
  • 492 posts
  • LocationNew Zealand

Posted 04 March 2012 - 11:39 AM

View PostCookiebal, on 29 February 2012 - 04:58 PM, said:

Yeah, security obviously wasn't really my priority :unsure:/>. But there are many encoders around the forum, so fun for them I guess!

I think all of them are mine? XD

#59 Cookiebal

  • Members
  • 82 posts

Posted 04 March 2012 - 11:45 AM

View PostBouncyWolf102, on 04 March 2012 - 11:19 AM, said:

im getting an error pathfinding:191: attempt to compare __lt on nill and number please help btw i love this project!!! ty for putting out your hard work for the public to use XD

Check your perver/coordx and pervar/gotox txt files. One of them is probably empty.

View Posttomass1996, on 04 March 2012 - 11:39 AM, said:

View PostCookiebal, on 29 February 2012 - 04:58 PM, said:

Yeah, security obviously wasn't really my priority :unsure:/>. But there are many encoders around the forum, so fun for them I guess!

I think all of them are mine? XD

I had yours in mind when making that post yeah B)/>

#60 BouncyWolf102

  • New Members
  • 4 posts

Posted 05 March 2012 - 08:16 AM

my files are all right and followed instructions but its still got the error





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users