This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Race Pro Kid's profile picture

[Turtle][CraftOS] Race Pro Kid's Programs - Simple Stuff - Random Generators, Turtle Controller [Test], Calculators, etc. [17]

Started by Race Pro Kid, 14 March 2012 - 03:07 AM
Race Pro Kid #1
Posted 14 March 2012 - 04:07 AM
THIS POST HAS MOVED TO MY WEBSITE. This post will stay up, but I will either be here rarely or not again.


These are some of my first programs. I taught myself Lua by looking at scripts others made. I find it fun to code, especially when my programs work. Most of these are test scripts and aren't very advanced. Now, on to the less boring stuff.

Table of Contents:

Changes
Downloads
My Programs
….Random Generators
……..Number Generator
……..Phone Number Generator
……..Name Generator
….Turtle
……..House Builder
…………Full House
…………House Skeleton
…………House Windows
…………House Torches
…………House Fence
……..Turtle Controller
….Calculators
……..Full Calculator
……..Stand-Alones
…………Add
…………Subtract
…………Multiply
…………Divide
…………Square
….Other
……..Self Destruct
……..Virus Tutorial
Source Code
Pics
Request-A-Program
Installing
Copyright stuff

Changes/News
SpoilerWed. March 14
Added A virus tutorial, "House Fence", and Turtle Controller.
Fri. March 16
Added pictures for the calculators and generators, added two videos for the self-destruct and house builder.
Sun. March 25
Added a download of a source code version of my scripts and had a small update for the calculators.
Sat. April 14
Wow, I haven't been very active on here lately, I'm starting to *somewhat* lose interest in Minecraft. I still love it, but there are other things to do.
anyway, off the boring life stuff and onto the real news. I am soon going to have an installer for my scripts! I am also taking installation requests. I now have made the installer! It will replace the old complete download.

Downloads
Download a direct download of an installer for all of my programs from Dropbox here, or download an independent file from each program info spoiler.

Downloads not working? Reply and tell me!

My Programs
Random Generators
SpoilerNumber Generator
SpoilerWhen you run it, It first asks, "Between [#]", and you type in a number where the # is. It then asks, "and [#]", and again, type a number. It then randomly selects a number between A and B.

Download
Phone Number Generator
SpoilerAll this does is spit out a random phone number. Pretty simple.

Download
Name Generator
SpoilerDoes what it says. Spits out a random name. I am still collecting names at the moment, so technically it's a WIP.

Download
Turtle
SpoilerTurtle Controller
SpoilerJust run it and use WASD to move and turn, Q to break blocks in front of the Turtle, E to place blocks, space to go up and CTRL to go down. The Turtle will automatically break blocks above it when it moves up, and the same down.

Download
House Builder
SpoilerFull House
SpoilerBuilds a descent 9x7 (meant it to be 8x6, but it turned out different :mellow:/>/>) house. To run: place 2 stacks of wood or any other (placeable) material into the Turtle's inventory, then about 19-64 of the same material. This is because it takes 64+64+19 blocks to make a house. Then place at least 21 blocksin the next slot for the window material, then at least 4 torches in the next slot, then at least 43 fence blocks in the next slot and 1 fence gate in the next. When You start it up, it will start with the skeleton, then the windows, then the torches, then the fence.

Download
House Skeleton
SpoilerJust makes the house, no windows, no torches. Look at Full House for more.

Download
House Windows
SpoilerJust makes the windows. WARNING: WILL NOT DETECT HOUSES. LEAVE THE TURTLE IN THE PLACE WHERE IT STOPS FROM MAKING THE HOUSE SKELETON OR FULL HOUSE.

Download
House Torches
SpoilerJust places the torches. Places the torches sideways in some parts though, will fix.WARNING: WILL NOT DETECT HOUSES. LEAVE THE TURTLE IN THE PLACE WHERE IT STOPS FROM MAKING THE HOUSE SKELETON OR FULL HOUSE.

Download
House Fence
SpoilerJust places a fence around the house. Place at least 43 fence blocks (or whatever material you want to use) into the first Turtle slot, then at least 1 fence gate or fence, depending of if you want a gate. Fence gate might be placed sideways, depending on the way you placed the Turtle, eg, North/South - should be fine, East/West - gate will be sideways. WARNING: WILL NOT DETECT HOUSES. LEAVE THE TURTLE IN THE PLACE WHERE IT STOPS FROM MAKING THE HOUSE SKELETON OR FULL HOUSE.

