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

All Activity

This stream auto-updates     

  1. Today
  2. local GUI = require("GUI") local component = require 'component' local thread = require 'thread' local event = require 'event' local reactor = component.reactor_chamber local currentTemps = reactor.getHeat() -------------------------------------------------------------------------------- -- Create new application local application = GUI.application() -- Add panel that fits application application:addChild(GUI.panel(1, 1, application.width, application.height, 0x262626)) -- Add smaller panels application:addChild(GUI.panel(4, 2, 23, 4, 0x880000)) application:addChild(GUI.text(5, 3, 0xFFFFFF, "Current Reactor Temps")) -- Grab a reference to the text object you need to update local gui_temp = GUI.text(5, 5, 0xFFFFFF, currentTemps) application:addChild(gui_temp) application:draw(true) -- initial paint thread.create(application.start, application) -- Start the app event handler as a subprocess of this one while true do os.sleep(3) -- Update the element every 3 seconds gui_temp.text = tostring(reactor.getHeat()) gui_temp:update() -- Signal the app that this element should be refreshed end This is just another attempt in case I missed something... If this doesn't work yet again, then could you run `cat /tmp/event.log` after running this (if it fails), and reply with its output if it's available. Threads and event timers don't throw errors in the main process.
  3. Yesterday
  4. 1) yes. The quotes. 2) autorun isn't depricated ( I don't think..) but you might like the .shrc format better. Run 'edit .shrc' in the home dir and add the path to the file you want to run on the first available line. It's super simple and can have multiple programs to run on startup. Also programs can take shell args just like typing it in yourself.
  5. hello. i have password lock on my computer and i want to run it automaticaly. i looked to internet and i find some about autorun.lua file (HERE) and i create the file, edit /autorun.lua and writed this to it : os.execute(/home/door) (i have file named "door") i save it and reboot the OS and for 0.3second there is some red text and after it it goes normaly to /home/ menu i edited the code to os.execute(/home/door.lua) and there is still the same red text and it goes again to /home menu. what i am doing wrong ? edit: i recorded the error and slowed down it in sony vegas and looked to error and i have missing quotes
  6. Thank you for your help. Didn't seem to want to update that variable. It will get the first reading when you first run the program up but doesn't want to update properly after that. I may have to refer to the library creator on this.
  7. Hello, I would like to use the function .suckFromSlot in a robot so he can suck one item in the slot number 5 from a chest above him. But I don't understand how to use the function because when I've test some program, I've don't success to use it. Thank you for helping me.
  8. Last week
  9. Okay, so here's my problem. I am trying to make my own custom OS for OpenComputers. However, I am having issues with the GPU displaying on-screen. I have code that should, as far as I can tell, do what I need it to, but doesn't. How to reproduce: Download the attached .lua files, and put them on a floppy disk. Place init.lua in the root directory (of the floppy), and boot.lua in sys/boot/ (so the files on the floppy should be /init.lua and /sys/boot/boot.lua). Boot from the floppy, and you will see what I mean. If anyone can help me, or knows what I can change or look at, your help would be greatly appreciated Before you ask, I have already looked at the Wiki entries on Component, GPU, Screen, Writing Custom OSes, and that one forum post about 'Custom OSes under OpenComputers' Lua architecture'. I am probably a moderate to intermediate Lua programmer by now, and this code is the result of around an hour of work. Thanks in advance! boot.lua init.lua
  10. I use Linux Mint MATE on my MacBook and GalliumOS 3.0 on my Chromebook. I also have a raspberry pi BTW why is there a huge rectangle on your desktop background?
  11. Programming and technology related survival server Start with basic stone tools and a golden shovel to create GriefPrevention claims. You can connect from this IP: codersnet.pw You can install the modpack from Technic Launcher: https://www.technicp...ersnet-official Also join our Discord Server! Mods: Applied Energistics 2 AutoRegLib Baubles BetterFPS BiblioCraft ComputerCraft: Tweaked Chisel Chisel & Bits CodeChicken Lib CoFH Core CoFH World Compact Machines Computronics ConnectedTexturesMod EnderCore Ender IO Extra Cells 2 Extra Utilities Forgelin Forge Multipart Hwyla Inventory Tweaks Iron Chests Just Enough Items LibrarianLib Mantle McJtyLib MCMultiPart Mekanism Mekanism Generators Minimal Peripherals MrTJPCore NoMoreRecipeConflict OpenComputers OpenSecurity PeripheralPlusOne Plethora Peripherals ProjectE Project Red (Link to the wiki containing all links of all mods) Psi Quark Oddities Quark Redstone Flux Refined Storage Refined Storage Addons RFTools Random PSIdeas Tinkers Construct The Framework Thermal Mods (Link to the download page containing all links of all mods) Tinkers' Tool Leveling Wawla The Weirding Gadget Xaero's Minimap
  12. Description: I am looking for a program that show's that stats of a Fusion Reactor from Nuclear on an OpenComputers monitor. Function: The function of the program would be to see fuel levels in both tanks, current temp and max temp and the energy levels with in the reactor. Deadline: I'm not too fussed, I would appreciate it as soon as possible. Additional Information: I found this link which has the NuclearCraft OpenComputers Methods " https://github.com/turbodiesel4598/NuclearCraft/blob/master/openComputers.txt#L37
  13. Hello, I've been having problems starting the computer just like in this post: I did everything in the post but nothing. The computer starts initializing lua components but it starts lagging A LOT, then it usually freezes and ends with a "too long without yielding" error. I have only OC in the mods folder. The thing is, I kinda thought of using another scripting languange to see if it was sth about lua, and found a mod to add OpenPython support (https://www.curseforge.com/minecraft/mc-mods/openpython), and magically it didn't have the same error or the lag, and succesfully loaded OpenPython so I think it's lua related? I also started having too many problems with Minecraft after upgrading my Win7 system to Win10...
  14. Oh, I see! Thank you I am on multiplayer server and I guess it is not updated to latest version.
  15. 1.7.2 had some serious bugs - not sure why you're not using latest builds.use our latest release build on curse ,or even better, try our latest dev builds https://minecraft.curseforge.com/projects/opencomputers/files https://ci.cil.li/
  16. Hi! I am new to the OpenComputers mod and to LUA in general. The OC version I am using is Minecraft version 1.12.2 I have a Tier 3 Computer Case and Screen setup with these inside: I have already installed OS and OPPM and it was working after that. Everything was working before I logged off for the night (and I turned off the energy source for my computer and I shut the computer down by typing "shutdown"). Now that I am back in my server, I get the error: Unrecoverable Error, Computer Halted. I had used the "shutdown" way to turn off my computer, and it would still turn on, but now it is not. Not only my computer is not working, but my robot and Tier 1 computer too have ceased working. Tier 3 Computer: Robot: Tier 1 Computer: Tl;dr , All machines have computer halted error even though they were working fine before I logged off. Is there any way to fix this error besides making a new HDD and new robot?
  17. I'm not super familiar with this library so you may have to adjust the code as it is untested. local GUI = require("GUI") local component = require 'component' local thread = require 'thread' local event = require 'event' local reactor = component.reactor_chamber local currentTemps = reactor.getHeat() -------------------------------------------------------------------------------- -- Create new application local application = GUI.application() -- Add panel that fits application application:addChild(GUI.panel(1, 1, application.width, application.height, 0x262626)) -- Add smaller panels application:addChild(GUI.panel(4, 2, 23, 4, 0x880000)) application:addChild(GUI.text(5, 3, 0xFFFFFF, "Current Reactor Temps")) -- Grab a reference to the text object you need to update local gui_temp = GUI.text(5, 5, 0xFFFFFF, currentTemps) application:addChild(gui_temp) -- Create a timer that will run every 3 seconds, forever. local tid = event.timer(3, function() gui_temp.text = tostring(reactor.getHeat()) -- overwrite the text data gui_temp:update() -- notify the app that the state of gui_temp has changed end, math.huge) -------------------------------------------------------------------------------- application:draw(true) application:start() event.cancel(tid) -- cleanup the timer after application:start returns
  18. I am trying to make a robot to automate my Mystical Agriculture inferium farm, but I am not able to place the seeds with .use(). I tested my code with wheat seeds and it works fine. Does anyone know a workaround?
  19. Earlier
  20. Greetings, I'm new to Lua but familiar with some of the basics. I'm using this library for the GUI, but not sure on the proper procedure on updating the items on the screen. I have an adapter attached to an IC2 fluid reactor and want to call reactor.getHeat() to get the latest temps and update this child: application:addChild(GUI.text(5, 5, 0xFFFFFF, currentTemps)) If someone can kindly point me in the right direction I think I can go from there. The rest of my code is pretty basic which I haven't played around much on it. local GUI = require("GUI") local component = require 'component' local reactor = component.reactor_chamber local currentTemps = reactor.getHeat() -------------------------------------------------------------------------------- -- Create new application local application = GUI.application() -- Add panel that fits application application:addChild(GUI.panel(1, 1, application.width, application.height, 0x262626)) -- Add smaller panels application:addChild(GUI.panel(4, 2, 23, 4, 0x880000)) application:addChild(GUI.text(5, 3, 0xFFFFFF, "Current Reactor Temps")) application:addChild(GUI.text(5, 5, 0xFFFFFF, currentTemps)) -------------------------------------------------------------------------------- application:draw(true) application:start()
  21. Repository: https://github.com/cyb0124/OCRemote. The following is a copy of the repo's readme. OCRemote is an OpenComputers program by cyb0124 for item management and auto-crafting. Main features include: Extensive reuse of same machines for multiple recipes. Prioritization of recipes based on the current number of items stored. (e.g. deciding which crop to grow, or deciding which ore to process first.) Robust handling of multiple-input recipes to prevent clogging (e.g. for alloy furnaces). Preventing recipes from using up the last seed/sapling/etc. OCRemote is designed for survival/expert-mode gameplay in modpacks such as Enigmatica 2 and Project Ozone 3. When used correctly, it can completely replace ME-system based auto processing both in early game and in late game. It has been tested to function correctly in Sponge-based public servers. Server and clients OCRemote includes a TCP server program written in C++ that needs be run outside the minecraft world. All decision-makings happen in the server. The computers in minecraft world merely execute the commands sent by the server. Multiple clients can connect to the same server, which allows parallelization of inventory manipulation operations. Bus OCRemote requires a shared inventory to move items around. This inventory is called as the "bus" in the source code. The bus can be implemented using EnderStorage's ender chests, or using ActuallyAdditions' item lasers. Storage OCRemote currently supports 3 different types of storages: Chests OCRemote will use chests the most efficient way, i.e. coalescing item stacks to avoid wasting slots. StorageDrawers or equivalent. ME system OpenComputers' access to ME system is slow (throttled), so OCRemote is able to use multiple computers to access the same ME system to parallelize accesses. Auto Crafting OCRemote doesn't analyze any tree structure for recipe dependencies; instead it will simply start to craft an item if the amount stored of that item falls below a set point and if all ingredients are available. This will eventually propagate through all recipe dependencies. If multiple recipes use the same machine, OCRemote will prefer the recipe with the lowest percentage amount stored. All processes can also regulate the amount of items in the machine buffer to prevent bloating the machine buffers. OCRemote currently supports the following types of auto-crafting processes: ProcessSlotted This process is intended for machines that can only run 1 recipe at once and the input items need to go into specific slot with the correct ratio. OCRemote will only execute recipes that input items match the items already in the machine. ProcessCraftingRobot This process uses a single crafting robot to handle all grid crafting recipes. It also allows non-consumable items in recipes (e.g. Pam's Harvestcraft recipes that require utensils, or master infusion crystal). ProcessRFToolsControlWorkbench Same as ProcessCraftingRobot, but uses RFTools Control's Workbench as the crafter. In this case, non-consumable items are stored in a neighboring inventory. ProcessBuffered This process is intended for machines that can run multiple recipes at once, or for general buffering/pipelining of recipe inputs. In additional to recipes, it also allows items to be constantly refilled at the target inventory. Besides being able to regulate the total amount of items in the buffer, it also allows limiting each individual recipe's maximum number of items being processed. This process respects the ratio of the input items and only sends complete sets of inputs, which is useful for machines such as ExCompressum's Auto Compressor, or gear presses. ProcessScatteringWorkingSet This process is intended for machine that can run multiple recipes at once but independently for each slot. This process will try to spread out input items among slots to help with parallelization. ProcessInputless and ProcessHeterogeneousInputless These processes are for machines that passively generate outputs (e.g. cobblestone generators). ProcessReactorHysteresis This process is a simple hysteresis feedback controller for big/extreme reactors. ProcessReactorProportional This process is a simple proportional feedback controller for big/extreme reactors. ProcessPlasticMixer This process automatically sets PneumaticCraft's plastic mixer's color setting to produce the plastic that has the lowest amount stored. Usage The documentation is still WIP and there isn't a GUI for configuration yet. The storage/auto-crafting configuration is currently hardcoded in the server program's main function. It contains a sample configuration which you can adapt for your own use. To use OCRemote, you need to build and run the server program on a server that can be reached from OpenComputers' Internet Card. The server requires a C++ compiler (e.g. gcc) with C++17 support, CMake and Boost to build. For the client script, you need to edit the first 3 lines to match your server configuration. The client script is meant to run without any OS or storage medium. To run it, first compress it using Lua minifier and then flash it into an EEPROM. Alternatively, you can upload the client script to a HTTP server and flash the loader script to load the uncompressed client script from the Internet.
  22. I made a first implementation capable of parsing and displaying OHML. This implementation supports most things except: relative positions, buttons, images and progress bars. It's called minescape and for now is only published on my repo (available with Fuchas's fpm command)
  23. nope, 1.8 and 1.9 are no longer supported
  24. Hey! I just wondered if you guys were planning to release OpenComputers v1.7.4 for Minecraft 1.8.9. When I installed the mod it said that a newer version was available (v1.7.4), but it is not available for 1.8.9. Thanks!
  25. FullChest sorting storage system This program uses a robot to sort items into simple storage system. I am using iron chests mod here. There is an input chest (golden), storage chests (iron), and an overflow chest (diamond). The robot is placed behind the input chest facing the chest and I recommend placing a charger next to it. Red blocks are always required, orange and yellow blocks are required depending on storage size (in this one, orange blocks are needed). I usually place them all to be sure. The storage chests must always be on the right from the input chest. Each storage chest must have no empty slot! If you want a chest to contain certain items, put one of these items into a slot like this: The robot then goes around in zig-zag pattern and tries to put each item into each chest. All chests have no empty slots, therefore only wanted items can be put into each chest - for all other items the chest is full. If the robot is waiting on the start, it checks the input chest for new items every 10 seconds. If an item is found it will start sorting in 1 minute (except for the first check - then it si immidiet). Program also in attachments robot = require("robot") os = require("os") computer = require("computer") totalSlots = robot.inventorySize() function dropAll(slots) for i = 1, slots, 1 do robot.select(i) robot.drop() end robot.select(1) end function suckAll() count = 0 while robot.suck() do count = count + 1 end return count end -- direction false - left -- direction true - right function next(direction) if not direction then robot.turnLeft() else robot.turnRight() end b = robot.forward() if not direction then robot.turnRight() else robot.turnLeft() end return b end while true do first = true while robot.suck() == false do print("check") first = false os.sleep(10) end robot.drop() print("Sorting is starting...") if not first then print("in 60 seconds...") os.sleep(60) end print("now!") usedSlots = suckAll() if usedSlots > totalSlots then usedSlots = totalSlots end direction = false robot.turnLeft() robot.forward() robot.forward() robot.turnRight() while true do dropAll(usedSlots) while next(direction) do dropAll(usedSlots) end print("end of row") if not robot.up() then -- last row print("end of sorting") robot.turnRight() while robot.forward() do end robot.turnLeft() dropAll(usedSlots) while robot.down() do end dropAll(totalSlots) -- just to be sure break end direction = not direction end end sorter.lua
  26. Fuchas 0.4.0 is now available! The feature list can be seen below (and in the Projects page on GitHub)
  27. if you dont understand the compile error message (specifically, a lua load error message), then remove code until you pinpoint where the problem. anyways, `term.clear print("asdf")` is not valid lua, try `term.clear() print("asdf")`
  1. Load more activity
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up
  • Create New...

Important Information

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