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

Custom Command Turtles

Started by Bindre12, 04 December 2012 - 06:27 AM
Bindre12 #1
Posted 04 December 2012 - 07:27 AM
Custom Command Turtle OS Beta v2.3

Wirelessly control your army of Turtles, much like you control Steve in Minecraft






This project may be kinda "Noobish" but I made this program to learn the Lua Language and decided to post it to see what you guys think.

- Must have a Computer (Basic or Advanced), Modem on the computer, and a wireless Digging, Farming, Felling, Mining, and Basic Turtles

- You select a Turtle by using keys 1-5, and move the selected Turtle using w a s d keys.
- The Turtles can Dig, place items, cut trees, farm and more.

- Program Mode is for the current selected Turtle, in order to select a different turtle exit Program Mode
- Currently no refuel function (Working on that)
- There Might be some bugs (Like I said still learning the language) if you find some let me know and i will do my best to fix them.

Also if you have tricks or a way to make my code better let me know, like to see what I can add or change to make it non Noobish :)/>

Used the Tunnel and Excavate programs from ComputerCraft itself in the code for the turtles




Future Additions:

Fixing so it wont matter which side the modem is on the computer

Refuel Function

Add Basic Turtle and functions

Make Program Mode more user friendly

Make help screen easier to read


Downloads:

Spoiler

Program (for computer and turtles) and info file





Code:

Spoiler

Computer



Basic Turtle



Digger Turtle



Farmer Turtle



Logger Turtle



Miner Turtle




Change Log

Spoiler

(1.0 wasn't released - it was my first attempt at Lua)


2.0

- Initial release


2.1

- added Basic Turtles and Functions

- Made Program Mode and the Help Screen easier to read and use


2.2

- Nothing new just cleaned up code

- Having problems with Refuel commands

(refuel turtles manually until further notice)


2.3

- Fixed so you can put the modem on any side of the computer (Thanks Dlcruz129)

- Fixed a derp in the 'wait for rednet message code' in the computer



Enjoy!
Dlcruz129 #2
Posted 04 December 2012 - 02:25 PM
Very nice for a first post!
Bindre12 #3
Posted 05 December 2012 - 05:07 AM
Thanks
billbertking1 #4
Posted 05 December 2012 - 08:46 AM
How do I turn on the wireless modem? I've been searching everywhere, but no luck… :(/>
Bindre12 #5
Posted 05 December 2012 - 08:51 AM
in this program, the modem has to be on top of the computer (fixing so it won't matter)

Edit - Fixed so now it doesn't matter
Bindre12 #6
Posted 11 December 2012 - 10:18 AM
Updated to 2.2
- Not much of an update just cleaned it up
- Having problems with refuel command
- So manually refuel your turtles for now
Dlcruz129 #7
Posted 11 December 2012 - 03:32 PM
for i,v in pairs(rs.getSides()) do
rednet.open(v)
end
That opens all modems on the computer. Warning: Untested and typed on my iPhone, let me know if I derped something up.
Bindre12 #8
Posted 11 December 2012 - 07:05 PM
Thanks, worked great
Much better then a bunch of if-then statements i was planning to use
Bindre12 #9
Posted 18 December 2012 - 06:08 AM
Updated to 2.3
- Fixed so you can put the modem on any side of the computer
- Fixed a derp in the 'wait for rednet message code' in the computer
alaphwolf #10
Posted 10 January 2013 - 01:26 AM
Looks neat, can't wait to try it out.

As to the refueling issue, I don't know how to code the problem out but if you use miscperfs then you can simply make an RTG(?the nuclear one?) turtel, put in some uranium and the thing will fuel itself over the next 14 hours….it gains a small amount per tick but it adds up quickly.

cheers
Heracles421 #11
Posted 10 January 2013 - 03:14 AM
Looks neat, can't wait to try it out.

As to the refueling issue, I don't know how to code the problem out but if you use miscperfs then you can simply make an RTG(?the nuclear one?) turtel, put in some uranium and the thing will fuel itself over the next 14 hours….it gains a small amount per tick but it adds up quickly.

cheers

Well, the refuel is way to simple, ask me if you want me to give you an example on how to use it
nutcase84 #12
Posted 10 January 2013 - 05:35 AM
Very nice for your first program! Good job!
anonimo182 #13
Posted 10 January 2013 - 06:32 AM
Nice first program!