• Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Welcome to OpenComputers

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

  • Announcements

    • Lizzy Trickster

      Latest Stable OpenComputers Version   11/26/16

      The latest released version of OpenComputers is version 1.6.1 for MC 1.7.10, 1.8.9, 1.9.4 & 1.10.2. See more information here! Beta/Dev builds can be found at the Jenkins Build Server (ci.cil.li)

Forums

  1. OpenComputers

    1. Announcements

      OpenComputers official announcements.

      115
      posts
    2. Feedback

      Tell us what you think.

      308
      posts
    3. IRC

      #OC channel discussion
      irc.esper.net #oc

      26
      posts
  2. Code Central

    1. Support

      Ask for support from the OpenComputers community

      2526
      posts
    2. Showcase

      Showcase what you have created for OC. No 'malware' or other junk!

      1546
      posts
    3. Tutorials

      Help other users out. Please no 'false tutorials'

      99
      posts
  3. Addons & More

    1. Addons Mods

      Show off your OC addons mods

      176
      posts
    2. Architectures

      Discussions for Architectures

      166
      posts
    3. OpenEngineering Task Force

      Discussion board for the OETF documents

      52
      posts
  4. General

    1. Lounge

      Just lounge around or have an open discussion.

      290
      posts
    2. Forum Games

      Fight boredom!

      61
      posts
    3. Showcase

      Show off your creations! (not for your programs)

      119
      posts
    4. Servers

      A place to advertise your servers

      131
      posts
  • Topics

  • Posts

    • Awesome Gui. Im very new to Lua but not to Programming at all. With this Gui i was able to do the stuff i wanted. Terrasteel Automation. Well my Program isnt finished yet, and needs some advanced stuff to do to like mana checks etc. but it works well for now and at least for me.  Your Designer has some issues with List Creation it lacks beginning " and ending " in the List Title but its easy to fix it myself.  I searched so much on youtube and reddit posts for some solutions to create it fully automated, but got only some hints and ideas. so i'll share the WIP Code here  for someones needs.    The Setup is kinda simple. its just a very Small Refined Storage system wich holds just the Credients needed for the Terrasteel Ingot. 
      Then it needs just an Interface + OC Adapter without any Upgrade in it. Then there is 1 Chest wich gets the Items step by step with a 5 seconds sleep timer
      to get ready for the next one (this may be adjusted for slower mana flows so the steel can be made till the next items can put in place with the Open Crate.
      Another Chest with an Advanced Item Collector (Random Things mod with item filter) takes the Terrasteel only. (I personally take this chest into my AE2 ME System but you can work
      with whatever you want here. Hope this helps one or another. Keep in mind its still WIP, working but needs additional checks and things. But you get ideas as well.
      Cheers Coco <3   local component = require("component") local gpu = component.gpu gpu.setResolution(160,50) local gui = require("gui") local event = require("event") local sides = require("sides") local rsInterface = component.block_refinedstorage_interface gui.checkVersion(2,5) local prgName = "botanics" local version = "v1.0" local function getContentAmount(material) local allItems = rsInterface.getItems() for i, item in ipairs(allItems) do if(item.label == material) then --getContent = rsInterface.getItem(item, true) return (item.size) end end end local function getItemToCraft(material) local allItems = rsInterface.getItems() for s, item in ipairs(allItems) do if(item.label == material) then --local getCraftItem = rsInterface.getItem(item, true) rsInterface.extractItem(item, 1, sides.right) end end end -- Begin: Callbacks local function order_list_callback(guiID, listID, selected, text) -- Your code here if (text == 'Terrasteel') then material_label = 'Terrasteel' material_content_1 = 'Mana Pearl' material_content_2 = 'Manasteel Ingot' material_content_3 = 'Mana Diamond' material_amount_1 = getContentAmount(material_content_1) material_amount_2 = getContentAmount(material_content_2) material_amount_3 = getContentAmount(material_content_3) else material_label = 'Waehle aus' material_content_1 = '' material_content_2 = '' material_content_3 = '' end gui.newLabel(mainGui, 56, 2, ""..material_label.."", 0xc3c3c3, 0x0, 15) gui.newLabel(mainGui, 56, 4, ""..material_content_1.."", 0xc3c3c3, 0x0, 15) if (text == 'Terrasteel' and material_amount_1 > 0) then gui.newLabel(mainGui, 75, 4, ""..material_amount_1.."", 0xc3c3c3, 0x33ff00, 7) else gui.newLabel(mainGui, 75, 4, "missing", 0xc3c3c3, 0xff0000, 7) end gui.newLabel(mainGui, 56, 5, ""..material_content_2.."", 0xc3c3c3, 0x0, 15) if (text == 'Terrasteel' and material_amount_2 > 0) then gui.newLabel(mainGui, 75, 5, ""..material_amount_2.."", 0xc3c3c3, 0x33ff00, 7) else gui.newLabel(mainGui, 75, 5, "missing", 0xc3c3c3, 0xff0000, 7) end gui.newLabel(mainGui, 56, 6, ""..material_content_3.."", 0xc3c3c3, 0x0, 15) if (text == 'Terrasteel' and material_amount_3 > 0) then gui.newLabel(mainGui, 75, 6, ""..material_amount_3.."", 0xc3c3c3, 0x33ff00, 7) else gui.newLabel(mainGui, 75, 6, "missing", 0xc3c3c3, 0xff0000, 7) end gui.displayGui(mainGui) end local function text_menge_callback(guiID, textID, text) local toCraft = text return toCraft end local function button_start_callback(guiID, buttonID) local toCraft = guiID[3].text local counter = 0 local limiters = tonumber(toCraft) progress = gui.newProgress(guiID, 2, 18, 35, limiters, 0, nil, true) for i = 1, toCraft do -- print(toCraft, material_label, material_content_1, material_content_2, material_content_3) gui.displayGui(guiID) getItemToCraft(material_content_1) getItemToCraft(material_content_2) getItemToCraft(material_content_3) order_list_callback(guiID, nil, nil, material_label) counter = counter + 1 if counter <= limiters then gui.setValue(guiID, progress, counter) end if counter > limiters then counter = 0 end os.sleep(5) end end local function exitButtonCallback(guiID, id) local result = gui.getYesNo("", "Do you really want to exit?", "") if result == true then gui.exit() end gui.displayGui(mainGui) refresh() end -- End: Callbacks -- Begin: Menu definitions mainGui = gui.newGui(2, 2, 158, 48, true) order_list = gui.newList(mainGui, 1, 1, 50, 15, {}, order_list_callback, "Was soll hergestellt werden?") gui.insertList(mainGui, order_list, "Waehle aus") gui.insertList(mainGui, order_list, "Terrasteel") label_menge = gui.newLabel(mainGui, 54, 12, "Menge:", 0xc3c3c3, 0x0, 7) text_menge = gui.newText(mainGui, 54, 13, 10, "0", text_menge_callback, 20, false) button_start = gui.newButton(mainGui, 54, 15, "Starten", button_start_callback) frame_info = gui.newFrame(mainGui, 54, 1, 40, 10) exitButton = gui.newButton(mainGui, 151, 48, "exit", exitButtonCallback) -- End: Menu definitions gui.clearScreen() gui.setTop("Terrestrial Agglomeration Plate Automation") gui.setBottom("Made with Visual Gui v0.1a and Gui library v2.5") -- Main loop while true do gui.runGui(mainGui) end
         
    • Hello! Is there any method to get a list of queued crafts or missing items from ME network? I want to find out if there is an analog of such methods in AE 2, as in Refined Storage https://refinedstorage.raoulvdberge.com/wiki/opencomputers-api getTasks, getMissingItems sry for my English
    • Updated SAD.lua pastebin link to point to v2 Changes : + Added vars, now can manipulate variables in SAD, use ` SAD.vars ` to store variables. A important use of variables is often Queries and actors need to interact with external components obtained via component.proxy()... Previously these components would need to be proxied EVERY query run and actor run. This is uneeded memory usage and CPU usage especially on the lowest tier setups. Now instead one can do ` SAD.vars.my_tank = SAD.vars.my_tank or component.proxy("address_here") ` . Thus will either fetch the variable if set or set it by calling proxy once. For best practices use a namespace in vars : ` SAD.myQuery.my_tank ` this can prevent overlapping variables among queries and actors.   + Added check for modem properly now. The check previously would error if no modem is present, now it performs a isAvailable("modem") call as it should.   + Performance improvements! Before one would have to do ` require("component") ` and any other requires (such as for dkjson) themselves on EVERY query and actor, this makes alot of reading and loading and hurts the cpu. Now SAD does a load once strategy, IF you want a allways available load once module (from Open computers) let me know and ill quickly update, to get the load once modules just do SAD.[module] ie ` SAD.components ` or ` SAD.modem `   Also before SAD would read in the query and actor files before running them EVERY cycle, now SAD loads once on startServer/startClient and uses that load. this SIGNIFICANTLY reduces CPU load, before it was nearly impossible to use the machine while SAD runs in background, now its usable on even low tier machines (although still with some felt performance hits on low end machines) /   Also i will later be working on a example query actor i will be using myself on the server I play for roatarycraft AC engine management and gearbox lubricant monitors. If and weh ni get around to completing it i will video the example and share. Enjoy
    • Hey, guys, I am just wondering how do I get the actual storage to show up I got the other graphs but that one won't show up. I am using industrial craft 2. please help I am just using the code above  
    • Sadly no it only works with a single port.
  • Popular Contributors