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

Search the Community

Showing results for tags 'simple'.



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 6 results

  1. "FullChest" item 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
  2. My first big program. It shows: -a randomized message (requested from my HTTP server, and fortune on the server side), -Computer address, used/free/all RAM, energy levels, uptime, filesystem for booting, whether the computer can do HTTP requests, -List of components available Thanks to CptMercury and payonel for some parts of the code. I will make it available through OPPM soon, but for now you will need to get it through GitHub: https://github.com/AugiteSoul/AugiteOpenComputers/blob/master/systeminfo/systeminfo.lua Feel free to send some feedback, positive or not! I will try to answer everyone.
  3. AND HIS NAME IS... GANG SINA! Gangsir here again, I've made a simple script that opens a door when a entity from a list moves near an attached motion detector. This acts as both a method of security and an easy way to automatically open a door. It outputs a redstone signal on the top of the computer/RedstoneIO block when a valid entity moves near it. Usage: proxdoor [-abli] <time to stay open> [Person1] [Person2]... Switches: -a : Accept all mode, door will open for any motion. Whitelist has no effect. Cannot use with -b -b : Blacklist mode, all provided names the door will ignore, accept all others, cannot be used with -a -i : Inverted redstone mode, turns redstone on by default and off on detect. Good for piston doors. -l : Logs all door activity to a file. Useful for security So, if I wanted the door to stay open for 2 seconds, and allow both me and Sangar to open the door, I would run: proxdoor 2 Gangsir Sangar You can have an almost infinite whitelist, limited by your RAM. If you have a very large whitelist, it may be more efficient to run the program in accept all mode or blacklist mode, see above. When setting up, ensure that there is a motion detector on both sides of the door, or it can be seen from both sides. Also ensure it has line of sight, and is within 3 blocks from the door, so that it can trigger. This range can be modified in the program. Screenshots: Requirements: The program can be found here: https://github.com/NoahNMorton/Gangsir_MC_LuaPrograms/blob/master/OpenComputers/HeadlessPrograms/ProximityDoor.lua Or, Wgetted: wget https://raw.githubusercontent.com/NoahNMorton/Gangsir_MC_LuaPrograms/master/OpenComputers/HeadlessPrograms/ProximityDoor.lua proxdoor.lua As a quick p.s., the program is headless, meaning you can remove all graphics components and it will still function fine. Also recommended if using for security that you protect the blocks around the door, the door itself, and the motion detector to prevent people just busting down the door. I recommend the block protector from RFTools, or Thaumcraft warding. As always, make sure to like or comment if you enjoy my programs, I'm always happy to see that. Changelog for those who care: V1.0 Added the program. --- V1.1 Added accept all mode and inverted mode, made whitelist lookup faster. Numerous optimisations. --- V1.2 Added blacklist mode --- V1.3 Added file logging on option ---
  4. I just want a simple screen with different levels with buttons on them that control a screen. I have been trying for 8 hours to do something but It just ain't working. I ain't made for this stuff, there are a lot of smart people on here that can do it in a minute I believe. So please help me, I am such a noob with this mod I just started looking into this mod today. I'm already having a headache... I'm all ears people
  5. !ereh Risgang I've written a simple program for transferring a medium sized text file (Less than about 8000 characters, roughly a small essay) over an OC network, wired or wirelessly. I've named it GFT, or "Gift", short for Gangsir File Transfer. This program is actually two small sub-programs, one for receiving and one for sending. To differentiate between them, the first argument changes the function of the program. Then, the second argument tells the file to operate on, for sending or receiving to. (To generate on receive.) Syntax is as follows: gft <send/receive> <"/path/to/file.txt"> This program copies the file being sent, so don't worry about losing the original copy. And yes, this program is small enough to send itself. (Don't know why you would, since you need this program on the receiving end anyway.) I wouldn't recommend using gft to send the file that gft is running off of, since I have not tested what happens. Uses port 20 by default, the default port for FTP in real life. Requirements for program: -Tier 1 everything -Network card -Connection between sender and receiver, if wired How to get the program: The program can be found at my github like always: https://github.com/NoahNMorton/Gangsir_MC_LuaPrograms/blob/master/OpenComputers/GangsirsSimpleFileTransfer.lua Or can be wgetted with an internet card: wget https://raw.githubusercontent.com/NoahNMorton/Gangsir_MC_LuaPrograms/master/OpenComputers/GangsirsSimpleFileTransfer.lua gft.lua Thanks for reading, and as always, let me know if you have any feedback.
  6. Introduction Are you creating the secret underground base? A pyramid maze with all kinds of traps? Or just your high security door lock? Then it's very likely that you are using redstone. More complex designs require bigger circuits or computers. (redstone computers?) Programming with redstone cards or blocks is quite straightforward, but it can be quite annoying to always repeat yourself: local component = require("component") local sides = require("sides") local colors = require("colors") local rs = component.redstone rs.setBundledOutput(sides.north, colors.blue, true) --close entrance os.sleep(1) rs.setBundledOutput(sides.north, colors.green, false) --open exit os.sleep(10) rs.setBundledOutput(sides.north, colors.green, true) --close exit os.sleep(1) rs.setBundledOutput(sides.north, colors.blue, false) --open entrance This library makes things easier and your code more expressive: local component = require("component") local rstools = require("mpm.rstools") local rs = component.redstone --inverted to make true == open local entrance = rstools.digital("output", rs, "north", "blue").inverted local exit = rstools.digital("output", rs, "north", "green").inverted entrance(false) --close entrance os.sleep(1) exit:pulse(10, true, false) --open exit for 10 seconds os.sleep(1) entrance(true) --open entrance Documentation Depencencies Software OpenOS Hardware Redstone Component Installation Download the file and save it as the library "mpm.rstools". Download (last update: 29.01.16) github mkdir /home/lib/mpm cd /home/lib/mpm wget 'https://raw.githubusercontent.com/mpmxyz/ocprograms/master/home/lib/mpm/rstools.lua' Known Issues None.
×
×
  • Create New...

Important Information

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