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

Robotic Actually Additions Canola Oil Improver - RAACOI

Recommended Posts

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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