Download
Calculators
SpoilerCalculator
SpoilerA full calculator. Proper syntax: calc [number] [+, -, *, or /] [number]

Download
Add
SpoilerIt asks to set the first number. Set it. Then to set the second. Set that too. Answer.

Download
Subtract
SpoilerIt asks to set the first number. Set it. Then to set the second. Set that too. Answer.

Download
Multiply
SpoilerIt asks to set the first number. Set it. Then to set the second. Set that too. Answer.

Download
Divide
SpoilerIt asks to set the first number. Set it. Then to set the second. Set that too. Answer.

Download
Square
SpoilerIt asks to set the first number. Set it. Then to set the second. Set that too. Answer.

Download
Other
SpoilerSelf Destruct
SpoilerSets off redstone outputs everywhere. Literally, on every side of the computer. Just place TNT under/next to/behind/above the computer to make it work. There isn't any known way to do it through Lua. When you run it, it asks if you are sure you want to continue, and you have to say "yes" or "no". Saying "yes" will start the countdown and will let you head for the hills.

Download
Virus [Tutorial]
SpoilerPart 1 - The virus:
When you place down a computer, type "edit startup". This will let you edit the startup script for that computer. Once in, type "print ("Your computer is infected!")", or whatever you want. Then start a new line and type "sleep(2)". Start another line. Finally, type "os.shutdown()". What this does is whenever you start up your computer, it will be uncontrollable (except if you press CTRL+T, which force-stops the program; to fix that remove the first two lines).

Part 2 - The anti-virus:
Put down a drive next to a different computer and put an unchanged floppy disk in it. Now in the computer type "edit disk/startup". It will bring you to the edit screen. Now just type "print ("Anti-Virus Plus loaded successfully.")". Press CTRL, press enter when "save" is selected, then press "exit". Now put the floppy into a drive next to the infected computer and start it up. It should say "Anti-Virus Plus loaded successfully."

Video
Spoiler

Source Code
You can download the source code here. It contains almost all the programs with comments that show how each line works.

Pictures
Spoiler











Request-A-Program
You can request any program that has to do with random generators, Turtle buildings, or anything else. I might be able to make it, I might not. Make sure not to make any super-advanced requests though, as I am not a super-advanced coder ;)/>/>.

Stuff I'm okay with:
Random generators
Turtle buildings
Other stuff I'll add in the future
New: Installers! You can send me your script, and I will package it into an installer for your users' ease.

Installing

To install if you downloaded the files independantly:

1. Download teh filez
2. Put the file(s) that you downloaded into "%appdata%.minecraftmodsComputerCraftluaromprograms"
3. Start Minecraft
4. Go into a game
5. Use my programs
6. ???
7. PROFIT!


To install if you download the zip with all my programs:

1. Download teh filez
2. Put the mods folder in the zip into your .minecraft folder (%appdata%.minecraft). It will ask to merge folders, say yes. If it asks to overwrite files, check it out. Make sure that none of your files are named the same as mine.
3. Start Minecraft
4. Go into a game
5. Use my programs
6. ???
7. PROFIT!

Copyright Stuff
You cannot put these programs ANYWHERE on the internet and/or anywhere people can download them. No sharing, uploading, or anything of that sort without my permission. PM me on the Minecraft Forums, ComputerCraft Forums, or anywhere else that has my name in it. If you find my content anywhere that is not under my name, please alert me ASAP.

Like my Stuff?
An easy way to show your appreciation and likeyness of my stuff is to click the next to my post.
Race Pro Kid #2
Posted 14 March 2012 - 04:26 PM
100 views already? Thanks guys! ;)/>/>

