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

Jasems

Members
  • Content Count

    11
  • Joined

  • Last visited

Posts posted by Jasems

  1. So I got this semi-working.  By adding the "*n" to the io.read it seems to take the code and change the hex.  For some reason though it likes to mess up the program temporarily now though.  Probably a much better way to do all of this (which I welcome the improvements), but I got it working for now.  Yay!

  2. That's how I currently have the code, but it doesn't work.  If I manually put the hex code at 0xFFFFFF (for example) in place of the io.read() it works fine, but I think it has something to do w/that sending a string (or something with quotes) but the hex code doesn't work w/the quotes like the booleon and texture does.

  3. Ok I got something basic working, but need help w/the hex input text.

     

    --------------------------------------------------------------------------------------------

    local term = require("term")

     

    local printer = component.printer3d

     

    term.clear()

    term.setCursor(1,1)

     

    printer.reset()

    -- Name the Block

    io.write(" Name Your Block: ")

    printer.setLabel(io.read())

    -- This part works great since the read returns as a string, probably a better way to do it, but I am a beginner lol

     

    --set the color tint

    io.write("Write in hex color: ")

    printer.addShape(0,0,0,16,16,16, "opencomputers:White","true",io.read())

    -- this part doesn't get the io.read() command since it returns as a string, i need it to return as just 0xFFFFFF (for example) without quotes.

     

    printer.commit(1)

    --------------------------------------------------------------------------------------------

    So the above prints, but need to figure out how to change that last io.read() in the printer.addShape tint color.  Would be cool to have it already grab the 0x part so i just have to type the hex color code.  Go easy on me pretty new at all this lol...

  4. Description:


    I have been having fun printing stuff w/the 3d printer just to the plain chamelium blocks.  I have just been going in and editing a single file changing the hex color, exiting then printing.  Looking to have a program to input just the hex color code, and printer will print it.  Maybe even have a 2nd option after printing to give a quantity?


     


    Function:


    Basically load program, it asks for color hex code.  Next screen could be how many, or even ask for the texture block you want to use, in my case just been using chamelium blocks.  Then 3rd screen asks for how many.


     


    Deadline:


    No rush, even just something to get me started would be helpful.  Everything I learn about programming I forget after not doing it for a few months... lol


     


    Additional Information:


    none atm


     


    Thanks a bunch!


     


  5. Ok, several people helped me get much further than I have been able to, but now I am brain fried and wanted to get my days worth of goofing around thoughts on paper to solicit ideas/help.

     

    in order to access the jars via Thaumcraft, 1. you need Thaumcraft Tinkerer installed, it adds these commands we will be using next.

     

    I have 5 jars per adapter block, and am up to 34 jars (using server rack).  I started out by manually naming each jar i.e.

        type components:

               gets a component name like 3901b290-e50b-4958-b0b2-ea2c87ac6025   blockJar_0

        then:

               jar1 = component.proxy(component.get("390")

     

    -- I abandoned that idea with some chatter on forums about doing this:

    local jars = {} 

    for k,v in component.list("blockjar") do table.insert(jars, component.proxy(k)) end

    for k,v in pairs(jars) do print(v.getEssentiaType(0), v.getEssentiaAmount(0)) end

     

    Ok now that works, it prints the name of the essentia from the jar and the amount in the jar to the right of it.  I have tried changing it up w/some term.sort command stuff, but all those examples use first and 2nd letters (I am only dealing w/2nd letter only, the v).

     

    I think I just need a push in the right direction just a small example, I keep reading over the OC forums and reading through the table section on lua 5.2.  Sample that will either make the essentiaAmount## always be same distance from first essentiaType no matter the letter, and/or maybe show me how to keep start a new line instead of it just continually scrolling.  Part of the problem w/doing it this way is I can't access things individually (or can I??) otherwise i could just manually space out those words lol... Ok bedtime, sorry for the novel, thanks thanks again for the fellows on irc.

     

     

  6. I was looking around in all the programs listed on http://openprograms.github.io/, there is one in Kenny-Programs area that lists "OpenLights" control.  I looked it up and saw it is something that allows color changing lights?  Where would one obtain this to try it out? Also, it listed only 1.7.2 next to it, is it available for 1.6.4? This sounds like a dream come true for a lighting guy lol.  Thanks!

     

    Jasems 

  7. Ok so I made a simple program to basically detect if a lever is pushed down to send a rednet color to move an MFFS platform.  I am brand new at lua and OpenComputers and would like to do make it so that something like event("char") == "w"  the miner will go up, if it detects an "s" then it will go down, or if you hit "x" it will stop the miner. 

     

     

    It might be helpful to just start w/how to get it to detect a keypress to just stop the program. I am slowly but surely understanding some of the terms on the wiki, but some simple examples would be a much better way to learn.  Thanks!

     

     

×
×
  • Create New...

Important Information

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