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

Lizzian

Administrators
  • Content Count

    250
  • Joined

  • Last visited

  • Days Won

    28

Posts posted by Lizzian

  1. did you make sure the tape was at the beginning before writing it? Also I think (depending on how the script does it) that the dropbox url gets forced to https so that my be causing issues

  2. local component = require("component")

    local modem = component.modem

    local term = require("term")

    local event = require("event")

    local prgms = {"move to","home","unready","reportPos","exit"}

    local port = 100

    print("Starting Robot Commander...")

    print("Opening port "..port.."...")

    modem.open(port)

    print("Port "..port.." open: :"..tostring(modem.isOpen(port)))

    os.sleep(1)

    local select = 0

    while prgms[select] ~= "exit" do

    print("\n\nRobot Commander\n")

    print("1) Move robot to...")

    print("2) Send robot home")

    print("3) Exit robot ready state\n (unable to restart remotely)")

    print("4) Report robot position")

    print("5) Exit Robot Commander\n")

    select = tonumber(io.read())

    if prgms[select] == "move to" then

    local mode

    local valid = false

    while valid == false do

    print("\n(R)elative or (absolute) movement?")

    mode = io.read()

    if mode == "r" or mode == "R" then

    print("Enter x-distance:")

    xTarget = io.read()

    print("Enter y-distance:")

    yTarget = io.read()

    print("Enter z-distance:")

    zTarget = io.read()

    valid = true

    elseif mode == "a" or mode == "A" then

    print("Enter x-target:")

    xTarget = io.read()

    print("Enter y-target:")

    yTarget = io.read()

    print("Enter z-target:")

    zTarget = io.read()

    valid = true

    else

    print("Error: Must enter 'a' or 'r' for mode...\n")

    end

    end

    valid = false

    while valid == false do

    print("\nMode\tx\ty\tz")

    print(tostring(mode).."\t"..xTarget.."\t"..yTarget.."\t"..zTarget)

    print("Send command? ('y' or 'n')")

    option = io.read()

    if option == "y" or option == "Y" then

    modem.broadcast(100,1,xTarget,yTarget,zTarget,tostring(mode))

    print("Command sent")

    valid = true

    elseif option == "n" or option == "N" then

    print("Please re-select command.")

    valid = true

    else

    print("Error: Must enter 'y' or 'n'")

    end

    end

    if prgms[select] == "home" then

    modem.broadcast(port,2)

    end

    if prgms[select] == "unready" then

    modem.broadcast(port,3)

    end

    if prgms[select] == "reportPos" then

    local pos = {}

    modem.broadcast(port,4)

    pos = {event.pull(10,"modem")}

    print(pos[6].." "..pos[7].." "..pos[8])

    print("press any key to continue")

    os.sleep(3)

    io.read()

    end

    if prgms[select] == "exit" then

    print("Exiting Robot Commander...")

    os.sleep(1)

    end

    end

    you seemed to have a wild extra "end" in the middle of your program, this should work but i cant test since i'm not at a mc capable computer
  3. Might as well keep you guys in the loop with server development:

     

    I plan to revise the pack and the server before the end of the year (I've got college and job stuff to do so not much time for recreating stuff) since the mods I was originally going to use are now up to date and the current pack is a bit resource intensive. I'll post more details when I can / when i think of them.

  4. This was (or something similar) discussed in IRC and I think the general outcome was "No", mainly because having a full computer in a single (or two) block space(s) completely goes against the look and feel of OC

  5. 1st part was discussed on IRC so I'll copy the bit of the log that matters:

     

    [16:20] <@Ender> iceman11a: put a switch between them, it can transfer network messages but components wont be visible from the other side

    [16:21] <@Ender> if you want to transfer power, the Power Distributor block is what you want
    [16:23] <iceman11a> Ender, The idea I had was to let the server have that option. Let the server have all the components and have to send that information to the pc requesting it.
    [16:24] <iceman11a> Ender, Your saying put a switch between each pc and sever. Is that right
    [16:26] <iceman11a> Ender, Or can I plug 2 pc's into the switch and plug the switch into the server,
    [16:27] <Magik6k> iceman11a: yep, you can
    [16:28] <iceman11a> Ender, So all of the above.
    [16:28] <iceman11a> It doesn't matter as long as these's a switch between them
    [16:36] <@Ender> iceman11a: yes, as long as the connections between the pcs have at least 1 switch inbetween it should be fine

     

    as for the modem stuff, if you write at the top of your script something like 

    server = "UUID HERE"
    computerA = "Blah"
    

    then you can simply reference it as modem.send( server, port, data )

  6. Copying from OC is a lot harder than pasting, if you want to edit it outside the game and have it show up instantly ingame, set bufferedFilesystems to false in the OC config. As for pneumaticcraft stuff, have you looked at the pressure monitor that can be attached to pipes? That will output a RS signal strength in correlation to the pressure inside the tube.

×
×
  • Create New...

Important Information

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