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

My little scripter

Started by libraryaddict, 13 June 2012 - 05:32 AM
libraryaddict #1
Posted 13 June 2012 - 07:32 AM
Basically you wanted to make a turtle program which does this and that?
You wanted it to construct a bunker of might?
But you didn't want some stupid coding..

Presenting the answer!

http://pastebin.com/1QsKMhkv - 0.1
http://pastebin.com/sTuB50jU - 0.2

To use this just type "ProgramName Script"
ProgramName = Whatever you called it
Script = Your script file.

You make the script like this!


move forwards
move forwards
move back
move up 5 (This repeats it 5 times)
move down 5
dig up
dig down
dig forwards
select 6
place forwards

You get the idea.

This does not however have a few turtle functions.

What this can do

move: up, down, forwards, back
dig: up, down, forwards
place: up, down, forwards
select: slot number
print: <stuff here>

Now featuring repetition!
Just add a space and a number to the end of the script!
Eg. move up 30

Print can not be repeated!

And it has some checking incase you derp up your script D:

Changelog

- Added repeating a command
- Added print command
Mtdj2 #2
Posted 13 June 2012 - 11:38 AM
Im sorry, "Little"? That is awesome! Would make scripting easier. And checking? Also awesome!

i give you 5 :(/>/> :)/>/> -_-/>/> -_-/>/> -_-/>/>
(You can replace the smileys with diamonds.)
libraryaddict #3
Posted 13 June 2012 - 01:23 PM
Eh. I'm a bit weird and I wanted it to sound like "My little pony" >.>
Dirkus7 #4
Posted 13 June 2012 - 02:46 PM
Looks nice!
You should add move left and right to it :(/>/>
and maybe print?
MysticT #5
Posted 13 June 2012 - 05:39 PM
Nice work. One suggestion:
You could add a "parameter" to the commands (like the direction) to repeat them. Something like:

move forward 5
and it moves 5 blocks forward.
It would make scripts easier and shorter.
libraryaddict #6
Posted 13 June 2012 - 11:39 PM
Looks nice!
You should add move left and right to it :(/>/>
and maybe print?

Good idea about the print, Im not that sure about the move left/right..
That would be too confusing for the scripter after a while.


Nice work. One suggestion:
You could add a "parameter" to the commands (like the direction) to repeat them. Something like:

move forward 5
and it moves 5 blocks forward.
It would make scripts easier and shorter.

Rightyo. Ill add that
libraryaddict #7
Posted 14 June 2012 - 12:20 AM
Ok dokey. Added both of them.
Please report any bugs
kazagistar #8
Posted 18 June 2012 - 04:04 PM
Are you trying to create an automated version of the shell? Why not just make a program that calls shell.run on every line of your script file? That way, you can add more functions just by adding in new programs.
libraryaddict #9
Posted 19 June 2012 - 06:31 AM
Are you trying to create an automated version of the shell? Why not just make a program that calls shell.run on every line of your script file? That way, you can add more functions just by adding in new programs.

I could run it as a shell, however there is just one big problem.
It would just make the coding look worse :

As it is, It checks the file to see if its legit. Then it runs it.
What can your suggestion do that this doesn't do as good?