Useful Computer Craft programs..

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Vasa

New Member
Jul 29, 2019
532
0
1
I have been searching for simple programs on computercraft forums and i found these small and very useful programs.They are mostly seen in direwolf's videos.
Hope you like them ;)

original thread on cc forums.

pastebin get 16Fi7BAZ update

This program is used to fetch all other programs.
code. To use it, simply run:

update <ProgramName>

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

Programs....
pastebin get tpgKGzxz turn

turn [right|left|around]

Turns the turtle in place.

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

pastebin get 4n2zP1UJ makewall

makewall <length> <height>
Builds a wall using the items in inventory slots nubmer 1 thru 13. If it runs out of items, it will wait for you to refill.

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

pastebin get hwePkhJg makefloor

makefloor <length> <width> [right|left]


Makes a floor (or flat roof) of a givenlength and width using the items in inventory slots nubmer 1 thru 13, building the

square to the right or left of the turtle's starting position. If it runs out of items, it will wait for you to refill.

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

pastebin get 26HuG7uZ makebox

makebox <length> <width> <Height> [right|left]

Makes a box of given dimensions. Exacly like making 4 walls in a single command .

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

pastebin get A8GUg9kR dig

dig [top|front|bot]

If you have a mining Turtle, this will break the block in the given direction and add it to inventory. Great way to fetch things out of lava.

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

pastebin get LEm9jTdV digline

digline <length> [top|front|bot]

Digs in a straight line of given length, removing all blocks in the given direction (above, below, or in front of the turtle) There's still alot to be desired on this one.

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




coded by:
_The_Big_Red_
 
Last edited:
  • Like
Reactions: AlanEsh

whd23

New Member
Jul 29, 2019
111
0
1
Programs....
pastebin get tpgKGzxz turn

turn [right|left|around]

Turns the turtle in place.

No need for a program. Turtle movement controls are built-in to the shell via the "go" command.

> go fd 3 lt fd 2 rt back 4

"Go forward 3, turn left, forward 2, turn right, go back 4"

you can also put numbers on the lt/rt.

> go lt 2

Will turn the turtle 180 degrees.
 

kaovalin

New Member
Jul 29, 2019
782
0
0
Now if those added fancy mouse clickable buttons and could be accessed via wireless computer I would be impressed
 

Flyin_spaghetti

New Member
Jul 29, 2019
29
0
0
with upcoming portable computers, some fancy things can be done. it'd be hard to control it when you have the computer display in front of you though[DOUBLEPOST=1396599356][/DOUBLEPOST]
Now if those added fancy mouse clickable buttons and could be accessed via wireless computer I would be impressed
and they are not that fancy. just read a single tutorial and you'll be fine
 

trajing

New Member
Jul 29, 2019
3,091
-14
1
with upcoming portable computers, some fancy things can be done. it'd be hard to control it when you have the computer display in front of you though[DOUBLEPOST=1396599356][/DOUBLEPOST]
and they are not that fancy. just read a single tutorial and you'll be fine
I have read multiple tutorials and they still seem impossible to make.
 

Flyin_spaghetti

New Member
Jul 29, 2019
29
0
0
hint: just display the text as you normally would, than wait for the click event, than extract the location of the click event to see if its on a button, put all this in a while true do loop so it'll wait for your next click after you do once. sorry i cant put an example code right now.
 

kaovalin

New Member
Jul 29, 2019
782
0
0
with upcoming portable computers, some fancy things can be done. it'd be hard to control it when you have the computer display in front of you though[DOUBLEPOST=1396599356][/DOUBLEPOST]
and they are not that fancy. just read a single tutorial and you'll be fine

Making a functional gui isnt the issue to me, its making it look nice while being functional. I literally just started coding in lua for CC this week (albeit with different programming exp in college). Only just got it so I could dynamically add TE energy cells to the computer then read the total % with a weighted average storage. Cut me some slack dude :p. Can you recommend any good tutorials in particular for said gui features though?

Additionally would anyone be interested in a program that reads energy cells dynamically and outputs a variety of info regarding current levels and usage stats? Its not done yet and I'd need to cleanup the code but its coming along well so others might find it useful as I do.
 
  • Like
Reactions: Staxed and trajing

Staxed

New Member
Jul 29, 2019
1,019
-2
0
Making a functional gui isnt the issue to me, its making it look nice while being functional. I literally just started coding in lua for CC this week (albeit with different programming exp in college). Only just got it so I could dynamically add TE energy cells to the computer then read the total % with a weighted average storage. Cut me some slack dude :p. Can you recommend any good tutorials in particular for said gui features though?

Additionally would anyone be interested in a program that reads energy cells dynamically and outputs a variety of info regarding current levels and usage stats? Its not done yet and I'd need to cleanup the code but its coming along well so others might find it useful as I do.

I'd love something like this. I've been planning on writing something that checks the storage level of an entire array of (mek energy cubes) and uses that + level of energy stored in the reactor itself to control the control rod % of my big reactor...

so a program like that would kill off a lot of the work :)
 

whd23

New Member
Jul 29, 2019
111
0
1
I'd love something like this. I've been planning on writing something that checks the storage level of an entire array of (mek energy cubes) and uses that + level of energy stored in the reactor itself to control the control rod % of my big reactor...

so a program like that would kill off a lot of the work :)

You think a guy might mention that to people on his server or something... :D
 
  • Like
Reactions: Staxed