(editing to make sure I don't spam)

I'm currently adding a virus tutorial. I'll make a video later.

EDIT: erm, how do I edit the post name? :mellow:/>/> I'm pretty new
Wolvan #3
Posted 14 March 2012 - 05:19 PM
erm, how do I edit the post name? :mellow:/>/> I'm pretty new
Easy. Edit the first post and then click on the button Full Editor. There you can set the Post Name
Race Pro Kid #4
Posted 14 March 2012 - 05:33 PM
erm, how do I edit the post name? :mellow:/>/> I'm pretty new
Easy. Edit the first post and then click on the button Full Editor. There you can set the Post Name

Thanks. I've almost made 200 posts on the MC Forum, but I have never needed to change a name.
Race Pro Kid #5
Posted 14 March 2012 - 09:34 PM
Uhh… bump? :mellow:/>/>

Anyone need pictures?
BenAgain #6
Posted 15 March 2012 - 12:09 AM
Request a program, eh? If you're interested, I've been wanting to make a buncha programs for an Airport I made, but I don't know crap in Lua. If you want, parhaps you could join my Hamachi server, so I can see how things are going, give input, and hopefully learn some stuff at the same time? (Annoyingly, some stuff in my airport has to wait untill RedPower updates. I also got an subway, but I don't think I'll put computers there.)
Race Pro Kid #7
Posted 15 March 2012 - 12:19 AM
Request a program, eh? If you're interested, I've been wanting to make a buncha programs for an Airport I made, but I don't know crap in Lua. If you want, parhaps you could join my Hamachi server, so I can see how things are going, give input, and hopefully learn some stuff at the same time? (Annoyingly, some stuff in my airport has to wait untill RedPower updates. I also got an subway, but I don't think I'll put computers there.)

Sure. What's your IP and Hamachi ID?
Race Pro Kid #8
Posted 15 March 2012 - 12:38 AM
Request a program, eh? If you're interested, I've been wanting to make a buncha programs for an Airport I made, but I don't know crap in Lua. If you want, parhaps you could join my Hamachi server, so I can see how things are going, give input, and hopefully learn some stuff at the same time? (Annoyingly, some stuff in my airport has to wait untill RedPower updates. I also got an subway, but I don't think I'll put computers there.)

Hey, I know a good one… Possibly a script that makes a Turtle build a ramp from a building to an airplane, the ground to an airplane, or anything else, and break it upon command? Sound cool? :D/>/>
Race Pro Kid #9
Posted 15 March 2012 - 01:29 AM
I am currently working a controllable Turtle. You can go forward, backward, up, down, turn left, turn right, dig, place, and set the selected block in the Turtle's inventory.
cant_delete_account #10
Posted 15 March 2012 - 01:37 AM
I am currently working a controllable Turtle. You can go forward, backward, up, down, turn left, turn right, dig, place, and set the selected block in the Turtle's inventory.
Meh, thats pretty easy.
Race Pro Kid #11
Posted 15 March 2012 - 02:17 AM
I am currently working a controllable Turtle. You can go forward, backward, up, down, turn left, turn right, dig, place, and set the selected block in the Turtle's inventory.
Meh, thats pretty easy.

Let me restate myself.

I am currently working a controllable Turtle. You can go forward, backward, up, down, turn left, turn right, dig, place, and set the selected block in the Turtle's inventory with keyboard keys and not commands or programs.
Wolvan #12
Posted 15 March 2012 - 01:53 PM
I am currently working a controllable Turtle. You can go forward, backward, up, down, turn left, turn right, dig, place, and set the selected block in the Turtle's inventory.
Meh, thats pretty easy.

Let me restate myself.

I am currently working a controllable Turtle. You can go forward, backward, up, down, turn left, turn right, dig, place, and set the selected block in the Turtle's inventory with keyboard keys and not commands or programs.
With rednet? Already made by me :D/>/> Even dance function. But I can easily set it to local control to. I think I will add this
Race Pro Kid #13
Posted 15 March 2012 - 02:17 PM
With rednet? Already made by me :D/>/> Even dance function. But I can easily set it to local control to. I think I will add this

Nah, with the turtle… I know all the simple stuff, but I don't know the hard/really hard stuff. It's weird. I can't find any middle stuff, lol.

Edit: that's a long quote chain. I'll take it out.

Edit 2: I forgot to say that I use and love your remote-controlled Turtle idea. I've been trying to decipher what I can from your code, but I still need to figure out some new stuff so I can.
Wolvan #14
Posted 15 March 2012 - 02:36 PM
Nah, with the turtle… I know all the simple stuff, but I don't know the hard/really hard stuff. It's weird. I can't find any middle stuff, lol.

Edit: that's a long quote chain. I'll take it out.

Edit 2: I forgot to say that I use and love your remote-controlled Turtle idea. I've been trying to decipher what I can from your code, but I still need to figure out some new stuff so I can.
I can help you understand it and thx for liking it :D/>/>
BenAgain #15
Posted 15 March 2012 - 02:42 PM
Here's an idea for a program: An analogue clock emulator for a 3x3 monitor display. As far as I know, that would be difficult, but it'd look sweet in a modern style grand central train station as a centerpiece.
Race Pro Kid #16
Posted 16 March 2012 - 02:57 AM
Here's an idea for a program: An analogue clock emulator for a 3x3 monitor display. As far as I know, that would be difficult, but it'd look sweet in a modern style grand central train station as a centerpiece.

Hey, can I make it… well… simple? And possibly make it an actual clock with art from zeh text, and just count seconds? So just a movie basically?
Useless #17
Posted 16 March 2012 - 12:08 PM
I shall request thee program.
Im fairly new to computercraft, and I'm basically looking for a code to put in my turtle(s) they are able to strip mine. Any ideas?
Wolvan #18
Posted 16 March 2012 - 01:42 PM
I shall request thee program.
Im fairly new to computercraft, and I'm basically looking for a code to put in my turtle(s) they are able to strip mine. Any ideas?
Strip mining? What's that? maybe I can build it
Race Pro Kid #19
Posted 16 March 2012 - 02:26 PM
I shall request thee program.
Im fairly new to computercraft, and I'm basically looking for a code to put in my turtle(s) they are able to strip mine. Any ideas?

Erm, what's strip mining? Don't bash me, I've just never heard it before.

Nevermind. If no one else knows what it is, Google it.
Useless #20
Posted 16 March 2012 - 06:52 PM
Strip mining: Mining in large quantities at once, such as clearing a hole chunk away.
Well, maybe strip mining isnt what i want. Branch mining should do it.
Branch Mining: Digging 1x1x7 "branches" along a main shaft. Try looking it up on the wiki.

Also, from previous videos, i've seen a block where the turtle will drop it's items in it and continue mining. Is this another mod?
Useless #21
Posted 18 March 2012 - 11:57 AM
Bump
Wolvan #22
Posted 18 March 2012 - 12:06 PM
Strip mining: Mining in large quantities at once, such as clearing a hole chunk away.
Well, maybe strip mining isnt what i want. Branch mining should do it.
Branch Mining: Digging 1x1x7 "branches" along a main shaft. Try looking it up on the wiki.

Also, from previous videos, i've seen a block where the turtle will drop it's items in it and continue mining. Is this another mod?
OK I could try to programm branch mining :D/>/>
TheOutcast5 #23
Posted 24 March 2012 - 05:20 AM
You should make a game
Learning_inpaired #24
Posted 13 June 2012 - 02:24 PM
Request-A-Program

id like to request a a program to auto controll a door and lighting system on a per room base, and have it use the API for the bundled wires from redpower i use the redworks OS atm ona server
emil7370 #25
Posted 15 June 2012 - 08:55 PM
Could you please make a game. Like snake, pong and other classic games.

(Not snake and pong, those are already made :(/>/>)

Thanks
kazagistar #26
Posted 15 June 2012 - 10:40 PM
Wait, how would branch mining help turtles? They don't know if they hit anything valuable… well I guess you could make sure each turtle has 1 block of cobble, dirt, and gravel to compare to their surroundings. Does compare actually work? I haven't used it yet

EDIT: I tested it, and turtle.compare() works just fine. So comparing to a set of bad blocks is not a problem.

Honestly though, the biggest problem for turtles is not picking up bad blocks, but carrying them home. I would just have it keep one of each bad block in its inventory, and drop those blocks whenever it mines it. Then it would reach max capacity of useful stuff slower.
Mtdj2 #27
Posted 18 June 2012 - 08:17 PM
You can make the turtle drop the scrap blocks after mining them. (Sorry for being out of topic)
Great programs! I could make them all myself, but only if i really want to.
Exerro #28
Posted 25 June 2012 - 12:32 PM
about the airport server thing…I wud luv to give it a go and make a few programs for it…what's the ip?
ssandiss #29
Posted 10 July 2012 - 03:02 PM
Make a analog or digital clock that will be shown on a monitor :)/>/>
yaaay #30
Posted 14 July 2012 - 03:36 AM
Make a rtf/doc/txt file editor
A Music Player that plays MP3 and MIDI also in-game music disk
a turtle exploding(To Mine Really Fast)Program(I will put TNT in it)
A creeper/zombie/anything scary sound player(to troll friends)
An Town Simulation Game(With GUI)
An linux script(.SH Files)
An Coloured OS with GUI
Race Pro Kid #31
Posted 14 July 2012 - 05:20 AM
1 - Make a rtf/doc/txt file editor
2 - A Music Player that plays MP3 and MIDI also in-game music disk
3 - a turtle exploding(To Mine Really Fast)Program(I will put TNT in it)
4 - A creeper/zombie/anything scary sound player(to troll friends)
5 - An Town Simulation Game(With GUI)
6 - An linux script(.SH Files)
7 - An Coloured OS with GUI
1 - Already made, comes with the mod
2 - Already made, comes with the mod
3 - Not yet possible EDIT: I could make a program that makes a turtle place down TNT and then place down a redstone torch next to it, but I can't make the turtle itself explode.
4 - Not yet possible
5 - I can't make games, sorry… :/
6 - What?
7 - Colors not yet possible THROUGH CODE, but you can customize them in the C:/Users/[YourUsername]/AppData/Roaming/.minecraft/config/mod_ComputerCraft.cfg file.
As for a GUI, do you mean a GUI with clickable buttons? That's not yet possible.
yaaay #32
Posted 19 July 2012 - 04:29 PM
1 - Make a rtf/doc/txt file editor
2 - A Music Player that plays MP3 and MIDI also in-game music disk
3 - a turtle exploding(To Mine Really Fast)Program(I will put TNT in it)
4 - A creeper/zombie/anything scary sound player(to troll friends)
5 - An Town Simulation Game(With GUI)
6 - An linux script(.SH Files)
7 - An Coloured OS with GUI
1 - Already made, comes with the mod
2 - Already made, comes with the mod
3 - Not yet possible EDIT: I could make a program that makes a turtle place down TNT and then place down a redstone torch next to it, but I can't make the turtle itself explode.
4 - Not yet possible
5 - I can't make games, sorry… :/
6 - What?
7 - Colors not yet possible THROUGH CODE, but you can customize them in the C:/Users/[YourUsername]/AppData/Roaming/.minecraft/config/mod_ComputerCraft.cfg file.
As for a GUI, do you mean a GUI with clickable buttons? That's not yet possible.
1.An Advanced one,OK?
2.An Advanced one,OK?
3.Do That!
4.Why?
5.Recommend Me Some People,Then.
6.Nah,It is impossible.What about a app like rednet,but uses names instead of IDs?(You can let me type in ID in a log and then a name and use the name to connect to that ID.)
7.Teach me to change colors!
GUI can be text based.

EDIT:also,For the Phone number generator,I would like to tell you the Phone number format of Hong Kong,Where I Live in,Would You Like That?
Race Pro Kid #33
Posted 17 August 2012 - 09:47 PM
Admins/Mods, please lock this topic.
yaaay #34
Posted 27 October 2012 - 07:28 AM
1 - Make a rtf/doc/txt file editor
2 - A Music Player that plays MP3 and MIDI also in-game music disk
3 - a turtle exploding(To Mine Really Fast)Program(I will put TNT in it)
4 - A creeper/zombie/anything scary sound player(to troll friends)
5 - An Town Simulation Game(With GUI)
6 - An linux script(.SH Files)
7 - An Coloured OS with GUI
1 - Already made, comes with the mod
2 - Already made, comes with the mod
3 - Not yet possible EDIT: I could make a program that makes a turtle place down TNT and then place down a redstone torch next to it, but I can't make the turtle itself explode.
4 - Not yet possible
5 - I can't make games, sorry… :/
6 - What?
7 - Colors not yet possible THROUGH CODE, but you can customize them in the C:/Users/[YourUsername]/AppData/Roaming/.minecraft/config/mod_ComputerCraft.cfg file.
As for a GUI, do you mean a GUI with clickable buttons? That's not yet possible.
1.An Advanced one,OK?
2.An Advanced one,OK?
3.Do That!
4.Why?
5.Recommend Me Some People,Then.
6.Nah,It is impossible.What about a app like rednet,but uses names instead of IDs?(You can let me type in ID in a log and then a name and use the name to connect to that ID.)
7.Teach me to change colors!
GUI can be text based.

EDIT:also,For the Phone number generator,I would like to tell you the Phone number format of Hong Kong,Where I Live in,Would You Like That?
Duh,With the new Advaaaaaaaanced computer it is possible
fixerpro #35
Posted 13 November 2012 - 03:50 PM
Strip mining: Mining in large quantities at once, such as clearing a hole chunk away.
Well, maybe strip mining isnt what i want. Branch mining should do it.
Branch Mining: Digging 1x1x7 "branches" along a main shaft. Try looking it up on the wiki.

Also, from previous videos, i've seen a block where the turtle will drop it's items in it and continue mining. Is this another mod?
probably is RedPower or BuildCraft
i havnt seen any other mod that has that kind of block,describe what it looked like adn ill see what mod it is
dave400100 #36
Posted 10 December 2012 - 03:36 PM
Request-A-Program

I am a noob at code if you could make me a code. That my mining turtle to make cobble platforms in skyblock for me. Plzz help me