Cozzmo

Poor man's refiner

8

Log in or register to like this ship.


Description
n/a
n/a

Simple script making your refiners to automatically cycle through t1 recipes when they are out of resources. Helps if you're just starting and have only one refiner or if you want to make your refiner more efficient.

Just copy this into your onStatusChanged(3) filter on your refiner (assuming you named that slot "refiner")

```
--- status 3 -> jammed, no materials

-- 198782496, -- hematite -> iron
-- 2240749601, -- bauxite -> aluminum
-- 159858782, -- coal -> carbon
-- 2589986891, -- qurtz -> silicon

local currentItem = refiner.getOutputs()

-- linked list to cycle possible recipes
local refinedOres = {}

refinedOres[198782496] = 2240749601;
refinedOres[2240749601] = 159858782;
refinedOres[159858782] = 2589986891;
refinedOres[2589986891] = 198782496;

refiner.stop(true)
refiner.setOutput(refinedOres[currentItem[1].id])
refiner.startRun()
```


Created 1 year ago
Updated 1 year ago
Comments

Log in or register to leave a comment.


1 year ago

902PE_Gaming

I've done my own updated version of this script. you can get it directly via github here: https://github.com/MichelV69/DU-LUA-PoorMansRefinerManager

1 year ago

Tunsji

This script works very well. Thanks for the update to the instructions 902PE_Gaming. That did the trick. :-)

1 year ago

902PE_Gaming

the trick is the slot on the board has to be named whatever the "currentItem" object is. So if you have "RefinerPink" as the slot name, then you have to have that line `local currentItem = RefinerPink.getOutputs()`. Additionally, the "onStatusChanged" has a blank box beside it; you _must_ put 3 in this box or it will not work.

1 year ago

Finesse

Doesn't work as described for me, likely due to poor installation on my part. Sometimes material switches and the refiner starts, sometimes it just switches to a random resource and doesn't start, sometimes it switches to the correct resource but doesn't start. Essentially, after manually pressing start from 0 to 2 times this script allows you to skip the "configuration" step.

1 year ago

neckster69

We couldn't get this to work. Not switching at all for us

1 year ago

Nopalito

Such a simple but great idea.

Cozzmo
Profile:
Discord:
cozmo#9083
In-game:
Cozzmo
Location:
Alioth
Tags
  • Sold As
    • Free

  • Usage
    • Industry