Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scriptName = "Schematic builder"
- version = "1.7"
- --[[
- Builds structures using schematic files with a turtle or a command computer. Schematics can be downloaded from sites such as http://www.planetminecraft.com.
- Requires openperipherals in CC 1.7 - 1.79. Plethora in later versions. Other combinations might work,
- If interrupted, you can resume by placing the turtle back in the original location and restarting the program.
- Quick setup
- Copy a schematic file to the turtle/command computer (see downloading instructions if on a server)
- Turtles must be placed on top of a chest (any type).
- Command computers require a chest on any side.
- pastebin run Fm3xf6Z9 builder.lua <filename>
- --or if using Opus OS, just type
- builder.lua <filename>
- The first time you run the program, you must select a wrench. Place a wrench into the chest. Go to the supplies list and double-click the SelectAWrench item. Select the wrench and apply. EnderIO, Thermal Expansion, and Applied Energistics wrenches will work (only wrenches that can spin pistons will work).
- Downloading schematics
- Option 1: Use wget if the schematic is available for download.
- Option 2: Transferring via pastebin
- To create a base64 file from a command line, do:
- linux / max:
- base64 -w0 NAME.schematic > NAME.schematic.base64
- windows (I haven't tried this - but google said this will work):
- certutil -encode NAME.schematic NAME.schematic.base64
- Upload the base64 file to pastebin.
- To download and convert the base64 file back into a schematic file, do:
- pastebin run Fm3xf6Z9 base64dl.lua <filename> <url>
- You can download a simple test schematic using:
- pastebin run Fm3xf6Z9 base64dl.lua chicken.schematic https://pastebin.com/raw/vxpHBUky
- ]]
- local GIT_REPO = 'kepler155c/opus/master'
- local BASE = 'https://raw.githubusercontent.com/' .. GIT_REPO
- local function dourl(url, ...)
- local env = setmetatable({ }, { __index = _G })
- for k,v in pairs(getfenv(1)) do
- env[k] = v
- end
- local h = http.get(url)
- if h then
- local fn, m = load(h.readAll(), url, nil, env)
- h.close()
- if fn then
- return fn(...)
- end
- end
- error('Failed to download ' .. url)
- end
- dourl(BASE .. '/sys/boot/multishell.boot', ...)
Add Comment
Please, Sign In to add comment