Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Ruuqo

Members
  • Content Count

    3
  • Joined

  • Last visited

Posts posted by Ruuqo

  1. local component=require"component"
    local event=require"event"
     
    local link=component.tunnel
    local modem=component.modem
    local port=100
     
    local function forward(event,rec_addr,from,port,distance,message)
    modem.broadcast(port,message)
    end
    
    event.listen("modem_message",forward)

    This forwards all message received by the tunnel (and any other message as well but it does not receive messages if you don't open a port, tunnel is an exception of course) to all computers listening on port 100 in this case. Once started it will run in the background until you restart the pc. you won't see this program working. if you want to see it, add a "print(message)" to the function forward, then you get an output each time you receive a message from the tunnel.

    I've not tested this code but i'm confident it should work.

     

     

     

     

    I'll give this a quick shot, thanks

  2. Okay, so first let me explain.

     

    I would like to be able to send a message from a computer with a linked card, to the other computer with a linked card, and have the receiving computer then forward that message as a broadcast to other computers on the other network its connected to, these two networks are in different dimensions.

     

    My ability to code LUA is pretty much "hello world", and someone in IRC coded this for me...

     

    http://pastebin.com/qmTAUpsB

     

    The recieving computer gets the message, but it does not go through its own network to other computers, can someone help?

     

    thanks

  3. So I can figure out how to send normal network messages, but I am at my wits end with linked cards

     

    What lua command do I need to type to send a message to a computer receiving the message?

     

    I have tried  component.tunnel.send= , but I dont know what function to type, or anything xD I tried component.tunnel.send("my message here") but it never shows up on the receiving computer.

     

    The command I use on the receiving computer is event.pull("tunnel") but a message never comes through.

     

    Help me please, and try to be simple, my ability to code lua is almost zero xD

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.