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

SubThread

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by SubThread

  1. Robotic Actually Additions Canola Oil Improver - RAACOI

    This is a semi-automatic script for robots that takes oil from Actually Additions and crafts it into the next tier.
    Canola Oil --> Crystallized Oil or
    Crystallized Oil ---> Empowered Oil.

    In short, the robot will: Take Canola Oil, drop it down, drop a seed and put the new oil into a container.
    So you will still need to deal with the seeds in atomic reconstruction and empowerer. That's not that bad to manually do though since
    you can do them stack by stack.

    The robot will simply pause and try later if something goes wrong (for example out of seeds or oil). So you don't have to restart it or anything.

     

    Code: https://pastebin.com/m8gAz7my

    -- Robot oil improver for Canola oil (Actually Additions)
    -- Version 0.00000000000000000003a
    
    local robot = require("robot")
    
    local function sleep(x)
      os.sleep(x)
    end
    
    local function s()
      sleep(0.2)
    end
    
    local function drain()
      local r = robot.drain(1000)
      return r
    end
    
    local function fillDown()
      local r = robot.fillDown(1000)
      return r
    end
    
    local function dropDown()
      local r = robot.dropDown(1)
      return r
    end
    
    local function drainDown()
      local r = robot.drainDown(1000)
      return r
    end
    
    local function fill()
      local r = robot.fill(1000)
      return r
    end
    
    local function rearm()
      print("Trying to fill up with some seeds.")
      robot.turnRight()
      s()
      robot.suck()
      robot.turnLeft()
      s()
    end
    
    local function verifier(func, msg, ident)
      while true do
        local r = func()
        if r == true then
          --pass
          s()
          break
        else
          print("Unable to:", msg, "Taking a nap")
          if ident == 3 then
            rearm()
          end
          sleep(5)
        end
      end
    end
    
    print("Greetings!")
    sleep(0.3)
    
    while true do
      verifier(drain, "drain the raw oil", 1)
      verifier(fillDown, "fill the space down below... Something is probably very wrong.", 2)
      verifier(dropDown, "drop a seed", 3)
      robot.turnLeft()
      verifier(drainDown, "drain from below. Something is janky.", 4)
      verifier(fill, "dump the new oil.", 5)
      robot.turnRight()
      s()
    end
    
    

     

    Setup - Robot

    This is a recommended robot build:
    Mwxht3G.png

    You can get away with cheaper, the solar is optional if you prefer using chargers, and/or you want the robot to work inside a building.
    Just don't forget the tank and inventory upgrade as seen above.

    To get the program into the computer you can either use a floppy, internet card or paste it in directly with a middle mouse click.
    For example: Start up the robot. Type: edit oil.lua. Copy the code, paste with middle mouse. Press CTRL-S to save and CTRL-W to exit.
    Start with: oil.lua or simply oil.


    Setup - Placement

    I strongly recommend fluid containers like Iron/Stone drums from Extra Utils 2 or tanks from EnderIO. And piping it. You could fill an 
    oil generator directly too if you want.


    Gph9txz.png

    In front of the robot - A tank or similar with the input oil. For example Canola Oil.
    To the left of the robot - An output tank or similar for the improved oil. 
    To the right of the robot - A chest with the seeds.
    Below the robot - 1x1x1 hole. The robot will drop the seed here.
    Behind the robot - Optional charger.

    Usage
    Start up the program and the robot will get to work. I strongly recommend that you don't move these tanks, instead use pipes to transport the oil.
    You can pipe into the input tank directly from the fermenters for example. You can also pipe seeds into the seed chest to make it 
    close to fully automatic.
     

    Example of Canola Oil --> Empowered Oil (dual robots)

    a3BoIIR.png

    Quite handy, with two robots you can enhance the oil the whole way up to Empowered Oil.
     

    Known Issues

    Quote

    SOLVED IN OpenComputers-MC1.10.2-1.6.2.122-dev! 
    http://ci.cil.li/job/OpenComputers-dev-MC1.10/lastSuccessfulBuild/artifact/build/libs/OpenComputers-MC1.10.2-1.6.2.122-dev.jar
    Currently I have huge problems with robots turning off during world load. That can break this a bit forcing me to manually "fix" the oil state.
    For example starting up the robot, entering a lua prompt by typing "lua", and inside that mess around with commands like:
    =robot.drainDown()
    =robot.fill()
    =robot.turnLeft()
    =robot.TurnRight()
    Hopefully your robots are behaving better than mine, so this shouldn't be a problem.


    Other notes
    Thanks to irc chat for getting my grips together after messing up simple code.

  2. Drone Tree Farmer

    dXVk1wA.png

     

    - Introduction -
    This is an automatic tree farmer script for drones harvesting spruce wood in king size (2x2).
    Just place a chest next to the drone and 8 or more saplings in the first slot and it should be be able to go on forever.
    No coal is needed, no charge pads, the solar panel upgrade will power the drone.
    This is not the fastest way to get wood, but it's pretty cheap, easy setup and doesn't need maintenance.

     

    Built for: OpenComputers-MC1.10.2-1.6.2.7,  Lua 5.2. 
    Also works on OpenComputers-MC1.7.10-1.6.2.12-universal,  Lua 5.2, other than the beep sound is weird.
    Should work for newer versions too!

    - Requirements -
    * A working computer of any tier, to flash EEPROMs.
    * A drone (tier 1) with: cpu, ram, solar and inventory upgrade.
    * 8 or more Spruce saplings. Jungle trees are partly supported, it could work but branches will be left alone.
    * A chest or similar is recommended.
    * An empty EEPROM.

    - Usage -
     

    Part A - Flashing
    1. Start up a computer with an internet card in it.
    2. Replace the Lua EEPROM with an empty one.
    3. Right click the computer screen and type (or paste):

    pastebin get kSjuz992 bios && flash bios

    4. Follow the instructions and when done - take out your newly flashed EEPROM.

     

    Part B - Making the drone

    recipe.png
    1. Grab a Drone Case Tier 1 and place it in the Assembler.
    2. Add T1 cpu, ram, solar upgrade and inventory upgrade.
    3. Add the flashed EEPROM. (You can also change roms later if you want)
    4. Assemble away!

     

    Part C - Actual work.
    1. Find a flat area of dirt or grass. Remove any tall grass.
    2. Place the drone so it got at least 10 blocks to the WEST of it. (Press F3 to find out where west is.)
    3. Place a chest next to the drone, NORTHERN side (again F3 to find out).
    4. Place 8 or more spruce saplings in the top left slot.
    5. Start the drone. It should say ROM OK and get to work.
    6. Grab a cup of Joe to celebrate.

    inAction.png

    Source code:
    https://pastebin.com/kSjuz992

    Disclaimer: This is my first lua script that I ever release so my code is far from good. Also, I am not a programmer, just started with this. This also got a lot of debug code in it, lack of loops, extra sleeps and what not.
    Thanks to irc chat for the sleep function!

     

     

×
×
  • Create New...

Important Information

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