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

Search the Community

Showing results for tags 'ae2'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Fediverse ID


Location


Interests

Found 5 results

  1. So I made myself a little lua script to read the inventory of my me storage system and also list the amount of bytes they require. Its my first script so I'm sure there are better ways to do all of this. The Me Network is connected to the Computer via an adapter on the me controller of the network. Pastebin here Now what it does is it uses the getItemsInNetwork function to list all items in a loop and display the name and amount of Bytes of each item in one line. A line counter goes up for each of the items added which is needed later. After all Items are listed it displays the total amount of Bytes available as well as the amount of bytes used and then the percentage of used storage. And finally at the very end a timer is displayed that counts down from 60. Once this timer is over the script refreshes and goes through the list of items again so that the item counts are updated. here is where I used the line counter so that the very last line could get cleared and replaced with the new timer that displays one second less on every loop until it hits zero and the script refreshes. This script has worked for me for quite a while and on a second me system that only holds 3 different types of items it still does. On my main me storage however this script is starting to break at the very end with the timer line no longer being overwritten and instead adding multiple lines alongside the new timer line like so: And here is how it looks on the other me system: Here the line "Time until refresh: n" is replaced the way its supposed to. The only difference between the two scripts is that the one that works uses the getFluidsInNetwork function instead. Is there a way for me to fix this or is it a problem of having too many items in storage ? Additionally tips on how to improve this script in general are welcome as its my first and could probably be improved a lot.
  2. It is possible this was implemented elsewhere and I failed to notice it, but I did this as an exercise as exploring OpenComputers. My son and I play The 1.7.10 Pack for our sandbox fun (in survival mode though), and I wanted to see if I could easily use OpenComputers to replace the typical-and-complex nest of level emitters and crafting cards to maintain minimum amounts of certain items in the AE2 ME network. This is not terribly sophisticated, and is just "fire-and-forget" with respects to requesting the crafting operations from the ME Network. As I continue to dabble I may add in checking on the status of the requested jobs and bound the looping to when all requested jobs per loop-pass have been completed. Edited to include versions (Minecraft 1.7.10) and remove a couple of potentially confusing commented-out lines: OpenComputers 1.6.2.12 AE2 rv3 beta6 Lots of other stuff outside the scope of this program Here is what I wrote: local component = require("component") local meController = component.proxy(component.me_controller.address) local gpu = component.gpu -- Each element of the array is "item", "damage", "number wanted", "max craft size" -- Damage value should be zero for base items items = { { "minecraft:iron_ingot", 0, 512, 32 }, { "minecraft:gold_ingot", 0, 256, 32 }, { "IC2:itemIngot", 0, 512, 32 }, -- Copper { "IC2:itemIngot", 1, 256, 32 }, -- Tin { "IC2:itemIngot", 2, 512, 32 }, -- Bronze { "IC2:itemIngot", 3, 256, 64 }, -- Refined Iron { "appliedenergistics2:item.ItemMultiMaterial", 8, 128, 32 }, -- Fluix Dust { "appliedenergistics2:item.ItemMultiMaterial", 10, 128, 32 }, -- Pure Certus { "appliedenergistics2:item.ItemMultiMaterial", 11, 128, 32 }, -- Pure Nether { "appliedenergistics2:item.ItemMultiMaterial", 12, 128, 32 }, -- Pure Fluix { "appliedenergistics2:item.ItemMultiMaterial", 22, 128, 32 }, -- Logic Processor { "appliedenergistics2:item.ItemMultiMaterial", 23, 128, 32 }, -- Calculation Processor { "appliedenergistics2:item.ItemMultiMaterial", 24, 128, 32 }, -- Engineering Processor { "appliedenergistics2:item.ItemMultiMaterial", 52, 32, 32 }, -- Blank Pattern { "appliedenergistics2:item.ItemMultiPart", 16, 128, 32 }, -- Glass Cable - Fluix { "appliedenergistics2:item.ItemMultiPart", 21, 64, 32 }, -- ME Covered Cable - Orange { "appliedenergistics2:item.ItemMultiPart", 22, 64, 32 }, -- ME Covered Cable - Magenta { "appliedenergistics2:item.ItemMultiPart", 24, 64, 32 }, -- ME Covered Cable - Yellow { "appliedenergistics2:item.ItemMultiPart", 25, 64, 32 }, -- ME Covered Cable - Lime { "appliedenergistics2:item.ItemMultiPart", 29, 64, 32 }, -- ME Covered Cable - Cyan { "appliedenergistics2:item.ItemMultiPart", 30, 64, 32 }, -- ME Covered Cable - Purple { "appliedenergistics2:item.ItemMultiPart", 31, 64, 32 }, -- ME Covered Cable - Blue { "appliedenergistics2:item.ItemMultiPart", 34, 64, 32 }, -- ME Covered Cable - Red { "appliedenergistics2:item.ItemMultiPart", 36, 64, 32 }, -- ME Covered Cable - Fluix { "appliedenergistics2:item.ItemMultiPart", 140, 64, 32 }, -- Quartz Fiber { "appliedenergistics2:tile.BlockQuartzGlass", 0, 64, 32 }, -- Quartz Glass { "minecraft:glass", 0, 512, 256 }, { "minecraft:sand", 0, 512, 256 } } loopDelay = 60 -- Seconds between runs while true do for curIdx = 1, #items do curName = items[curIdx][1] curDamage = items[curIdx][2] curMinValue = items[curIdx][3] curMaxRequest = items[curIdx][4] -- io.write("Checking for " .. curMinValue .. " of " .. curName .. "\n") storedItem = meController.getItemsInNetwork({ name = curName, damage = curDamage }) io.write("Network contains ") gpu.setForeground(0xCC24C0) -- Purple-ish io.write(storedItem[1].size) gpu.setForeground(0xFFFFFF) -- White io.write(" items with label ") gpu.setForeground(0x00FF00) -- Green io.write(storedItem[1].label .. "\n") gpu.setForeground(0xFFFFFF) -- White if storedItem[1].size < curMinValue then delta = curMinValue - storedItem[1].size craftAmount = delta if delta > curMaxRequest then craftAmount = curMaxRequest end io.write(" Need to craft ") gpu.setForeground(0xFF0000) -- Red io.write(delta) gpu.setForeground(0xFFFFFF) -- White io.write(", requesting ") gpu.setForeground(0xCC24C0) -- Purple-ish io.write(craftAmount .. "... ") gpu.setForeground(0xFFFFFF) -- White craftables = meController.getCraftables({ name = curName, damage = curDamage }) if craftables.n >= 1 then cItem = craftables[1] retval = cItem.request(craftAmount) gpu.setForeground(0x00FF00) -- Green io.write("OK\n") gpu.setForeground(0xFFFFFF) -- White else gpu.setForeground(0xFF0000) -- Red io.write(" Unable to locate craftable for " .. storedItem[1].name .. "\n") gpu.setForeground(0xFFFFFF) -- White end end end io.write("Sleeping for " .. loopDelay .. " seconds...\n\n") os.sleep(loopDelay) end I have also attached a cropped screenshot of it running and the output. Naturally one will want to turn knobs on the crafting amounts and frequency. I find the 60 minute cycle to be more than enough for the crafting backlog to be cleared.
  3. This is a simple Applied Energistics 2 Stock AutoCrafting monitor. With this programm you can say that you want to keep certain items and amounts in stock. You can specify how many processors you want the program to use. If ingredients are missing the program will tell you in the message column, but not which ingredients. If you want to change or delete an item you have to check the box infront of the item name and the press the change or delete button. The program creates automatically 2 config files, 1 for the items and the other one for some other values (at this time only max cpu usage is stored in this file). V1.3: https://pastebin.com/326Sh9Xe << Installer for AutoCrafting and GUI Lib (pastebin get 326Sh9Xe AE2AutoStockInstaller.lua) Changelog: Completely overwritten Code Added GUI for better editing of Crafting List Added Installer (Installer will set Startup to AE2 Auto Stock tool) V1.2: not Published V1.1: https://pastebin.com/wDup161T Changelog: Added more errors: No Recipe (if recipe is not in network) and All Cpus busy (if players/programs request/s occupied all cpus) V1.0: https://pastebin.com/JC3WewzK Have fun and enjoy... Sorry for my bad english...
  4. I am currently in the midst of building a larger open computers project for which i need to go through a lot of blocks with very specific labels (x-y-z, where x,y and z are integers, 0-5-99 for example), which is the only difference that can be found between the blocks without looking at them, that are stored in an ae2 Me system. The problem: I only know the maximum values for x,y and z, but not which individual block exist. My question is now if there is a way to do a "fuzzy" search (something like "-32-" to find all items containing that string in their label) within the ae2 integration(searching for all of the blocks takes way to long(64000 blocks and more)), so far i have only come across getting all items or only items with an exactly matching label. In case there is no way to do this in the current ae2 integration i would like to request this feature. MC 1.12.2 OC 1.7.3.146
  5. hi i am okay to computercraft but a complete newb to openccomputers but here is my question I have made a program in cc and then ported it over to oc it works but for some unknown reason will it not read the data from my table or maybe from ae2 itself here is the code so what's wrong local component = require "component" local gpu = component.gpu local colors = require("colors") local term = require "term" local me = component.me_interface local monX,monY = gpu.getResolution() local low = 64 local meItems = { [1] = {"Iron Ingot","minecraft:iron_ingot","0"}, [2] = {"Sand", "minecraft:sand","0"}, [3] = {"Acasia Wood","minecraft:log2","0"}, [4] = {"Acasia Planks","minecraft:planks","4"}, [5] = {"SawDust","Mekanism:Sawdust","0"}, [6] = {"Paper","minecraft:paper","0"}, [7] = {"Cactus","minecraft:cactus","0"}, [8] = {"Cactus Green","minecraft:dye","2"}, [9] = {"Ink","minecraft:dye","0"}, [10] = {"Red Dye","minecraft:dye","1"}, [11] = {"Purple Dye","minecraft:dye","5"}, [12] = {"Gray Dye","minecraft:dye","8"}, [13] = {"Light Gray Dye","minecraft:dye","7"}, [14] = {"Light Blue Dye","minecraft:dye","12"}, [15] = {"Dandyline Yellow","minecraft:dye","11"}, [16] = {"Aluminium Ingots","TConstruct:materials","11"}, [17] = {"Stone","minecraft:stone","0"}, [18] = {"CobbleStone","minecraft:cobblestone","0"}, [19] = {"Gold Ingots","minecraft:gold_ingot","0"}, [20] = {"Copper Ingots","Mekanism:Ingot","5"}, [21] = {"GlowStone Dust","minecraft;glowstone_dust","0"}, [22] = {"Glass","minecraft:glass","0"} } function checkMe(checkName, name) melist = me.getAvailableItems() for a = 1, #melist do itemName = melist[a].fingerprint.id .. melist[a].fingerprint.dmg value = tostring(melist[a].size) if itemName == checkName then centerT(name, row+2, 0x000000, 0x0024BF, "lefty") if tonumber(value) <= low then centerT(value, row+2,0x000000, 0xBF0000, "righty") else centerT(value, row+2,0x000000, 0x0FBF00, "righty") end row=row+1 end end end function checkTable() row = 1 clearScreen() for i = 1, #meItems do checkName = meItems[2] .. meItems[3] name = meItems[1] checkMe(checkName, name) end end function clearScreen() gpu.setBackground(0x000000) term.clear() term.setCursor(1,1) centerT(" ME Inventory ",1 ,0x0F00BF , 0xFFFFFF,"head") end function centerT(text,line,txtback,txtcolor,pos) gpu.setBackground(txtback) gpu.setForeground(txtcolor) length = string.len(text) dif = math.floor(monX-length) x = math.floor(dif/2) if pos == "head" then term.setCursor(x+1, line) term.write(text) elseif pos == "lefty" then term.setCursor(2,line) term.write(text) elseif pos == "righty" then term.setCursor(monX-length, line) term.write(text) end end while true do checkTable() -- sleep(10) end
×
×
  • Create New...

Important Information

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